Toggle navigation
Toggle navigation
This project
Loading...
Sign in
Hooke
/
data-table
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Graphs
Network
Create a new issue
Commits
Issue Boards
Authored by
hookehuyr
2024-06-28 09:58:37 +0800
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
d5abb2b9e678dfe6c47f7c8012c66f5cf211a028
d5abb2b9
1 parent
0322be6c
✨ feat(入口页): 权限报错信息判断
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
7 deletions
components.d.ts
src/App.vue
src/views/no_auth.vue
components.d.ts
View file @
d5abb2b
...
...
@@ -41,7 +41,7 @@ declare module '@vue/runtime-core' {
RuleField
:
typeof
import
(
'./src/components/RuleField/index.vue'
)[
'default'
]
SignField
:
typeof
import
(
'./src/components/SignField/index.vue'
)[
'default'
]
TableField
:
typeof
import
(
'./src/components/TableField/index.vue'
)[
'default'
]
Test
:
typeof
import
(
'./src/components/
VideoField
/test.vue'
)[
'default'
]
Test
:
typeof
import
(
'./src/components/
LoginBox
/test.vue'
)[
'default'
]
TextareaField
:
typeof
import
(
'./src/components/TextareaField/index.vue'
)[
'default'
]
TextField
:
typeof
import
(
'./src/components/TextField/index.vue'
)[
'default'
]
TimePickerField
:
typeof
import
(
'./src/components/TimePickerField/index.vue'
)[
'default'
]
...
...
src/App.vue
View file @
d5abb2b
...
...
@@ -87,12 +87,10 @@ onMounted(async () => {
if (data.length) {
Object.assign(form_setting, data[0]['property_list'], data[0]['extend']);
}
// TODO: 接口返回请求权限
// form_setting.no_auth = true;
// 缓存表单设置
store.changeFormSetting(form_setting);
//
TODO: 跳转
if (form_setting.
no_auth) {
//
跳转未授权页
if (form_setting.
auth_error) { // 权限报错信息存在
$router.replace({
path: '/no_auth',
query: {
...
...
src/views/no_auth.vue
View file @
d5abb2b
<!--
* @Date: 2022-06-29 18:18:02
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-06-2
5 13:45:2
7
* @LastEditTime: 2024-06-2
8 09:57:5
7
* @FilePath: /data-table/src/views/no_auth.vue
* @Description: 文件描述
-->
...
...
@@ -10,7 +10,7 @@
<div class="text-box">
<van-icon name="warning" color="red" size="1.25rem" /> 您暂无权限访问该页面
</div>
<div>{{ formSetting }}</div>
<div>{{ formSetting
.auth_error
}}</div>
</div>
</template>
...
...
Please
register
or
login
to post a comment