素材中心 分组bug
This commit is contained in:
parent
bdf1303854
commit
e92db41bea
|
|
@ -20,7 +20,7 @@ export function useCate(type: number) {
|
||||||
const cateLists = ref<any[]>([])
|
const cateLists = ref<any[]>([])
|
||||||
|
|
||||||
// 选中的分组id
|
// 选中的分组id
|
||||||
const cateId = ref('')
|
const cateId = ref<number | string>('')
|
||||||
|
|
||||||
// 获取分组列表
|
// 获取分组列表
|
||||||
const getCateLists = async () => {
|
const getCateLists = async () => {
|
||||||
|
|
@ -39,6 +39,9 @@ export function useCate(type: number) {
|
||||||
]
|
]
|
||||||
cateLists.value = data
|
cateLists.value = data
|
||||||
cateLists.value.unshift(...item)
|
cateLists.value.unshift(...item)
|
||||||
|
setTimeout(() => {
|
||||||
|
treeRef.value?.setCurrentKey(cateId.value)
|
||||||
|
}, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
// 添加分组
|
// 添加分组
|
||||||
|
|
@ -66,6 +69,7 @@ export function useCate(type: number) {
|
||||||
const handleDeleteCate = async (id: number) => {
|
const handleDeleteCate = async (id: number) => {
|
||||||
await feedback.confirm('确定要删除?')
|
await feedback.confirm('确定要删除?')
|
||||||
await fileCateDelete({ id })
|
await fileCateDelete({ id })
|
||||||
|
cateId.value = ''
|
||||||
getCateLists()
|
getCateLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -87,7 +91,12 @@ export function useCate(type: number) {
|
||||||
}
|
}
|
||||||
|
|
||||||
// 处理文件的钩子函数
|
// 处理文件的钩子函数
|
||||||
export function useFile(cateId: Ref<string>, type: Ref<number>, limit: Ref<number>, size: number) {
|
export function useFile(
|
||||||
|
cateId: Ref<string | number>,
|
||||||
|
type: Ref<number>,
|
||||||
|
limit: Ref<number>,
|
||||||
|
size: number
|
||||||
|
) {
|
||||||
const tableRef = shallowRef()
|
const tableRef = shallowRef()
|
||||||
const listShowType = ref('normal')
|
const listShowType = ref('normal')
|
||||||
const moveId = ref(0)
|
const moveId = ref(0)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue