diff --git a/README.md b/README.md index 53169a50..f9f4ca43 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,8 @@ ## ⚡ Introduction -V3 Admin Vite is a free and open source middle and background management system basic solution, based on mainstream framework such as Vue3, TypeScript, Element Plus, Pinia and Vite +V3 Admin Vite is a free and open source middle and background management system basic solution, based on mainstream framework such as +Vue3, TypeScript, Element Plus, Pinia and Vite. - Vue Cli 5.x: [v3-admin](https://github.com/un-pany/v3-admin) - Electron desktop: [v3-electron-vite](https://github.com/un-pany/v3-electron-vite) @@ -21,7 +22,7 @@ China repository: [Gitee](https://gitee.com/un-pany/v3-admin-vite) ## 📺 Online preview | Location | account | Link | -| ------------ | ------------------- | ----------------------------------------------- | +|--------------|---------------------|-------------------------------------------------| | github-pages | `admin` or `editor` | [link](https://un-pany.github.io/v3-admin-vite) | ## ❤️ Generate electricity with love @@ -52,13 +53,15 @@ China repository: [Gitee](https://gitee.com/un-pany/v3-admin-vite) ## Functions - **User management**: Log in and out of the demo -- **Authority management**: Page-level permissions (dynamic routing), button-level permissions (directive permissions, permission functions), and route navigation guards +- **Authority management**: Page-level permissions (dynamic routing), button-level permissions (directive permissions, permission + functions), and route navigation guards - **Multiple Environments**: Development, Staging, Production - **Multiple themes**: Normal, Dark, Dark Blue, three theme modes - **Multiple layouts**:Left, Top, Left Top, three layout modes - **Error page**: 403, 404 - **Dashboard**: Display different Dashboard pages according to different users -- **Other functions**:SVG, Dynamic Sidebar, Dynamic Breadcrumb Navigation, Tabbed Navigation, Screenfull, Adaptive Shrink Sidebar, Hook (Composables) +- **Other functions**:SVG, Dynamic Sidebar, Dynamic Breadcrumb Navigation, Tabbed Navigation, Screenfull, Adaptive Shrink Sidebar, + Hook (Composables) ## 🚀 Development @@ -138,12 +141,13 @@ pnpm test Thanks to all the contributors! - + contributors ## 💕 Thanks star -Small projects are not easy to get a star, if you like this project, welcome to support a star! This is the only motivation for the author to maintain it on an ongoing basis (whisper: it's free after all) +Small projects are not easy to get a star, if you like this project, welcome to support a star! This is the only motivation for the +author to maintain it on an ongoing basis (whisper: it's free after all) ## ☕ Donate diff --git a/src/views/table/vxe-table/index.vue b/src/views/table/vxe-table/index.vue index c00b2197..40d2c88d 100644 --- a/src/views/table/vxe-table/index.vue +++ b/src/views/table/vxe-table/index.vue @@ -3,8 +3,8 @@ import { nextTick, reactive, ref } from "vue" import { type ElMessageBoxOptions, ElMessageBox, ElMessage } from "element-plus" import { deleteTableDataApi, getTableDataApi } from "@/api/table" import { type TableResponseData } from "@/api/table/types/table" -import RoleColumnSolts from "./tsx/RoleColumnSolts" -import StatusColumnSolts from "./tsx/StatusColumnSolts" +import RoleColumnSlots from "./tsx/RoleColumnSlots" +import StatusColumnSlots from "./tsx/StatusColumnSlots" import { type VxeGridInstance, type VxeGridProps, @@ -31,6 +31,7 @@ interface RowMeta { /** vxe-table 自动添加上去的属性 */ _VXE_ID?: string } + const xGridDom = ref() const xGridOpt: VxeGridProps = reactive({ loading: true, @@ -96,7 +97,7 @@ const xGridOpt: VxeGridProps = reactive({ field: "roles", title: "角色", /** 自定义列与 type: "html" 的列一起使用,会产生错误,所以采用 TSX 实现 */ - slots: RoleColumnSolts + slots: RoleColumnSlots }, { field: "phone", @@ -109,7 +110,7 @@ const xGridOpt: VxeGridProps = reactive({ { field: "status", title: "状态", - slots: StatusColumnSolts + slots: StatusColumnSlots }, { field: "createTime", diff --git a/src/views/table/vxe-table/tsx/RoleColumnSolts.tsx b/src/views/table/vxe-table/tsx/RoleColumnSlots.tsx similarity index 82% rename from src/views/table/vxe-table/tsx/RoleColumnSolts.tsx rename to src/views/table/vxe-table/tsx/RoleColumnSlots.tsx index 9d95f942..e34af982 100644 --- a/src/views/table/vxe-table/tsx/RoleColumnSolts.tsx +++ b/src/views/table/vxe-table/tsx/RoleColumnSlots.tsx @@ -1,6 +1,6 @@ import { type VxeColumnPropTypes } from "vxe-table/types/column" -const solts: VxeColumnPropTypes.Slots = { +const slots: VxeColumnPropTypes.Slots = { default: ({ row, column }) => { const cellValue = row[column.field] const type = cellValue === "admin" ? "primary" : "warning" @@ -8,4 +8,4 @@ const solts: VxeColumnPropTypes.Slots = { } } -export default solts +export default slots diff --git a/src/views/table/vxe-table/tsx/StatusColumnSolts.tsx b/src/views/table/vxe-table/tsx/StatusColumnSlots.tsx similarity index 83% rename from src/views/table/vxe-table/tsx/StatusColumnSolts.tsx rename to src/views/table/vxe-table/tsx/StatusColumnSlots.tsx index 125263ca..3bf4d42f 100644 --- a/src/views/table/vxe-table/tsx/StatusColumnSolts.tsx +++ b/src/views/table/vxe-table/tsx/StatusColumnSlots.tsx @@ -1,6 +1,6 @@ import { type VxeColumnPropTypes } from "vxe-table/types/column" -const solts: VxeColumnPropTypes.Slots = { +const slots: VxeColumnPropTypes.Slots = { default: ({ row, column }) => { const cellValue = row[column.field] const [type, value] = cellValue ? ["success", "启用"] : ["danger", "禁用"] @@ -8,4 +8,4 @@ const solts: VxeColumnPropTypes.Slots = { } } -export default solts +export default slots