提交 031161f7 编写于 作者: Q qiang

Merge branch 'dev' into alpha

......@@ -19,7 +19,7 @@ const {
const {
hasOwn,
parseStyle,
parseStyle,
trimMPJson
} = require('../util')
......@@ -113,7 +113,8 @@ const platformJson2ProjectJson = {
projectname: defaultCopy,
packOptions: defaultCopy,
debugOptions: defaultCopy,
scripts: defaultCopy
scripts: defaultCopy,
cloudbaseRoot: defaultCopy
}
function copyToJson (json, fromJson, options) {
......@@ -320,4 +321,4 @@ module.exports = function (pagesJson, manifestJson, project = {}) {
}
}
}
}
}
......@@ -18,14 +18,15 @@ export function getCurrentPages (isAll = false, ignoreError = false) {
let childrenVm = app.$children[0]
if (childrenVm && childrenVm.$children.length) {
const tabBarVm = childrenVm.$children.find(vm => vm.$options.name === 'TabBar')
const layoutVm = childrenVm.$children.find(vm => vm.$options.name === 'Layout')
if (layoutVm) {
childrenVm = layoutVm
const layoutVm = childrenVm.$children.find(vm => vm.$options.name === 'Layout')
if (layoutVm) {
childrenVm = layoutVm
}
childrenVm.$children.forEach(vm => {
if (tabBarVm !== vm && vm.$children.length && vm.$children[0].$options.name === 'Page' && vm.$children[0].$slots.page) {
// vm.$children[0]=Page->PageBody->RealPage
const pageVm = vm.$children[0].$children.find(vm => vm.$options.name === 'PageBody').$children.find(vm => !!vm.$page)
const pageBody = vm.$children[0].$children.find(vm => vm.$options.name === 'PageBody')
const pageVm = pageBody && pageBody.$children.find(vm => !!vm.$page)
if (pageVm) {
let isActive = true
if (!isAll && tabBarVm && pageVm.$page && pageVm.$page.meta.isTabBar) { // 选项卡仅列出活动的
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册