Skip to content

Commit a23f6d1

Browse files
committed
🐛 处理窄屏显示问题 #495
1 parent 33edabd commit a23f6d1

1 file changed

Lines changed: 4 additions & 5 deletions

File tree

src/pages/options/routes/ScriptList.tsx

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,6 @@ function ScriptList() {
167167
key: "name",
168168
title: t("name"),
169169
dataIndex: "name",
170-
width: 240,
171170
sorter: (a, b) => a.name.localeCompare(b.name),
172171
filterIcon: <IconSearch />,
173172
filterDropdown: ({ filterKeys, setFilterKeys, confirm }: any) => {
@@ -209,6 +208,7 @@ function ScriptList() {
209208
setTimeout(() => inputRef.current!.focus(), 150);
210209
}
211210
},
211+
className: "max-w-[240px]",
212212
render: (col, item: ListType) => {
213213
return (
214214
<Tooltip content={col} position="tl">
@@ -804,9 +804,8 @@ function ScriptList() {
804804
// 将选中的脚本依次置顶(从后往前,保持选中脚本之间的相对顺序)
805805
[...select].reverse().forEach((script) => {
806806
// 找到脚本当前的位置
807-
const scriptIndex = currentScripts.findIndex((s) => s.uuid === script.uuid);
808-
if (scriptIndex > 0) {
809-
// 如果不是已经在最顶部
807+
const scriptIndex = currentScripts.findIndex(s => s.uuid === script.uuid);
808+
if (scriptIndex > 0) { // 如果不是已经在最顶部
810809
// 将脚本置顶(移动到第一个位置)
811810
dispatch(sortScript({ active: script.uuid, over: currentScripts[0].uuid }));
812811
}
@@ -995,7 +994,7 @@ function ScriptList() {
995994
hideOnSinglePage: true,
996995
}}
997996
style={{
998-
minWidth: "1100px",
997+
minWidth: "1200px",
999998
}}
1000999
rowSelection={{
10011000
type: "checkbox",

0 commit comments

Comments
 (0)