zhongshujie
2024-11-19 253b3f50df303f24fdf880797619432f8b74db21
src/components/paint/index.vue
@@ -1,6 +1,6 @@
<template>
  <div class="paint">
    <canvas id="canvas" width="400" :height="canvasHeight"></canvas>
    <canvas id="canvas" :width="canvasWidth" :height="canvasHeight"></canvas>
    <!-- 操作按钮 -->
    <ul class="paint-btn">
      <li class="paint-btn-box">
@@ -55,6 +55,7 @@
export default {
  data() {
    return {
      canvasWidth:window.innerWidth > 450 ? 400 : window.innerWidth - 30,
      backgroundImgUrl: "", // 背景
      isDraw: true, // 绘画、框选模式
      brush: "Pencil", // 画笔类型