canvas_zx
v0.0.6
Published
1.引入组件main.js ``` import CanvasZx from "canvas_zx"; Vue.use(CanvasZx) ``` 2.使用 ``` <canvas-zx @callback="callback" :id="id" :list="list" :options="options"/>
Downloads
10
Readme
canvas_zx
Project setup
1.引入组件main.js
import CanvasZx from "canvas_zx";
Vue.use(CanvasZx)
2.使用
<canvas-zx @callback="callback" :id="id" :list="list" :options="options"/>
data() {
return {
id:"canvas",//canvas的id
list:[
{id: "10", isFlicker: true, position: {x: 600, y: 100}, img: require("@/assets/image/canvas/icon-fj3.svg")},
{id: "build", position: {x: 0, y: 0}, img: require("@/assets/image/canvas/3.png")},
],
options:{
buildID: "build",//建筑图标的id
scope: 1.6, //缩放大小范围
step: 0.02,//缩放每步大小
}
}
},
methods:{
callback(e){
console.log(e)
}
}