From 8d72f46d3cc2eb6c282ef43786d137935e31fb73 Mon Sep 17 00:00:00 2001 From: handongxun Date: Tue, 13 Oct 2020 14:28:58 +0800 Subject: [PATCH] =?UTF-8?q?update:=20=E5=8E=BB=E6=8E=89=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E5=88=B0=E5=A4=B4=E6=9D=A1=E6=8F=90=E7=A4=BA=E8=AF=AD(?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=E5=8F=AF=E4=BB=A5=E4=BD=BF=E7=94=A8)?= =?UTF-8?q?=EF=BC=9Adata=20=E4=BD=9C=E4=B8=BA=E5=B1=9E=E6=80=A7=E4=BF=9D?= =?UTF-8?q?=E7=95=99=E5=90=8D,=E4=B8=8D=E5=85=81=E8=AE=B8=E5=9C=A8?= =?UTF-8?q?=E8=87=AA=E5=AE=9A=E4=B9=89=E7=BB=84=E4=BB=B6=20scoped-slots-de?= =?UTF-8?q?fault=20=E4=B8=AD=E5=AE=9A=E4=B9=89=E4=B8=BA=20props?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/uni-template-compiler/lib/template/generate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/uni-template-compiler/lib/template/generate.js b/packages/uni-template-compiler/lib/template/generate.js index e06e3ff04..41df8181c 100644 --- a/packages/uni-template-compiler/lib/template/generate.js +++ b/packages/uni-template-compiler/lib/template/generate.js @@ -78,7 +78,7 @@ function processElement (ast, state, isRoot) { if (ast.attr.id && ast.attr.id.indexOf('{{') === 0) { state.tips.add(`id 作为属性保留名,不允许在自定义组件 ${ast.type} 中定义为 props`) } - if (hasOwn(ast.attr, 'data')) { // 百度中会出现异常情况 + if (hasOwn(ast.attr, 'data') && platformName !== 'mp-toutiao') { // 百度中会出现异常情况 state.tips.add(`data 作为属性保留名,不允许在自定义组件 ${ast.type} 中定义为 props`) } } -- GitLab