1
0
mirror of https://github.com/zclzone/vue-naive-admin.git synced 2025-05-01 22:59:01 +08:00

Compare commits

..

No commits in common. "e135be93afe61186e0f4010b34def51584573134" and "eb3c56f5af526303451440a9ac59e7465bd07967" have entirely different histories.

2 changed files with 5 additions and 6 deletions

View File

@ -112,7 +112,6 @@ function handleDelete(item) {
await api.deletePermission(item.id) await api.deletePermission(item.id)
$message.success('删除成功', { key: 'deleteMenu' }) $message.success('删除成功', { key: 'deleteMenu' })
emit('refresh') emit('refresh')
emit('update:currentMenu', null)
} catch (error) { } catch (error) {
$message.destroy('deleteMenu') $message.destroy('deleteMenu')
} }

View File

@ -115,7 +115,7 @@
<template #unchecked>禁用</template> <template #unchecked>禁用</template>
</n-switch> </n-switch>
</n-form-item-gi> </n-form-item-gi>
<n-form-item-gi v-if="modalForm.type === 'MENU'" :span="12" path="keepAlive"> <n-form-item-gi v-if="modalForm.type === 'MENU'" :span="12" path="enable">
<template #label> <template #label>
<QuestionLabel <QuestionLabel
label="KeepAlive" label="KeepAlive"
@ -184,8 +184,8 @@ const required = {
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
} }
const defaultForm = { enable: true, show: true, layout: '' } const defaultForm = { enable: true, show: true }
const [modalFormRef, modalForm, validation] = useForm() const [modalFormRef, modalForm, validation] = useForm(defaultForm)
const [modalRef, okLoading] = useModal() const [modalRef, okLoading] = useModal()
const modalAction = ref('') const modalAction = ref('')
@ -193,8 +193,8 @@ const parentIdDisabled = ref(false)
function handleOpen(options = {}) { function handleOpen(options = {}) {
const { action, row = {}, ...rest } = options const { action, row = {}, ...rest } = options
modalAction.value = action modalAction.value = action
modalForm.value = { ...defaultForm, ...row } modalForm.value = { ...row }
parentIdDisabled.value = !!row.parentId && row.type === 'BUTTON' parentIdDisabled.value = !!row.parentId
modalRef.value.open({ ...rest, onOk: onSave }) modalRef.value.open({ ...rest, onOk: onSave })
} }