UNPKG

yanzhen-design-vue

Version:

37 lines (36 loc) 1.11 kB
"use strict"; Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" }); const utilsVue = require("@yanzhen-libs/utils-vue"); const antButtonTypes = require("ant-design-vue/es/button/buttonTypes"); require("../../../hooks/index.cjs"); const index = require("../../../hooks/use-namespace/index.cjs"); const ns = index.useNamespace("button"); const buttonOptions = { ns, class: ns.b(), name: ns.defineVNodeName() }; const buttonName = buttonOptions.name; const AntButton = utilsVue.propsSeparate(antButtonTypes()); const buttonTypes = ["default", "primary", "ghost", "dashed", "link", "text"]; const buttonProps = utilsVue.buildProps({ ...AntButton.props, // 扩展类型 text: { type: [String, Number], default: "" }, type: { type: utilsVue.definePropType(String), values: buttonTypes, default: buttonTypes[0] } }); const buttonEmits = utilsVue.buildEmits({ ...AntButton.emits }); exports.AntButton = AntButton; exports.buttonEmits = buttonEmits; exports.buttonName = buttonName; exports.buttonOptions = buttonOptions; exports.buttonProps = buttonProps;