From e2880b1aa1cec9bab7e086eb53ec0ec580e19b82 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=98=AF=E5=B0=8F=E7=8E=8B=E5=91=80=5C24601?= <819653817@qq.com> Date: Fri, 21 Jun 2024 10:20:10 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=AE=E5=8A=A8=E6=A1=86=E7=A7=BB=E5=87=BA?= =?UTF-8?q?=E7=9A=84=E9=97=AE=E9=A2=98=EF=BC=8C=20=E4=B8=8A=E6=8A=A5?= =?UTF-8?q?=E5=9B=BE=E7=89=87=E5=8A=A0=E8=BD=BD=E4=B8=8D=E4=B8=8A=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/assets/css/index.less | 2 +- yifengdian-company-report/src/views/home.vue | 27 ++++-- .../src/views/vegetableDetails.vue | 85 ++++++++++++++----- 3 files changed, 85 insertions(+), 29 deletions(-) diff --git a/yifengdian-company-report/src/assets/css/index.less b/yifengdian-company-report/src/assets/css/index.less index 1f2a451..a4a3c35 100644 --- a/yifengdian-company-report/src/assets/css/index.less +++ b/yifengdian-company-report/src/assets/css/index.less @@ -58,7 +58,7 @@ body #app { color: #ff9805; } .border-btn{ - border-top: 1px solid #E0E9F5; + border-top: 1px solid #E0E9F5; } .border-btn-yellow{ border-bottom: 1px solid #E0E9F5; diff --git a/yifengdian-company-report/src/views/home.vue b/yifengdian-company-report/src/views/home.vue index 5c6649a..e8a4698 100644 --- a/yifengdian-company-report/src/views/home.vue +++ b/yifengdian-company-report/src/views/home.vue @@ -143,8 +143,8 @@ export default { dragging: false, startX: 0, startY: 0, - x: 279, - y: 625 + x: 275, + y: 540 }; }, created() { @@ -155,7 +155,8 @@ export default { console.log("123"); this.dragging = true; this.startX = event.touches[0].clientX - this.x; - this.startY = event.touches[0].clientY - this.y; + this.startY = event.touches[0].clientY - this.y + }, onMovableMove(event) { console.log("123"); @@ -163,6 +164,20 @@ export default { if (this.dragging) { this.x = event.touches[0].clientX - this.startX; this.y = event.touches[0].clientY - this.startY; + if(this.x>300){ + console.log("12w3"); + this.x=300 + } + if(this.x<0){ + console.log("12w3"); + this.x=10 + } + if(this.y>600){ + this.y=600 + } + if(this.y<0){ + this.y=10 + } } console.log(this.x, this.y); }, @@ -372,7 +387,7 @@ export default { } .movable-area { - width: 100%; + width: 375px; height: 100%; position: relative; } @@ -385,7 +400,7 @@ export default { } .draggable { - width: 100%; - height: 100%; + width: 80px; + height: 80px; } \ No newline at end of file diff --git a/yifengdian-company-report/src/views/vegetableDetails.vue b/yifengdian-company-report/src/views/vegetableDetails.vue index 0f50af0..f5ca86e 100644 --- a/yifengdian-company-report/src/views/vegetableDetails.vue +++ b/yifengdian-company-report/src/views/vegetableDetails.vue @@ -1,25 +1,6 @@