From 5143f2b83f1292d01e4584582a6c4e47934e1fe1 Mon Sep 17 00:00:00 2001 From: mabo Date: Tue, 29 Jun 2021 15:24:16 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=BB=91=E5=9D=97=E9=AA=8C?= =?UTF-8?q?=E8=AF=81=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- buyer/src/components/verify/index.vue | 6 +++++- manager/src/views/my-components/verify/index.vue | 4 ++++ seller/src/views/my-components/verify/index.vue | 6 +++++- 3 files changed, 14 insertions(+), 2 deletions(-) diff --git a/buyer/src/components/verify/index.vue b/buyer/src/components/verify/index.vue index 3004b32c..39ecee85 100644 --- a/buyer/src/components/verify/index.vue +++ b/buyer/src/components/verify/index.vue @@ -18,6 +18,7 @@ import { getVerifyImg, postVerifyImg } from './verify.js'; export default { props: { + // 传入数据,判断是登录、注册、修改密码 verifyType: { defalut: 'LOGIN', type: String @@ -43,10 +44,12 @@ export default { }; }, methods: { + // 鼠标按下事件,开始拖动滑块 mouseDown (e) { this.downX = e.clientX; this.flag = true; }, + // 鼠标移动事件,计算距离 mouseMove (e) { if (this.flag) { let offset = e.clientX - this.downX; @@ -60,6 +63,7 @@ export default { } } }, + // 鼠标抬起事件,验证是否正确 mouseUp () { if (!this.flag) return false; this.flag = false; @@ -108,7 +112,7 @@ export default { handler: function (v) { this.type = v; } - } + }, } }; diff --git a/manager/src/views/my-components/verify/index.vue b/manager/src/views/my-components/verify/index.vue index 3004b32c..eb6b7705 100644 --- a/manager/src/views/my-components/verify/index.vue +++ b/manager/src/views/my-components/verify/index.vue @@ -18,6 +18,7 @@ import { getVerifyImg, postVerifyImg } from './verify.js'; export default { props: { + // 传入数据,判断是登录、注册、修改密码 verifyType: { defalut: 'LOGIN', type: String @@ -43,10 +44,12 @@ export default { }; }, methods: { + // 鼠标按下事件,开始拖动滑块 mouseDown (e) { this.downX = e.clientX; this.flag = true; }, + // 鼠标移动事件,计算距离 mouseMove (e) { if (this.flag) { let offset = e.clientX - this.downX; @@ -60,6 +63,7 @@ export default { } } }, + // 鼠标抬起事件,验证是否正确 mouseUp () { if (!this.flag) return false; this.flag = false; diff --git a/seller/src/views/my-components/verify/index.vue b/seller/src/views/my-components/verify/index.vue index 7dfbff4f..eb6b7705 100644 --- a/seller/src/views/my-components/verify/index.vue +++ b/seller/src/views/my-components/verify/index.vue @@ -18,6 +18,7 @@ import { getVerifyImg, postVerifyImg } from './verify.js'; export default { props: { + // 传入数据,判断是登录、注册、修改密码 verifyType: { defalut: 'LOGIN', type: String @@ -43,10 +44,12 @@ export default { }; }, methods: { + // 鼠标按下事件,开始拖动滑块 mouseDown (e) { this.downX = e.clientX; this.flag = true; }, + // 鼠标移动事件,计算距离 mouseMove (e) { if (this.flag) { let offset = e.clientX - this.downX; @@ -60,6 +63,7 @@ export default { } } }, + // 鼠标抬起事件,验证是否正确 mouseUp () { if (!this.flag) return false; this.flag = false; @@ -108,7 +112,7 @@ export default { handler: function (v) { this.type = v; } - }, + } } };