feat: The translation box can be set to adaptive height

This commit is contained in:
Gabe
2025-10-26 16:18:56 +08:00
parent 61a515c1d2
commit bdaf665b7c
5 changed files with 45 additions and 6 deletions

View File

@@ -68,6 +68,7 @@ export default function Tranbox() {
hideClickAway = false,
simpleStyle = false,
followSelection = false,
autoHeight = false,
triggerMode = OPT_TRANBOX_TRIGGER_CLICK,
// extStyles = "",
enDict = OPT_DICT_BING,
@@ -330,6 +331,20 @@ export default function Tranbox() {
max={200}
/>
</Grid>
<Grid item xs={12} sm={12} md={6} lg={3}>
<TextField
fullWidth
select
size="small"
name="autoHeight"
value={autoHeight}
label={i18n("tranbox_auto_height")}
onChange={handleChange}
>
<MenuItem value={false}>{i18n("disable")}</MenuItem>
<MenuItem value={true}>{i18n("enable")}</MenuItem>
</TextField>
</Grid>
{!isExt && (
<Grid item xs={12} sm={12} md={6} lg={3}>
<ShortcutInput