From 824defa72482056b916f535770d61ecc43e2a1d1 Mon Sep 17 00:00:00 2001 From: yennanliu Date: Mon, 27 Nov 2023 11:02:36 +0800 Subject: [PATCH] add category view, component, update router, negelect multi-word-component-names checks --- .../Frondend/ecommerce-ui/package.json | 2 +- .../src/components/Category/CategoryBox.vue | 58 +++++++++++++++++++ .../Frondend/ecommerce-ui/src/router/index.js | 8 +++ .../src/views/Category/Category.vue | 57 ++++++++++++++++++ 4 files changed, 124 insertions(+), 1 deletion(-) create mode 100644 ShoppingCart/Frondend/ecommerce-ui/src/components/Category/CategoryBox.vue create mode 100644 ShoppingCart/Frondend/ecommerce-ui/src/views/Category/Category.vue diff --git a/ShoppingCart/Frondend/ecommerce-ui/package.json b/ShoppingCart/Frondend/ecommerce-ui/package.json index 8e814e539..5234421ca 100644 --- a/ShoppingCart/Frondend/ecommerce-ui/package.json +++ b/ShoppingCart/Frondend/ecommerce-ui/package.json @@ -37,7 +37,7 @@ "parserOptions": { "parser": "@babel/eslint-parser" }, - "rules": {} + "rules": {"vue/multi-word-component-names": "off"} }, "browserslist": [ "> 1%", diff --git a/ShoppingCart/Frondend/ecommerce-ui/src/components/Category/CategoryBox.vue b/ShoppingCart/Frondend/ecommerce-ui/src/components/Category/CategoryBox.vue new file mode 100644 index 000000000..854e5850e --- /dev/null +++ b/ShoppingCart/Frondend/ecommerce-ui/src/components/Category/CategoryBox.vue @@ -0,0 +1,58 @@ + + + + + \ No newline at end of file diff --git a/ShoppingCart/Frondend/ecommerce-ui/src/router/index.js b/ShoppingCart/Frondend/ecommerce-ui/src/router/index.js index a23f7b0c3..a06590764 100644 --- a/ShoppingCart/Frondend/ecommerce-ui/src/router/index.js +++ b/ShoppingCart/Frondend/ecommerce-ui/src/router/index.js @@ -3,6 +3,7 @@ import VueRouter from "vue-router"; import HomeView from "../views/HomeView.vue"; import AddCategory from "../views/Category/AddCategory"; +import Category from "../views/Category/Category"; Vue.use(VueRouter); @@ -27,6 +28,13 @@ const routes = [ name: "AddCategory", component: AddCategory, }, + + { + path: "/admin/category", + name: "AdminCategory", + component: Category, +} + ]; const router = new VueRouter({ diff --git a/ShoppingCart/Frondend/ecommerce-ui/src/views/Category/Category.vue b/ShoppingCart/Frondend/ecommerce-ui/src/views/Category/Category.vue new file mode 100644 index 000000000..35efd0cd3 --- /dev/null +++ b/ShoppingCart/Frondend/ecommerce-ui/src/views/Category/Category.vue @@ -0,0 +1,57 @@ + + + + + \ No newline at end of file