fix: 存储管理及菜单管理功能优化 (#6)

菜单管理功能优化:
1、建议组件名称tag可点击快捷输入
2、目录类型外链无意义,隐藏
This commit is contained in:
kils
2024-04-24 17:06:23 +08:00
committed by GitHub
parent 9d77732fbc
commit 62d4432c00
3 changed files with 20 additions and 23 deletions

View File

@@ -50,7 +50,7 @@
<template #extra>
<div v-if="routeName">
<span>建议组件名称</span>
<a-tag>{{ routeName }}</a-tag>
<a-tag checkable @check="inputRouteName">{{ routeName }}</a-tag>
</div>
</template>
</a-form-item>
@@ -65,18 +65,6 @@
<a-input v-model.trim="form.permission" placeholder="system:user:add" allow-clear />
</a-form-item>
<a-row :gutter="16" v-if="[1, 2].includes(form.type)">
<a-col :xs="12" :sm="12" :md="8" :lg="8" :xl="8" :xxl="8">
<a-form-item label="是否外链" field="isExternalUrl" v-if="[1, 2].includes(form.type)">
<a-switch
v-model="form.isExternal"
:checked-value="true"
:unchecked-value="false"
checked-text=""
unchecked-text=""
type="round"
/>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="8" :lg="8" :xl="8" :xxl="8">
<a-form-item label="是否隐藏" field="hidden">
<a-switch
@@ -101,6 +89,18 @@
/>
</a-form-item>
</a-col>
<a-col :xs="12" :sm="12" :md="8" :lg="8" :xl="8" :xxl="8">
<a-form-item label="是否外链" field="isExternalUrl" v-if="form.type === 2">
<a-switch
v-model="form.isExternal"
:checked-value="true"
:unchecked-value="false"
checked-text=""
unchecked-text=""
type="round"
/>
</a-form-item>
</a-col>
</a-row>
<a-form-item label="菜单排序" field="sort">
<a-input-number v-model="form.sort" placeholder="请输入菜单排序" :min="1" mode="button" style="width: 150px" />
@@ -188,6 +188,10 @@ const formRules = computed(() => {
}
})
const inputRouteName = () => {
form.name = routeName.value
}
// 切换类型清除校验
const onChangeType = () => {
formRef.value?.clearValidate()