Skip to content

Commit dd3ac76

Browse files
authored
🐛 UserConfigPanel CSS 修正 (#1361)
1 parent 99cb415 commit dd3ac76

3 files changed

Lines changed: 15 additions & 0 deletions

File tree

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
.modal-config .arco-tabs {
2+
position: static;
3+
}
4+
5+
.modal-config .arco-tabs-pane {
6+
max-height: calc(100vh - 400px);
7+
overflow: auto;
8+
}
9+
10+
.modal-config .arco-form-item:last-child {
11+
margin-bottom: 0;
12+
}

src/pages/components/UserConfigPanel/index.tsx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import { ValueClient } from "@App/app/service/service_worker/client";
2020
import { message } from "@App/pages/store/global";
2121
import type { TKeyValuePair } from "@App/pkg/utils/message_value";
2222
import { encodeRValue } from "@App/pkg/utils/message_value";
23+
import "./index.css";
2324

2425
const FormItem = Form.Item;
2526

@@ -52,6 +53,7 @@ const UserConfigPanel: React.FC<{
5253
return (
5354
<Modal
5455
visible={visible}
56+
className={"modal-config"}
5557
title={`${script.name} ${t("config")}`} // 替换为键值对应的英文文本
5658
okText={<Popover content={t("save_only_current_group")}>{t("save")}</Popover>}
5759
cancelText={t("close")} // 替换为键值对应的英文文本

src/pages/components/layout/MainLayout.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ const importByUrls = async (urls: string[]): Promise<TImportStat | undefined> =>
122122
const getSafePopupParent = (p: Element) => {
123123
p = (p.closest("button")?.parentNode as Element) || p; // 確保 ancestor 沒有 button 元素
124124
p = (p.closest("span")?.parentNode as Element) || p; // 確保 ancestor 沒有 span 元素
125+
p = (p.closest(".arco-form-item-control-children")?.parentNode as Element) || p; // 確保 ancestor 沒有 .form-item-control-children 元素
125126
p = (p.closest(".arco-collapse-item-content")?.parentNode as Element) || p; // 確保 ancestor 沒有 .arco-collapse-item-content 元素
126127
p = (p.closest(".arco-card")?.parentNode as Element) || p; // 確保 ancestor 沒有 .arco-card 元素
127128
p = (p.closest("aside")?.parentNode as Element) || p; // 確保 ancestor 沒有 aside 元素

0 commit comments

Comments
 (0)