@deskhero/dh_ui 1.48.1 → 1.48.3
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 +25 -17
- package/dist/dh_ui.umd.js +1 -1
- package/dist/src/components/InputGroup.vue.d.ts +5 -0
- package/dist/style.css +1 -1
- package/package.json +1 -1
package/dist/dh_ui.es.js
CHANGED
|
@@ -24896,10 +24896,14 @@ const _sfc_main$c = {
|
|
|
24896
24896
|
};
|
|
24897
24897
|
var InputGroup_vue_vue_type_style_index_0_lang = "";
|
|
24898
24898
|
const _hoisted_1$b = { class: "input__group" };
|
|
24899
|
-
const _hoisted_2$b = ["placeholder", "type"];
|
|
24899
|
+
const _hoisted_2$b = ["placeholder", "type", "value"];
|
|
24900
24900
|
const _sfc_main$b = {
|
|
24901
24901
|
__name: "InputGroup",
|
|
24902
24902
|
props: {
|
|
24903
|
+
modelValue: {
|
|
24904
|
+
type: [String, Number],
|
|
24905
|
+
default: ""
|
|
24906
|
+
},
|
|
24903
24907
|
inputType: {
|
|
24904
24908
|
type: String,
|
|
24905
24909
|
default: "text"
|
|
@@ -24925,12 +24929,13 @@ const _sfc_main$b = {
|
|
|
24925
24929
|
default: "type here"
|
|
24926
24930
|
}
|
|
24927
24931
|
},
|
|
24932
|
+
emits: ["update:modelValue"],
|
|
24928
24933
|
setup(__props) {
|
|
24929
24934
|
const props = __props;
|
|
24930
24935
|
useCssVars((_ctx) => ({
|
|
24931
|
-
"
|
|
24932
|
-
"
|
|
24933
|
-
"
|
|
24936
|
+
"9bbc973e": flexDir.value,
|
|
24937
|
+
"17a45996": __props.widthProp,
|
|
24938
|
+
"d5af8106": __props.heightProp
|
|
24934
24939
|
}));
|
|
24935
24940
|
const flexDir = ref("row");
|
|
24936
24941
|
onMounted(() => {
|
|
@@ -24943,8 +24948,10 @@ const _sfc_main$b = {
|
|
|
24943
24948
|
createElementVNode("input", {
|
|
24944
24949
|
class: "input__group_field",
|
|
24945
24950
|
placeholder: __props.placeholder,
|
|
24946
|
-
type: __props.inputType
|
|
24947
|
-
|
|
24951
|
+
type: __props.inputType,
|
|
24952
|
+
value: __props.modelValue,
|
|
24953
|
+
onInput: _cache[0] || (_cache[0] = ($event) => _ctx.$emit("update:modelValue", $event.target.value))
|
|
24954
|
+
}, null, 40, _hoisted_2$b),
|
|
24948
24955
|
createVNode(DhIcon, {
|
|
24949
24956
|
class: "input__group_icon",
|
|
24950
24957
|
"icon-name": __props.iconName
|
|
@@ -27149,7 +27156,7 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
|
|
|
27149
27156
|
}
|
|
27150
27157
|
script.render = render;
|
|
27151
27158
|
script.__file = "src/Multiselect.vue";
|
|
27152
|
-
var
|
|
27159
|
+
var default_css_vue_type_style_index_0_src_766265f0_lang = "";
|
|
27153
27160
|
var InputList_vue_vue_type_style_index_1_lang = "";
|
|
27154
27161
|
const _hoisted_1$9 = /* @__PURE__ */ createElementVNode("img", {
|
|
27155
27162
|
alt: "",
|
|
@@ -27186,24 +27193,25 @@ const _sfc_main$a = {
|
|
|
27186
27193
|
setup(__props, { emit }) {
|
|
27187
27194
|
const props = __props;
|
|
27188
27195
|
useCssVars((_ctx) => ({
|
|
27189
|
-
"
|
|
27196
|
+
"2c3afb11": __props.maxHeight
|
|
27190
27197
|
}));
|
|
27191
|
-
const inputVal = ref(
|
|
27198
|
+
const inputVal = ref([]);
|
|
27192
27199
|
function update() {
|
|
27193
27200
|
emit("update", inputVal.value);
|
|
27194
27201
|
}
|
|
27195
|
-
watch(() => props.selectItems, (
|
|
27196
|
-
if (!
|
|
27202
|
+
watch(() => props.selectItems, (oldValue, newValue) => {
|
|
27203
|
+
if (!oldValue) {
|
|
27197
27204
|
return;
|
|
27198
27205
|
}
|
|
27199
|
-
|
|
27200
|
-
|
|
27201
|
-
inputVal.value =
|
|
27202
|
-
} else {
|
|
27203
|
-
const selectedItems = props.list.filter((item) => value == item.value);
|
|
27204
|
-
inputVal.value = [...inputVal.value, ...selectedItems];
|
|
27206
|
+
const selected = props.list.filter((item) => oldValue.includes(item[props.idProp]));
|
|
27207
|
+
if (JSON.stringify(selected) !== JSON.stringify(inputVal.value)) {
|
|
27208
|
+
inputVal.value = [...inputVal.value, ...selected];
|
|
27205
27209
|
inputVal.value = [...new Set(inputVal.value)];
|
|
27206
27210
|
}
|
|
27211
|
+
if (newValue.length > oldValue.length) {
|
|
27212
|
+
const difference = newValue.filter((x2) => !oldValue.includes(x2));
|
|
27213
|
+
inputVal.value = inputVal.value.filter((item) => !difference.includes(item[props.idProp]));
|
|
27214
|
+
}
|
|
27207
27215
|
});
|
|
27208
27216
|
return (_ctx, _cache) => {
|
|
27209
27217
|
return openBlock(), createElementBlock(Fragment, null, [
|