UNPKG

yanzhen-design-vue

Version:

23 lines (22 loc) 740 B
import { defineAsyncComponent } from "vue"; import { defineComponent, withInstall } from "@yanzhen-lowcode/core"; import "../text-preview/index.mjs"; import { tagProps, tagEmits } from "./src/tag.mjs"; import { defineTextPreviewComponent } from "../text-preview/schema.mjs"; const SchemaTagOptions = { props: tagProps, emits: tagEmits }; const Tag = defineComponent("tag", { ...SchemaTagOptions, component: defineAsyncComponent(() => import("./src/tag.vue.mjs")) }); const PreviewTag = defineTextPreviewComponent("preview-tag", { ...SchemaTagOptions, component: defineAsyncComponent(() => import("./src/tag.vue.mjs")) }); const YzSchemaTag = withInstall(Tag, { PreviewTag }); export { YzSchemaTag, YzSchemaTag as default };