yanzhen-design-vue
Version:
41 lines (40 loc) • 1.73 kB
JavaScript
;
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
const vue = require("vue");
const antDesignVue = require("ant-design-vue");
const useCascader = require("./use-cascader.cjs");
const cascader = require("./cascader.cjs");
const _sfc_main = /* @__PURE__ */ vue.defineComponent({
...{ name: cascader.cascaderName },
__name: "cascader",
props: cascader.cascaderProps,
emits: cascader.cascaderEmits,
setup(__props, { expose: __expose, emit: __emit }) {
const { ns } = cascader.cascaderOptions;
const props = __props;
const emit = __emit;
const [
{ _ref, modelValue, propsRef, optionsRef, handleChange, handleVisibleChange, handleLoadData }
] = useCascader.useCascader(props, emit);
__expose({
/** @description button html element */
ref: _ref
});
return (_ctx, _cache) => {
return vue.openBlock(), vue.createBlock(vue.unref(antDesignVue.Cascader), vue.mergeProps({
ref_key: "_ref",
ref: _ref
}, vue.unref(propsRef), {
value: vue.unref(modelValue),
"onUpdate:value": _cache[0] || (_cache[0] = ($event) => vue.isRef(modelValue) ? modelValue.value = $event : null),
"field-names": { label: props.labelKey, value: props.valueKey, children: props.childrenKey },
options: vue.unref(optionsRef),
class: [vue.unref(ns).b()],
"load-data": vue.unref(handleLoadData),
onChange: vue.unref(handleChange),
onDropdownVisibleChange: vue.unref(handleVisibleChange)
}), null, 16, ["value", "field-names", "options", "class", "load-data", "onChange", "onDropdownVisibleChange"]);
};
}
});
exports.default = _sfc_main;