|
@@ -9,10 +9,10 @@
|
|
|
<script lang="ts">
|
|
|
|
|
|
import {SGraphRectItem, SGraphScene, SGraphView} from "@persagy-web/graph/lib";
|
|
|
- import { Component, Prop, Vue } from "vue-property-decorator";
|
|
|
+ import { Component, Vue } from "vue-property-decorator";
|
|
|
|
|
|
@Component
|
|
|
- export default class HelloWorld extends Vue {
|
|
|
+ export default class Rect extends Vue {
|
|
|
id: string = 'rect' + Date.now();
|
|
|
view: SGraphView | undefined;
|
|
|
item: SGraphRectItem | undefined;
|
|
@@ -73,14 +73,11 @@
|
|
|
}
|
|
|
};
|
|
|
private mounted (): void {
|
|
|
- console.log(this)
|
|
|
- console.log(this.rectData)
|
|
|
this.init();
|
|
|
}
|
|
|
init(): void {
|
|
|
this.view = new SGraphView(this.id);
|
|
|
const scene = new SGraphScene();
|
|
|
- console.log(this.rectData)
|
|
|
this.item = new SGraphRectItem(null, this.rectData);
|
|
|
this.item.selectable = true;
|
|
|
scene.addItem(this.item);
|
|
@@ -99,7 +96,7 @@
|
|
|
}
|
|
|
}
|
|
|
// 修改圆角半径
|
|
|
- changeY(val:number): void {
|
|
|
+ changeY(val: number): void {
|
|
|
if (this.item){
|
|
|
this.item.radius = val;
|
|
|
}
|