From 3a7c381580e1594d2778523aa506897b627db422 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Wed, 13 Nov 2024 14:03:36 +0800 Subject: [PATCH] =?UTF-8?q?=E7=99=BB=E5=BD=95=E3=80=81=E5=AD=97=E4=BD=93?= =?UTF-8?q?=E5=9B=BE=E6=A0=87=E7=BB=84=E4=BB=B6=E3=80=81=E8=8F=9C=E5=8D=95?= =?UTF-8?q?=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Footer/index.vue | 10 +- src/layout/index.vue | 2 + src/plugins/customComponents.ts | 2 + .../console/{console.vue => index.vue} | 0 src/views/login/LoginForm.vue | 177 +++++--- src/views/login/PhoneForm.vue | 169 ++++++++ src/views/login/QrcodeForm.vue | 41 ++ src/views/login/RegisterForm.vue | 231 +++++------ src/views/login/index.vue | 386 +++++++++--------- src/views/system/menu/CreateDrawer.vue | 119 ------ src/views/system/menu/columns.ts | 101 +++-- src/views/system/menu/edit.vue | 254 ++++++++++++ src/views/system/menu/index.vue | 384 +++++++---------- 13 files changed, 1118 insertions(+), 758 deletions(-) rename src/views/dashboard/console/{console.vue => index.vue} (100%) create mode 100644 src/views/login/PhoneForm.vue create mode 100644 src/views/login/QrcodeForm.vue delete mode 100644 src/views/system/menu/CreateDrawer.vue create mode 100644 src/views/system/menu/edit.vue diff --git a/src/layout/components/Footer/index.vue b/src/layout/components/Footer/index.vue index 6202799..3062264 100644 --- a/src/layout/components/Footer/index.vue +++ b/src/layout/components/Footer/index.vue @@ -1,11 +1,11 @@ @@ -23,7 +23,7 @@ + diff --git a/src/views/login/PhoneForm.vue b/src/views/login/PhoneForm.vue new file mode 100644 index 0000000..91ef2a5 --- /dev/null +++ b/src/views/login/PhoneForm.vue @@ -0,0 +1,169 @@ + + + + + + diff --git a/src/views/login/QrcodeForm.vue b/src/views/login/QrcodeForm.vue new file mode 100644 index 0000000..9d29fea --- /dev/null +++ b/src/views/login/QrcodeForm.vue @@ -0,0 +1,41 @@ + + + + + diff --git a/src/views/login/RegisterForm.vue b/src/views/login/RegisterForm.vue index 81f5ef8..968ef4f 100644 --- a/src/views/login/RegisterForm.vue +++ b/src/views/login/RegisterForm.vue @@ -1,160 +1,163 @@ diff --git a/src/views/login/index.vue b/src/views/login/index.vue index 7f6b50d..e11d60e 100644 --- a/src/views/login/index.vue +++ b/src/views/login/index.vue @@ -1,221 +1,221 @@ diff --git a/src/views/system/menu/CreateDrawer.vue b/src/views/system/menu/CreateDrawer.vue deleted file mode 100644 index f3e1b27..0000000 --- a/src/views/system/menu/CreateDrawer.vue +++ /dev/null @@ -1,119 +0,0 @@ - - - diff --git a/src/views/system/menu/columns.ts b/src/views/system/menu/columns.ts index 1907545..90359bd 100644 --- a/src/views/system/menu/columns.ts +++ b/src/views/system/menu/columns.ts @@ -1,54 +1,89 @@ import { h } from 'vue'; import { BasicColumn } from '@/components/Table'; -import { NTag } from 'naive-ui'; - +import {NTag } from 'naive-ui'; +import { renderIcon } from '@/utils'; +import * as VueIcon from '@vicons/antd'; +const iconComponent = (icon) => { + const IconComponent = renderIcon(VueIcon[icon]); + return IconComponent; +}; export const columns: BasicColumn[] = [ { title: '菜单名称', - key: 'label', + key: 'name', + width: 250, }, { title: '类型', key: 'type', - render(row) { - return h( - 'span', - {}, - { - default: () => (row.type === 1 ? '侧边栏菜单' : ''), - }, - ); - }, - }, - { - title: '副标题', - key: 'subtitle', - }, - { - title: '路径', - key: 'path', - }, - { - title: '权限标识', - key: 'auth', - }, - { - title: '打开方式', - key: 'openType', - render(row) { + width: 100, + render(record) { return h( NTag, { - type: 'info', + type: record.type == 1 ? 'success' : 'info', }, { - default: () => (row.openType === 1 ? '当前窗口' : '新窗口'), + default: () => (record.type == 1 ? '按钮' : '菜单'), }, ); }, }, { - title: '创建时间', - key: 'create_date', + title: '图标', + key: 'icon2', + width: 100, + render(record){ + return h( + iconComponent(record.icon2) + ) + } }, + { + title: '权限标识', + key: 'permission', + width: 200, + }, + { + title: '状态', + key: 'status', + width: 100, + render(record) { + return h( + NTag, + { + type:record.status == 0 ? 'info' : 'error', + }, + { + default: () => (record.status == 0 ? '正常' : '停用'), + }, + ); + }, + }, + { + title: '是否隐藏', + key: 'type', + width: 100, + render(record) { + return h( + NTag, + { + type: record.hide == 0 ? 'success' : 'error', + }, + { + default: () => (record.hide == 0 ? '显示' : '隐藏'), + }, + ); + }, + }, + { + title: '排序', + key: 'sort', + width: 100, + }, + { + title: '更新时间', + key: 'updateTime', + width: 180, + } ]; diff --git a/src/views/system/menu/edit.vue b/src/views/system/menu/edit.vue new file mode 100644 index 0000000..7bb95a1 --- /dev/null +++ b/src/views/system/menu/edit.vue @@ -0,0 +1,254 @@ + + diff --git a/src/views/system/menu/index.vue b/src/views/system/menu/index.vue index f75148c..d5fbf3b 100644 --- a/src/views/system/menu/index.vue +++ b/src/views/system/menu/index.vue @@ -1,249 +1,169 @@