提交 e67c1637 编写于 作者: Q qiang

feat(App): skip functional components (view)

上级 8dd2e525
......@@ -4,8 +4,17 @@ const {
const tags = require('@dcloudio/uni-cli-shared/lib/tags')
// web components
const elements = ['uni-view']
// 仅限 view 层
module.exports = function parseTag (el) {
const tag = el.tag
const element = elements.find(element => tag === element || 'uni-' + tag === element)
if (element) {
el.tag = element
return
}
if (el.tag.indexOf('v-uni-') !== 0 && hasOwn(tags, el.tag)) {
el.tag = 'v-uni-' + el.tag
}
......
......@@ -210,7 +210,7 @@ function isComponent (tagName) {
return false
}
}
return !hasOwn(tags, getTagName(tagName.replace('v-uni-', '')))
return !hasOwn(tags, getTagName(tagName.replace(/^(v-)?uni-/, '')))
}
function makeMap (str, expectsLowerCase) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册