File tree 2 files changed +4
-2
lines changed
2 files changed +4
-2
lines changed Original file line number Diff line number Diff line change @@ -81,8 +81,10 @@ export const withDefault = function(type) {
81
81
warn ( `${ this . _vueTypes_name } - invalid default value: "${ def } "` , def ) ;
82
82
return this ;
83
83
}
84
+
85
+ // isFunction(def) 关注 https://github.com/vuejs/vue-next/pull/1291 合并发版本后可删除
84
86
this . default =
85
- isArray ( def ) || isPlainObject ( def )
87
+ isArray ( def ) || isPlainObject ( def ) || isFunction ( def )
86
88
? function ( ) {
87
89
return def ;
88
90
}
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ const AffixProps = {
31
31
/** 固定状态改变时触发的回调函数 */
32
32
// onChange?: (affixed?: boolean) => void;
33
33
/** 设置 Affix 需要监听其滚动事件的元素,值为一个返回对应 DOM 元素的函数 */
34
- target : PropTypes . func . def ( ( ) => getDefaultTarget ) ,
34
+ target : PropTypes . func . def ( getDefaultTarget ) ,
35
35
prefixCls : PropTypes . string ,
36
36
} ;
37
37
const AffixStatus = {
You can’t perform that action at this time.
0 commit comments