diff --git a/src/pages/Home/components/FabricSize.vue b/src/pages/Home/components/FabricSize.vue index 8804b6b..707d6ce 100644 --- a/src/pages/Home/components/FabricSize.vue +++ b/src/pages/Home/components/FabricSize.vue @@ -2,21 +2,37 @@
坐标:
- 上移 - 下移 - 左移 - 右移 + 上移 + 下移 + 左移 + 右移
宽度: - +
高度: - +
- \ No newline at end of file + diff --git a/src/pages/Home/index.vue b/src/pages/Home/index.vue index 28da0e2..4005b54 100644 --- a/src/pages/Home/index.vue +++ b/src/pages/Home/index.vue @@ -271,7 +271,7 @@ @@ -403,7 +403,7 @@ @@ -482,7 +482,7 @@ @@ -1678,6 +1678,22 @@ const cteatedNumber = (): string => { return `${Math.floor(Math.random() * 100000000)}+${+new Date()}`; }; +// 修改尺寸数字 +const changeFabricPositionNumber = (value: number | boolean, str: string): void => { + let number = 0; + if (typeof value === "boolean") { + number = JSON.parse(JSON.stringify(currentFabric.value.target.get(str))); + if (value) { + number--; + } else { + number++; + } + } else { + number = value; + } + changeFabricPosition(number, str); +}; + // 编辑尺寸 const changeFabricPosition = (value: number, str: string): void => { if (value) { @@ -1730,7 +1746,6 @@ const changeFabricPosition = (value: number, str: string): void => { break; case "width": case "height": - maxRect.set(str, value); if (str === "width") { maxRect.set("left", value / 2 - value); currentFabric.value.target.set(str, value); @@ -2850,7 +2865,7 @@ const changeData = (): any => { ...row.customFrom, width: row.width, height: row.height - 36.16, - top: row.top + 16, + top: row.top + 17, left: row.left, }; }); @@ -2859,7 +2874,7 @@ const changeData = (): any => { ...row.customFrom, width: row.width, height: row.height - 36.16, - top: row.top + 16, + top: row.top + 17, left: row.left, }; }); @@ -2868,7 +2883,7 @@ const changeData = (): any => { ...row.customFrom, width: row.width, height: row.height - 36.16, - top: row.top + 16, + top: row.top + 17, left: row.left, }; }); @@ -2877,7 +2892,7 @@ const changeData = (): any => { ...row.customFrom, width: row.width, height: row.height, - top: row.top + 16, + top: row.top + 17, left: row.left, }; });