字段修改
This commit is contained in:
@@ -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"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user