File tree Expand file tree Collapse file tree 2 files changed +9
-4
lines changed
packages/lib/vue2/vue2-core/src Expand file tree Collapse file tree 2 files changed +9
-4
lines changed Original file line number Diff line number Diff line change @@ -9,6 +9,10 @@ export default {
99 type : String ,
1010 default : '保存'
1111 } ,
12+ okBtnProps : {
13+ type : Object ,
14+ default : ( ) => ( { } )
15+ } ,
1216 cancelBtn : {
1317 type : String ,
1418 default : '取消'
@@ -21,7 +25,9 @@ export default {
2125 } ,
2226 render ( h ) {
2327 const self = this ;
24- const { okBtn, cancelBtn, globalOptions : { COMPONENT_MAP } } = this . $props ;
28+ const {
29+ okBtn, okBtnProps, cancelBtn, globalOptions : { COMPONENT_MAP }
30+ } = this . $props ;
2531
2632 return h ( COMPONENT_MAP . formItem , {
2733 class : {
@@ -40,9 +46,7 @@ export default {
4046 style : {
4147 marginLeft : '10px'
4248 } ,
43- props : {
44- type : 'primary'
45- } ,
49+ props : { type : 'primary' , ...okBtnProps } ,
4650 on : {
4751 click ( ) {
4852 self . $emit ( 'onSubmit' ) ;
Original file line number Diff line number Diff line change @@ -121,6 +121,7 @@ export default function createForm(globalOptions = {}) {
121121 props : {
122122 globalOptions,
123123 okBtn : self . footerParams . okBtn ,
124+ okBtnProps : self . footerParams . okBtnProps ,
124125 cancelBtn : self . footerParams . cancelBtn ,
125126 formItemAttrs : self . footerParams . formItemAttrs ,
126127 } ,
You can’t perform that action at this time.
0 commit comments