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

fix(v3): compatible with native

上级 c4148678
......@@ -48,11 +48,18 @@ module.exports = function(content) {
}
// 暂时实时读取配置信息,查找是否 disableScroll
const appJson = getPagesJson()
if (!appJson.nvue || !appJson.nvue.pages) {
return content
let pageJson
if (appJson.nvue) { //旧版本
if (!appJson.nvue || !appJson.nvue.pages) {
return content
}
const pagePath = resourcePath + '.html'
pageJson = appJson.nvue.pages.find(page => page.path === pagePath)
} else {
pageJson = appJson.pages.find(page => page.path === resourcePath)
}
const pagePath = resourcePath + '.html'
const pageJson = appJson.nvue.pages.find(page => page.path === pagePath)
if (!pageJson) {
return content
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册