From dbee3ef45de5249b65c5371c015758fda915086d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=BA=8E=E8=82=96=E7=A3=8A?= <18851179580@163.com> Date: Tue, 8 Oct 2024 18:01:03 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=86=85=E5=AE=B9=E6=98=BE?= =?UTF-8?q?=E7=A4=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/diy/img-magic.vue | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/components/diy/img-magic.vue b/components/diy/img-magic.vue index 1d37c6f1..9962d8fa 100644 --- a/components/diy/img-magic.vue +++ b/components/diy/img-magic.vue @@ -56,8 +56,6 @@ content_img_radius: '', cube_cell: '', container_size: '', - cubeCellWidth: 0, - hackReset: true, }; }, watch: { @@ -93,26 +91,25 @@ img_spacing: `padding:${spacing}`, img_outer_spacing: new_style.image_spacing * 2 + 'rpx', content_img_radius: radius_computer(new_style), - cubeCellWidth: sys_width / density, container_size: sys_width * 2 + 'rpx', cube_cell: sys_width / density, style_container: common_styles_computer(new_style.common_style), }); }, getSelectedWidth(item) { - return (item.end.x - item.start.x + 1) * this.cubeCellWidth; + return (item.end.x - item.start.x + 1) * this.cube_cell; }, //计算选中层的高度。 getSelectedHeight(item) { - return (item.end.y - item.start.y + 1) * this.cubeCellWidth; + return (item.end.y - item.start.y + 1) * this.cube_cell; }, //计算选中层的右边距离。 getSelectedTop(item) { - return (item.start.y - 1) * this.cubeCellWidth; + return (item.start.y - 1) * this.cube_cell; }, //计算选中层的左边距离。 getSelectedLeft(item) { - return (item.start.x - 1) * this.cubeCellWidth; + return (item.start.x - 1) * this.cube_cell; }, // 计算成百分比 percentage(num) {