cloud-web-corejs 1.1.0-dev.73 → 1.1.0-dev.74

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,7 +1,7 @@
1
1
  {
2
2
  "name": "cloud-web-corejs",
3
3
  "private": false,
4
- "version": "1.1.0-dev.73",
4
+ "version": "1.1.0-dev.74",
5
5
  "scripts": {
6
6
  "build:ace-resources": "node build/build-ace-resources.js",
7
7
  "build:tinymce-resources": "node build/build-tinymce-resources.js",
@@ -153,5 +153,5 @@ loadUserById(id, resolve) {
153
153
  - 关键词为空(含只有空格)时不调用 `load`。
154
154
  - 相同关键词且上次有结果时,不再重复请求。
155
155
  - 未选中新项就失焦:输入框还原为已保存的 `label`,下拉关闭,关键词高亮清除。已保存的 ID 不变。
156
- - 点清空:ID 和名称一起变成 `null`。
156
+ - 点清空:ID 和名称一起变成 `null`,下拉关闭。焦点还在时可以继续输入并重新查询。
157
157
  - `disabled`、`readonly` 时不发起查询。
@@ -336,10 +336,20 @@ export default {
336
336
  this.$emit("update:label", null);
337
337
  this.$emit("change", null, oldValue, null);
338
338
  this.$emit("clear");
339
+ // 清空按钮会把 el-autocomplete 的 activated 关掉,且不会再次触发 focus。
340
+ // 焦点还在时要重新打开,否则继续输入不会再出下拉。
341
+ this.keepSearching();
339
342
  this.$nextTick(() => {
340
343
  this.isSelecting = false;
344
+ this.keepSearching();
341
345
  });
342
346
  },
347
+ keepSearching() {
348
+ const input = this.$refs.input;
349
+ if (!input || !this.focused) return;
350
+ input.activated = true;
351
+ input.suggestionDisabled = false;
352
+ },
343
353
  handleInputChange(text) {
344
354
  if (this.isSelecting) return;
345
355
  this.$emit("input-change", text);