vsyswin-ui 0.2.95 → 0.2.96

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": "vsyswin-ui",
3
- "version": "0.2.95",
3
+ "version": "0.2.96",
4
4
  "main": "lib/vsyswin-ui.umd.min.js",
5
5
  "private": false,
6
6
  "description": "Vue2.x的应用组件库.",
@@ -10,9 +10,11 @@
10
10
  class="query-input"
11
11
  ref='queryInputRef'
12
12
  :placeholder="placeholder"
13
+ @compositionstart="typing=true"
14
+ @compositionend="onCompositionEnd"
13
15
  @focus="onQueryInputFocus"
14
16
  @blur="onQueryInputBlur"
15
- @input="onSearchTree"
17
+ @input="onInput"
16
18
  />
17
19
  </div>
18
20
  </div>
@@ -95,6 +97,7 @@ export default {
95
97
  searchIsActive: false,
96
98
  ztreeId: 'ztree_' + parseInt(Math.random() * 1e10),
97
99
  ztreeObj: null,
100
+ typing: false,
98
101
  ztreeSetting: {
99
102
  view: {
100
103
  showIcon: true // default to hide icon
@@ -203,6 +206,15 @@ export default {
203
206
  // 搜索框失去焦点
204
207
  this.searchIsActive = false
205
208
  },
209
+ onCompositionEnd() {
210
+ this.typing = false
211
+ this.onSearchTree()
212
+ },
213
+ onInput() {
214
+ // 正在输入中文时就不执行后面的代码
215
+ if (this.typing) return
216
+ this.onSearchTree()
217
+ },
206
218
  onSearchTree: debounce(200, function() {
207
219
  // 根据关键字搜索树
208
220
  this.$emit('searchTree', this.keyword)