fix: default trans tag
This commit is contained in:
@@ -324,6 +324,8 @@ export const PROMPT_PLACE_TEXT = "{{text}}"; // 占位符
|
||||
|
||||
export const DEFAULT_COLOR = "#209CEE"; // 默认高亮背景色/线条颜色
|
||||
|
||||
export const DEFAULT_TRANS_TAG = "font";
|
||||
|
||||
// 全局规则
|
||||
export const GLOBLA_RULE = {
|
||||
pattern: "*",
|
||||
@@ -460,7 +462,7 @@ export const DEFAULT_SETTING = {
|
||||
detectRemote: false, // 是否使用远程语言检测
|
||||
contextMenus: true, // 是否添加右键菜单(作废)
|
||||
contextMenuType: 1, // 右键菜单类型(0不显示,1简单菜单,2多级菜单)
|
||||
transTag: "span", // 译文元素标签
|
||||
transTag: DEFAULT_TRANS_TAG, // 译文元素标签
|
||||
transOnly: false, // 是否仅显示译文
|
||||
transTitle: false, // 是否同时翻译页面标题
|
||||
subrulesList: DEFAULT_SUBRULES_LIST, // 订阅列表
|
||||
|
||||
@@ -12,6 +12,7 @@ import {
|
||||
DEFAULT_COLOR,
|
||||
MSG_TRANS_CURRULE,
|
||||
TRANS_NEWLINE_LENGTH,
|
||||
DEFAULT_TRANS_TAG,
|
||||
} from "../../config";
|
||||
import { useTranslate } from "../../hooks/Translate";
|
||||
import { styled, css } from "@mui/material/styles";
|
||||
@@ -90,7 +91,7 @@ export default function Content({ q, keeps, translator, $el }) {
|
||||
|
||||
const {
|
||||
newlineLength = TRANS_NEWLINE_LENGTH,
|
||||
transTag = "span",
|
||||
transTag = DEFAULT_TRANS_TAG,
|
||||
transOnly = false,
|
||||
} = translator.setting;
|
||||
|
||||
|
||||
@@ -26,6 +26,7 @@ import {
|
||||
OPT_LANGS_TO,
|
||||
DEFAULT_BLACKLIST,
|
||||
MSG_CONTEXT_MENUS,
|
||||
DEFAULT_TRANS_TAG,
|
||||
} from "../../config";
|
||||
import { useShortcut } from "../../hooks/Shortcut";
|
||||
import ShortcutInput from "./ShortcutInput";
|
||||
@@ -97,7 +98,7 @@ export default function Settings() {
|
||||
mouseKey = OPT_MOUSEKEY_DISABLE,
|
||||
detectRemote = false,
|
||||
contextMenuType = 1,
|
||||
transTag = "span",
|
||||
transTag = DEFAULT_TRANS_TAG,
|
||||
transOnly = false,
|
||||
transTitle = false,
|
||||
touchTranslate = 2,
|
||||
|
||||
Reference in New Issue
Block a user