zzayne / iview-dynamicrouter Goto Github PK
View Code? Open in Web Editor NEWvue+iview 组件库的动态路由和权限验证实现
vue+iview 组件库的动态路由和权限验证实现
老大,根据您的权限验证,左侧的导航栏 是由 后台传递过来的吗?还是后台传递的数据 与我们写好的 进行匹配
前端菜鸟,尝试没通,求老大更新
登录账号没有加以区分啊
export default (url) =>()=>import(@/views/${url}.vue
)
这句需要装什么插件吗? 我在vue-cli 项目中使用 报错, 所以问下 ,麻烦解答一下, 谢谢
希望老大可以更新以iview admin2的template为基础,再出个分支就更好啦 @zzayne
学习中
搞了好久,一直没搞通;各种碰壁,谢谢
当设置好动态路由之后就报错```
ERROR in ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/tables/components/multiPageTable.vue
Module not found: Error: Can't resolve './editableTable.vue' in 'C:\Users\ding\Desktop\CustomerSanagementSystem\src\views\tables\components'
@ ./node_modules/babel-loader/lib!./node_modules/vue-loader/lib/selector.js?type=script&index=0!./src/views/tables/components/multiPageTable.vue 7:21-51
@ ./src/views/tables/components/multiPageTable.vue
@ ./src/views lazy ^./.*.vue$
@ ./src/libs/lazyLoading.js
@ ./src/libs/util.js
@ ./src/main.js
@ multi (webpack)-dev-server/client?http://localhost:8081 webpack/hot/dev-server @/main
Child html-webpack-plugin for "..\index.html":`
"path": "/businessRouter",
"icon": "iconfont icon-yewu1",
"name": "businessRouter",
"title": "业务管理",
"component": "Main",
"children": [
{
"path": "pactManage",
"name": "pactManage",
"title": "合同管理",
"component": "businessBox/pactManage/pactManage"
}
这是正常的路由数据控制。
我在children里面再嵌一层children不行吗?
路由是配置成功了,可以三层地址打开页面,但是点击菜单他打开的却是去掉/businessRouter的。直接是#/pactRouter
"path": "/businessRouter",
"icon": "iconfont icon-yewu1",
"name": "businessRouter",
"title": "业务管理",
"component": "Main",
"children": [
{
"path": "pactRouter",
"name": "pactRouter",
"title": "合同管理",
"component": "businessBox/pactManage/pactRouter",
"children": [
{
"path": "pactManage",
"name": "pactManage",
"title": "合同列表",
"component": "businessBox/pactManage/pactManage"
}
]
}
大概有40多个 .vue 文件 最后发现
// 生成路由节点
util.initRouterNode
方法中 menu.component = lazyLoading(menu.component); 这个位置导致的
求教有什么办法解决么?
你好,现在有个问题请教一下。
v-hasPermission在页面元素标签内是可以使用的,但是在render函数里怎么去控制按钮的权限呢,比如表格里的操作按钮
如果某用户没有访问A页面的权限,但直接在地址栏输入菜单名称就可以访问了,这种非法访问怎么拦截啊?求老大指点... @zzayne
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.