|
@@ -327,6 +327,7 @@ const canvas = ref(null);
|
|
|
const canvasBg = ref(null);
|
|
|
let ctx = undefined;
|
|
|
let ctxBg = undefined;
|
|
|
+let isclean = false;
|
|
|
const select = ref([0, 'rgb(241, 194, 50)', 48, 1, 0]);
|
|
|
const emit = defineEmits(['closemain', 'getimage']);
|
|
|
const close = () => {
|
|
@@ -368,7 +369,6 @@ const fillAll = () => {
|
|
|
ctxBg.shadowColor = conf.shadowColor;
|
|
|
ctxBg.fillStyle = conf.strokeStyle;
|
|
|
ctxBg.globalAlpha = conf.globalAlpha;
|
|
|
- console.log('填充', conf, waith.value, height.value);
|
|
|
pathList.push(conf);
|
|
|
indexBase = pathList.length;
|
|
|
ctxBg.fillRect(0, 0, waith.value, height.value);
|
|
@@ -384,7 +384,7 @@ const step = I => {
|
|
|
}
|
|
|
if (indexBase + I > pathList.length) {
|
|
|
indexBase = pathList.length;
|
|
|
- drawBg();
|
|
|
+ // drawBg();
|
|
|
return;
|
|
|
}
|
|
|
indexBase += I;
|
|
@@ -393,6 +393,7 @@ const step = I => {
|
|
|
// 清除
|
|
|
const clearAll = () => {
|
|
|
pathList = [];
|
|
|
+ isclean = true;
|
|
|
canvas.value.width = waith.value;
|
|
|
canvasBg.value.width = waith.value;
|
|
|
};
|
|
@@ -522,7 +523,7 @@ const drawBg = () => {
|
|
|
const wbg = canvasBg.value.width;
|
|
|
canvasBg.value.width = wbg;
|
|
|
const end = Math.min(indexBase, pathList.length);
|
|
|
- if (props.file.fileResult) {
|
|
|
+ if (!isclean && props.file.fileResult) {
|
|
|
ctxBg.drawImage(img, 0, 0, waith.value, height.value);
|
|
|
}else {
|
|
|
ctxBg.beginPath();
|