From a0014bed6529b15e07cf96413d4702c9904682a8 Mon Sep 17 00:00:00 2001 From: puhui999 Date: Mon, 24 Apr 2023 11:42:44 +0800 Subject: [PATCH] =?UTF-8?q?=E5=95=86=E5=93=81=E7=AE=A1=E7=90=86=E5=88=9D?= =?UTF-8?q?=E5=A7=8B=E7=95=8C=E9=9D=A2=E7=BB=93=E6=9E=84=E8=AE=BE=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/router/modules/remaining.ts | 31 ++- src/views/mall/product/management/addForm.vue | 53 +++++ .../management/components/BasicInfoForm.vue | 191 +++++++++++++++ .../management/components/DescriptionForm.vue | 13 + .../components/OtherSettingsForm.vue | 94 ++++++++ .../product/management/components/index.ts | 5 + src/views/mall/product/management/index.vue | 225 ++++++++++++++++++ 7 files changed, 608 insertions(+), 4 deletions(-) create mode 100644 src/views/mall/product/management/addForm.vue create mode 100644 src/views/mall/product/management/components/BasicInfoForm.vue create mode 100644 src/views/mall/product/management/components/DescriptionForm.vue create mode 100644 src/views/mall/product/management/components/OtherSettingsForm.vue create mode 100644 src/views/mall/product/management/components/index.ts create mode 100644 src/views/mall/product/management/index.vue diff --git a/src/router/modules/remaining.ts b/src/router/modules/remaining.ts index 55e933ed..32848b9a 100644 --- a/src/router/modules/remaining.ts +++ b/src/router/modules/remaining.ts @@ -2,9 +2,9 @@ import { Layout } from '@/utils/routerHelper' const { t } = useI18n() /** -* redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 -* name:'router-name' 设定路由的名字,一定要填写不然使用时会出现各种问题 -* meta : { + * redirect: noredirect 当设置 noredirect 的时候该路由在面包屑导航中不可被点击 + * name:'router-name' 设定路由的名字,一定要填写不然使用时会出现各种问题 + * meta : { hidden: true 当设置 true 的时候该路由不会再侧边栏出现 如404,login等页面(默认 false) alwaysShow: true 当你一个路由下面的 children 声明的路由大于1个时,自动会变成嵌套的模式, @@ -31,7 +31,7 @@ const { t } = useI18n() canTo: true 设置为true即使hidden为true,也依然可以进行路由跳转(默认 false) } -**/ + **/ const remainingRouter: AppRouteRecordRaw[] = [ { path: '/redirect', @@ -345,6 +345,29 @@ const remainingRouter: AppRouteRecordRaw[] = [ meta: { title: '商品属性值', icon: '', activeMenu: '/product/property' } } ] + }, + { + path: '/product', + component: Layout, + name: 'ProductManagementEdit', + meta: { + hidden: true + }, + children: [ + { + path: 'productManagementAdd', + component: () => import('@/views/mall/product/management/addForm.vue'), + name: 'ProductManagementAdd', + meta: { + noCache: true, + hidden: true, + canTo: true, + icon: 'ep:edit', + title: '添加商品', + activeMenu: '/product/product-management' + } + } + ] } ] diff --git a/src/views/mall/product/management/addForm.vue b/src/views/mall/product/management/addForm.vue new file mode 100644 index 00000000..d077df5b --- /dev/null +++ b/src/views/mall/product/management/addForm.vue @@ -0,0 +1,53 @@ + + diff --git a/src/views/mall/product/management/components/BasicInfoForm.vue b/src/views/mall/product/management/components/BasicInfoForm.vue new file mode 100644 index 00000000..1b33e9eb --- /dev/null +++ b/src/views/mall/product/management/components/BasicInfoForm.vue @@ -0,0 +1,191 @@ + + + diff --git a/src/views/mall/product/management/components/DescriptionForm.vue b/src/views/mall/product/management/components/DescriptionForm.vue new file mode 100644 index 00000000..53609705 --- /dev/null +++ b/src/views/mall/product/management/components/DescriptionForm.vue @@ -0,0 +1,13 @@ + + diff --git a/src/views/mall/product/management/components/OtherSettingsForm.vue b/src/views/mall/product/management/components/OtherSettingsForm.vue new file mode 100644 index 00000000..e8152883 --- /dev/null +++ b/src/views/mall/product/management/components/OtherSettingsForm.vue @@ -0,0 +1,94 @@ + + diff --git a/src/views/mall/product/management/components/index.ts b/src/views/mall/product/management/components/index.ts new file mode 100644 index 00000000..04e6f74d --- /dev/null +++ b/src/views/mall/product/management/components/index.ts @@ -0,0 +1,5 @@ +import BasicInfoForm from './BasicInfoForm.vue' +import DescriptionForm from './DescriptionForm.vue' +import OtherSettingsForm from './OtherSettingsForm.vue' + +export { BasicInfoForm, DescriptionForm, OtherSettingsForm } diff --git a/src/views/mall/product/management/index.vue b/src/views/mall/product/management/index.vue new file mode 100644 index 00000000..4fdfed1b --- /dev/null +++ b/src/views/mall/product/management/index.vue @@ -0,0 +1,225 @@ + +