Pre Merge pull request !107 from Furoe/dev

This commit is contained in:
Furoe 2022-12-15 13:04:13 +00:00 committed by Gitee
commit 728a63f970
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

View File

@ -101,7 +101,7 @@
</template>
<script lang="ts" setup>
import { ref, computed, watch, toRefs, toRaw } from 'vue'
import { ref, computed, watch, toRef, toRefs, toRaw, reactive } from 'vue'
import { useTargetData } from '../../../hooks/useTargetData.hook'
import { MonacoEditor } from '@/components/Pages/MonacoEditor'
import { icon } from '@/plugins'
@ -187,7 +187,10 @@ const saveFilter = () => {
watch(
() => showModal.value,
(newData: boolean) => {
if (newData) fetchTargetData()
if (newData){
fetchTargetData()
filter.value = targetData.value.filter || `return data`
}
}
)
</script>