UNPKG

yanzhen-design-vue

Version:

27 lines (26 loc) 853 B
import { defineAsyncComponent } from "vue"; import { defineComponent, withInstall } from "@yanzhen-lowcode/core"; import "../text-preview/index.mjs"; import { imageProps, imageEmits } from "./src/image.mjs"; import { defineTextPreviewComponent, YzSchemaTextPreview } from "../text-preview/schema.mjs"; const SchemaImageOptions = { props: imageProps, emits: imageEmits }; const PreviewImage = defineTextPreviewComponent("preview-image", { ...SchemaImageOptions, component: YzSchemaTextPreview.component }); const Image = defineComponent("image", { ...SchemaImageOptions, component: defineAsyncComponent(() => import("./src/image.vue.mjs")) }); const YzSchemaImage = withInstall(Image, { PreviewImage }); const YzSchemaPreviewImage = withInstall(PreviewImage); export { YzSchemaImage, YzSchemaPreviewImage, YzSchemaImage as default };