闫增涛
2024-11-06 85da14ad4377e081a744934c3ded049808427f59
绘画插件修改
2个文件已修改
10 ■■■■ 已修改文件
src/books/artAndDrama/view/components/index.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/paint/index.vue 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/books/artAndDrama/view/components/index.vue
@@ -186,7 +186,7 @@
    // 测试页面跳转
    //  setTimeout(() => {
    //  this.gotoPage(5,3);
    //  this.gotoPage(5,32);
    //   setTimeout(() => {
    //     this.renderSign("Highlight", {
    //       id: "2ACA9359",
src/components/paint/index.vue
@@ -55,7 +55,7 @@
export default {
  data() {
    return {
      canvasWidth:400,
      canvasWidth:window.innerWidth > 450 ? 400 : window.innerWidth - 30,
      backgroundImgUrl: "", // 背景
      isDraw: true, // 绘画、框选模式
      brush: "Pencil", // 画笔类型
@@ -127,15 +127,9 @@
    },
  },
  mounted() {
    this.handleCanvasWidth()
    this.init();
  },
  methods: {
    handleCanvasWidth() {
      if(window.innerWidth < 450) {
        this.canvasWidth = window.innerWidth - 30
      }
    },
    // 初始化画布
    init() {
      this.canvas = new fabric.Canvas(