Add all the logic for presets working

This commit is contained in:
MattIPv4
2020-04-28 13:09:58 +01:00
parent 1df3ab88f6
commit 043f89eac0
3 changed files with 88 additions and 4 deletions

View File

@@ -61,6 +61,12 @@ limitations under the License.
if (changes) return ` (${changes.toLocaleString()})`;
return '';
},
setValue(tab, key, val) {
Object.assign(this.$props.data[tab][key], { value: val, computed: val });
},
resetValue(tab, key) {
this.setValue(tab, key, this.$props.data[tab][key].default);
},
},
};
</script>