fix: 去除navigation bar

This commit is contained in:
ilhamtahir committed 2024-12-25 10:12:00 +08:00
1 parent f416365edd
commit ace88a7149
10 files changed
+34 -53

No files matched your search

+12 -16
View File
@@ -3,8 +3,6 @@ import avator from '@/static/image/pet-parameters/avator.png'
import addBtn from '@/static/image/pet-plan/add_btn.png'
import card from '@/static/image/pet-plan/card.png'
import editBtn from '@/static/image/pet-plan/edit.png'
import miniGoods from '@/static/image/pet-plan/mini_goods.png'
import nutritionGoods from '@/static/image/pet-plan/nutrition_goods.png'
import userAddBtn from '@/static/image/pet-plan/user_add_btn.png'
import ToolApi from '@/utils'
@@ -15,21 +13,20 @@ interface User {
isClick: boolean
plan: { image: string, name: string, weight: string, energy: string, label: string[] }[]
}
const titleName = ref<string>('喂养计划')
const safeHeight = ToolApi.getSafeHeight()
// 用户存在情况
const userList = ref<User[]>([
{ name: '子龙', image: avator, label: ['1岁', '孟加拉豹猫', '8kg'], plan: [
{ image: miniGoods, name: 'MINI主食包', weight: '500', energy: '1200kcal', label: ['湿粮', '呵护肠胃'] },
{ image: nutritionGoods, name: '营养加焙烘焙粮', weight: '500', energy: '1200kcal', label: ['湿粮', '呵护肠胃'] },
], isClick: true },
{ name: '广坤', image: avator, label: ['12岁', '孟加拉豹猫', '8kg'], plan: [
{ image: miniGoods, name: 'MINI主食包', weight: '600', energy: '1300kcal', label: ['湿粮', '呵护肠胃'] },
{ image: nutritionGoods, name: '营养加焙烘焙粮', weight: '1000', energy: '1300kcal', label: ['湿粮', '呵护肠胃'] },
], isClick: false },
])
// const userList = ref<User[]>([
// { name: '子龙', image: avator, label: ['1岁', '孟加拉豹猫', '8kg'], plan: [
// { image: miniGoods, name: 'MINI主食包', weight: '500', energy: '1200kcal', label: ['湿粮', '呵护肠胃'] },
// { image: nutritionGoods, name: '营养加焙烘焙粮', weight: '500', energy: '1200kcal', label: ['湿粮', '呵护肠胃'] },
// ], isClick: true },
// { name: '广坤', image: avator, label: ['12岁', '孟加拉豹猫', '8kg'], plan: [
// { image: miniGoods, name: 'MINI主食包', weight: '600', energy: '1300kcal', label: ['湿粮', '呵护肠胃'] },
// { image: nutritionGoods, name: '营养加焙烘焙粮', weight: '1000', energy: '1300kcal', label: ['湿粮', '呵护肠胃'] },
// ], isClick: false },
// ])
// 用户不存在情况
// const userList = ref<User[]>([])
const userList = ref<User[]>([])
const clickUser = computed(() => {
return userList.value.filter(user => user.isClick === true)
})
@@ -49,7 +46,6 @@ function handleEdit() {
</script>
<template>
<TitleBar :title-name="titleName" />
<view class="flex flex-col bg-[#F5F6F7] overflow-y-auto" :style="`height:calc(100vh - ${safeHeight}px)`">
<!-- 喂养计划未注册 -->
<view v-if="userList.length === 0" class="w-[calc(100% - 32px)] min-h-[135px] rounded-lg m-[16px] relative">
@@ -63,7 +59,7 @@ function handleEdit() {
<view class="w-[111px] h-[42px] bg-[black] absolute top-0 right-0 rounded-tr-xl z-10">
<text class="text-[#999] absolute right-5 top-2 text-[12px]">
编辑计划
无计划
</text>
</view>
<view class="absolute right-0 top-0 w-[78px] h-[24px] z-20" @tap="handleAdd" />