添加排位相框
This commit is contained in:
@@ -4,6 +4,10 @@ defineProps({
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
frameSrc: {
|
||||
type: String,
|
||||
default: "",
|
||||
},
|
||||
onClick: {
|
||||
type: Function,
|
||||
default: () => {},
|
||||
@@ -30,8 +34,8 @@ defineProps({
|
||||
<template>
|
||||
<view class="avatar" @click="onClick">
|
||||
<image
|
||||
v-if="frame"
|
||||
src="../static/avatar-frame.png"
|
||||
v-if="frameSrc || frame"
|
||||
:src="frameSrc || '../static/avatar-frame.png'"
|
||||
mode="widthFix"
|
||||
:style="{
|
||||
width: Number(size) + 10 + 'px',
|
||||
|
||||
@@ -51,9 +51,9 @@ watch(
|
||||
|
||||
<template>
|
||||
<view class="container" :style="{ width: containerWidth }">
|
||||
<block v-if="user.id"
|
||||
><Avatar
|
||||
:frame="true"
|
||||
<block v-if="user.id">
|
||||
<Avatar
|
||||
:frameSrc="user.lvlImage"
|
||||
:src="user.avatar"
|
||||
:onClick="toUserPage"
|
||||
:size="42"
|
||||
|
||||
Reference in New Issue
Block a user