给所有select元素添加一个右侧下拉按钮

This commit is contained in:
PaRaD1SE98
2023-05-10 07:14:49 +00:00
parent 0ad91101a4
commit 96e3d3a22c
6 changed files with 70 additions and 15 deletions

View File

@@ -10,7 +10,15 @@ import ClearIcon from "../icons/clear.svg";
import LoadingIcon from "../icons/three-dots.svg";
import EditIcon from "../icons/edit.svg";
import EyeIcon from "../icons/eye.svg";
import { Input, List, ListItem, Modal, PasswordInput, Popover } from "./ui-lib";
import {
Input,
List,
ListItem,
Modal,
PasswordInput,
Popover,
Select,
} from "./ui-lib";
import { ModelConfigList } from "./model-config";
import { IconButton } from "./button";
@@ -368,7 +376,7 @@ export function Settings() {
</ListItem>
<ListItem title={Locale.Settings.SendKey}>
<select
<Select
value={config.submitKey}
onChange={(e) => {
updateConfig(
@@ -382,11 +390,11 @@ export function Settings() {
{v}
</option>
))}
</select>
</Select>
</ListItem>
<ListItem title={Locale.Settings.Theme}>
<select
<Select
value={config.theme}
onChange={(e) => {
updateConfig(
@@ -399,11 +407,11 @@ export function Settings() {
{v}
</option>
))}
</select>
</Select>
</ListItem>
<ListItem title={Locale.Settings.Lang.Name}>
<select
<Select
value={getLang()}
onChange={(e) => {
changeLang(e.target.value as any);
@@ -414,7 +422,7 @@ export function Settings() {
{Locale.Settings.Lang.Options[lang]}
</option>
))}
</select>
</Select>
</ListItem>
<ListItem