@deskhero/dh_ui 1.44.5 → 1.44.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dh_ui.es.js +20 -3
- package/dist/dh_ui.umd.js +1 -1
- package/dist/src/components/InputList.vue.d.ts +4 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dh_ui.es.js
CHANGED
|
@@ -24841,7 +24841,6 @@ const _sfc_main$c = {
|
|
|
24841
24841
|
const props = __props;
|
|
24842
24842
|
const multiple = reactive(props.multipleProp);
|
|
24843
24843
|
function updateDropdown(name, email, index) {
|
|
24844
|
-
console.log(multiple);
|
|
24845
24844
|
if (multiple) {
|
|
24846
24845
|
multiple.map((item) => {
|
|
24847
24846
|
if (item.id === index) {
|
|
@@ -27138,7 +27137,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27138
27137
|
}
|
|
27139
27138
|
script.render = render;
|
|
27140
27139
|
script.__file = "src/Multiselect.vue";
|
|
27141
|
-
var
|
|
27140
|
+
var default_css_vue_type_style_index_0_src_70b3ed2d_lang = "";
|
|
27142
27141
|
var InputList_vue_vue_type_style_index_1_lang = "";
|
|
27143
27142
|
const _hoisted_1$9 = /* @__PURE__ */ createElementVNode("img", {
|
|
27144
27143
|
alt: "",
|
|
@@ -27165,17 +27164,35 @@ const _sfc_main$a = {
|
|
|
27165
27164
|
idProp: {
|
|
27166
27165
|
type: String,
|
|
27167
27166
|
default: "value"
|
|
27167
|
+
},
|
|
27168
|
+
selectItems: {
|
|
27169
|
+
type: Array,
|
|
27170
|
+
required: true
|
|
27168
27171
|
}
|
|
27169
27172
|
},
|
|
27170
27173
|
emits: ["update"],
|
|
27171
27174
|
setup(__props, { emit }) {
|
|
27175
|
+
const props = __props;
|
|
27172
27176
|
useCssVars((_ctx) => ({
|
|
27173
|
-
"
|
|
27177
|
+
"6af3e44c": __props.maxHeight
|
|
27174
27178
|
}));
|
|
27175
27179
|
const inputVal = ref(null);
|
|
27176
27180
|
function update() {
|
|
27177
27181
|
emit("update", inputVal.value);
|
|
27178
27182
|
}
|
|
27183
|
+
watch(() => props.selectItems, (value) => {
|
|
27184
|
+
if (!value) {
|
|
27185
|
+
return;
|
|
27186
|
+
}
|
|
27187
|
+
if (!inputVal.value) {
|
|
27188
|
+
const selectedItems = props.list.filter((item) => value == item.value);
|
|
27189
|
+
inputVal.value = selectedItems;
|
|
27190
|
+
} else {
|
|
27191
|
+
const selectedItems = props.list.filter((item) => value == item.value);
|
|
27192
|
+
inputVal.value = [...inputVal.value, ...selectedItems];
|
|
27193
|
+
inputVal.value = [...new Set(inputVal.value)];
|
|
27194
|
+
}
|
|
27195
|
+
});
|
|
27179
27196
|
return (_ctx, _cache) => {
|
|
27180
27197
|
return openBlock(), createElementBlock(Fragment, null, [
|
|
27181
27198
|
createVNode(unref(script), {
|