From 507de918436bae5b96b82d993d42cff2109fb898 Mon Sep 17 00:00:00 2001
From: IchliebedichZhu <54796446@qq.com>
Date: Mon, 4 Mar 2024 17:51:02 +0000
Subject: [PATCH 1/5] fix: drag animation problem
---
src/common/hooks/dragHelper.ts | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/src/common/hooks/dragHelper.ts b/src/common/hooks/dragHelper.ts
index a6dbbab..1d5e617 100644
--- a/src/common/hooks/dragHelper.ts
+++ b/src/common/hooks/dragHelper.ts
@@ -113,11 +113,14 @@ export default class DragHelper {
private moveFlutter(x: number, y: number, d = 0, lazy = 0) {
const { width, height, finallySize } = this.initial as TInitial
let scale: string | null = null
- if (!d) {
+ if (d) {
if (width > finallySize) {
scale = width - d >= finallySize ? `transform: scale(${(width - d) / width});` : null
- } else scale = width + d <= finallySize ? `transform: scale(${(width + d) / width})` : null
+ } else {
+ scale = width + d <= finallySize ? `transform: scale(${(width + d) / width})` : null
+ }
}
+
const options = [`left: ${x}px`, `top: ${y}px`, `width: ${width}px`, `height: ${height}px`]
scale && options.push(scale)
options.push(`transition: all ${lazy}s`)
@@ -137,9 +140,7 @@ export default class DragHelper {
this.dragging = false
store.commit('setDraging', false)
store.commit('selectItem', {})
- if (!this.cloneEl) {
- return
- }
+
if (!done) {
const { pageX, offsetX, pageY, offsetY } = this.initial as TInitial
this.changeStyle([`left: ${pageX - offsetX}px`, `top: ${pageY - offsetY}px`, 'transform: scale(1)', 'transition: all 0.3s'])
From d6f957433163dff94f909fa65614e68db7a12bb2 Mon Sep 17 00:00:00 2001
From: IchliebedichZhu <54796446@qq.com>
Date: Mon, 4 Mar 2024 18:08:36 +0000
Subject: [PATCH 2/5] update: formatting qrcode component
---
src/components/business/qrcode/index.vue | 60 ++++--------------------
src/components/business/qrcode/method.ts | 53 +++++++++++++++++++++
2 files changed, 61 insertions(+), 52 deletions(-)
create mode 100644 src/components/business/qrcode/method.ts
diff --git a/src/components/business/qrcode/index.vue b/src/components/business/qrcode/index.vue
index 57151aa..3828c6e 100644
--- a/src/components/business/qrcode/index.vue
+++ b/src/components/business/qrcode/index.vue
@@ -11,10 +11,11 @@
-
-
diff --git a/src/components/business/picture-selector/index.vue b/src/components/business/picture-selector/index.vue
index f67f707..421a25c 100644
--- a/src/components/business/picture-selector/index.vue
+++ b/src/components/business/picture-selector/index.vue
@@ -2,8 +2,8 @@
* @Author: ShawnPhang
* @Date: 2022-10-08 10:07:19
* @Description:
- * @LastEditors: ShawnPhang
- * @LastEditTime: 2023-10-05 00:04:51
+ * @LastEditors: ShawnPhang , Jeremy Yu
+ * @Date: 2024-03-04 18:10:00
-->
diff --git a/src/components/business/qrcode/index.vue b/src/components/business/qrcode/index.vue
index 3828c6e..e6c06dd 100644
--- a/src/components/business/qrcode/index.vue
+++ b/src/components/business/qrcode/index.vue
@@ -3,7 +3,7 @@
* @Date: 2022-03-16 09:15:52
* @Description:
* @LastEditors: ShawnPhang , Jeremy Yu
- * @Date: 2024-03-04 09:50:00
+ * @Date: 2024-03-04 18:50:00
-->
diff --git a/src/components/business/qrcode/method.ts b/src/components/business/qrcode/method.ts
index 7eb2471..bb823f9 100644
--- a/src/components/business/qrcode/method.ts
+++ b/src/components/business/qrcode/method.ts
@@ -1,4 +1,11 @@
-import { CornerDotType,Options } from "qr-code-styling"
+/*
+ * @Author: Jeremy Yu
+ * @Date: 2024-03-04 18:10:00
+ * @Description:
+ * @LastEditors: Jeremy Yu
+ * @Date: 2024-03-04 18:10:00
+ */
+import { CornerDotType, Options } from "qr-code-styling"
import { TQrcodeProps } from "./index.vue"
/** 生成二维码数据 */
diff --git a/src/components/business/right-click-menu/RcMenu.vue b/src/components/business/right-click-menu/RcMenu.vue
index 8522c48..22fdf37 100644
--- a/src/components/business/right-click-menu/RcMenu.vue
+++ b/src/components/business/right-click-menu/RcMenu.vue
@@ -1,136 +1,142 @@
-