UNPKG

yanzhen-design-vue

Version:

28 lines (27 loc) 903 B
import { defineAsyncComponent } from "vue"; import { defineComponent, withInstall } from "@yanzhen-lowcode/core"; import "../text-preview/index.mjs"; import { inputProps, inputEmits } from "./src/input.mjs"; import { defineTextPreviewComponent, YzSchemaTextPreview } from "../text-preview/schema.mjs"; const SchemaInputOptions = { props: inputProps, emits: inputEmits }; const PreviewInput = defineTextPreviewComponent("preview-input", { ...SchemaInputOptions, component: YzSchemaTextPreview.component }); const Input = defineComponent("input", { ...SchemaInputOptions, styleImport: () => import("./style/index.mjs"), component: defineAsyncComponent(() => import("./src/input.vue.mjs")) }); const YzSchemaInput = withInstall(Input, { PreviewInput }); const YzSchemaPreviewInput = withInstall(PreviewInput); export { YzSchemaInput, YzSchemaPreviewInput, YzSchemaInput as default };