| | |
| | | <item v-if="item.meta" :icon="item.meta && item.meta.icon" :title="item.meta.title" />
|
| | | </template>
|
| | | <sidebar-item
|
| | | v-for="child in item.children"
|
| | | :key="child.path"
|
| | | v-for="(child, index) in item.children"
|
| | | :key="child.path + index"
|
| | | :is-nest="true"
|
| | | :item="child"
|
| | | :base-path="resolvePath(child.path)"
|
| | |
| | | },
|
| | | // 添加tab页签
|
| | | openPage(title, url, params) {
|
| | | var obj = { path: url, meta: { title: title } }
|
| | | const obj = { path: url, meta: { title: title } }
|
| | | store.dispatch('tagsView/addView', obj);
|
| | | return router.push({ path: url, query: params });
|
| | | },
|
| | |
| | | return all_permission === permission || permissionDatas.includes(permission)
|
| | | })
|
| | |
|
| | | if (!hasPermission) {
|
| | | return false
|
| | | }
|
| | | return true
|
| | | return hasPermission;
|
| | |
|
| | | } else {
|
| | | console.error(`need roles! Like checkPermi="['system:user:add','system:user:edit']"`)
|
| | | return false
|
| | |
| | | return super_admin === role || permissionRoles.includes(role)
|
| | | })
|
| | |
|
| | | if (!hasRole) {
|
| | | return false
|
| | | }
|
| | | return true
|
| | | return hasRole;
|
| | |
|
| | | } else {
|
| | | console.error(`need roles! Like checkRole="['admin','editor']"`)
|
| | | return false
|
| | |
| | | * @returns {Boolean}
|
| | | */
|
| | | export function isString(str) {
|
| | | if (typeof str === 'string' || str instanceof String) {
|
| | | return true
|
| | | }
|
| | | return false
|
| | | return typeof str === 'string' || str instanceof String;
|
| | | }
|
| | |
|
| | | /**
|