fix determining state of condition-enable elements

This commit is contained in:
buzzcode2007 2024-04-03 08:21:50 +08:00
parent 907fbe9000
commit 16a5b038ee

View file

@ -429,17 +429,9 @@ export default class windowman {
input_elements.forEach((input_element) => { input_elements.forEach((input_element) => {
if (input_element.getAttribute("data-enable")) { if (input_element.getAttribute("data-enable")) {
(async () => { (async () => {
input_element.disabled = !((await secretariat.read( input_element.disabled = !((await secretariat.read(input_element.getAttribute("data-enable"))) != null
input_element.getAttribute("data-enable"), ? (typeof (await secretariat.read(input_element.getAttribute("data-enable")))).includes(`obj`)
)) != null ? (Object.keys(await secretariat.read(input_element.getAttribute("data-enable")))).length > 0
? (typeof (await secretariat.read(
input_element.getAttribute("data-enable"),
))).includes(`obj`)
? (
await secretariat.read(
input_element.getAttribute("data-enable"),
)
).length > 0
: !!(await secretariat.read( : !!(await secretariat.read(
input_element.getAttribute("data-enable"), input_element.getAttribute("data-enable"),
)) ))