云平台预览
This commit is contained in:
3
src/components/mt-preview-ypt/index.ts
Normal file
3
src/components/mt-preview-ypt/index.ts
Normal file
@@ -0,0 +1,3 @@
|
||||
import MtPreviewYPT from './index.vue'
|
||||
|
||||
export default MtPreviewYPT
|
||||
1156
src/components/mt-preview-ypt/index.vue
Normal file
1156
src/components/mt-preview-ypt/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
@@ -19,6 +19,12 @@ export const constantRoutes = [
|
||||
path: '/preview',
|
||||
component: () => import('../views/preview/index.vue')
|
||||
},
|
||||
{
|
||||
// 云平台预览页面
|
||||
name: 'preview_YPT',
|
||||
path: '/preview_YPT',
|
||||
component: () => import('../views/preview/index_YPT.vue')
|
||||
},
|
||||
{
|
||||
name: 'edit-load',
|
||||
path: '/edit-load',
|
||||
|
||||
19
src/views/preview/index_YPT.vue
Normal file
19
src/views/preview/index_YPT.vue
Normal file
@@ -0,0 +1,19 @@
|
||||
<template>
|
||||
<mt-preview-ypt ref="MtPreviewRef" @on-event-call-back="onEventCallBack"></mt-preview-ypt>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
import { MtPreviewYpt } from '@/export'
|
||||
import { onMounted, ref } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
const MtPreviewRef = ref<InstanceType<typeof MtPreviewYpt>>()
|
||||
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>
|
||||
Reference in New Issue
Block a user