Sfoglia il codice sorgente

Added a first version of `data-autoset`

tags/0.2.0
Florian Bouillon 3 mesi fa
parent
commit
aab4c0bc66
Firmato da: Avior <florian.bouillon@delta-wings.net> ID Chiave GPG: B143FF27EF555D16
1 ha cambiato i file con 10 aggiunte e 0 eliminazioni
  1. +10
    -0
      FormManager.ts

+ 10
- 0
FormManager.ts Vedi File

@@ -167,6 +167,16 @@ export default class FormManager {

//Setup the system for basic inputs
this.setupInputs()

setInterval(() => {
this.form.querySelectorAll("[data-autoset]").forEach((el: HTMLInputElement) => {
let autosetStr = el.dataset.autoset
if (autosetStr.startsWith("run:")) {
let tmp = autosetStr.split("run:")[1]
el.value = eval(tmp)
}
})
}, 500)
}

/**


Loading…
Annulla
Salva