From d31792d36280054d3c52f0ce5adf6b8816c74f1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E8=B4=A4=E5=BF=83?= <3277200+sentsim@users.noreply.github.com> Date: Thu, 4 Aug 2022 15:17:18 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20colorpicker=20=E5=9B=9E?= =?UTF-8?q?=E8=B0=83=E7=A4=BA=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- examples/colorpicker.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/colorpicker.html b/examples/colorpicker.html index dcf840f7..2243ca83 100644 --- a/examples/colorpicker.html +++ b/examples/colorpicker.html @@ -60,13 +60,14 @@ body{padding:20px;} //,predefine: true //开启预定义颜色 //,colors: ['#F00','#0F0','#00F','rgb(255, 69, 0)','rgba(255, 69, 0, 0.5)'] ,change: function(color){ - document.body.style.backgroundColor = color; + this.done(color); } ,done: function(color){ layui.$('#LAY-test1').val(color); document.body.style.backgroundColor = color; } ,cancel: function(color){ + this.done(color); console.log('cancel', color); } ,close: function(color){