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

fix(mp): remove invalid property

上级 c276f6c6
......@@ -13,13 +13,14 @@ const {
} = require('@dcloudio/uni-cli-shared/lib/cache')
const {
darkmode,
darkmode,
hasTheme
} = require('@dcloudio/uni-cli-shared/lib/theme')
const {
hasOwn,
parseStyle
parseStyle,
trimMPJson
} = require('../util')
function defaultCopy (name, value, json) {
......@@ -171,12 +172,6 @@ function getCondition (pagesJson) {
}
return false
}
function trimAppJson (app) {
delete app.topWindow
delete app.leftWindow
delete app.rightWindow
}
module.exports = function (pagesJson, manifestJson, project = {}) {
const app = {
......@@ -251,14 +246,14 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
return {
app: {
name: 'app',
content: trimAppJson(app)
content: trimMPJson(app)
}
}
}
return {
app: {
name: 'app',
content: trimAppJson(app)
content: trimMPJson(app)
},
project: {
name: 'project.config',
......@@ -317,7 +312,7 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
return {
app: {
name: 'app',
content: trimAppJson(app)
content: trimMPJson(app)
},
project: {
name: 'project.config',
......
......@@ -41,9 +41,16 @@ function hasOwn (obj, key) {
return _hasOwnProperty.call(obj, key)
}
function trimMPJson (json) {
delete json.topWindow
delete json.leftWindow
delete json.rightWindow
return json
}
function parseStyle (style = {}, root = '') {
// TODO pages.json 触发了两次,需要排查
style = JSON.parse(JSON.stringify(style))
style = trimMPJson(JSON.parse(JSON.stringify(style)))
let platformStyle = {}
......@@ -117,5 +124,6 @@ function parseTabBar (style = {}) {
module.exports = {
hasOwn,
parseStyle,
parseTabBar
parseTabBar,
trimMPJson
}
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册