ideaz-element
Version:
<p align="center"> <a href="" target="_blank" rel="noopener noreferrer"> <img src="./docs/public/logo.svg" alt="Ideaz Element" width="180" style="width: 180px;" /> </a> </p>
61 lines (60 loc) • 1.99 kB
JavaScript
import { defineComponent as s, createVNode as c, mergeProps as f } from "vue";
import "../../../node_modules/.pnpm/lodash-unified@1.0.3_@types_lodash-es@4.17.12_lodash-es@4.17.21_lodash@4.17.21/node_modules/lodash-unified/import.mjs";
import "../../../utils/index.mjs";
import a from "./TagSelectItem.mjs";
import { tagSelectProps as V } from "./props.mjs";
import { useFormSize as g } from "../../../hooks/useFormSize.mjs";
import { isObject as h } from "../../../utils/is.mjs";
import S from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/get.mjs";
import z from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/set.mjs";
import C from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/cloneDeep.mjs";
import T from "../../../node_modules/.pnpm/lodash-es@4.17.21/node_modules/lodash-es/omit.mjs";
const O = /* @__PURE__ */ s({
name: "ZTagSelect",
components: {
TagSelectItem: a
},
props: V,
emits: ["update:modelValue", "change"],
setup(l, {
emit: t,
slots: m
}) {
const i = g();
return () => {
const {
options: r,
all: d,
titleWidth: u,
multiple: n,
alias: p
} = l;
return h(l.modelValue) ? r.map((e) => c(a, f({
modelValue: S(l.modelValue, e.field, ""),
"onUpdate:modelValue": (o) => t("update:modelValue", z(C(l.modelValue), e.field, o)),
size: i.value,
titleWidth: u,
multiple: n,
all: d,
alias: p,
options: e.children
}, T(e, "children"), {
onChange: (o) => t("change", o)
}), m)) : c(a, {
modelValue: l.modelValue,
"onUpdate:modelValue": (e) => t("update:modelValue", e),
size: i.value,
titleWidth: u,
multiple: n,
all: d,
alias: p,
options: r,
onChange: (e) => t("change", e)
}, m);
};
}
});
export {
O as default
};
//# sourceMappingURL=index.mjs.map