File tree 2 files changed +9
-4
lines changed
packages/lib/vue2/vue2-core/src
2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export default {
9
9
type : String ,
10
10
default : '保存'
11
11
} ,
12
+ okBtnProps : {
13
+ type : Object ,
14
+ default : ( ) => ( { } )
15
+ } ,
12
16
cancelBtn : {
13
17
type : String ,
14
18
default : '取消'
@@ -21,7 +25,9 @@ export default {
21
25
} ,
22
26
render ( h ) {
23
27
const self = this ;
24
- const { okBtn, cancelBtn, globalOptions : { COMPONENT_MAP } } = this . $props ;
28
+ const {
29
+ okBtn, okBtnProps, cancelBtn, globalOptions : { COMPONENT_MAP }
30
+ } = this . $props ;
25
31
26
32
return h ( COMPONENT_MAP . formItem , {
27
33
class : {
@@ -40,9 +46,7 @@ export default {
40
46
style : {
41
47
marginLeft : '10px'
42
48
} ,
43
- props : {
44
- type : 'primary'
45
- } ,
49
+ props : { type : 'primary' , ...okBtnProps } ,
46
50
on : {
47
51
click ( ) {
48
52
self . $emit ( 'onSubmit' ) ;
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export default function createForm(globalOptions = {}) {
121
121
props : {
122
122
globalOptions,
123
123
okBtn : self . footerParams . okBtn ,
124
+ okBtnProps : self . footerParams . okBtnProps ,
124
125
cancelBtn : self . footerParams . cancelBtn ,
125
126
formItemAttrs : self . footerParams . formItemAttrs ,
126
127
} ,
You can’t perform that action at this time.
0 commit comments