layui/.svn/pristine/55/55220c9adbba5500f5b70ca27fb95ddbd870a005.svn-base
2022-12-09 16:41:41 +08:00

27 lines
470 B
Plaintext

<script lang="ts">
export default {
name: "Title",
};
</script>
<script lang="ts" setup>
export interface HeaderProps {
title: string | boolean | Function;
}
const renderContent = function (content: any) {
if (typeof content === "function") {
return content();
}
return content;
};
const props = defineProps<HeaderProps>();
</script>
<template>
<div class="layui-layer-title" style="cursor: move">
{{ renderContent(title) }}
</div>
</template>