UNPKG

yanzhen-design-vue

Version:

43 lines (42 loc) 1.06 kB
import { propsSeparate, epPropType, buildProps, buildEmits } from "@yanzhen-libs/utils-vue"; import antInputProps from "ant-design-vue/es/input/inputProps"; import "../../../hooks/index.mjs"; import { useNamespace } from "../../../hooks/use-namespace/index.mjs"; const ns = useNamespace("input"); const inputOptions = { ns, class: ns.b(), name: ns.defineVNodeName() }; const inputName = inputOptions.name; const inputPreviewName = ns.defineVNodeName("preview"); const AntInput = propsSeparate({ ...antInputProps(), inputElement: epPropType.any, addonBefore: epPropType.any, addonAfter: epPropType.any, prefix: epPropType.any, suffix: epPropType.any, clearIcon: epPropType.any }); const inputProps = buildProps({ ...AntInput.props, type: { type: String, values: ["text", "textarea", "number"], default: "text" }, dataSource: String, columnBizType: String }); const inputEmits = buildEmits({ ...AntInput.emits }); export { AntInput, inputEmits, inputName, inputOptions, inputPreviewName, inputProps };