refactor(家族封面): 统一使用默认家族封面图片并调整删除按钮样式
将各页面的家族封面图片引用统一为defaultFamilyCover,并调整删除按钮的大小和文字样式
Showing
3 changed files
with
12 additions
and
11 deletions
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-08-27 17:44:53 | 2 | * @Date: 2025-08-27 17:44:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-02 11:27:00 | 4 | + * @LastEditTime: 2025-09-02 11:36:49 |
| 5 | * @FilePath: /lls_program/src/pages/CreateFamily/index.vue | 5 | * @FilePath: /lls_program/src/pages/CreateFamily/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -116,9 +116,9 @@ | ... | @@ -116,9 +116,9 @@ |
| 116 | <view | 116 | <view |
| 117 | v-if="familyAvatar" | 117 | v-if="familyAvatar" |
| 118 | @click="deleteAvatar" | 118 | @click="deleteAvatar" |
| 119 | - class="absolute -top-2 -right-2 w-6 h-6 bg-red-500 rounded-full flex items-center justify-center" | 119 | + class="absolute -top-2 -right-2 w-5 h-5 bg-red-500 rounded-full flex items-center justify-center" |
| 120 | > | 120 | > |
| 121 | - <view class="text-white text-sm">×</view> | 121 | + <view class="text-white text-xs">×</view> |
| 122 | </view> | 122 | </view> |
| 123 | <view | 123 | <view |
| 124 | @click="chooseImage" | 124 | @click="chooseImage" |
| ... | @@ -177,7 +177,7 @@ import Taro from '@tarojs/taro'; | ... | @@ -177,7 +177,7 @@ import Taro from '@tarojs/taro'; |
| 177 | import { Edit, Tips, Photograph, Right } from '@nutui/icons-vue-taro'; | 177 | import { Edit, Tips, Photograph, Right } from '@nutui/icons-vue-taro'; |
| 178 | // import AppHeader from '../../components/AppHeader.vue'; | 178 | // import AppHeader from '../../components/AppHeader.vue'; |
| 179 | import BASE_URL from '@/utils/config'; | 179 | import BASE_URL from '@/utils/config'; |
| 180 | -import defaultFamilyCoverSvg from '@/assets/images/default-family-cover.png'; | 180 | +import defaultFamilyCover from '@/assets/images/default-family-cover.png'; |
| 181 | 181 | ||
| 182 | const familyName = ref(''); | 182 | const familyName = ref(''); |
| 183 | const familyIntro = ref(''); | 183 | const familyIntro = ref(''); |
| ... | @@ -214,7 +214,7 @@ const districtColumns = ref([ | ... | @@ -214,7 +214,7 @@ const districtColumns = ref([ |
| 214 | const familyAvatar = ref(''); | 214 | const familyAvatar = ref(''); |
| 215 | const focusedIndex = ref(-1); | 215 | const focusedIndex = ref(-1); |
| 216 | const inputRefs = ref([]); | 216 | const inputRefs = ref([]); |
| 217 | -const defaultFamilyCover = ref(defaultFamilyCoverSvg); | 217 | +const defaultFamilyCover = ref(defaultFamilyCover); |
| 218 | 218 | ||
| 219 | const isFormValid = computed(() => { | 219 | const isFormValid = computed(() => { |
| 220 | return ( | 220 | return ( | ... | ... |
| ... | @@ -201,6 +201,7 @@ import TotalPointsDisplay from '@/components/TotalPointsDisplay.vue'; | ... | @@ -201,6 +201,7 @@ import TotalPointsDisplay from '@/components/TotalPointsDisplay.vue'; |
| 201 | import PointsCollector from '@/components/PointsCollector.vue' | 201 | import PointsCollector from '@/components/PointsCollector.vue' |
| 202 | import WeRunAuth from '@/components/WeRunAuth.vue' | 202 | import WeRunAuth from '@/components/WeRunAuth.vue' |
| 203 | import { useMediaPreview } from '@/composables/useMediaPreview'; | 203 | import { useMediaPreview } from '@/composables/useMediaPreview'; |
| 204 | +import defaultFamilyCover from '@/assets/images/default-family-cover.png'; | ||
| 204 | 205 | ||
| 205 | const todaySteps = ref(0); | 206 | const todaySteps = ref(0); |
| 206 | const isWeRunAuthorized = ref(false); | 207 | const isWeRunAuthorized = ref(false); |
| ... | @@ -362,7 +363,7 @@ const initPageData = async () => { | ... | @@ -362,7 +363,7 @@ const initPageData = async () => { |
| 362 | // 获取用户信息 | 363 | // 获取用户信息 |
| 363 | familyName.value = '张爷爷的家庭' | 364 | familyName.value = '张爷爷的家庭' |
| 364 | familySlogn.value = '每日走万步,全家一起行' | 365 | familySlogn.value = '每日走万步,全家一起行' |
| 365 | - familyCover.value = 'https://placehold.co/800x400/e2f3ff/0369a1?text=LFX&font=roboto' | 366 | + familyCover.value = defaultFamilyCover |
| 366 | } | 367 | } |
| 367 | 368 | ||
| 368 | useDidShow(() => { | 369 | useDidShow(() => { | ... | ... |
| 1 | <!-- | 1 | <!-- |
| 2 | * @Date: 2025-08-27 17:44:53 | 2 | * @Date: 2025-08-27 17:44:53 |
| 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com | 3 | * @LastEditors: hookehuyr hookehuyr@gmail.com |
| 4 | - * @LastEditTime: 2025-09-02 11:23:27 | 4 | + * @LastEditTime: 2025-09-02 11:38:50 |
| 5 | * @FilePath: /lls_program/src/pages/EditFamily/index.vue | 5 | * @FilePath: /lls_program/src/pages/EditFamily/index.vue |
| 6 | * @Description: 文件描述 | 6 | * @Description: 文件描述 |
| 7 | --> | 7 | --> |
| ... | @@ -115,9 +115,9 @@ | ... | @@ -115,9 +115,9 @@ |
| 115 | <view | 115 | <view |
| 116 | v-if="familyAvatar" | 116 | v-if="familyAvatar" |
| 117 | @click="deleteAvatar" | 117 | @click="deleteAvatar" |
| 118 | - class="absolute -top-2 -right-2 w-6 h-6 bg-red-500 rounded-full flex items-center justify-center" | 118 | + class="absolute -top-2 -right-2 w-5 h-5 bg-red-500 rounded-full flex items-center justify-center" |
| 119 | > | 119 | > |
| 120 | - <view class="text-white text-sm">×</view> | 120 | + <view class="text-white text-xs">×</view> |
| 121 | </view> | 121 | </view> |
| 122 | <view | 122 | <view |
| 123 | @click="chooseImage" | 123 | @click="chooseImage" |
| ... | @@ -173,7 +173,7 @@ import Taro from '@tarojs/taro'; | ... | @@ -173,7 +173,7 @@ import Taro from '@tarojs/taro'; |
| 173 | import { Edit, Tips, Photograph, Right } from '@nutui/icons-vue-taro'; | 173 | import { Edit, Tips, Photograph, Right } from '@nutui/icons-vue-taro'; |
| 174 | // import AppHeader from '../../components/AppHeader.vue'; | 174 | // import AppHeader from '../../components/AppHeader.vue'; |
| 175 | import BASE_URL from '@/utils/config'; | 175 | import BASE_URL from '@/utils/config'; |
| 176 | -import defaultFamilyCoverSvg from '@/assets/images/default-family-cover.png'; | 176 | +import defaultFamilyCover from '@/assets/images/default-family-cover.png'; |
| 177 | 177 | ||
| 178 | const familyName = ref(''); | 178 | const familyName = ref(''); |
| 179 | const familyIntro = ref(''); | 179 | const familyIntro = ref(''); |
| ... | @@ -209,7 +209,7 @@ const districtColumns = ref([ | ... | @@ -209,7 +209,7 @@ const districtColumns = ref([ |
| 209 | ]); | 209 | ]); |
| 210 | const familyAvatar = ref(''); | 210 | const familyAvatar = ref(''); |
| 211 | const focusedIndex = ref(-1); | 211 | const focusedIndex = ref(-1); |
| 212 | -const defaultFamilyCover = ref(defaultFamilyCoverSvg); | 212 | +const defaultFamilyCover = ref(defaultFamilyCover); |
| 213 | 213 | ||
| 214 | // 图片预览相关 | 214 | // 图片预览相关 |
| 215 | const previewVisible = ref(false); | 215 | const previewVisible = ref(false); | ... | ... |
-
Please register or login to post a comment