diff --git a/public/测试.svg b/public/测试.svg
index f898eff..6beb1d0 100644
--- a/public/测试.svg
+++ b/public/测试.svg
@@ -1 +1 @@
-
\ No newline at end of file
+
\ No newline at end of file
diff --git a/src/views/dashboard/demo/components/ParameterInfo.vue b/src/views/dashboard/demo/components/ParameterInfo.vue
index cad2940..285d3b9 100644
--- a/src/views/dashboard/demo/components/ParameterInfo.vue
+++ b/src/views/dashboard/demo/components/ParameterInfo.vue
@@ -89,7 +89,6 @@ onBeforeUpdate(async () => {
-->
diff --git a/src/views/dashboard/demo/components/staticSvg.vue b/src/views/dashboard/demo/components/staticSvg.vue
index f455fb0..b54644c 100644
--- a/src/views/dashboard/demo/components/staticSvg.vue
+++ b/src/views/dashboard/demo/components/staticSvg.vue
@@ -44,6 +44,6 @@ function fullScreen() {
diff --git a/src/views/dashboard/demo/components/svg.vue b/src/views/dashboard/demo/components/svg.vue
index d2d4f3f..21e2856 100644
--- a/src/views/dashboard/demo/components/svg.vue
+++ b/src/views/dashboard/demo/components/svg.vue
@@ -59,9 +59,9 @@ async function loadSvg() {
// 等待DOM更新后应用实时数据
await nextTick()
- document.querySelector('.svg-container > svg')?.removeAttribute('width')
- document.querySelector('.svg-container > svg')?.removeAttribute('height')
-
+ document.querySelector('.svg-container > svg')?.setAttribute('width', '100%')
+ document.querySelector('.svg-container > svg')?.setAttribute('height', '100%')
+ document.querySelector('.svg-container > svg')?.setAttribute('preserveAspectRatio', 'none')
// updateRealtimeValues()
}
catch (error) {
@@ -76,8 +76,10 @@ async function updateRealtimeValues() {
return
try {
const svgElement = document.querySelector('.svg-container > svg')
- svgElement?.removeAttribute('width')
- svgElement?.removeAttribute('height')
+ svgElement?.setAttribute('width', '100%')
+ svgElement?.setAttribute('height', '100%')
+ svgElement?.setAttribute('preserveAspectRatio', 'none')
+
// 获取SVG元素
if (!svgElement)
return
@@ -212,9 +214,12 @@ defineExpose({