From 05a43d8d144fefdaf711ea5a2b1b6b145677fdc8 Mon Sep 17 00:00:00 2001 From: baiyapeng Date: Fri, 5 Dec 2025 12:26:28 +0800 Subject: [PATCH] feat: Added Youdao Translate --- src/App.svelte | 41 +++++++++++++++++++++++++++++++++++++---- 1 file changed, 37 insertions(+), 4 deletions(-) diff --git a/src/App.svelte b/src/App.svelte index 4e9d3da..242c9e4 100644 --- a/src/App.svelte +++ b/src/App.svelte @@ -5,6 +5,7 @@ let text = $state(""); let urlMaps = $state({ sougou: `https://fanyi.sogou.com`, + youdao: `https://fanyi.youdao.com`, }); onMount(() => { @@ -25,14 +26,16 @@ $effect(() => { urlMaps.sougou = `https://fanyi.sogou.com/text?keyword=${text}%0A&transfrom=auto&transto=zh-CHS&model=general`; + // 有道翻译不支持通过URL参数自动填入文本,因此只能打开翻译页面 + urlMaps.youdao = `https://fanyi.youdao.com/#/TextTranslate`; });
-