diff --git a/src/components/AutoDataForm/index.vue b/src/components/AutoDataForm/index.vue index 04aa57d37..2b5a49663 100644 --- a/src/components/AutoDataForm/index.vue +++ b/src/components/AutoDataForm/index.vue @@ -35,7 +35,6 @@ export default { type: Object, default: () => ({}) } - }, data() { return { diff --git a/src/components/DataForm/index.vue b/src/components/DataForm/index.vue index 6a7621494..74d3723f6 100644 --- a/src/components/DataForm/index.vue +++ b/src/components/DataForm/index.vue @@ -13,7 +13,7 @@ - {{ button.title }} + {{ button.title }} {{ $tc('Reset') }} {{ $tc('Submit') }} @@ -66,6 +66,14 @@ export default { // 重置表单 resetForm(formName) { this.$refs[formName].resetFields() + }, + handleClick(button) { + const callback = button.callback || function(values, form) { + console.log('Click ', button.title, ': ', values) + } + const form = this.$refs['form'] + const values = form.getFormValue() + callback(values, form) } } } diff --git a/src/views/settings/Email.vue b/src/views/settings/Email.vue index a21908169..5d71edbbd 100644 --- a/src/views/settings/Email.vue +++ b/src/views/settings/Email.vue @@ -5,7 +5,7 @@ :initial="object" :update-success-next-route="successUrl" :clean-form-value="cleanFormValue" - :object="object" + :object.sync="object" :fields-meta="fieldsMeta" :get-method="getMethod" /> diff --git a/src/views/users/users/UserCreateUpdate.vue b/src/views/users/users/UserCreateUpdate.vue index d168fe087..148662a41 100644 --- a/src/views/users/users/UserCreateUpdate.vue +++ b/src/views/users/users/UserCreateUpdate.vue @@ -1,5 +1,5 @@