Skip to content

Commit adfe93e

Browse files
committed
perf(vue3-core): 优化 okBtnProps 的实现方式
1 parent 7b8c3c0 commit adfe93e

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

packages/lib/vue3/vue3-core/src/components/FormFooter.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,11 @@ export default {
5353
style: {
5454
marginLeft: '10px'
5555
},
56-
...Object.assign({ type: 'primary' }, props.okBtnProps),
56+
type: 'primary',
5757
onClick() {
5858
emit('submit');
59-
}
59+
},
60+
...props.okBtnProps
6061
}, {
6162
default: () => props.okBtn
6263
})

packages/lib/vue3/vue3-core/src/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ export default function createForm(globalOptions = {}) {
5555
const footerParams = computed(() => ({
5656
show: true,
5757
okBtn: '保存',
58-
okBtnProps: { type: 'primary' },
58+
okBtnProps: {},
5959
cancelBtn: '取消',
6060
...props.formFooter
6161
}));

0 commit comments

Comments
 (0)