refactor: ♻️ pageContent组件,工具栏按钮适配移动端,提取按钮公共方法

This commit is contained in:
超凡
2025-04-18 08:07:11 +08:00
parent c3aefbb2df
commit 80ea3a0262
4 changed files with 129 additions and 205 deletions

View File

@@ -1,7 +1,7 @@
import type { IContentConfig } from "@/components/CURD/types";
const contentConfig: IContentConfig = {
pageName: "sys:user",
// pageName: "sys:demo", // 不写不进行按钮权限校验
table: {
showOverflowTooltip: true,
},
@@ -117,11 +117,11 @@ const contentConfig: IContentConfig = {
operat: [
{
name: "reset_pwd",
auth: "password:reset",
icon: "refresh-left",
text: "重置密码",
type: "primary",
auth: "password:reset",
attrs: { icon: "refresh-left", type: "primary" },
render(row) {
// 根据条件,显示或隐藏
return row.id === 1;
},
},