Files
svgeditor2.0/src/views/preview/index_ZL.vue
2025-11-12 09:52:48 +08:00

20 lines
634 B
Vue

<template>
<mt-preview-zl ref="MtPreviewRef" @on-event-call-back="onEventCallBack"></mt-preview-zl>
</template>
<script setup lang="ts">
import { MtPreviewZl } from '@/export'
import { onMounted, ref } from 'vue'
import { ElMessage } from 'element-plus'
const MtPreviewRef = ref<InstanceType<typeof MtPreviewZl>>()
const onEventCallBack = (type: string, item_id: string) => {
console.log(type, item_id)
if (type == 'test-dialog') {
ElMessage.success(`获取到了id:${item_id}`)
}
}
onMounted(() => {
MtPreviewRef.value?.setImportJson(JSON.parse(sessionStorage.getItem('exportJson') as any))
})
</script>