From b6a8996c695d77a16b0923ac584a86c7d2150b11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 24 Jul 2019 21:20:20 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=8C=89=E9=92=AE=E7=BB=84?= =?UTF-8?q?=E4=BB=B6=E7=9A=84=E7=84=A6=E7=82=B9=E8=8E=B7=E5=8F=96;?= =?UTF-8?q?=E5=AE=8C=E6=88=90input=E7=BB=84=E4=BB=B6=E7=9A=84=E5=BC=80?= =?UTF-8?q?=E5=8F=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.dev.js | 2 +- build.prod.js | 2 +- src/form/button.wc | 11 +- src/form/input.wc | 262 +++++++++++++++++++++++++++++++++++++++++++-- 4 files changed, 262 insertions(+), 15 deletions(-) diff --git a/build.dev.js b/build.dev.js index 2d9f06b..f721101 100644 --- a/build.dev.js +++ b/build.dev.js @@ -66,7 +66,7 @@ function mkWCFile({ style, html, js }) { let name = '' let props = '' - js = js.replace(/props = (\{[\w\W]*?\})/, function(s, m) { + js = js.replace(/props = (\{[\w\W]*?\n\s{2}?\})/, function(s, m) { props = m var attr = new Function( `var props = ${m}, attr = []; for(var i in props){attr.push(i)}; return attr` diff --git a/build.prod.js b/build.prod.js index 20e783d..81310f5 100644 --- a/build.prod.js +++ b/build.prod.js @@ -75,7 +75,7 @@ function mkWCFile({ style, html, js }) { let name, props - js = js.replace(/props = (\{[\w\W]*?\})/, function(s, m) { + js = js.replace(/props = (\{[\w\W]*?\n\s{2}?\})/, function(s, m) { props = m var attr = new Function( `var props = ${m}, attr = []; for(var i in props){attr.push(i)}; return attr` diff --git a/src/form/button.wc b/src/form/button.wc index d106a7d..3edefc2 100644 --- a/src/form/button.wc +++ b/src/form/button.wc @@ -239,6 +239,7 @@