Becoming a better version of myself.:sunny:
- 🌀 我的博客
- 📞 联系
- QQ:12155627787
- Email: [email protected]
- ✒️ 技术
- 喜欢前端三贱客以及周边技术;
- 对后端也略有兴趣。
🏠 个人情况:暂时在成都工作,是一个从二开转行前端的Boy...其实,能做自己比较喜欢的事真是太好了(^▽^)。
花有重开日,人无再少年... 珍重!
一个用来做权限练习的简单后台模板
Becoming a better version of myself.:sunny:
🏠 个人情况:暂时在成都工作,是一个从二开转行前端的Boy...其实,能做自己比较喜欢的事真是太好了(^▽^)。
花有重开日,人无再少年... 珍重!
写的挺好~按照你这个模板把那个视频看了,对老铁表示感谢
sessionStorage.getItem('v-user') && initDynamicRouter()
你写的这个代码是什么意思的吖,为什么有了这句代码刷新页面路由数据就不会消失了,为什么呢
没事,乱发一个哈哈
大哥,我做自定义指令报这个错怎么解决呢,我是按照视频中来写的,为啥那个老师的没有报错呢
import Vue from 'vue' import router from '@/router' Vue.directive('permission', { inserted (el, binding) { // console.log(el) console.log(binding) const action = binding.value.action // 判断,在当前路由所对应的组件中,如何判断用户是否具备 action 权限 console.log(action) console.log(router.currentRoute.meta) if (router.currentRoute.meta.index0f(action) === -1) { el.parentNode.removeChild(el) } } })
报错信息 Error in directive permission inserted hook: "TypeError: router__WEBPACK_IMPORTED_MODULE_1_.default.currentRoute.meta.index0f is not a function"
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.