add watcher
This commit is contained in:
@@ -110,7 +110,7 @@
|
||||
|
||||
<script>
|
||||
// composable imports
|
||||
import { ref, computed } from "vue";
|
||||
import { ref, computed, watch } from "vue";
|
||||
import { useQuasar, useDialogPluginComponent } from "quasar";
|
||||
import { saveScript, editScript, downloadScript } from "@/api/scripts";
|
||||
import { notifySuccess } from "@/utils/notify";
|
||||
@@ -175,6 +175,12 @@ export default {
|
||||
script.value.code = r.code;
|
||||
});
|
||||
|
||||
watch(code, (newValue, oldValue) => {
|
||||
if (newValue) {
|
||||
script.value.code = code.value;
|
||||
}
|
||||
});
|
||||
|
||||
async function submitForm() {
|
||||
loading.value = true;
|
||||
let result = "";
|
||||
|
||||
Reference in New Issue
Block a user