| | |
| | | |
| | | // 测试页面跳转 |
| | | // setTimeout(() => { |
| | | // this.gotoPage(5,3); |
| | | // this.gotoPage(5,32); |
| | | // setTimeout(() => { |
| | | // this.renderSign("Highlight", { |
| | | // id: "2ACA9359", |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | canvasWidth:400, |
| | | canvasWidth:window.innerWidth > 450 ? 400 : window.innerWidth - 30, |
| | | backgroundImgUrl: "", // 背景 |
| | | isDraw: true, // 绘画、框选模式 |
| | | brush: "Pencil", // 画笔类型 |
| | |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.handleCanvasWidth() |
| | | this.init(); |
| | | }, |
| | | methods: { |
| | | handleCanvasWidth() { |
| | | if(window.innerWidth < 450) { |
| | | this.canvasWidth = window.innerWidth - 30 |
| | | } |
| | | }, |
| | | // 初始化画布 |
| | | init() { |
| | | this.canvas = new fabric.Canvas( |