zartui 3.1.67 → 3.1.68
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/es/index.d.ts +1 -1
- package/es/index.mjs +1 -1
- package/es/multiple-picker/MultiplePicker.d.ts +22 -22
- package/es/multiple-picker/MultiplePicker.mjs +48 -21
- package/es/multiple-picker/index.d.ts +2 -2
- package/lib/index.d.ts +1 -1
- package/lib/index.js +1 -1
- package/lib/multiple-picker/MultiplePicker.d.ts +22 -22
- package/lib/multiple-picker/MultiplePicker.js +48 -21
- package/lib/multiple-picker/index.d.ts +2 -2
- package/lib/web-types.json +1 -1
- package/lib/zartui.cjs.js +49 -22
- package/lib/zartui.es.js +49 -22
- package/lib/zartui.js +49 -22
- package/lib/zartui.min.js +1 -1
- package/package.json +4 -4
package/lib/zartui.cjs.js
CHANGED
|
@@ -16942,7 +16942,10 @@ const multiplePickerProps = {
|
|
|
16942
16942
|
showToolbar: truthProp,
|
|
16943
16943
|
showTitle: truthProp,
|
|
16944
16944
|
options: makeArrayProp(),
|
|
16945
|
-
filteredOptions:
|
|
16945
|
+
filteredOptions: {
|
|
16946
|
+
type: Array,
|
|
16947
|
+
default: void 0
|
|
16948
|
+
},
|
|
16946
16949
|
toolbarPosition: makeStringProp("bottom"),
|
|
16947
16950
|
textKey: makeStringProp("text"),
|
|
16948
16951
|
columnCounts: makeNumberProp(3),
|
|
@@ -16966,7 +16969,7 @@ var stdin_default$A = vue.defineComponent({
|
|
|
16966
16969
|
const confirmIndexes = vue.ref(props.selectedIndex);
|
|
16967
16970
|
const confirmValues = vue.ref(props.selectedValue);
|
|
16968
16971
|
const displayOptions = vue.computed(() => {
|
|
16969
|
-
return props.filteredOptions
|
|
16972
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
16970
16973
|
});
|
|
16971
16974
|
const displaySelectedIndexes = vue.computed(() => {
|
|
16972
16975
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -17064,11 +17067,13 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17064
17067
|
if (newValue !== props.showPicker) {
|
|
17065
17068
|
emit("update:showPicker", newValue);
|
|
17066
17069
|
}
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17070
|
-
|
|
17071
|
-
|
|
17070
|
+
if (newValue) {
|
|
17071
|
+
currentOptions2.value = deepClone(props.options);
|
|
17072
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
17073
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
17074
|
+
getIndexesByValues();
|
|
17075
|
+
updateAllSelectedOptions();
|
|
17076
|
+
}
|
|
17072
17077
|
});
|
|
17073
17078
|
vue.watch(() => props.showPicker, (newValue) => {
|
|
17074
17079
|
var _a;
|
|
@@ -17194,65 +17199,87 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17194
17199
|
const handleSelectAll = () => {
|
|
17195
17200
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17196
17201
|
confirmIndexes.value = [];
|
|
17202
|
+
confirmValues.value = [];
|
|
17203
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17204
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17197
17205
|
updateAllSelectedOptions();
|
|
17206
|
+
onChange();
|
|
17198
17207
|
return;
|
|
17199
17208
|
}
|
|
17209
|
+
let newIndexes = [];
|
|
17200
17210
|
if (!isAllSelected.value) {
|
|
17201
17211
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17202
|
-
const selectedIndexes = [];
|
|
17203
17212
|
displayOptions.value.forEach((option2) => {
|
|
17204
17213
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17205
17214
|
if (originalIndex >= 0) {
|
|
17206
|
-
|
|
17215
|
+
newIndexes.push(originalIndex);
|
|
17207
17216
|
}
|
|
17208
17217
|
});
|
|
17209
|
-
confirmIndexes.value = selectedIndexes;
|
|
17210
17218
|
} else {
|
|
17211
|
-
|
|
17219
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
17212
17220
|
}
|
|
17213
17221
|
} else {
|
|
17214
|
-
|
|
17222
|
+
newIndexes = [];
|
|
17215
17223
|
}
|
|
17224
|
+
confirmIndexes.value = newIndexes;
|
|
17225
|
+
if (confirmIndexes.value.length > 0) {
|
|
17226
|
+
getValuesByIndexes();
|
|
17227
|
+
} else {
|
|
17228
|
+
confirmValues.value = [];
|
|
17229
|
+
}
|
|
17230
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17231
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17216
17232
|
updateAllSelectedOptions();
|
|
17233
|
+
onChange();
|
|
17217
17234
|
};
|
|
17218
17235
|
const onSelectOther = () => {
|
|
17219
17236
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17220
17237
|
confirmIndexes.value = [];
|
|
17238
|
+
confirmValues.value = [];
|
|
17239
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17240
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17221
17241
|
updateAllSelectedOptions();
|
|
17242
|
+
onChange();
|
|
17222
17243
|
return;
|
|
17223
17244
|
}
|
|
17245
|
+
let newIndexes = [];
|
|
17224
17246
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17225
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
17226
17247
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
17227
17248
|
confirmIndexes.value.forEach((idx) => {
|
|
17228
17249
|
var _a;
|
|
17229
17250
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
17230
17251
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
17231
|
-
|
|
17252
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
17253
|
+
if (isInFilteredList) {
|
|
17232
17254
|
currentSelectedInFiltered.add(idx);
|
|
17233
17255
|
}
|
|
17234
17256
|
}
|
|
17235
17257
|
});
|
|
17236
|
-
const newSelectedIndexes = [];
|
|
17237
17258
|
displayOptions.value.forEach((option2) => {
|
|
17238
17259
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17239
17260
|
if (originalIndex >= 0) {
|
|
17240
17261
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
17241
|
-
|
|
17262
|
+
newIndexes.push(originalIndex);
|
|
17242
17263
|
}
|
|
17243
17264
|
}
|
|
17244
17265
|
});
|
|
17245
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
17246
17266
|
} else {
|
|
17247
|
-
const temp = new Array();
|
|
17248
17267
|
currentOptions2.value.forEach((_, index2) => {
|
|
17249
17268
|
if (!confirmIndexes.value.includes(index2)) {
|
|
17250
|
-
|
|
17269
|
+
newIndexes.push(index2);
|
|
17251
17270
|
}
|
|
17252
17271
|
});
|
|
17253
|
-
confirmIndexes.value = temp;
|
|
17254
17272
|
}
|
|
17273
|
+
confirmIndexes.value = newIndexes;
|
|
17274
|
+
if (confirmIndexes.value.length > 0) {
|
|
17275
|
+
getValuesByIndexes();
|
|
17276
|
+
} else {
|
|
17277
|
+
confirmValues.value = [];
|
|
17278
|
+
}
|
|
17279
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17280
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17255
17281
|
updateAllSelectedOptions();
|
|
17282
|
+
onChange();
|
|
17256
17283
|
};
|
|
17257
17284
|
const genOptionItems = () => {
|
|
17258
17285
|
let formatOptions = [];
|
|
@@ -17267,7 +17294,7 @@ var stdin_default$A = vue.defineComponent({
|
|
|
17267
17294
|
return vue.createVNode(stdin_default$B, {
|
|
17268
17295
|
"ref": pickerOptions,
|
|
17269
17296
|
"currentIndexes": displaySelectedIndexes.value,
|
|
17270
|
-
"onUpdate:currentIndexes":
|
|
17297
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
17271
17298
|
"columnCounts": props.columnCounts,
|
|
17272
17299
|
"initialOptions": formatOptions,
|
|
17273
17300
|
"allowHtml": props.allowHtml,
|
|
@@ -23381,7 +23408,7 @@ const Lazyload = {
|
|
|
23381
23408
|
});
|
|
23382
23409
|
}
|
|
23383
23410
|
};
|
|
23384
|
-
const version = "3.1.
|
|
23411
|
+
const version = "3.1.68";
|
|
23385
23412
|
function install(app) {
|
|
23386
23413
|
const components = [
|
|
23387
23414
|
ActionSheet,
|
package/lib/zartui.es.js
CHANGED
|
@@ -16940,7 +16940,10 @@ const multiplePickerProps = {
|
|
|
16940
16940
|
showToolbar: truthProp,
|
|
16941
16941
|
showTitle: truthProp,
|
|
16942
16942
|
options: makeArrayProp(),
|
|
16943
|
-
filteredOptions:
|
|
16943
|
+
filteredOptions: {
|
|
16944
|
+
type: Array,
|
|
16945
|
+
default: void 0
|
|
16946
|
+
},
|
|
16944
16947
|
toolbarPosition: makeStringProp("bottom"),
|
|
16945
16948
|
textKey: makeStringProp("text"),
|
|
16946
16949
|
columnCounts: makeNumberProp(3),
|
|
@@ -16964,7 +16967,7 @@ var stdin_default$A = defineComponent({
|
|
|
16964
16967
|
const confirmIndexes = ref(props.selectedIndex);
|
|
16965
16968
|
const confirmValues = ref(props.selectedValue);
|
|
16966
16969
|
const displayOptions = computed(() => {
|
|
16967
|
-
return props.filteredOptions
|
|
16970
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
16968
16971
|
});
|
|
16969
16972
|
const displaySelectedIndexes = computed(() => {
|
|
16970
16973
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -17062,11 +17065,13 @@ var stdin_default$A = defineComponent({
|
|
|
17062
17065
|
if (newValue !== props.showPicker) {
|
|
17063
17066
|
emit("update:showPicker", newValue);
|
|
17064
17067
|
}
|
|
17065
|
-
|
|
17066
|
-
|
|
17067
|
-
|
|
17068
|
-
|
|
17069
|
-
|
|
17068
|
+
if (newValue) {
|
|
17069
|
+
currentOptions2.value = deepClone(props.options);
|
|
17070
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
17071
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
17072
|
+
getIndexesByValues();
|
|
17073
|
+
updateAllSelectedOptions();
|
|
17074
|
+
}
|
|
17070
17075
|
});
|
|
17071
17076
|
watch(() => props.showPicker, (newValue) => {
|
|
17072
17077
|
var _a;
|
|
@@ -17192,65 +17197,87 @@ var stdin_default$A = defineComponent({
|
|
|
17192
17197
|
const handleSelectAll = () => {
|
|
17193
17198
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17194
17199
|
confirmIndexes.value = [];
|
|
17200
|
+
confirmValues.value = [];
|
|
17201
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17202
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17195
17203
|
updateAllSelectedOptions();
|
|
17204
|
+
onChange();
|
|
17196
17205
|
return;
|
|
17197
17206
|
}
|
|
17207
|
+
let newIndexes = [];
|
|
17198
17208
|
if (!isAllSelected.value) {
|
|
17199
17209
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17200
|
-
const selectedIndexes = [];
|
|
17201
17210
|
displayOptions.value.forEach((option2) => {
|
|
17202
17211
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17203
17212
|
if (originalIndex >= 0) {
|
|
17204
|
-
|
|
17213
|
+
newIndexes.push(originalIndex);
|
|
17205
17214
|
}
|
|
17206
17215
|
});
|
|
17207
|
-
confirmIndexes.value = selectedIndexes;
|
|
17208
17216
|
} else {
|
|
17209
|
-
|
|
17217
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
17210
17218
|
}
|
|
17211
17219
|
} else {
|
|
17212
|
-
|
|
17220
|
+
newIndexes = [];
|
|
17213
17221
|
}
|
|
17222
|
+
confirmIndexes.value = newIndexes;
|
|
17223
|
+
if (confirmIndexes.value.length > 0) {
|
|
17224
|
+
getValuesByIndexes();
|
|
17225
|
+
} else {
|
|
17226
|
+
confirmValues.value = [];
|
|
17227
|
+
}
|
|
17228
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17229
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17214
17230
|
updateAllSelectedOptions();
|
|
17231
|
+
onChange();
|
|
17215
17232
|
};
|
|
17216
17233
|
const onSelectOther = () => {
|
|
17217
17234
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
17218
17235
|
confirmIndexes.value = [];
|
|
17236
|
+
confirmValues.value = [];
|
|
17237
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17238
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17219
17239
|
updateAllSelectedOptions();
|
|
17240
|
+
onChange();
|
|
17220
17241
|
return;
|
|
17221
17242
|
}
|
|
17243
|
+
let newIndexes = [];
|
|
17222
17244
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
17223
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
17224
17245
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
17225
17246
|
confirmIndexes.value.forEach((idx) => {
|
|
17226
17247
|
var _a;
|
|
17227
17248
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
17228
17249
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
17229
|
-
|
|
17250
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
17251
|
+
if (isInFilteredList) {
|
|
17230
17252
|
currentSelectedInFiltered.add(idx);
|
|
17231
17253
|
}
|
|
17232
17254
|
}
|
|
17233
17255
|
});
|
|
17234
|
-
const newSelectedIndexes = [];
|
|
17235
17256
|
displayOptions.value.forEach((option2) => {
|
|
17236
17257
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option2.value);
|
|
17237
17258
|
if (originalIndex >= 0) {
|
|
17238
17259
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
17239
|
-
|
|
17260
|
+
newIndexes.push(originalIndex);
|
|
17240
17261
|
}
|
|
17241
17262
|
}
|
|
17242
17263
|
});
|
|
17243
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
17244
17264
|
} else {
|
|
17245
|
-
const temp = new Array();
|
|
17246
17265
|
currentOptions2.value.forEach((_, index2) => {
|
|
17247
17266
|
if (!confirmIndexes.value.includes(index2)) {
|
|
17248
|
-
|
|
17267
|
+
newIndexes.push(index2);
|
|
17249
17268
|
}
|
|
17250
17269
|
});
|
|
17251
|
-
confirmIndexes.value = temp;
|
|
17252
17270
|
}
|
|
17271
|
+
confirmIndexes.value = newIndexes;
|
|
17272
|
+
if (confirmIndexes.value.length > 0) {
|
|
17273
|
+
getValuesByIndexes();
|
|
17274
|
+
} else {
|
|
17275
|
+
confirmValues.value = [];
|
|
17276
|
+
}
|
|
17277
|
+
emit("update:selectedValue", confirmValues.value);
|
|
17278
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
17253
17279
|
updateAllSelectedOptions();
|
|
17280
|
+
onChange();
|
|
17254
17281
|
};
|
|
17255
17282
|
const genOptionItems = () => {
|
|
17256
17283
|
let formatOptions = [];
|
|
@@ -17265,7 +17292,7 @@ var stdin_default$A = defineComponent({
|
|
|
17265
17292
|
return createVNode(stdin_default$B, {
|
|
17266
17293
|
"ref": pickerOptions,
|
|
17267
17294
|
"currentIndexes": displaySelectedIndexes.value,
|
|
17268
|
-
"onUpdate:currentIndexes":
|
|
17295
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
17269
17296
|
"columnCounts": props.columnCounts,
|
|
17270
17297
|
"initialOptions": formatOptions,
|
|
17271
17298
|
"allowHtml": props.allowHtml,
|
|
@@ -23379,7 +23406,7 @@ const Lazyload = {
|
|
|
23379
23406
|
});
|
|
23380
23407
|
}
|
|
23381
23408
|
};
|
|
23382
|
-
const version = "3.1.
|
|
23409
|
+
const version = "3.1.68";
|
|
23383
23410
|
function install(app) {
|
|
23384
23411
|
const components = [
|
|
23385
23412
|
ActionSheet,
|
package/lib/zartui.js
CHANGED
|
@@ -18718,7 +18718,10 @@
|
|
|
18718
18718
|
showToolbar: truthProp,
|
|
18719
18719
|
showTitle: truthProp,
|
|
18720
18720
|
options: makeArrayProp(),
|
|
18721
|
-
filteredOptions:
|
|
18721
|
+
filteredOptions: {
|
|
18722
|
+
type: Array,
|
|
18723
|
+
default: void 0
|
|
18724
|
+
},
|
|
18722
18725
|
toolbarPosition: makeStringProp("bottom"),
|
|
18723
18726
|
textKey: makeStringProp("text"),
|
|
18724
18727
|
columnCounts: makeNumberProp(3),
|
|
@@ -18742,7 +18745,7 @@
|
|
|
18742
18745
|
const confirmIndexes = vue.ref(props.selectedIndex);
|
|
18743
18746
|
const confirmValues = vue.ref(props.selectedValue);
|
|
18744
18747
|
const displayOptions = vue.computed(() => {
|
|
18745
|
-
return props.filteredOptions
|
|
18748
|
+
return props.filteredOptions !== void 0 ? props.filteredOptions : currentOptions2.value;
|
|
18746
18749
|
});
|
|
18747
18750
|
const displaySelectedIndexes = vue.computed(() => {
|
|
18748
18751
|
if (!props.filteredOptions || props.filteredOptions.length === 0) {
|
|
@@ -18840,11 +18843,13 @@
|
|
|
18840
18843
|
if (newValue !== props.showPicker) {
|
|
18841
18844
|
emit("update:showPicker", newValue);
|
|
18842
18845
|
}
|
|
18843
|
-
|
|
18844
|
-
|
|
18845
|
-
|
|
18846
|
-
|
|
18847
|
-
|
|
18846
|
+
if (newValue) {
|
|
18847
|
+
currentOptions2.value = deepClone(props.options);
|
|
18848
|
+
confirmIndexes.value = deepClone(currentSelectedIndex.value);
|
|
18849
|
+
confirmValues.value = deepClone(currentSelectedValue.value);
|
|
18850
|
+
getIndexesByValues();
|
|
18851
|
+
updateAllSelectedOptions();
|
|
18852
|
+
}
|
|
18848
18853
|
});
|
|
18849
18854
|
vue.watch(() => props.showPicker, (newValue) => {
|
|
18850
18855
|
var _a;
|
|
@@ -18970,65 +18975,87 @@
|
|
|
18970
18975
|
const handleSelectAll = () => {
|
|
18971
18976
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
18972
18977
|
confirmIndexes.value = [];
|
|
18978
|
+
confirmValues.value = [];
|
|
18979
|
+
emit("update:selectedValue", confirmValues.value);
|
|
18980
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18973
18981
|
updateAllSelectedOptions();
|
|
18982
|
+
onChange();
|
|
18974
18983
|
return;
|
|
18975
18984
|
}
|
|
18985
|
+
let newIndexes = [];
|
|
18976
18986
|
if (!isAllSelected.value) {
|
|
18977
18987
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
18978
|
-
const selectedIndexes = [];
|
|
18979
18988
|
displayOptions.value.forEach((option) => {
|
|
18980
18989
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option.value);
|
|
18981
18990
|
if (originalIndex >= 0) {
|
|
18982
|
-
|
|
18991
|
+
newIndexes.push(originalIndex);
|
|
18983
18992
|
}
|
|
18984
18993
|
});
|
|
18985
|
-
confirmIndexes.value = selectedIndexes;
|
|
18986
18994
|
} else {
|
|
18987
|
-
|
|
18995
|
+
newIndexes = currentOptions2.value.map((_, index2) => index2);
|
|
18988
18996
|
}
|
|
18989
18997
|
} else {
|
|
18990
|
-
|
|
18998
|
+
newIndexes = [];
|
|
18991
18999
|
}
|
|
19000
|
+
confirmIndexes.value = newIndexes;
|
|
19001
|
+
if (confirmIndexes.value.length > 0) {
|
|
19002
|
+
getValuesByIndexes();
|
|
19003
|
+
} else {
|
|
19004
|
+
confirmValues.value = [];
|
|
19005
|
+
}
|
|
19006
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19007
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18992
19008
|
updateAllSelectedOptions();
|
|
19009
|
+
onChange();
|
|
18993
19010
|
};
|
|
18994
19011
|
const onSelectOther = () => {
|
|
18995
19012
|
if (props.filteredOptions && props.filteredOptions.length === 0) {
|
|
18996
19013
|
confirmIndexes.value = [];
|
|
19014
|
+
confirmValues.value = [];
|
|
19015
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19016
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
18997
19017
|
updateAllSelectedOptions();
|
|
19018
|
+
onChange();
|
|
18998
19019
|
return;
|
|
18999
19020
|
}
|
|
19021
|
+
let newIndexes = [];
|
|
19000
19022
|
if (props.filteredOptions && props.filteredOptions.length > 0) {
|
|
19001
|
-
const filteredValues = new Set(displayOptions.value.map((opt) => opt.value));
|
|
19002
19023
|
const currentSelectedInFiltered = /* @__PURE__ */ new Set();
|
|
19003
19024
|
confirmIndexes.value.forEach((idx) => {
|
|
19004
19025
|
var _a;
|
|
19005
19026
|
if (idx >= 0 && idx < currentOptions2.value.length) {
|
|
19006
19027
|
const value = (_a = currentOptions2.value[idx]) == null ? void 0 : _a.value;
|
|
19007
|
-
|
|
19028
|
+
const isInFilteredList = displayOptions.value.some((opt) => opt.value === value);
|
|
19029
|
+
if (isInFilteredList) {
|
|
19008
19030
|
currentSelectedInFiltered.add(idx);
|
|
19009
19031
|
}
|
|
19010
19032
|
}
|
|
19011
19033
|
});
|
|
19012
|
-
const newSelectedIndexes = [];
|
|
19013
19034
|
displayOptions.value.forEach((option) => {
|
|
19014
19035
|
const originalIndex = currentOptions2.value.findIndex((opt) => opt.value === option.value);
|
|
19015
19036
|
if (originalIndex >= 0) {
|
|
19016
19037
|
if (!currentSelectedInFiltered.has(originalIndex)) {
|
|
19017
|
-
|
|
19038
|
+
newIndexes.push(originalIndex);
|
|
19018
19039
|
}
|
|
19019
19040
|
}
|
|
19020
19041
|
});
|
|
19021
|
-
confirmIndexes.value = newSelectedIndexes;
|
|
19022
19042
|
} else {
|
|
19023
|
-
const temp = new Array();
|
|
19024
19043
|
currentOptions2.value.forEach((_, index2) => {
|
|
19025
19044
|
if (!confirmIndexes.value.includes(index2)) {
|
|
19026
|
-
|
|
19045
|
+
newIndexes.push(index2);
|
|
19027
19046
|
}
|
|
19028
19047
|
});
|
|
19029
|
-
confirmIndexes.value = temp;
|
|
19030
19048
|
}
|
|
19049
|
+
confirmIndexes.value = newIndexes;
|
|
19050
|
+
if (confirmIndexes.value.length > 0) {
|
|
19051
|
+
getValuesByIndexes();
|
|
19052
|
+
} else {
|
|
19053
|
+
confirmValues.value = [];
|
|
19054
|
+
}
|
|
19055
|
+
emit("update:selectedValue", confirmValues.value);
|
|
19056
|
+
emit("update:selectedIndex", confirmIndexes.value);
|
|
19031
19057
|
updateAllSelectedOptions();
|
|
19058
|
+
onChange();
|
|
19032
19059
|
};
|
|
19033
19060
|
const genOptionItems = () => {
|
|
19034
19061
|
let formatOptions = [];
|
|
@@ -19043,7 +19070,7 @@
|
|
|
19043
19070
|
return vue.createVNode(stdin_default$B, {
|
|
19044
19071
|
"ref": pickerOptions,
|
|
19045
19072
|
"currentIndexes": displaySelectedIndexes.value,
|
|
19046
|
-
"onUpdate:currentIndexes":
|
|
19073
|
+
"onUpdate:currentIndexes": onUpdateCurrentIndexes,
|
|
19047
19074
|
"columnCounts": props.columnCounts,
|
|
19048
19075
|
"initialOptions": formatOptions,
|
|
19049
19076
|
"allowHtml": props.allowHtml,
|
|
@@ -27441,7 +27468,7 @@
|
|
|
27441
27468
|
});
|
|
27442
27469
|
}
|
|
27443
27470
|
};
|
|
27444
|
-
const version = "3.1.
|
|
27471
|
+
const version = "3.1.68";
|
|
27445
27472
|
function install(app) {
|
|
27446
27473
|
const components = [
|
|
27447
27474
|
ActionSheet,
|