diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..9d3ff636bc0217da4d990145fc4d0e15d4051911 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/App.vue" @@ -0,0 +1,68 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/left.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/left.vue" new file mode 100644 index 0000000000000000000000000000000000000000..4b5a3b214b3b4c703e4119eda4c2eff87bc57e59 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/left.vue" @@ -0,0 +1,63 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/right.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/right.vue" new file mode 100644 index 0000000000000000000000000000000000000000..d6e65c152910d23f12a9e38c6b15962d579dd14a --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/goods/right.vue" @@ -0,0 +1,26 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconCommunity.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconCommunity.vue" new file mode 100644 index 0000000000000000000000000000000000000000..2dc8b055253af30fb797037e2fe260505f0cf711 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconCommunity.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconDocumentation.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconDocumentation.vue" new file mode 100644 index 0000000000000000000000000000000000000000..6d4791cfbcf2782b3e5ffbabd042d4c47b2fbbed --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconDocumentation.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconEcosystem.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconEcosystem.vue" new file mode 100644 index 0000000000000000000000000000000000000000..c3a4f078c0bd340a33c61ea9ecd8a755d03571ed --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconEcosystem.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconSupport.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconSupport.vue" new file mode 100644 index 0000000000000000000000000000000000000000..7452834d3ef961ce24c3a072ddba2620b6158bae --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconSupport.vue" @@ -0,0 +1,7 @@ + diff --git "a/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconTooling.vue" "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconTooling.vue" new file mode 100644 index 0000000000000000000000000000000000000000..660598d7c76644ffe126a1a1feb1606650bfb937 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230410-Vue\346\217\222\346\247\275/components/icons/IconTooling.vue" @@ -0,0 +1,19 @@ + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..7c6366221c301f5b61c0b0e2fffb662f9d788b59 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/App.vue" @@ -0,0 +1,45 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/center.vue" "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/center.vue" new file mode 100644 index 0000000000000000000000000000000000000000..5fb8777c9f13319298288f7891af338d12bc7891 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/center.vue" @@ -0,0 +1,126 @@ + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/top.vue" "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/top.vue" new file mode 100644 index 0000000000000000000000000000000000000000..a545735b579cdc10c5c92ecc7caf2d8868daebf6 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/top.vue" @@ -0,0 +1,19 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/\346\224\266\346\254\276\347\240\201.jpg" "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/\346\224\266\346\254\276\347\240\201.jpg" new file mode 100644 index 0000000000000000000000000000000000000000..42c2a141b65fed979a8bfe9b02e41b617124be59 Binary files /dev/null and "b/\346\210\264\344\275\263\350\276\211/20230413-VueSetup/components/goods/\346\224\266\346\254\276\347\240\201.jpg" differ diff --git "a/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..7fea2c30a107e25fa736a9fc668b01ce12aa2729 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/App.vue" @@ -0,0 +1,44 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/center.vue" "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/center.vue" new file mode 100644 index 0000000000000000000000000000000000000000..0f6e2e148949c353256c0163def3566bad14b25b --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/center.vue" @@ -0,0 +1,108 @@ + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/top.vue" "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/top.vue" new file mode 100644 index 0000000000000000000000000000000000000000..fb8e7bb92ab0c2d3125238903f1a657f29ffcfd6 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230415-Vue\345\205\250\345\261\200\344\272\213\344\273\266\346\200\273\347\272\277/components/goods/top.vue" @@ -0,0 +1,25 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..3116b399511c2d34a1a77065947991588e60886f --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/App.vue" @@ -0,0 +1,58 @@ + + + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/gaikuang.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/gaikuang.vue" new file mode 100644 index 0000000000000000000000000000000000000000..1e0af318d1ade3a8678a856e181fc41d48c517ca --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/gaikuang.vue" @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/jianjie.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/jianjie.vue" new file mode 100644 index 0000000000000000000000000000000000000000..65144b1ce3c8067fbd3fcd4dfdc7111f3622c9ad --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/jianjie.vue" @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/lingdao.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/lingdao.vue" new file mode 100644 index 0000000000000000000000000000000000000000..19b9d64df48bd236362ff0cc68f0b52590771d48 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/lingdao.vue" @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/shipin.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/shipin.vue" new file mode 100644 index 0000000000000000000000000000000000000000..e9f3d489419f4701ead6f922d4aee32ff214323f --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/shipin.vue" @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiangce.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiangce.vue" new file mode 100644 index 0000000000000000000000000000000000000000..0a532e2dc1ac1e4d52ae9e22dc57e650835a585e --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiangce.vue" @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiaoxun.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiaoxun.vue" new file mode 100644 index 0000000000000000000000000000000000000000..d60439f4acf451579df7dda86068b6513c7e4e78 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/xiaoxun.vue" @@ -0,0 +1,30 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/zhangcheng.vue" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/zhangcheng.vue" new file mode 100644 index 0000000000000000000000000000000000000000..d4472e7f6532c7a802aaa01068996e7f73433aa2 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/components/zhangcheng.vue" @@ -0,0 +1,400 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/main.js" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/main.js" new file mode 100644 index 0000000000000000000000000000000000000000..10128a941a0ccca7a37fb6a02eb0956affdb6e98 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/main.js" @@ -0,0 +1,8 @@ +import { createApp } from 'vue' +import App from './App.vue' +import router from './router' + +// import './assets/main.css' + + +createApp(App).use(router).mount('#app') diff --git "a/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/router/index.js" "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/router/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..31743b11855007db7e11f01de99492bb38857633 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230419-VueRouter/router/index.js" @@ -0,0 +1,52 @@ +import {createRouter,createWebHistory} from 'vue-router' +import gaikuang from '../components/gaikuang.vue' +import jianjie from '../components/jianjie.vue' +import lingdao from '../components/lingdao.vue' +import zhangcheng from '../components/zhangcheng.vue' +import xiaoxun from '../components/xiaoxun.vue' +import xiangce from '../components/xiangce.vue' +import shipin from '../components/shipin.vue' + +const router = createRouter({ + history:createWebHistory(), + routes:[ + { + path:'/gaikuang', + name:'gaikuang', + component:gaikuang + }, + { + path:'/jianjie', + name:'jianjie', + component:jianjie + }, + { + path:'/lingdao', + name:'lingdao', + component:lingdao + }, + { + path:'/zhangcheng', + name:'zhangcheng', + component:zhangcheng + }, + { + path:'/xiaoxun', + name:'xiaoxun', + component:xiaoxun + }, + { + path:'/xiangce', + name:'xiangce', + component:xiangce + }, + { + path:'/shipin', + name:'shipin', + component:shipin + }, + +] +}) + +export default router; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..5fff6525042c9d9aa3ad8992aeb71afbbb96bd6b --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/App.vue" @@ -0,0 +1,18 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/base.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/base.vue" new file mode 100644 index 0000000000000000000000000000000000000000..deffd6c499b62b312af7a41390ad13329a2f1385 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/base.vue" @@ -0,0 +1,75 @@ + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/gaikuang.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/gaikuang.vue" new file mode 100644 index 0000000000000000000000000000000000000000..1e0af318d1ade3a8678a856e181fc41d48c517ca --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/gaikuang.vue" @@ -0,0 +1,14 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/jianjie.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/jianjie.vue" new file mode 100644 index 0000000000000000000000000000000000000000..65144b1ce3c8067fbd3fcd4dfdc7111f3622c9ad --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/jianjie.vue" @@ -0,0 +1,17 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/lingdao.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/lingdao.vue" new file mode 100644 index 0000000000000000000000000000000000000000..19b9d64df48bd236362ff0cc68f0b52590771d48 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/lingdao.vue" @@ -0,0 +1,32 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/shipin.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/shipin.vue" new file mode 100644 index 0000000000000000000000000000000000000000..e3f07b8f8d03cbe8495ce4bc44edbfbb080b7c02 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/shipin.vue" @@ -0,0 +1,15 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiangce.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiangce.vue" new file mode 100644 index 0000000000000000000000000000000000000000..0a532e2dc1ac1e4d52ae9e22dc57e650835a585e --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiangce.vue" @@ -0,0 +1,51 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiaoxun.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiaoxun.vue" new file mode 100644 index 0000000000000000000000000000000000000000..936ef9f4af2030be908e8a0a00dbc3c701b49377 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/xiaoxun.vue" @@ -0,0 +1,29 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/zhangcheng.vue" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/zhangcheng.vue" new file mode 100644 index 0000000000000000000000000000000000000000..d4472e7f6532c7a802aaa01068996e7f73433aa2 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/components/zhangcheng.vue" @@ -0,0 +1,400 @@ + + + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/main.js" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/main.js" new file mode 100644 index 0000000000000000000000000000000000000000..acd69e28ba5accb95c98b1f5cc07e0b9a12d44cd --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/main.js" @@ -0,0 +1,6 @@ +import { createApp } from 'vue' +import App from './App.vue' +import router from './router' +// import './assets/main.css' + +createApp(App).use(router).mount('#app') \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/router/index.js" "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/router/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..da82531e8d323dcad4f05472ef88289f476df807 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230420-VueChildren/router/index.js" @@ -0,0 +1,59 @@ +import {createRouter,createWebHistory } from 'vue-router' +import basevue from '../components/base.vue' +import gaikuang from '../components/gaikuang.vue' +import jianjie from '../components/jianjie.vue' +import lingdao from '../components/lingdao.vue' +import zhangcheng from '../components/zhangcheng.vue' +import xiaoxun from '../components/xiaoxun.vue' +import xiangce from '../components/xiangce.vue' +import shipin from '../components/shipin.vue' + +const router = createRouter({ + history:createWebHistory(), + routes:[ + { + path:'/base', + name:'base', + component:basevue, + children:[ + { + path:'gaikuang', + name:'gaikuang', + component:gaikuang + }, + { + path:'jianjie', + name:'jianjie', + component:jianjie + }, + { + path:'lingdao', + name:'lingdao', + component:lingdao + }, + { + path:'zhangcheng', + name:'zhangcheng', + component:zhangcheng + }, + { + path:'xiaoxun', + name:'xiaoxun', + component:xiaoxun + }, + { + path:'xiangce', + name:'xiangce', + component:xiangce + }, + { + path:'shipin', + name:'shipin', + component:shipin + } + ] + } + ] +}) + +export default router; \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/App.vue" "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/App.vue" new file mode 100644 index 0000000000000000000000000000000000000000..def34c46aef23ed9f4b9db028f54d2b4bec85cf8 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/App.vue" @@ -0,0 +1,11 @@ + + + + + diff --git "a/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/index.vue" "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/index.vue" new file mode 100644 index 0000000000000000000000000000000000000000..79122ef14183e2affdc303e59861d1589b750bba --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/index.vue" @@ -0,0 +1,13 @@ + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/login.vue" "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/login.vue" new file mode 100644 index 0000000000000000000000000000000000000000..3849219ebee85bf8a7f20151838a98c73fd3767b --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/components/login.vue" @@ -0,0 +1,39 @@ + + + \ No newline at end of file diff --git "a/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/main.js" "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/main.js" new file mode 100644 index 0000000000000000000000000000000000000000..a31a4d9485cd95c1bbf57fe4eb3c0bd676481fa5 --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/main.js" @@ -0,0 +1,13 @@ +import { createApp } from 'vue' +import App from './App.vue' +import router from './router' + +// import './assets/main.css' + +// const app = createApp(App) + +// app.use(router) + +// app.mount('#app'); + +createApp(App).use(router).mount('#app') diff --git "a/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/router/index.js" "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/router/index.js" new file mode 100644 index 0000000000000000000000000000000000000000..6ee2b723296fc48815a9be40a81a4566aa8c263b --- /dev/null +++ "b/\346\210\264\344\275\263\350\276\211/20230422-Vue\350\267\257\347\224\261\345\256\210\345\215\253/router/index.js" @@ -0,0 +1,33 @@ +import { createRouter, createWebHistory } from 'vue-router' +import loginvue from '../components/login.vue' +import indexvue from '../components/index.vue' + +const router = createRouter({ + history: createWebHistory(import.meta.env.BASE_URL), + routes: [ + { + path: '/login', + name: 'login', + component: loginvue, + meta: { ischeck: false, title: "登陆页" } + }, + { + path: '/home', + name: 'home', + component: indexvue, + meta: { ischeck: true, title: "首页" } + }, + ] +}) + +router.beforeEach((to, from) => { + let islogin = localStorage.getItem('用户名') + if (to.meta.ischeck == true && islogin == null) { + return { path: '/login' } + } +}) + +router.afterEach((to, from) => { + document.getElementsByTagName("title")[0].textContent = to.meta.title +}) +export default router