mirror of
https://github.com/zclzone/vue-naive-admin.git
synced 2025-05-01 06:39:01 +08:00
Compare commits
2 Commits
eb3c56f5af
...
e135be93af
Author | SHA1 | Date | |
---|---|---|---|
|
e135be93af | ||
|
369ff0a68f |
@ -112,6 +112,7 @@ function handleDelete(item) {
|
||||
await api.deletePermission(item.id)
|
||||
$message.success('删除成功', { key: 'deleteMenu' })
|
||||
emit('refresh')
|
||||
emit('update:currentMenu', null)
|
||||
} catch (error) {
|
||||
$message.destroy('deleteMenu')
|
||||
}
|
||||
|
@ -115,7 +115,7 @@
|
||||
<template #unchecked>禁用</template>
|
||||
</n-switch>
|
||||
</n-form-item-gi>
|
||||
<n-form-item-gi v-if="modalForm.type === 'MENU'" :span="12" path="enable">
|
||||
<n-form-item-gi v-if="modalForm.type === 'MENU'" :span="12" path="keepAlive">
|
||||
<template #label>
|
||||
<QuestionLabel
|
||||
label="KeepAlive"
|
||||
@ -184,8 +184,8 @@ const required = {
|
||||
trigger: ['blur', 'change'],
|
||||
}
|
||||
|
||||
const defaultForm = { enable: true, show: true }
|
||||
const [modalFormRef, modalForm, validation] = useForm(defaultForm)
|
||||
const defaultForm = { enable: true, show: true, layout: '' }
|
||||
const [modalFormRef, modalForm, validation] = useForm()
|
||||
const [modalRef, okLoading] = useModal()
|
||||
|
||||
const modalAction = ref('')
|
||||
@ -193,8 +193,8 @@ const parentIdDisabled = ref(false)
|
||||
function handleOpen(options = {}) {
|
||||
const { action, row = {}, ...rest } = options
|
||||
modalAction.value = action
|
||||
modalForm.value = { ...row }
|
||||
parentIdDisabled.value = !!row.parentId
|
||||
modalForm.value = { ...defaultForm, ...row }
|
||||
parentIdDisabled.value = !!row.parentId && row.type === 'BUTTON'
|
||||
modalRef.value.open({ ...rest, onOk: onSave })
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user