fix: 修复设置页面没成功初始化设置问题
This commit is contained in:
parent
c75230a67d
commit
4c1761468f
@ -76,10 +76,16 @@ $(function(){
|
|||||||
|
|
||||||
// 初始化显示
|
// 初始化显示
|
||||||
for (const key in data) {
|
for (const key in data) {
|
||||||
if (data.hasOwnProperty(key) && data[key] != "") {
|
if (data.hasOwnProperty(key)) {
|
||||||
const $element = $("#" + key);
|
const $element = $("#" + key);
|
||||||
if ($element.length) {
|
if ($element.length) {
|
||||||
$element.val(data[key]);
|
if (data[key] === true) {
|
||||||
|
$element.val('true');
|
||||||
|
} else if (data[key] === false) {
|
||||||
|
$element.val('false');
|
||||||
|
} else {
|
||||||
|
$element.val(data[key]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user