add missing onMounted
This commit is contained in:
		@@ -94,6 +94,7 @@
 | 
				
			|||||||
          <tactical-dropdown
 | 
					          <tactical-dropdown
 | 
				
			||||||
            style="width: 350px"
 | 
					            style="width: 350px"
 | 
				
			||||||
            dense
 | 
					            dense
 | 
				
			||||||
 | 
					            :loading="agentLoading"
 | 
				
			||||||
            filled
 | 
					            filled
 | 
				
			||||||
            v-model="agent"
 | 
					            v-model="agent"
 | 
				
			||||||
            :options="agentOptions"
 | 
					            :options="agentOptions"
 | 
				
			||||||
@@ -124,7 +125,7 @@
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
<script>
 | 
					<script>
 | 
				
			||||||
// composable imports
 | 
					// composable imports
 | 
				
			||||||
import { ref, computed } from "vue";
 | 
					import { ref, computed, onMounted } from "vue";
 | 
				
			||||||
import { useQuasar, useDialogPluginComponent } from "quasar";
 | 
					import { useQuasar, useDialogPluginComponent } from "quasar";
 | 
				
			||||||
import { saveScript, editScript, downloadScript } from "@/api/scripts";
 | 
					import { saveScript, editScript, downloadScript } from "@/api/scripts";
 | 
				
			||||||
import { useAgentDropdown } from "@/composables/agents";
 | 
					import { useAgentDropdown } from "@/composables/agents";
 | 
				
			||||||
@@ -181,6 +182,7 @@ export default {
 | 
				
			|||||||
    const code = ref("");
 | 
					    const code = ref("");
 | 
				
			||||||
    const maximized = ref(false);
 | 
					    const maximized = ref(false);
 | 
				
			||||||
    const loading = ref(false);
 | 
					    const loading = ref(false);
 | 
				
			||||||
 | 
					    const agentLoading = ref(false);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    const title = computed(() => {
 | 
					    const title = computed(() => {
 | 
				
			||||||
      if (props.script) {
 | 
					      if (props.script) {
 | 
				
			||||||
@@ -245,6 +247,13 @@ export default {
 | 
				
			|||||||
      });
 | 
					      });
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    // component life cycle hooks
 | 
				
			||||||
 | 
					    onMounted(async () => {
 | 
				
			||||||
 | 
					      agentLoading.value = true;
 | 
				
			||||||
 | 
					      await getAgentOptions();
 | 
				
			||||||
 | 
					      agentLoading.value = false;
 | 
				
			||||||
 | 
					    });
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
      // reactive data
 | 
					      // reactive data
 | 
				
			||||||
      formScript: script.value,
 | 
					      formScript: script.value,
 | 
				
			||||||
@@ -253,6 +262,7 @@ export default {
 | 
				
			|||||||
      loading,
 | 
					      loading,
 | 
				
			||||||
      agentOptions,
 | 
					      agentOptions,
 | 
				
			||||||
      agent,
 | 
					      agent,
 | 
				
			||||||
 | 
					      agentLoading,
 | 
				
			||||||
 | 
					
 | 
				
			||||||
      // non-reactive data
 | 
					      // non-reactive data
 | 
				
			||||||
      shellOptions,
 | 
					      shellOptions,
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user