From 43e39ace2c4570af967b1f625f3fbba0ee35bcff Mon Sep 17 00:00:00 2001 From: sanjayk03-dev Date: Mon, 22 Jan 2024 23:12:59 +0530 Subject: [PATCH] fixing vue component mounding --- src/js/macros.js | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/js/macros.js b/src/js/macros.js index 1e4778c..846e14d 100644 --- a/src/js/macros.js +++ b/src/js/macros.js @@ -39,9 +39,6 @@ module.exports = { is_ready: function () { return this.mach_state == "READY"; }, - updateNewGcode: function (event) { - this.newGcode[this.tab - 1] = event.target.value; - }, macrosList: function () { return this.config.macrosList.map((el) => el.gcode_file_name); }, @@ -50,6 +47,9 @@ module.exports = { open: function () { utils.clickFileInput("gcode-file-input"); }, + updateNewGcode: function (event) { + this.newGcode[this.tab - 1] = event.target.value; + }, loadMacrosGcode: async function () { const file = this.selectedValues[this.tab - 1]; if (this.selectedValues[this.tab - 1] != "default") { @@ -61,7 +61,8 @@ module.exports = { // this.newGcode[this.tab - 1]=text; Vue.set(this.newGcode,this.tab-1,text); } else { - this.newGcode[this.tab - 1]=""; + // this.newGcode[this.tab - 1]=""; + Vue.set(this.newGcode,this.tab-1,""); } console.log("newGcode: ",this.newGcode[this.tab - 1]); },