字段修改

This commit is contained in:
kron
2025-06-17 13:47:33 +08:00
parent 16c1840cdd
commit a74fd1e744
14 changed files with 26 additions and 26 deletions

View File

@@ -1,22 +1,15 @@
<script setup>
import { computed } from "vue";
import Avatar from "@/components/Avatar.vue";
import useStore from "@/store";
import { storeToRefs } from "pinia";
const store = useStore();
const { user } = storeToRefs(store);
const props = defineProps({
showRank: {
type: Boolean,
default: false,
},
user: {
type: Object,
default: () => ({
nickName: "",
avatarUrl: "",
lvl: 0,
points: 0,
rankLvl: 0,
lvlPoints: 0,
}),
},
});
const containerWidth = computed(() => (props.showRank ? "72vw" : "100vw"));
const toUserPage = () => {
@@ -37,7 +30,7 @@ const toUserPage = () => {
<view class="container" :style="{ width: containerWidth }">
<Avatar
:frame="true"
:src="user.avatarUrl"
:src="user.avatar"
:onClick="toUserPage"
:size="42"
/>