DataV-Team / DataV

Vue数据可视化组件库(类似阿里DataV,大屏数据展示),提供SVG的边框及装饰、图表、水位图、飞线图等组件,简单易用,长期更新(React版已发布)
http://datav.jiaminghi.com
MIT License
8.98k stars 1.77k forks source link

vue3+ts #286

Open namezj opened 1 year ago

namezj commented 1 year ago

Hi! 👋

Firstly, thanks for your work on this project! 🙂

Today I used patch-package to patch @jiaminghi/data-view@2.10.0 for the project I'm working on.

Here is the diff that solved my problem:

diff --git a/node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue b/node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue
index 9928231..361bbff 100644
--- a/node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue
+++ b/node_modules/@jiaminghi/data-view/lib/components/decoration3/src/main.vue
@@ -4,9 +4,9 @@

       <template
         v-for="(point, i) in points"
+        :key="i"
       >
         <rect
-          :key="i"
           :fill="mergedColor[0]"
           :x="point[0] - halfPointSideLength"
           :y="point[1] - halfPointSideLength"
diff --git a/node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue b/node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue
index b044326..c1f5a9c 100644
--- a/node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue
+++ b/node_modules/@jiaminghi/data-view/lib/components/decoration6/src/main.vue
@@ -3,9 +3,9 @@
     <svg :width="`${svgWH[0]}px`" :height="`${svgWH[1]}px`" :style="`transform:scale(${svgScale[0]},${svgScale[1]});`">
       <template
         v-for="(point, i) in points"
+        :key="i"
       >
         <rect
-          :key="i"
           :fill="mergedColor[Math.random() > 0.5 ? 0 : 1]"
           :x="point[0] - halfRectWidth"
           :y="point[1] - heights[i] / 2"

This issue body was partially generated by patch-package.