yanzhen-design-vue
Version:
49 lines (48 loc) • 1.53 kB
JavaScript
;
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
const utilsVue = require("@yanzhen-libs/utils-vue");
const _switch = require("ant-design-vue/es/switch");
const utils = require("@yanzhen-libs/utils");
require("../../../hooks/index.cjs");
const index = require("../../../hooks/use-namespace/index.cjs");
const ns = index.useNamespace("switch");
const switchOptions = {
ns,
class: ns.b(),
name: ns.defineVNodeName()
};
const switchName = switchOptions.name;
const AntSwitchProps = utilsVue.propsSeparate({
..._switch.switchProps(),
size: utilsVue.defineCommonPropType(["default", "small"], String),
checkedChildren: utilsVue.epPropType.any,
unCheckedChildren: utilsVue.epPropType.any,
tabindex: utilsVue.definePropType([String, Number]),
checked: utilsVue.definePropType([String, Number, Boolean]),
checkedValue: {
type: utilsVue.definePropType([String, Number, Boolean]),
default: true
},
unCheckedValue: {
type: utilsVue.definePropType([String, Number, Boolean]),
default: false
}
});
const switchProps = utilsVue.buildProps({
...AntSwitchProps.props,
value: AntSwitchProps.props["checked"],
activeColor: String
});
const switchEmits = utils.mergeWith(
{
...AntSwitchProps.emits
},
{
"update:value": AntSwitchProps.emits["update:checked"]
}
);
exports.AntSwitchProps = AntSwitchProps;
exports.switchEmits = switchEmits;
exports.switchName = switchName;
exports.switchOptions = switchOptions;
exports.switchProps = switchProps;