Evan You 11 лет назад
Родитель
Сommit
19cfc9dd16
2 измененных файлов с 1 добавлено и 7 удалено
  1. 1 1
      examples/svg/index.html
  2. 0 6
      examples/svg/svg.js

+ 1 - 1
examples/svg/index.html

@@ -12,7 +12,7 @@
     <script type="text/x-template" id="polygraph-template">
       <polygon v-attr="points:points"></polygon>
       <circle cx="100" cy="100" r="80"></circle>
-      <text v-repeat="stats" v-component="axis-label" v-attr="x:x, y:y">
+      <text v-repeat="stats" v-component="axis-label" v-attr="x:point.x, y:point.y">
         {{label}}
       </text>
     </script>

+ 0 - 6
examples/svg/svg.js

@@ -31,12 +31,6 @@ Vue.component('polygraph', {
             this.$index,
             this.$parent.stats.length
           )
-        },
-        x: function () {
-          return this.point.x - 4
-        },
-        y: function () {
-          return this.point.y + 4
         }
       }
     }