diff --git a/frontend/auto-imports.d.ts b/frontend/auto-imports.d.ts index eab6be6..2d82a80 100644 --- a/frontend/auto-imports.d.ts +++ b/frontend/auto-imports.d.ts @@ -3,9 +3,11 @@ // @ts-nocheck // noinspection JSUnusedGlobalSymbols // Generated by unplugin-auto-import +// biome-ignore lint: disable export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElMessage: typeof import('element-plus/es')['ElMessage'] const computed: typeof import('vue')['computed'] const createApp: typeof import('vue')['createApp'] const customRef: typeof import('vue')['customRef'] @@ -70,6 +72,6 @@ declare global { // for type re-export declare global { // @ts-ignore - export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue' + export type { Component, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' import('vue') } diff --git a/frontend/components.d.ts b/frontend/components.d.ts index fc576b9..6620659 100644 --- a/frontend/components.d.ts +++ b/frontend/components.d.ts @@ -74,6 +74,7 @@ declare module 'vue' { ElTooltip: typeof import('element-plus/es')['ElTooltip'] ElTransfer: typeof import('element-plus/es')['ElTransfer'] ElTree: typeof import('element-plus/es')['ElTree'] + ElUpload: typeof import('element-plus/es')['ElUpload'] Error: typeof import('./src/components/taskbar/Error.vue')['default'] FileIcon: typeof import('./src/components/builtin/FileIcon.vue')['default'] FileIconImg: typeof import('./src/components/builtin/FileIconImg.vue')['default'] diff --git a/frontend/src/components/builtin/FileList.vue b/frontend/src/components/builtin/FileList.vue index d500e90..9e969c7 100644 --- a/frontend/src/components/builtin/FileList.vue +++ b/frontend/src/components/builtin/FileList.vue @@ -369,7 +369,7 @@ function handleRightClick(mouse: MouseEvent, item: OsFileWithoutContent, index: }, ]; - if (item.isShare && item.path.indexOf('/F/othershare') !== 0) { + if (!item.isShare || item.path.indexOf('/F/othershare') !== 0) { fileMenus.push({ label: t('delete'), click: async () => { @@ -385,7 +385,7 @@ function handleRightClick(mouse: MouseEvent, item: OsFileWithoutContent, index: }) } const userType = sys.getConfig('userType'); - if (userType == 'member' && !item.isShare) { + if (userType == 'member' && !item.isShare && !item.isDirectory) { menuArr.push( { diff --git a/frontend/src/components/builtin/FileProps.vue b/frontend/src/components/builtin/FileProps.vue index 47799c1..86be739 100644 --- a/frontend/src/components/builtin/FileProps.vue +++ b/frontend/src/components/builtin/FileProps.vue @@ -79,6 +79,7 @@ const file = ref(); const path = window?.config.content if(path.indexOf('/F') === 0) { file.value = (await useSystem()?.fs.getShareInfo(path)).fi + // file.value.path = file.value.titleName || file.value.path } else { file.value = await useSystem()?.fs.stat(path); } diff --git a/frontend/src/components/chat/Chat.vue b/frontend/src/components/chat/Chat.vue index 5af16a2..ae19608 100644 --- a/frontend/src/components/chat/Chat.vue +++ b/frontend/src/components/chat/Chat.vue @@ -18,13 +18,27 @@ }; const data = ref(generateData()); - const users = ref([]); + // 声明 users 时指定类型为 any[] + const users = ref([]); watchEffect(() => { if (store.allUserList.length > 0) { data.value = generateData(); } }); + + function toggleSelectItem(item: any) { + const index = users.value.indexOf(item.key); + if (index === -1) { + users.value.push(item.key); + } else { + users.value.splice(index, 1); + } + } + + function removeItem(userId: string) { + users.value = users.value.filter((user) => user !== userId); + }