|
@@ -28,7 +28,14 @@
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
-import { getCurrentInstance, onMounted, provide, reactive, ref } from 'vue'
|
|
|
+import {
|
|
|
+ getCurrentInstance,
|
|
|
+ onMounted,
|
|
|
+ provide,
|
|
|
+ reactive,
|
|
|
+ ref,
|
|
|
+ watch,
|
|
|
+} from 'vue'
|
|
|
import workflowChart from './chart/index.vue'
|
|
|
import workflowPanel from './chart/panel-index.vue'
|
|
|
import envVarsPanel from './instance/component/vars/evn-index.vue'
|
|
@@ -54,6 +61,12 @@ const state: any = reactive({
|
|
|
})
|
|
|
const ref_workflow = ref()
|
|
|
|
|
|
+watch(
|
|
|
+ () => WorkflowStore.autoSaveFlag,
|
|
|
+ () => {
|
|
|
+ console.log('自动保存')
|
|
|
+ },
|
|
|
+)
|
|
|
const getJsonData = () => {
|
|
|
const data = ref_workflow.value.toJSON()
|
|
|
const offset = WorkflowStore.graph.translate()
|