咏竹莉
where there is a will,there is a way
摘要: .div { width: 0; height:0; border-width: 100px; border-color: transparent red transparent transparent; transform: rotate(90deg); /*顺时针旋转90度*/ } 阅读全文
posted @ 2021-04-19 16:54 咏竹莉 阅读(92) 评论(0) 推荐(0)
摘要: 在做vue项目的时候,要求用户在页面访问前先登录,或在离开页面前发出提醒。 一、 全局守卫 router.beforeEach 路由改变前的钩子 const router = new VueRouter({...}) router.beforeEach((to, from, next) => { } 阅读全文
posted @ 2021-04-19 16:44 咏竹莉 阅读(204) 评论(0) 推荐(0)
摘要: vuex 是一个专为vue.js 应用程序开发的状态管理器,在main.js引入store 注入,在new Vue中挂载到vue实例中。 new Vue({ router, store, // store 和 router一样,将我们创建的Vuex实例挂载到这个vue实例中 render: h=> 阅读全文
posted @ 2021-04-19 15:03 咏竹莉 阅读(90) 评论(0) 推荐(0)