File tree Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Expand file tree Collapse file tree 5 files changed +35
-7
lines changed Original file line number Diff line number Diff line change 10
10
11
11
---
12
12
13
+ ## 2.2.8
14
+
15
+ ` 2021-09-17 `
16
+
17
+ - 🌟 Upload method supports patch [ #4637 ] ( https://github.com/vueComponent/ant-design-vue/issues/4637 )
18
+ - 🌟 List gutter supports array [ d2b721] ( https://github.com/vueComponent/ant-design-vue/commit/d2b72143f0e15c8716b4ea8f68b2b72eff5cf510 )
19
+ - 🐞 Fix Modal type error [ #4632 ] ( https://github.com/vueComponent/ant-design-vue/issues/4632 )
20
+ - 🐞 Fix the problem that AutoComplete cannot reset undefined [ 741718] ( https://github.com/vueComponent/ant-design-vue/commit/741718a0f92c790266e7a07d8d129c5673344a7e )
21
+ - 🐞 Fix the missing style of Tag closed icon [ #4649 ] ( https://github.com/vueComponent/ant-design-vue/issues/4649 )
22
+ - 🐞 Fix the problem that the TreeSelect clear button does not display under special conditions [ #4655 ] ( https://github.com/vueComponent/ant-design-vue/issues/4655 )
23
+ - 🐞 Fix useForm immdiate not working issue [ #4646 ] ( https://github.com/vueComponent/ant-design-vue/issues/4646 )
24
+
13
25
## 2.2.7
14
26
15
27
` 2021-09-08 `
Original file line number Diff line number Diff line change 10
10
11
11
---
12
12
13
+ ## 2.2.8
14
+
15
+ ` 2021-09-17 `
16
+
17
+ - 🌟 Upload method 支持 patch [ #4637 ] ( https://github.com/vueComponent/ant-design-vue/issues/4637 )
18
+ - 🌟 List gutter 支持数组 [ d2b721] ( https://github.com/vueComponent/ant-design-vue/commit/d2b72143f0e15c8716b4ea8f68b2b72eff5cf510 )
19
+ - 🐞 修复 Modal 类型错误 [ #4632 ] ( https://github.com/vueComponent/ant-design-vue/issues/4632 )
20
+ - 🐞 修复 AutoComplete 无法重置 undefined 问题 [ 741718] ( https://github.com/vueComponent/ant-design-vue/commit/741718a0f92c790266e7a07d8d129c5673344a7e )
21
+ - 🐞 修复 Tag 关闭图标样式丢失问题 [ #4649 ] ( https://github.com/vueComponent/ant-design-vue/issues/4649 )
22
+ - 🐞 修复 TreeSelect 清楚按钮在特殊条件下不显示问题 [ #4655 ] ( https://github.com/vueComponent/ant-design-vue/issues/4655 )
23
+ - 🐞 修复 useForm immdiate 不生效问题 [ #4646 ] ( https://github.com/vueComponent/ant-design-vue/issues/4646 )
24
+
13
25
## 2.2.7
14
26
15
27
` 2021-09-08 `
Original file line number Diff line number Diff line change @@ -332,16 +332,20 @@ function useForm(
332
332
return info ;
333
333
} ;
334
334
let oldModel = initialModel ;
335
+ let isFirstTime = true ;
335
336
const modelFn = ( model : { [ x : string ] : any } ) => {
336
337
const names = [ ] ;
337
338
rulesKeys . value . forEach ( key => {
338
339
const prop = getPropByPath ( model , key , false ) ;
339
340
const oldProp = getPropByPath ( oldModel , key , false ) ;
340
- if ( ! isEqual ( prop . v , oldProp . v ) ) {
341
+ const isFirstValidation = isFirstTime && options ?. immediate && prop . isValid ;
342
+
343
+ if ( isFirstValidation || ! isEqual ( prop . v , oldProp . v ) ) {
341
344
names . push ( key ) ;
342
345
}
343
346
} ) ;
344
347
validate ( names , { trigger : 'change' } ) ;
348
+ isFirstTime = false ;
345
349
oldModel = cloneDeep ( model ) ;
346
350
} ;
347
351
Original file line number Diff line number Diff line change @@ -95,19 +95,19 @@ export interface ModalFuncProps {
95
95
prefixCls ?: string ;
96
96
class ?: string ;
97
97
visible ?: boolean ;
98
- title ?: ( ( ) => VNodeTypes ) | VNodeTypes ;
98
+ title ?: string | ( ( ) => VNodeTypes ) | VNodeTypes ;
99
99
closable ?: boolean ;
100
- content ?: ( ( ) => VNodeTypes ) | VNodeTypes ;
100
+ content ?: string | ( ( ) => VNodeTypes ) | VNodeTypes ;
101
101
// TODO: find out exact types
102
102
onOk ?: ( ...args : any [ ] ) => any ;
103
103
onCancel ?: ( ...args : any [ ] ) => any ;
104
104
okButtonProps ?: ButtonPropsType ;
105
105
cancelButtonProps ?: ButtonPropsType ;
106
106
centered ?: boolean ;
107
107
width ?: string | number ;
108
- okText ?: ( ( ) => VNodeTypes ) | VNodeTypes ;
108
+ okText ?: string | ( ( ) => VNodeTypes ) | VNodeTypes ;
109
109
okType ?: LegacyButtonType ;
110
- cancelText ?: ( ( ) => VNodeTypes ) | VNodeTypes ;
110
+ cancelText ?: string | ( ( ) => VNodeTypes ) | VNodeTypes ;
111
111
icon ?: ( ( ) => VNodeTypes ) | VNodeTypes ;
112
112
/* Deprecated */
113
113
iconType ?: string ;
Original file line number Diff line number Diff line change @@ -86,11 +86,11 @@ const Tag = defineComponent({
86
86
const renderCloseIcon = ( ) => {
87
87
if ( closable ) {
88
88
return closeIcon ? (
89
- < div class = { `${ prefixCls } -close-icon` } onClick = { handleCloseClick } >
89
+ < div class = { `${ prefixCls . value } -close-icon` } onClick = { handleCloseClick } >
90
90
{ closeIcon }
91
91
</ div >
92
92
) : (
93
- < CloseOutlined class = { `${ prefixCls } -close-icon` } onClick = { handleCloseClick } />
93
+ < CloseOutlined class = { `${ prefixCls . value } -close-icon` } onClick = { handleCloseClick } />
94
94
) ;
95
95
}
96
96
return null ;
You can’t perform that action at this time.
0 commit comments