File tree Expand file tree Collapse file tree 1 file changed +52
-0
lines changed
Expand file tree Collapse file tree 1 file changed +52
-0
lines changed Original file line number Diff line number Diff line change 1+ ## v9.1.7 (2020-07-15)
2+
3+ ### 新特性 / New Features
4+ - [ 新增] input、auto-complete-input新增输入属性preIcon和icon用于设置前后图标
5+
6+ ### 破坏性修改 / Breaking Changes
7+ - [ 破坏性修改] 当select控件的trackItemBy属性有效时,根据trackItemBy所指的属性的值来判定value值是否有变更
8+
9+ #### 破坏性说明
10+
11+ select控件的` valueChange ` 事件触发时机有细微的变化,此前,通过select组件的` value ` 属性输入任何非空新对象都会触发` valueChange ` 事件,而不管当前控件是否给定了` trackItemBy ` 属性。这个做法导致了` trackItemBy ` 属性失去作用。比如下面的代码
12+
13+ ```
14+ html:
15+ // 注意,trackItemBy值为label,是有效的,这是关键
16+ <j-select [value]="value" trackItemBy="label" (valueChange)="onValueChange()">
17+ </j-select>
18+
19+ ts:
20+ this.value = {label: 'xxx'}; // onValueChange将会被调用
21+ this.value = {label: 'xxx'}; // onValueChange也会被调用,因为前后两次给的value值不是同一个对象。
22+ ```
23+
24+ 现在,控件在触发` valueChange ` 事件之前,增加了对` trackItemBy ` 值的判断,行为发生了变更:
25+
26+ ```
27+ html: 与前例一致
28+
29+ ts:
30+ this.value = {label: 'xxx'}; // onValueChange将会被调用
31+ this.value = {label: 'xxx'}; // onValueChange不会被调用,因为label的值前后都是xxx,没有变化
32+ ```
33+
34+ 但请注意,如果` trackItemBy ` 值为空,则select控件的行为与之前一致:
35+
36+ ```
37+ html:
38+ // 注意,trackItemBy没有配置,为非法值
39+ <j-select [value]="value" (valueChange)="onValueChange()">
40+ </j-select>
41+
42+ ts:
43+ this.value = {label: 'xxx'}; // onValueChange将会被调用
44+ this.value = {label: 'xxx'}; // onValueChange也会被调用,不给trackItemBy时,select控件会按照引用来判定value是否发生变化
45+ ```
46+
47+ ### 优化 / Modified
48+ - [ 优化] 将jigsawFloatArrowElement属性的类型改为any,避免在node运行时使用Jigsaw报错
49+
50+ ### 修复 / Fixes
51+ - [ 故障] 修复输入框在非键盘输入情况下改变时无法触发valueChange的问题
52+
153## v9.1.4 (2020-07-03)
254
355### 新特性 / New Features
You can’t perform that action at this time.
0 commit comments