UNPKG

yanzhen-design-vue

Version:

34 lines (33 loc) 990 B
import { buildProps, definePropType, buildEmits } from "@yanzhen-libs/utils-vue"; import "../../../hooks/index.mjs"; import { anyType } from "ant-design-vue/es/_util/type"; import { uploadProps, uploadEmits } from "./upload.mjs"; import { useNamespace } from "../../../hooks/use-namespace/index.mjs"; const previewGroupProps = () => { return buildProps({ previewPrefixCls: definePropType(String), preview: definePropType(anyType()) }); }; const ns = useNamespace("upload-image-preview"); const uploadImagePreviewOptions = { ns, class: ns.b(), name: ns.defineVNodeName() }; const uploadImagePreviewName = uploadImagePreviewOptions.name; const uploadImagePreviewProps = buildProps({ ...uploadProps, ...previewGroupProps(), fileList: uploadProps["fileList"] }); const uploadImagePreviewEmits = buildEmits({ ...uploadEmits, close: () => true }); export { uploadImagePreviewEmits, uploadImagePreviewName, uploadImagePreviewOptions, uploadImagePreviewProps };