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 +