feat: 添加 message 消息提示函数,兼容 Element PlusAnt Design 两种 Message 风格

This commit is contained in:
xiaoxian521
2022-11-27 16:14:55 +08:00
parent 667ef918fc
commit 33bd64d9ff
22 changed files with 381 additions and 45 deletions

View File

@@ -15,14 +15,13 @@ export function useColumns() {
);
const handleEdit = (index: number, row) => {
message(
`您编辑了第 ${index} 行,数据为:${JSON.stringify(row)}`,
"success"
);
message(`您编辑了第 ${index} 行,数据为:${JSON.stringify(row)}`, {
type: "success"
});
};
const handleDelete = (index: number, row) => {
message(`您删除了第 ${index} 行,数据为:${JSON.stringify(row)}`, "info");
message(`您删除了第 ${index} 行,数据为:${JSON.stringify(row)}`);
};
const columns: TableColumnList = [