From 81ea735ed2e4ae3be39d9618795d5b1547fb172d Mon Sep 17 00:00:00 2001 From: qiang Date: Wed, 15 Jan 2020 11:56:20 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=20app-v3=20=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6=20id=20=E6=9C=AA=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E5=88=B0=20view=20=E5=B1=82=E7=9A=84=E9=97=AE?= =?UTF-8?q?=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lib/app/parser/component-parser.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/uni-template-compiler/lib/app/parser/component-parser.js b/packages/uni-template-compiler/lib/app/parser/component-parser.js index ae2bccfd1..4df668ac8 100644 --- a/packages/uni-template-compiler/lib/app/parser/component-parser.js +++ b/packages/uni-template-compiler/lib/app/parser/component-parser.js @@ -10,10 +10,10 @@ const { module.exports = function parseComponent (el) { // 需要把自定义组件的 attrs, props 全干掉 if (el.tag && isComponent(el.tag)) { - // 仅保留 ID + // 仅保留 id、ID、data el.attrs && (el.attrs = el.attrs.filter(attr => { const name = attr.name - return name === ID || name.indexOf('data-') === 0 + return name === 'id' || name === ID || name.indexOf('data-') === 0 })) } -} +} -- GitLab