width setting

This commit is contained in:
cutls 2021-04-01 16:54:34 +09:00
parent 5cb184505c
commit bb60f28b63

View File

@ -4,13 +4,18 @@ var envView = new Vue({
data: { config: envConstruction }, data: { config: envConstruction },
methods: { methods: {
complete: function (i, val) { complete: function (i, val) {
var ls = envView.config[i].storage var ls = envView.config[i]
M.toast({ html: 'Complete', displayLength: 3000 }) if (!ls.data) {
if (!val) { ls = [ls]
var id = envView.config[i].id } else {
var val = $('#' + id).val() ls = ls.data
}
for (var j = 0; j < ls.length; j++) {
M.toast({ html: 'Complete', displayLength: 3000 })
var id = ls[j].id
var val = $('#' + id).val()
localStorage.setItem(ls[j].storage, val)
} }
localStorage.setItem(ls, val)
if (ls == 'ha') { if (ls == 'ha') {
hardwareAcceleration(val) hardwareAcceleration(val)
} }
@ -105,8 +110,15 @@ function load() {
var max = envView.config.length var max = envView.config.length
for (var i = 0; i < max; i++) { for (var i = 0; i < max; i++) {
var ls = envView.config[i].storage var ls = envView.config[i].storage
if (localStorage.getItem(ls)) { if (ls) {
envView.config[i].setValue = localStorage.getItem(ls) if (localStorage.getItem(ls)) {
envView.config[i].setValue = localStorage.getItem(ls)
}
} else {
ls = envView.config[i].data
for (var j = 0; j < ls.length; j++) {
envView.config[i].data[j].setValue = localStorage.getItem(ls[j].storage)
}
} }
} }
var max = tlView.config.length var max = tlView.config.length