feat(PageContent): ✨ 支持后端文件导入
This commit is contained in:
@@ -25,6 +25,9 @@ const contentConfig: IContentConfig<UserQuery> = {
|
||||
return UserAPI.getPage(params);
|
||||
},
|
||||
deleteAction: UserAPI.deleteByIds,
|
||||
importAction(file) {
|
||||
return UserAPI.import(1, file);
|
||||
},
|
||||
exportAction: UserAPI.export,
|
||||
importsTemplate: UserAPI.downloadTemplate,
|
||||
importsAction(data) {
|
||||
@@ -42,13 +45,8 @@ const contentConfig: IContentConfig<UserQuery> = {
|
||||
toolbar: [
|
||||
"add",
|
||||
"delete",
|
||||
"import",
|
||||
"export",
|
||||
{
|
||||
name: "import",
|
||||
icon: "upload",
|
||||
text: "导入",
|
||||
auth: "import",
|
||||
},
|
||||
{
|
||||
name: "custom1",
|
||||
icon: "plus",
|
||||
|
||||
@@ -113,8 +113,8 @@ async function handleEditClick(row: IObject) {
|
||||
// 其他工具栏
|
||||
function handleToolbarClick(name: string) {
|
||||
console.log(name);
|
||||
if (name === "import") {
|
||||
ElMessage.success("点击了导入按钮");
|
||||
if (name === "custom1") {
|
||||
ElMessage.success("点击了自定义1按钮");
|
||||
}
|
||||
}
|
||||
// 其他操作列
|
||||
|
||||
Reference in New Issue
Block a user