From e7f0724ed104acd663013573622cedae481d5ace Mon Sep 17 00:00:00 2001 From: yyx <3033867231@qq.com> Date: Thu, 12 Dec 2024 23:24:27 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- layout/Layout.vue | 114 +++ layout/components/AppMain.vue | 43 + layout/components/Navbar.vue | 235 +++++ layout/components/Sidebar/SidebarItem.vue | 154 +++ layout/components/Sidebar/index.vue | 89 ++ layout/components/index.js | 3 + layout/mixin/ResizeHandler.js | 41 + login/index.vue | 386 +++++++ pms/brand/add.vue | 34 + pms/brand/components/BrandDetail.vue | 145 +++ pms/brand/index.vue | 674 +++++++++++++ pms/brand/update.vue | 37 + pms/product/add.vue | 30 + pms/product/components/ProductAttrDetail.vue | 952 ++++++++++++++++++ pms/product/components/ProductDetail.vue | 396 ++++++++ pms/product/components/ProductInfoDetail.vue | 384 +++++++ .../components/ProductRelationDetail.vue | 310 ++++++ pms/product/components/ProductSaleDetail.vue | 601 +++++++++++ pms/product/index.vue | 908 +++++++++++++++++ pms/product/update.vue | 30 + pms/productAttr/addProductAttr.vue | 32 + .../components/ProductAttrDetail.vue | 185 ++++ pms/productAttr/index.vue | 463 +++++++++ pms/productAttr/productAttrList.vue | 455 +++++++++ pms/productAttr/updateProductAttr.vue | 32 + pms/productCate/add.vue | 31 + .../components/ProductCateDetail.vue | 264 +++++ pms/productCate/index.vue | 456 +++++++++ pms/productCate/update.vue | 31 + 29 files changed, 7515 insertions(+) create mode 100644 layout/Layout.vue create mode 100644 layout/components/AppMain.vue create mode 100644 layout/components/Navbar.vue create mode 100644 layout/components/Sidebar/SidebarItem.vue create mode 100644 layout/components/Sidebar/index.vue create mode 100644 layout/components/index.js create mode 100644 layout/mixin/ResizeHandler.js create mode 100644 login/index.vue create mode 100644 pms/brand/add.vue create mode 100644 pms/brand/components/BrandDetail.vue create mode 100644 pms/brand/index.vue create mode 100644 pms/brand/update.vue create mode 100644 pms/product/add.vue create mode 100644 pms/product/components/ProductAttrDetail.vue create mode 100644 pms/product/components/ProductDetail.vue create mode 100644 pms/product/components/ProductInfoDetail.vue create mode 100644 pms/product/components/ProductRelationDetail.vue create mode 100644 pms/product/components/ProductSaleDetail.vue create mode 100644 pms/product/index.vue create mode 100644 pms/product/update.vue create mode 100644 pms/productAttr/addProductAttr.vue create mode 100644 pms/productAttr/components/ProductAttrDetail.vue create mode 100644 pms/productAttr/index.vue create mode 100644 pms/productAttr/productAttrList.vue create mode 100644 pms/productAttr/updateProductAttr.vue create mode 100644 pms/productCate/add.vue create mode 100644 pms/productCate/components/ProductCateDetail.vue create mode 100644 pms/productCate/index.vue create mode 100644 pms/productCate/update.vue diff --git a/layout/Layout.vue b/layout/Layout.vue new file mode 100644 index 0000000..7425d23 --- /dev/null +++ b/layout/Layout.vue @@ -0,0 +1,114 @@ + + + + + + +#abc + + + \ No newline at end of file diff --git a/layout/components/AppMain.vue b/layout/components/AppMain.vue new file mode 100644 index 0000000..04e9cad --- /dev/null +++ b/layout/components/AppMain.vue @@ -0,0 +1,43 @@ + + + + +#abc + + diff --git a/layout/components/Navbar.vue b/layout/components/Navbar.vue new file mode 100644 index 0000000..23703ff --- /dev/null +++ b/layout/components/Navbar.vue @@ -0,0 +1,235 @@ + + + + + + +#abc + + + diff --git a/layout/components/Sidebar/SidebarItem.vue b/layout/components/Sidebar/SidebarItem.vue new file mode 100644 index 0000000..9252c2d --- /dev/null +++ b/layout/components/Sidebar/SidebarItem.vue @@ -0,0 +1,154 @@ + + + +#abc + + \ No newline at end of file diff --git a/layout/components/Sidebar/index.vue b/layout/components/Sidebar/index.vue new file mode 100644 index 0000000..45ebd60 --- /dev/null +++ b/layout/components/Sidebar/index.vue @@ -0,0 +1,89 @@ + + + + +#abc + + diff --git a/layout/components/index.js b/layout/components/index.js new file mode 100644 index 0000000..97ee3cd --- /dev/null +++ b/layout/components/index.js @@ -0,0 +1,3 @@ +export { default as Navbar } from './Navbar' +export { default as Sidebar } from './Sidebar' +export { default as AppMain } from './AppMain' diff --git a/layout/mixin/ResizeHandler.js b/layout/mixin/ResizeHandler.js new file mode 100644 index 0000000..dddc0b3 --- /dev/null +++ b/layout/mixin/ResizeHandler.js @@ -0,0 +1,41 @@ +import store from '@/store' + +const { body } = document +const WIDTH = 1024 +const RATIO = 3 + +export default { + watch: { + $route(route) { + if (this.device === 'mobile' && this.sidebar.opened) { + store.dispatch('CloseSideBar', { withoutAnimation: false }) + } + } + }, + beforeMount() { + window.addEventListener('resize', this.resizeHandler) + }, + mounted() { + const isMobile = this.isMobile() + if (isMobile) { + store.dispatch('ToggleDevice', 'mobile') + store.dispatch('CloseSideBar', { withoutAnimation: true }) + } + }, + methods: { + isMobile() { + const rect = body.getBoundingClientRect() + return rect.width - RATIO < WIDTH + }, + resizeHandler() { + if (!document.hidden) { + const isMobile = this.isMobile() + store.dispatch('ToggleDevice', isMobile ? 'mobile' : 'desktop') + + if (isMobile) { + store.dispatch('CloseSideBar', { withoutAnimation: true }) + } + } + } + } +} \ No newline at end of file diff --git a/login/index.vue b/login/index.vue new file mode 100644 index 0000000..656af7c --- /dev/null +++ b/login/index.vue @@ -0,0 +1,386 @@ + + + + + + +#abc + + + + +#abc + + + + + + + diff --git a/pms/brand/components/BrandDetail.vue b/pms/brand/components/BrandDetail.vue new file mode 100644 index 0000000..e7a5253 --- /dev/null +++ b/pms/brand/components/BrandDetail.vue @@ -0,0 +1,145 @@ + + + + + diff --git a/pms/brand/index.vue b/pms/brand/index.vue new file mode 100644 index 0000000..8ef5d57 --- /dev/null +++ b/pms/brand/index.vue @@ -0,0 +1,674 @@ + + + + + +#abc + + + + + + +#abc + + + + + + diff --git a/pms/product/add.vue b/pms/product/add.vue new file mode 100644 index 0000000..526aa83 --- /dev/null +++ b/pms/product/add.vue @@ -0,0 +1,30 @@ + + + + +#abc + + + \ No newline at end of file diff --git a/pms/product/components/ProductAttrDetail.vue b/pms/product/components/ProductAttrDetail.vue new file mode 100644 index 0000000..5b90eb2 --- /dev/null +++ b/pms/product/components/ProductAttrDetail.vue @@ -0,0 +1,952 @@ + + + + + + +#abc + + + + + + +#abc + + + \ No newline at end of file diff --git a/pms/product/components/ProductInfoDetail.vue b/pms/product/components/ProductInfoDetail.vue new file mode 100644 index 0000000..aa947e7 --- /dev/null +++ b/pms/product/components/ProductInfoDetail.vue @@ -0,0 +1,384 @@ + + + + + + +#abc + + + + + +#abc + + + + + \ No newline at end of file diff --git a/pms/product/components/ProductSaleDetail.vue b/pms/product/components/ProductSaleDetail.vue new file mode 100644 index 0000000..2a94c3a --- /dev/null +++ b/pms/product/components/ProductSaleDetail.vue @@ -0,0 +1,601 @@ + + + + + + + +#abc + + + + + + +#abc +