修改预览展示

This commit is contained in:
guanj
2025-11-05 15:31:56 +08:00
parent a7a88e6706
commit 3d987b4761

View File

@@ -1,6 +1,6 @@
<template>
<div
style="overflow: hidden; height: 100vh"
style="overflow: hidden; height: 100vh"
v-loading="useData.loading"
element-loading-background="#343849c7"
:style="{ backgroundColor: useData.display ? '' : canvas_cfg.color }"
@@ -184,8 +184,6 @@ const canvasStyle = computed(() => ({
marginLeft: (document.documentElement.clientWidth - canvas_cfg.value.width * canvas_cfg.value.scale) / 2 + 'px'
}))
// 鼠标按下事件 - 开始拖拽
const onMouseDown = (e: MouseEvent) => {
if (mtPreviewProps.canDrag && e.button === 0) {
@@ -568,8 +566,8 @@ const setImportJson = (exportJson: IExportJson) => {
grid_cfg.value = gridCfg
done_json.value = importDoneJson
// 为图元添加点击事件
addClickEventsToElements()
// // 为图元添加点击事件
// addClickEventsToElements()
// 首页初始化的时候
nextTick(() => {
@@ -1028,7 +1026,10 @@ const setMqtt = async () => {
done_json.value.forEach(item => {
msg.forEach((msgValue: any) => {
if (item.id == msgValue.id) {
item.props.text.val = item.props.text.val.replace(/#{3}/g, msgValue.value) //'B相负载电流-CP95:31'
item.props.text.val = item.props.text.val.replace(
/#{3}/g,
msgValue.value == 3.1415926 ? '暂无数据' : msgValue.value
) //'B相负载电流-CP95:31'
}
})
list.value.forEach((listValue: any) => {