@opentiny/vue-renderless 3.10.0 → 3.10.2

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opentiny/vue-renderless",
3
- "version": "3.10.0",
3
+ "version": "3.10.2",
4
4
  "description": "An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.",
5
5
  "homepage": "https://opentiny.design/tiny-vue",
6
6
  "keywords": [
@@ -24,7 +24,6 @@
24
24
  "url": "https://github.com/opentiny/tiny-vue/issues"
25
25
  },
26
26
  "sideEffects": false,
27
- "type": "module",
28
27
  "scripts": {
29
28
  "build": "tsup",
30
29
  "build:fast": "npm run build && npm run release",
package/search/index.js CHANGED
@@ -31,9 +31,9 @@ const searchClick = ({ emit, props, state }) => (e) => {
31
31
  emit("search", state.searchValue, state.currentValue);
32
32
  }
33
33
  };
34
- const searchEnterKey = ({ api, props, refs, nextTick }) => () => {
34
+ const searchEnterKey = ({ api, props, refs, nextTick }) => (event) => {
35
35
  if (props.isEnterSearch) {
36
- api.searchClick();
36
+ api.searchClick(event);
37
37
  nextTick(() => refs.input.blur());
38
38
  }
39
39
  };
package/select/index.js CHANGED
@@ -189,8 +189,9 @@ const getOption = ({ props, state }) => (value) => {
189
189
  const isObject = Object.prototype.toString.call(value).toLowerCase() === "[object object]";
190
190
  const isNull2 = Object.prototype.toString.call(value).toLowerCase() === "[object null]";
191
191
  const isUndefined = Object.prototype.toString.call(value).toLowerCase() === "[object undefined]";
192
- for (let i = state.cachedOptions.length - 1; i >= 0; i--) {
193
- const cachedOption = state.cachedOptions[i];
192
+ const optionsList = props.optimization ? props.options : state.cachedOptions;
193
+ for (let i = optionsList.length - 1; i >= 0; i--) {
194
+ const cachedOption = optionsList[i];
194
195
  const isEqual2 = isObject ? getObj(cachedOption.value, props.valueKey) === getObj(value, props.valueKey) : cachedOption.value === value;
195
196
  if (isEqual2) {
196
197
  option = cachedOption;
@@ -198,6 +199,9 @@ const getOption = ({ props, state }) => (value) => {
198
199
  }
199
200
  }
200
201
  if (option) {
202
+ if (!option.currentLabel) {
203
+ option.currentLabel = option[props.textField];
204
+ }
201
205
  return option;
202
206
  }
203
207
  const label = !isObject && !isNull2 && !isUndefined ? value : "";