diff --git a/README.md b/README.md index 29ca293..9c3dd22 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,15 @@ # Vue 3 + Vite +npm install + +npm install element-plus/icons-vue + npm run dev +npm run build + This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 ` - - - - diff --git a/src/components/leftMenu.vue b/src/components/leftMenu.vue new file mode 100644 index 0000000..e0ece87 --- /dev/null +++ b/src/components/leftMenu.vue @@ -0,0 +1,117 @@ + + + + + \ No newline at end of file diff --git a/src/components/skuModal.vue b/src/components/skuModal.vue new file mode 100644 index 0000000..68bf164 --- /dev/null +++ b/src/components/skuModal.vue @@ -0,0 +1,94 @@ + + + + + \ No newline at end of file diff --git a/src/main.js b/src/main.js index 11c0609..44fa672 100644 --- a/src/main.js +++ b/src/main.js @@ -5,28 +5,33 @@ import ElementPlus from "element-plus"; import zhCn from "element-plus/es/locale/lang/zh-cn"; import "element-plus/dist/index.css"; import "element-plus/theme-chalk/dark/css-vars.css"; +import * as ElementPlusIconsVue from '@element-plus/icons-vue' import store from "./store"; -let matchMedia = window.matchMedia("(prefers-color-scheme: light)"); -setDarkMode(matchMedia.matches); -matchMedia.addEventListener("change", function () { - console.log(`当前的主题是:${this.matches ? "light" : "dark"}`); - setDarkMode(this.matches); -}); +// let matchMedia = window.matchMedia("(prefers-color-scheme: light)"); +// setDarkMode(matchMedia.matches); +// matchMedia.addEventListener("change", function () { +// console.log(`当前的主题是:${this.matches ? "light" : "dark"}`); +// setDarkMode(this.matches); +// }); -// 设置主题模式 -function setDarkMode(flag) { - if (flag) { - document.querySelector("#html").classList.add("light"); - document.querySelector("#html").classList.remove("dark"); - } else { - document.querySelector("#html").classList.add("dark"); - document.querySelector("#html").classList.remove("light"); - } -} +// // 设置主题模式 +// function setDarkMode(flag) { +// if (flag) { +// document.querySelector("#html").classList.add("light"); +// document.querySelector("#html").classList.remove("dark"); +// } else { +// document.querySelector("#html").classList.add("dark"); +// document.querySelector("#html").classList.remove("light"); +// } +// } const app = createApp(App); +for (const [key, component] of Object.entries(ElementPlusIconsVue)) { + app.component(key, component) +} + app.use(router); app.use(store); app.use(ElementPlus, { locale: zhCn }); diff --git a/src/router/index.js b/src/router/index.js index e372ea9..93aaba2 100644 --- a/src/router/index.js +++ b/src/router/index.js @@ -23,6 +23,14 @@ const routes = [ }, component: () => import("@/views/register.vue"), }, + { + path: "/table", + name: "table", + meta: { + index: 1, + }, + component: () => import("@/views/table.vue"), + } ]; const router = createRouter({ diff --git a/src/views/cashier.vue b/src/views/cashier.vue new file mode 100644 index 0000000..63140d3 --- /dev/null +++ b/src/views/cashier.vue @@ -0,0 +1,3 @@ + \ No newline at end of file diff --git a/src/views/home.vue b/src/views/home.vue index 7cf0e6a..b6fbb9e 100644 --- a/src/views/home.vue +++ b/src/views/home.vue @@ -1,13 +1,568 @@ + + diff --git a/src/views/table.vue b/src/views/table.vue new file mode 100644 index 0000000..41e62f5 --- /dev/null +++ b/src/views/table.vue @@ -0,0 +1,3 @@ + \ No newline at end of file