@v-c/select 1.0.6 → 1.0.8
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/SelectInput/Content/MultipleContent.cjs +1 -1
- package/dist/SelectInput/Content/MultipleContent.js +1 -1
- package/dist/SelectInput/index.cjs +4 -2
- package/dist/SelectInput/index.js +4 -2
- package/dist/hooks/useSearchConfig.cjs +3 -1
- package/dist/hooks/useSearchConfig.js +3 -1
- package/package.json +1 -1
|
@@ -110,7 +110,7 @@ var MultipleContent = /* @__PURE__ */ (0, vue.defineComponent)((props, { expose
|
|
|
110
110
|
};
|
|
111
111
|
return () => {
|
|
112
112
|
const { inputProps } = props;
|
|
113
|
-
const prefixNode = !displayValues.value.length &&
|
|
113
|
+
const prefixNode = !displayValues.value.length && !inputValue.value ? () => (0, vue.createVNode)(require_Placeholder.default, null, null) : null;
|
|
114
114
|
const suffixNode = () => (0, vue.createVNode)(require_Input.default, (0, vue.mergeProps)({
|
|
115
115
|
"ref": inputRef,
|
|
116
116
|
"disabled": disabled.value,
|
|
@@ -104,7 +104,7 @@ var MultipleContent_default = /* @__PURE__ */ defineComponent((props, { expose }
|
|
|
104
104
|
};
|
|
105
105
|
return () => {
|
|
106
106
|
const { inputProps } = props;
|
|
107
|
-
const prefixNode = !displayValues.value.length &&
|
|
107
|
+
const prefixNode = !displayValues.value.length && !inputValue.value ? () => createVNode(Placeholder_default, null, null) : null;
|
|
108
108
|
const suffixNode = () => createVNode(Input_default, mergeProps({
|
|
109
109
|
"ref": inputRef,
|
|
110
110
|
"disabled": disabled.value,
|
|
@@ -100,6 +100,8 @@ var SelectInput = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, expo
|
|
|
100
100
|
...attrs,
|
|
101
101
|
onFocus: props.onFocus,
|
|
102
102
|
onBlur: props.onBlur,
|
|
103
|
+
onFocusin: props.onFocus,
|
|
104
|
+
onFocusout: props.onBlur,
|
|
103
105
|
onKeydown: props.onKeyDown,
|
|
104
106
|
onKeyup: props.onKeyUp,
|
|
105
107
|
onMousedown: props.onMouseDown
|
|
@@ -118,8 +120,8 @@ var SelectInput = /* @__PURE__ */ (0, vue.defineComponent)((props, { attrs, expo
|
|
|
118
120
|
"onMousedown": onInternalMouseDown,
|
|
119
121
|
"onKeydown": props.onKeyDown,
|
|
120
122
|
"onKeyup": props.onKeyUp,
|
|
121
|
-
"
|
|
122
|
-
"
|
|
123
|
+
"onFocusin": props.onFocus,
|
|
124
|
+
"onFocusout": onInternalBlur
|
|
123
125
|
}), [
|
|
124
126
|
(0, vue.createVNode)(require_Affix.default, {
|
|
125
127
|
"class": (0, _v_c_util.clsx)(`${prefixCls.value}-prefix`, classNamesConfig.value?.prefix),
|
|
@@ -93,6 +93,8 @@ var SelectInput_default = /* @__PURE__ */ defineComponent((props, { attrs, expos
|
|
|
93
93
|
...attrs,
|
|
94
94
|
onFocus: props.onFocus,
|
|
95
95
|
onBlur: props.onBlur,
|
|
96
|
+
onFocusin: props.onFocus,
|
|
97
|
+
onFocusout: props.onBlur,
|
|
96
98
|
onKeydown: props.onKeyDown,
|
|
97
99
|
onKeyup: props.onKeyUp,
|
|
98
100
|
onMousedown: props.onMouseDown
|
|
@@ -111,8 +113,8 @@ var SelectInput_default = /* @__PURE__ */ defineComponent((props, { attrs, expos
|
|
|
111
113
|
"onMousedown": onInternalMouseDown,
|
|
112
114
|
"onKeydown": props.onKeyDown,
|
|
113
115
|
"onKeyup": props.onKeyUp,
|
|
114
|
-
"
|
|
115
|
-
"
|
|
116
|
+
"onFocusin": props.onFocus,
|
|
117
|
+
"onFocusout": onInternalBlur
|
|
116
118
|
}), [
|
|
117
119
|
createVNode(Affix_default, {
|
|
118
120
|
"class": clsx(`${prefixCls.value}-prefix`, classNamesConfig.value?.prefix),
|
|
@@ -10,7 +10,7 @@ function useSearchConfig(showSearch, props, mode) {
|
|
|
10
10
|
return typeof showSearch.value === "object" || mode.value === "combobox" || mode.value === "tags" || mode.value === "multiple" && showSearch.value === void 0 ? true : showSearch.value;
|
|
11
11
|
}), (0, vue.computed)(() => {
|
|
12
12
|
const isObject = typeof showSearch.value === "object";
|
|
13
|
-
|
|
13
|
+
const config = {
|
|
14
14
|
filterOption: filterOption?.value,
|
|
15
15
|
searchValue: searchValue?.value,
|
|
16
16
|
optionFilterProp: optionFilterProp?.value,
|
|
@@ -19,6 +19,8 @@ function useSearchConfig(showSearch, props, mode) {
|
|
|
19
19
|
autoClearSearchValue: autoClearSearchValue?.value,
|
|
20
20
|
...isObject ? showSearch.value : {}
|
|
21
21
|
};
|
|
22
|
+
if (config.autoClearSearchValue === void 0) config.autoClearSearchValue = true;
|
|
23
|
+
return config;
|
|
22
24
|
})];
|
|
23
25
|
}
|
|
24
26
|
exports.default = useSearchConfig;
|
|
@@ -5,7 +5,7 @@ function useSearchConfig(showSearch, props, mode) {
|
|
|
5
5
|
return typeof showSearch.value === "object" || mode.value === "combobox" || mode.value === "tags" || mode.value === "multiple" && showSearch.value === void 0 ? true : showSearch.value;
|
|
6
6
|
}), computed(() => {
|
|
7
7
|
const isObject = typeof showSearch.value === "object";
|
|
8
|
-
|
|
8
|
+
const config = {
|
|
9
9
|
filterOption: filterOption?.value,
|
|
10
10
|
searchValue: searchValue?.value,
|
|
11
11
|
optionFilterProp: optionFilterProp?.value,
|
|
@@ -14,6 +14,8 @@ function useSearchConfig(showSearch, props, mode) {
|
|
|
14
14
|
autoClearSearchValue: autoClearSearchValue?.value,
|
|
15
15
|
...isObject ? showSearch.value : {}
|
|
16
16
|
};
|
|
17
|
+
if (config.autoClearSearchValue === void 0) config.autoClearSearchValue = true;
|
|
18
|
+
return config;
|
|
17
19
|
})];
|
|
18
20
|
}
|
|
19
21
|
export { useSearchConfig as default };
|