Commit 58c67667 by xiexiaoqin

fix: username name

parent a73450e0
......@@ -2,9 +2,7 @@
<template name="avater">
<view class="avater">
<image a:if="{{item.avatar}}" mode="scaleToFill" src="{{item.avatar}}" />
<text a:if="{{item.username}}">{{item.username.slice(0, split || 2)}}
</text>
<text a:else>{{item.name.slice(0, split || 2)}}
<text a:else>{{(item.username || item.name).slice(0, split || 2)}}
</text>
</view>
</template>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment