From cf6e91b8d81b528d65257fdc4912011873977cad Mon Sep 17 00:00:00 2001 From: licp <lichunping@guanfang.com.cn> Date: 星期一, 04 十一月 2024 14:05:36 +0800 Subject: [PATCH] 完成电路试验模板保存记录 --- src/components/tool/file-preview.vue | 10 ++++++++++ 1 files changed, 10 insertions(+), 0 deletions(-) diff --git a/src/components/tool/file-preview.vue b/src/components/tool/file-preview.vue index 37705f8..d95afab 100644 --- a/src/components/tool/file-preview.vue +++ b/src/components/tool/file-preview.vue @@ -129,6 +129,7 @@ renderedHandler() { console.log("娓叉煋瀹屾垚") this.isDocShow = true + this.resetStyle() }, errorHandler() { console.log("娓叉煋澶辫触") @@ -196,6 +197,15 @@ } return result }, + resetStyle(){ + const elements = document.querySelectorAll('[style*="pt"]'); + for (const element of elements) { + const style = element.getAttribute('style'); + if (!!style) { + element.setAttribute('style', style.replace(/pt/g, 'px')); + } + } + } } } </script> -- Gitblit v1.9.3