云查询对比样式修改

dianlixunjian
Zhufu 2024-08-01 14:31:57 +08:00
parent 4c21fa08ae
commit f4bceb41ad
2 changed files with 6 additions and 4 deletions

View File

@ -21,18 +21,20 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import { ref, onMounted } from "vue" import { ref, onMounted, defineEmits } from "vue"
import Icon from '@/components/Icon/Icon.vue'; import Icon from '@/components/Icon/Icon.vue';
import CloudQueryModal from './CloudQueryModal/index.vue'; import CloudQueryModal from './CloudQueryModal/index.vue';
import { useCloudQueryStore } from '@/store/modules/cloudquery'; import { useCloudQueryStore } from '@/store/modules/cloudquery';
import { LoadCloudQueryById } from '@/api/demo/cloudQuery' import { LoadCloudQueryById } from '@/api/demo/cloudQuery'
const useCloudQuery = useCloudQueryStore(); const useCloudQuery = useCloudQueryStore();
const emits = defineEmits(['changeCompare'])
const compare = ref(false); const compare = ref(false);
const info = ref({}) const info = ref({})
const changeCompare = () => { const changeCompare = () => {
compare.value = !compare.value; compare.value = !compare.value;
console.log('compare.value', compare.value); console.log('compare.value', compare.value);
emits('changeCompare', compare.value)
}; };
onMounted(() => { onMounted(() => {
let id = useCloudQuery.getCloudQueryInfo.id let id = useCloudQuery.getCloudQueryInfo.id

View File

@ -61,7 +61,7 @@
style="top: 20px" style="top: 20px"
:destroyOnClose="true" :destroyOnClose="true"
> >
<CloudQueryContent /> <CloudQueryContent @changeCompare="changeCompare"/>
</a-modal> </a-modal>
</div> </div>
</template> </template>
@ -235,8 +235,8 @@
function closeCloudQuery() { function closeCloudQuery() {
cloudQueryVisible.value = false; cloudQueryVisible.value = false;
} }
const changeCompare = () => { const changeCompare = (value) => {
compare.value = !compare.value; compare.value = value;
console.log('compare.value', compare.value); console.log('compare.value', compare.value);
}; };
</script> </script>