上一页 1 2 3 4 5 6 7 8 9 10 ··· 50 下一页
摘要: 使用 vue-cli 创建工程视频 使用 vite 创建工程视频 一、创建Vue3.0工程 1.使用 vue-cli 创建 官方文档:https://cli.vuejs.org/zh/guide/creating-a-project.html#vue-create ## 查看@vue/cli版本,确 阅读全文
posted @ 2023-04-17 11:00 垂序葎草 阅读(33) 评论(0) 推荐(0) 编辑
摘要: 视频 Vue3快速上手 1.Vue3简介 2020年9月18日,Vue.js发布3.0版本,代号:One Piece(海贼王) 耗时2年多、2600+次提交、30+个RFC、600+次PR、99位贡献者 github上的tags地址:https://github.com/vuejs/vue-next 阅读全文
posted @ 2023-04-14 15:29 垂序葎草 阅读(48) 评论(0) 推荐(0) 编辑
摘要: 笔记 脚手架文件结构 ├── node_modules ├── public │ ├── favicon.ico: 页签图标 │ └── index.html: 主页面 ├── src │ ├── assets: 存放静态资源 │ │ └── logo.png │ │── component: 存放 阅读全文
posted @ 2023-04-14 15:20 垂序葎草 阅读(24) 评论(0) 推荐(0) 编辑
摘要: 基本使用视频 按需引入视频 7.1移动端常用UI组件库 Vant https://youzan.github.io/vant Cube UI https://didi.github.io/cube-ui Mint UI http://mint-ui.github.io 7.2PC端常用UI组件库. 阅读全文
posted @ 2023-04-13 23:43 垂序葎草 阅读(20) 评论(0) 推荐(0) 编辑
摘要: 视频 13.路由器的两种工作模式 对于一个url来说,什么是hash值?—— #及其后面的内容就是hash值。 hash值不会包含在 HTTP 请求中,即:hash值不会带给服务器。 hash模式: 地址中永远带着#号,不美观 。 若以后将地址通过第三方手机app分享,若app校验严格,则地址会被标 阅读全文
posted @ 2023-04-13 23:18 垂序葎草 阅读(128) 评论(0) 推荐(0) 编辑
摘要: 视频 组件内守卫: //进入守卫:通过路由规则,进入该组件时被调用 beforeRouteEnter (to, from, next) { }, //离开守卫:通过路由规则,离开该组件时被调用 beforeRouteLeave (to, from, next) { } About.vue App.v 阅读全文
posted @ 2023-04-13 11:08 垂序葎草 阅读(111) 评论(0) 推荐(0) 编辑
摘要: 视频 独享守卫: beforeEnter(to,from,next){ console.log('beforeEnter',to,from) if(to.meta.isAuth){ //判断当前路由是否需要进行权限控制 if(localStorage.getItem('school') 'atgui 阅读全文
posted @ 2023-04-13 10:36 垂序葎草 阅读(18) 评论(0) 推荐(0) 编辑
摘要: 全局前置路由守卫视频 全局后置路由守卫视频 12.路由守卫 作用:对路由进行权限控制 分类:全局守卫、独享守卫、组件内守卫 全局守卫: //全局前置守卫:初始化时执行、每次路由切换前执行 router.beforeEach((to,from,next)=>{ console.log('beforeE 阅读全文
posted @ 2023-04-13 10:31 垂序葎草 阅读(114) 评论(0) 推荐(0) 编辑
摘要: 视频 11.两个新的生命周期钩子 作用:路由组件所独有的两个钩子,用于捕获路由组件的激活状态。 具体名字: activated路由组件被激活时触发。 deactivated路由组件失活时触发。 Home.vue News.vue #components ##Banner.vue <template> 阅读全文
posted @ 2023-04-12 21:33 垂序葎草 阅读(17) 评论(0) 推荐(0) 编辑
摘要: 视频 10.缓存路由组件 作用:让不展示的路由组件保持挂载,不被销毁。 具体编码: <keep-alive include="News"> <router-view></router-view> </keep-alive> News.vue Home.vue Message.vue #compone 阅读全文
posted @ 2023-04-12 21:20 垂序葎草 阅读(57) 评论(0) 推荐(0) 编辑
上一页 1 2 3 4 5 6 7 8 9 10 ··· 50 下一页