diff --git a/front/components/Drawer/TextShareDrawer.vue b/front/components/Drawer/TextShareDrawer.vue index f0aaaa5..97c9a77 100644 --- a/front/components/Drawer/TextShareDrawer.vue +++ b/front/components/Drawer/TextShareDrawer.vue @@ -20,6 +20,15 @@ const actionHandlers: Partial> = { 'text-share': { onClick: () => showDrawer({ render: ({ hide }) => h(TextShareHandle, { ...props, hide }) }), }, + 'text-translate': { + onClick: () => + props.onTextHandle({ + type: 'text-translate', + config: { + source: 'auto', + }, + }), + }, // 'text-image-generate': { // label: '生成配图', icon: LucideImage, className: 'bg-red-300', // onClick: () => { console.log('复制链接') } diff --git a/front/components/Preprocessing/types.ts b/front/components/Preprocessing/types.ts index ede41ce..05d70ab 100644 --- a/front/components/Preprocessing/types.ts +++ b/front/components/Preprocessing/types.ts @@ -1,5 +1,5 @@ export type FileHandleKey = 'file-share' | 'file-image-compress' | 'file-image-convert' export type FileShareHandleProps = { type: FileHandleKey; config: Record } -export type TextHandleKey = 'text-share' +export type TextHandleKey = 'text-share' | 'text-translate' export type TextShareHandleProps = { type: TextHandleKey; config: Record } diff --git a/front/components/Result/ResultIndexView.vue b/front/components/Result/ResultIndexView.vue index fa4927e..94bc7a9 100644 --- a/front/components/Result/ResultIndexView.vue +++ b/front/components/Result/ResultIndexView.vue @@ -1,6 +1,7 @@