UNPKG

@opensig/opendesign

Version:

<p align="center"><img src="../docs/public/opendesign-logo-light.png"/></p> <h1 align="center">opendesign</h1> <p align="center">一个 Vue 3 组件库</p> <p align="center"><b>皮肤可定制,使用 TypeScript</b></p>

56 lines (55 loc) 2.05 kB
"use strict"; const vue = require("vue"); const index = require("../select/index.js"); const OCascaderPanel_vue_vue_type_script_setup_true_lang = require("./OCascaderPanel.vue.js"); const types = require("./types.js"); const is = require("../_utils/is.js"); const _sfc_main = /* @__PURE__ */ vue.defineComponent({ __name: "OCascader", props: types.cascaderProps, emits: ["change", "update:modelValue"], setup(__props, { emit: __emit }) { const props = __props; const emits = __emit; const handleChange = (val) => { emits("change", val); emits("update:modelValue", val); }; const wrapClass = vue.computed(() => { const classStr = "o-cascader"; if (is.isUndefined(props.optionWrapClass)) { return classStr; } else if (is.isString(props.optionWrapClass)) { return `${classStr} ${props.optionWrapClass}`; } else { return [classStr, ...props.optionWrapClass].join(" "); } }); return (_ctx, _cache) => { return vue.openBlock(), vue.createBlock(vue.unref(index.OSelect), { "model-value": props.modelValue, round: props.round, variant: props.variant, placeholder: props.placeholder, triggre: props.trigger, "option-position": props.optionPosition, "option-width-mode": "auto", "unmount-on-hide": props.unmountOnHide, transition: props.transition, "option-wrap-class": wrapClass.value }, { default: vue.withCtx(() => [ vue.createVNode(OCascaderPanel_vue_vue_type_script_setup_true_lang, { options: props.options, "model-value": props.modelValue, "path-mode": props.pathMode, onChange: handleChange }, null, 8, ["options", "model-value", "path-mode"]) ]), _: 1 /* STABLE */ }, 8, ["model-value", "round", "variant", "placeholder", "triggre", "option-position", "unmount-on-hide", "transition", "option-wrap-class"]); }; } }); module.exports = _sfc_main;