提交 e768945f 编写于 作者: fxy060608's avatar fxy060608

feat(mp): match-media => uni-match-media

上级 9eb1f112
......@@ -463,7 +463,7 @@ function parseUsingAutoImportComponents (usingAutoImportComponents) {
return autoImportComponents
}
const BUILT_IN_COMPONENTS = ['page-meta', 'navigation-bar', 'match-media']
const BUILT_IN_COMPONENTS = ['page-meta', 'navigation-bar', 'uni-match-media']
function isBuiltInComponent (name) {
return BUILT_IN_COMPONENTS.includes(name)
......@@ -474,7 +474,7 @@ function isBuiltInComponentPath (modulePath) {
}
module.exports = {
isBuiltInComponent,
isBuiltInComponent,
isBuiltInComponentPath,
getMainEntry,
getNVueMainEntry,
......
......@@ -14,7 +14,11 @@ function removeAttr (el, name) {
module.exports = {
preTransformNode (el, {
warn
}) {
}) {
if (el.tag === 'match-media' && process.env.UNI_PLATFORM !== 'mp-weixin') {
el.tag = 'uni-match-media'
}
if (process.env.UNI_PLATFORM === 'app-plus' && el.tag === 'ad') {
warn('app-vue平台, <ad> 组件暂不支持非 V3 编译, 详见: https://ask.dcloud.net.cn/article/36599')
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册