diff --git a/front/components/Drawer/FileShareDrawer.vue b/front/components/Drawer/FileShareDrawer.vue index 87a3be5..782576a 100644 --- a/front/components/Drawer/FileShareDrawer.vue +++ b/front/components/Drawer/FileShareDrawer.vue @@ -15,6 +15,7 @@ import { cx } from 'class-variance-authority' import { isObject } from 'lodash-es' import showDrawer from '@/lib/showDrawer' import FileShareHandle from '@/components/Preprocessing/FileShareHandle.vue' +import ImageConvertHandle from '@/components/Preprocessing/ImageConvertHandle.vue' import type { FileShareHandleProps } from '../Preprocessing/types' const { t } = useI18n() const props = defineProps<{ @@ -52,6 +53,16 @@ const actions = [ props.onFileHandle({ type: 'file-image-compress', config: {} }) }, }, + isImage.value && { + label: t('page.upload.file.handleType.file-image-convert'), + icon: LucideArrowRightLeft, + className: 'bg-purple-300', + onClick: () => { + showDrawer({ + render: ({ hide }) => h(ImageConvertHandle, { ...props, hide }), + }) + }, + }, // isImage.value && { // label: '图片翻译', icon: LucideLanguages, className: 'bg-orange-300', onClick: () => { // console.log('复制链接') diff --git a/front/components/Result/ImageCompressResult.vue b/front/components/Result/ImageCompressResult.vue index 436054f..8254876 100644 --- a/front/components/Result/ImageCompressResult.vue +++ b/front/components/Result/ImageCompressResult.vue @@ -158,7 +158,7 @@ watch(