feat: 全局crud的ElNotification提示,ElNotification的封装

This commit is contained in:
H0nGzA1
2023-04-21 20:49:48 +08:00
parent 054bcf3eea
commit 25cc2c83c1
2 changed files with 27 additions and 2 deletions

View File

@@ -9,6 +9,7 @@ import { request } from '/@/utils/service';
//扩展包
import { FsExtendsEditor } from '@fast-crud/fast-extends';
import '@fast-crud/fast-extends/dist/style.css';
import { successMessage, successNotification } from '/@/utils/message';
export default {
async install(app: any, options: any) {
// 先安装ui
@@ -40,6 +41,14 @@ export default {
return { records: res.data, currentPage: res.page, pageSize: res.limit, total: res.total };
},
},
form: {
afterSubmit(ctx: any) {
// 增加crud提示
if (ctx.res.code == 2000) {
successNotification(ctx.res.msg);
}
},
},
/* search: {
layout: 'multi-line',
collapse: true,