@v-c/select 1.1.3 → 1.1.4
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/BaseSelect/index.js +1 -1
- package/dist/Select.js +6 -4
- package/dist/SelectInput/Input.js +4 -2
- package/dist/SelectTrigger.js +1 -1
- package/package.json +4 -4
package/dist/BaseSelect/index.js
CHANGED
|
@@ -381,7 +381,7 @@ var BaseSelect = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
381
381
|
}, null), renderNode]);
|
|
382
382
|
};
|
|
383
383
|
}, {
|
|
384
|
-
props:
|
|
384
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
385
385
|
className: {
|
|
386
386
|
type: String,
|
|
387
387
|
required: false,
|
package/dist/Select.js
CHANGED
|
@@ -55,7 +55,7 @@ function isRawValue(value) {
|
|
|
55
55
|
return !value || typeof value !== "object";
|
|
56
56
|
}
|
|
57
57
|
var Select = /* @__PURE__ */ defineComponent({
|
|
58
|
-
props:
|
|
58
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
59
59
|
prefixCls: {
|
|
60
60
|
type: String,
|
|
61
61
|
required: false,
|
|
@@ -621,7 +621,8 @@ var Select = /* @__PURE__ */ defineComponent({
|
|
|
621
621
|
internalValue.value = val;
|
|
622
622
|
};
|
|
623
623
|
const [mergedValues, getMixedOption] = useCache(computed(() => {
|
|
624
|
-
const
|
|
624
|
+
const newInternalValue = multiple.value && internalValue.value === null ? [] : internalValue.value;
|
|
625
|
+
const values = convert2LabelValues(newInternalValue);
|
|
625
626
|
if (props.mode === "combobox" && isComboNoValue(values[0]?.value)) return [];
|
|
626
627
|
return values;
|
|
627
628
|
}), valueOptions);
|
|
@@ -751,7 +752,8 @@ var Select = /* @__PURE__ */ defineComponent({
|
|
|
751
752
|
setSearchValue("");
|
|
752
753
|
return;
|
|
753
754
|
}
|
|
754
|
-
|
|
755
|
+
const newRawValues = Array.from(/* @__PURE__ */ new Set([...rawValues.value, formatted]));
|
|
756
|
+
triggerChange(newRawValues);
|
|
755
757
|
triggerSelect(formatted, true);
|
|
756
758
|
setSearchValue("");
|
|
757
759
|
}
|
|
@@ -768,7 +770,7 @@ var Select = /* @__PURE__ */ defineComponent({
|
|
|
768
770
|
return labelOptions.value.get(word)?.[mergedFieldNames.value.value];
|
|
769
771
|
}).filter((val) => val !== void 0);
|
|
770
772
|
if (props.mode === "tags") patchValues = patchValues.filter((val) => !valueOptions.value.get(val)?.disabled);
|
|
771
|
-
const newRawValues = Array.from(new Set([...rawValues.value, ...patchValues]));
|
|
773
|
+
const newRawValues = Array.from(/* @__PURE__ */ new Set([...rawValues.value, ...patchValues]));
|
|
772
774
|
triggerChange(newRawValues);
|
|
773
775
|
newRawValues.forEach((newRawValue) => {
|
|
774
776
|
triggerSelect(newRawValue, true);
|
|
@@ -48,7 +48,8 @@ var Input = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
48
48
|
};
|
|
49
49
|
const handlePaste = (event) => {
|
|
50
50
|
const { clipboardData } = event;
|
|
51
|
-
|
|
51
|
+
const pastedValue = clipboardData?.getData?.("text");
|
|
52
|
+
pastedTextRef.value = pastedValue || "";
|
|
52
53
|
};
|
|
53
54
|
const widthCssVar = shallowRef();
|
|
54
55
|
watch([() => props.syncWidth, () => props.value], async () => {
|
|
@@ -56,7 +57,8 @@ var Input = /* @__PURE__ */ defineComponent((props, { expose, attrs }) => {
|
|
|
56
57
|
const input = inputRef.value;
|
|
57
58
|
if (props.syncWidth && input) {
|
|
58
59
|
input.style.width = "0px";
|
|
59
|
-
|
|
60
|
+
const scrollWidth = input.scrollWidth;
|
|
61
|
+
widthCssVar.value = scrollWidth;
|
|
60
62
|
input.style.width = "";
|
|
61
63
|
}
|
|
62
64
|
}, { immediate: true });
|
package/dist/SelectTrigger.js
CHANGED
|
@@ -84,7 +84,7 @@ var SelectTrigger = /* @__PURE__ */ defineComponent((props, { slots, attrs, expo
|
|
|
84
84
|
}), { default: () => [slots?.default?.()] });
|
|
85
85
|
};
|
|
86
86
|
}, {
|
|
87
|
-
props:
|
|
87
|
+
props: /*@__PURE__*/ mergeDefaults({
|
|
88
88
|
prefixCls: {
|
|
89
89
|
type: String,
|
|
90
90
|
required: true
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@v-c/select",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "1.1.
|
|
4
|
+
"version": "1.1.4",
|
|
5
5
|
"description": "",
|
|
6
6
|
"author": "",
|
|
7
7
|
"license": "MIT",
|
|
@@ -34,10 +34,10 @@
|
|
|
34
34
|
"vue": "^3.0.0"
|
|
35
35
|
},
|
|
36
36
|
"dependencies": {
|
|
37
|
+
"@v-c/trigger": "^1.0.17",
|
|
37
38
|
"@v-c/overflow": "^1.1.0",
|
|
38
|
-
"@v-c/
|
|
39
|
-
"@v-c/util": "^1.0.19"
|
|
40
|
-
"@v-c/virtual-list": "^1.0.9"
|
|
39
|
+
"@v-c/virtual-list": "^1.0.9",
|
|
40
|
+
"@v-c/util": "^1.0.19"
|
|
41
41
|
},
|
|
42
42
|
"scripts": {
|
|
43
43
|
"build": "vite build",
|