update 流程定义预览 优化
This commit is contained in:
parent
5244925d97
commit
1e0cc0f6f9
@ -1,39 +1,39 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog title="预览" v-model="data.visible" width="70%" append-to-body>
|
<el-dialog v-model="data.visible" title="预览" width="70%" append-to-body>
|
||||||
<div v-if="data.type === 'png'" style="align:center">
|
<div v-if="data.type === 'png'" style="align: center">
|
||||||
<el-image :src="data.url[0]" v-if="data.type === 'png'">
|
<el-image v-if="data.type === 'png'" :src="data.url[0]">
|
||||||
<div>流程图加载中 <i class="el-icon-loading"></i></div>
|
<div>流程图加载中 <i class="el-icon-loading"></i></div>
|
||||||
</el-image>
|
</el-image>
|
||||||
</div>
|
</div>
|
||||||
<div class="xml-data" v-if="data.type === 'xml'">
|
<div v-if="data.type === 'xml'" class="xml-data">
|
||||||
<div v-for="(xml, index) in data.url" :key="index">
|
<div v-for="(xml, index) in data.url" :key="index">
|
||||||
<pre class="font">{{ xml }}</pre>
|
<pre class="font">{{ xml }}</pre>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<template #footer>
|
<template #footer>
|
||||||
<span class="dialog-footer" v-if="data.type === 'xml'"> </span>
|
<span v-if="data.type === 'xml'" class="dialog-footer"> </span>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
const data = reactive({
|
const data = reactive({
|
||||||
visible: false,
|
visible: false,
|
||||||
url: new Array<string>,
|
url: new Array<string>(),
|
||||||
type: ''
|
type: ''
|
||||||
})
|
});
|
||||||
//打开
|
//打开
|
||||||
const openDialog = (url: string[], type: string) => {
|
const openDialog = (url: string[], type: string) => {
|
||||||
data.visible = true
|
data.visible = true;
|
||||||
data.url = url
|
data.url = url;
|
||||||
data.type = type
|
data.type = type;
|
||||||
}
|
};
|
||||||
/**
|
/**
|
||||||
* 对外暴露子组件方法
|
* 对外暴露子组件方法
|
||||||
*/
|
*/
|
||||||
defineExpose({
|
defineExpose({
|
||||||
openDialog
|
openDialog
|
||||||
})
|
});
|
||||||
</script>
|
</script>
|
||||||
<style>
|
<style>
|
||||||
.xml-data {
|
.xml-data {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user