From db59809eb081eef676f6d4dfef8ebf5201b4dc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=87=E5=A4=A9?= Date: Wed, 14 Aug 2019 21:29:21 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96select=E7=BB=84=E4=BB=B6?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- build.dev.js | 4 ++- src/form/select.wc | 69 +++++++++++++++++++++++++++------------------- 2 files changed, 43 insertions(+), 30 deletions(-) diff --git a/build.dev.js b/build.dev.js index 8588ec3..48ea4b1 100644 --- a/build.dev.js +++ b/build.dev.js @@ -129,7 +129,9 @@ const log = console.log ${js} -customElements.define('wc-${name.toLowerCase()}', ${name}) +if(!customElements.get('wc-${name.toLowerCase()}')){ + customElements.define('wc-${name.toLowerCase()}', ${name}) +} ` } diff --git a/src/form/select.wc b/src/form/select.wc index d224d8b..0b34ea9 100644 --- a/src/form/select.wc +++ b/src/form/select.wc @@ -13,10 +13,6 @@