diff --git a/template/admin/src/styles/style.css b/template/admin/src/styles/style.css index cd3ea6cae..3575b7cdb 100644 --- a/template/admin/src/styles/style.css +++ b/template/admin/src/styles/style.css @@ -716,3 +716,10 @@ body { .pt10 { padding-top: 10px; } +.common-form-create-footer{ + display: flex; + justify-content: right; +} +.common-form-button{ + margin-right: 10px; +} \ No newline at end of file diff --git a/template/admin/src/utils/modal.js b/template/admin/src/utils/modal.js index 50b4d5bce..3e38d4dbc 100644 --- a/template/admin/src/utils/modal.js +++ b/template/admin/src/utils/modal.js @@ -114,7 +114,7 @@ Modal.newInstance = (properties) => { }, domProps: { innerHTML: this.title, - style: 'margin-bottom: 10px;', + style: 'margin-bottom: 20px;border-bottom:1px solid #f2f2f2;padding-bottom:10px;', }, }), ], diff --git a/template/admin/src/utils/modalForm.js b/template/admin/src/utils/modalForm.js index 125387eec..b6bd1d4b5 100644 --- a/template/admin/src/utils/modalForm.js +++ b/template/admin/src/utils/modalForm.js @@ -133,22 +133,39 @@ export default function (formRequestPromise, { width = '700' } = { width: '700' }, }, }), - h( - 'Button', - { - class: 'common-form-button', - props: { - type: 'primary', - long: true, - }, - on: { - click: () => { - fApi.submit(); + h('div', { class: 'common-form-create-footer' }, [ + h( + 'Button', + { + class: 'common-form-button', + props: { + long: false, + }, + on: { + click: () => { + modalInstance.remove(); + }, }, }, - }, - ['提交'], - ), + ['取消'], + ), + h( + 'Button', + { + class: 'common-form-button', + props: { + type: 'primary', + long: false, + }, + on: { + click: () => { + fApi.submit(); + }, + }, + }, + ['提交'], + ), + ]), ]); }, });