对 6 个 uni-app (Vue 2) 小程序页面/组件进行改造,当家庭数据区(familyId 为空)时显示 FamilyEmptyState 占位组件。
pages/home-pages/parent-index.vueFamilyEmptyState: 5 次hasFamily: 9 次(computed 定义 1 + v-if 使用 5 + v-else 注释等)pages/index-home/index.vueFamilyEmptyState: 2 次hasFamily: 4 次pages/health/challenge-manage.vuehasFamily 计算属性FamilyEmptyState: 2 次hasFamily: 4 次pages/mind/index.vueFamilyEmptyState: 3 次hasFamily: 5 次components/member-detail-sections/mind-section.vuehasFamilyFamilyEmptyState: 2 次(1 处 v-else + 1 处注释)hasFamily: 3 次pages/home-pages/child-index.vueFamilyEmptyState: 2 次hasFamily: 4 次=== pages/home-pages/parent-index.vue ===
FamilyEmptyState: 5
hasFamily: 9
=== pages/index-home/index.vue ===
FamilyEmptyState: 2
hasFamily: 4
=== pages/health/challenge-manage.vue ===
FamilyEmptyState: 2
hasFamily: 4
=== pages/mind/index.vue ===
FamilyEmptyState: 3
hasFamily: 5
=== components/member-detail-sections/mind-section.vue ===
FamilyEmptyState: 2
hasFamily: 3
=== pages/home-pages/child-index.vue ===
FamilyEmptyState: 2
hasFamily: 4
.../member-detail-sections/mind-section.vue | 11 +-
cfc-frontend/pages/health/challenge-manage.vue | 19 +++-
cfc-frontend/pages/home-pages/child-index.vue | 48 +++++----
cfc-frontend/pages/home-pages/parent-index.vue | 60 +++++++----
cfc-frontend/pages/index-home/index.vue | 29 ++++--
cfc-frontend/pages/mind/index.vue | 116 ++++++++++++---------
6 files changed, 181 insertions(+), 102 deletions(-)
hasFamily: function() { return this.$store.getters.hasFamily }<view v-if="hasFamily">...</view><view v-else><FamilyEmptyState type="card" /></view> 包裹