diff --git a/packages/uni-template-compiler/lib/template/generate.js b/packages/uni-template-compiler/lib/template/generate.js index e06e3ff0408b55b144b30ca0fe12ce227676c6df..41df8181ca1dc95a2da7dbad1429d1acd0f1c72b 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`) } }