菜单调整,资讯图标预览调整

This commit is contained in:
Jason 2022-09-20 18:50:08 +08:00
parent 73984d52c0
commit cadad25176
3 changed files with 11 additions and 9 deletions

View File

@ -20,7 +20,11 @@ const props = defineProps({
type: [String, Number],
default: 0
},
...imageProps
...imageProps,
hideOnClickModal: {
type: Boolean,
default: true
}
})
const styles = computed<CSSProperties>(() => {

View File

@ -54,10 +54,11 @@
<el-table-column label="ID" prop="id" min-width="80" />
<el-table-column label="封面" min-width="100">
<template #default="{ row }">
<el-image
<image-contain
v-if="row.image"
:src="row.image"
class="w-[60px] h-[45px]"
:width="60"
:height="45"
:preview-src-list="[row.image]"
preview-teleported
fit="contain"

View File

@ -73,7 +73,7 @@
</div>
</div>
</el-form-item>
<el-form-item label="选中菜单" prop="p" v-if="formData.menuType == MenuEnum.MENU">
<el-form-item label="选中菜单" prop="selected" v-if="formData.menuType == MenuEnum.MENU">
<div class="flex-1">
<el-input
v-model="formData.selected"
@ -259,15 +259,12 @@ const formRules = {
}
const menuOptions = ref<any[]>([])
const pageOptions = ref<any[]>([])
const getMenu = async () => {
const data: any = await menuLists()
const menu = { id: 0, menuName: '顶级', children: [] }
pageOptions.value = arrayToTree(
const menu: any = { id: 0, menuName: '顶级', children: [] }
menu.children = arrayToTree(
treeToArray(data).filter((item) => item.menuType != MenuEnum.BUTTON)
)
menu.children = data
menuOptions.value.push(menu)
}