From ee27f6bf7914cd57ffde1a592dd3d80c053888df Mon Sep 17 00:00:00 2001 From: xyc <3422692813@qq.com> Date: Wed, 16 Apr 2025 16:15:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/index/contract.vue | 335 ++++++++++-------- .../jushi-signature/jushi-signature.vue | 39 +- 2 files changed, 197 insertions(+), 177 deletions(-) diff --git a/pages/index/contract.vue b/pages/index/contract.vue index a46e9ba..011b0d4 100644 --- a/pages/index/contract.vue +++ b/pages/index/contract.vue @@ -1,178 +1,199 @@ + .f-box { + width: 100%; + box-sizing: border-box; + padding: 15px; + } + \ No newline at end of file diff --git a/uni_modules/jushi-signature/components/jushi-signature/jushi-signature.vue b/uni_modules/jushi-signature/components/jushi-signature/jushi-signature.vue index ba95409..b0b49e7 100644 --- a/uni_modules/jushi-signature/components/jushi-signature/jushi-signature.vue +++ b/uni_modules/jushi-signature/components/jushi-signature/jushi-signature.vue @@ -141,7 +141,7 @@ success: function(res) { console.log(res, '签名'); //强制返回base64 - that.emit(res.tempFilePath) + uni.$emit('tempFilePath', res.tempFilePath) }, fail(e) { console.log(JSON.stringify(e)) @@ -149,20 +149,20 @@ }, this) }, reset() { - let that = this - uni.getSystemInfo({ - success: function(res) { - ctx.clearRect(0, 0, res.windowWidth, res.windowHeight) - ctx.draw(true) - // #ifdef MP-WEIXIN - that.setCanvasBg() - // #endif - that.setPaintStyle() - }, - }) - tempPoint = [] - // 注意:这里不触发任何emit事件 - }, + let that = this + uni.getSystemInfo({ + success: function(res) { + ctx.clearRect(0, 0, res.windowWidth, res.windowHeight) + ctx.draw(true) + // #ifdef MP-WEIXIN + that.setCanvasBg() + // #endif + that.setPaintStyle() + }, + }) + tempPoint = [] + // 注意:这里不触发任何emit事件 + }, emit(tempFilePath) { this.$emit('change', tempFilePath) }, @@ -226,11 +226,11 @@ } .clear {} - + .reset { - background: #FF9900; - color: white; - } + background: #FF9900; + color: white; + } .sign-area { position: absolute; @@ -240,5 +240,4 @@ font-size: 130rpx; transform: rotate(-20deg); } - \ No newline at end of file