This commit is contained in:
X1627315083
2024-06-01 10:02:21 +08:00
parent 89ee910ce9
commit ff9e2f510b
21 changed files with 2046 additions and 1798 deletions

View File

@@ -101,6 +101,7 @@ export default defineComponent({
let { t } = useI18n();
let canvas = reactive({});
let scale = 2;
let exportWH = 512
let canvasWH = ref(0);
let textData = reactive({
fill:'#000000',
@@ -143,6 +144,7 @@ export default defineComponent({
let height = canvasBox.offsetHeight;
canvasBox.style.width = height+'px'
canvasWH.value = height
scale = exportWH/canvasWH.value
var canvasDom = document.createElement("canvas");
let oldCanvasDom = canvasBox.querySelector('canvas')
if(oldCanvasDom)canvasBox.removeChild(oldCanvasDom); // 清空原有内容