fix: webui

This commit is contained in:
手瓜一十雪 committed 2024-05-17 18:21:03 +08:00
1 parent 08f63d5809
commit e703ea8abd
2 files changed
+7 -4

No files matched your search

+4 -2
View File
@@ -245,6 +245,8 @@ async function onSettingWindowCreated(view: Element) {
doc: Document = document,
inputAttr: any = {}
) => {
type = type.replace(/\./g, "-");//替换操作
const hostContainerDom = doc.body.querySelector(
`#config-ob11-${type}-list`
);
@@ -252,11 +254,11 @@ async function onSettingWindowCreated(view: Element) {
buildHostListItem(
type,
"",
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
ob11Config[type.split("-")[0]][type.split("-")[1]].length,
inputAttr
)
);
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
ob11Config[type.split("-")[0]][type.split("-")[1]].push("");
};
const initReverseHost = (type: string, doc: Document = document) => {
const hostContainerDom = doc.body?.querySelector(
+3 -2
View File
@@ -357,6 +357,7 @@ async function onSettingWindowCreated(view) {
return result;
};
const addReverseHost = (type, doc2 = document, inputAttr = {}) => {
type = type.replace(/\./g, "-");
const hostContainerDom = doc2.body.querySelector(
`#config-ob11-${type}-list`
);
@@ -364,11 +365,11 @@ async function onSettingWindowCreated(view) {
buildHostListItem(
type,
"",
ob11Config[type.split(".")[0]][type.split(".")[1]].length,
ob11Config[type.split("-")[0]][type.split("-")[1]].length,
inputAttr
)
);
ob11Config[type.split(".")[0]][type.split(".")[1]].push("");
ob11Config[type.split("-")[0]][type.split("-")[1]].push("");
};
const initReverseHost = (type, doc2 = document) => {
const hostContainerDom = doc2.body?.querySelector(