generated from JX3BOX/jx3box-vue-boilerplate
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
75cfa54
commit 61dd97a
Showing
4 changed files
with
99 additions
and
27 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
<template> | ||
<div class="m-author-header" :style="{ backgroundImage: `url(${userDefinedStyle.banner})` }"> | ||
<div class="u-header-info"> | ||
<Avatar class="u-author-avatar" :uid="uid" :url="avatar" :size="avatarSize" :frame="avatar_frame" /> | ||
<div class="u-author-info"> | ||
<span class="u-name" :style="userDefinedStyle.userName"> | ||
<span @click="copyData(data.display_name || '匿名')">{{ data.display_name || "匿名" }}</span | ||
> <span class="u-uid" @click="copyData(data.ID || 0)">(UID : {{ data.ID || 0 }})</span> | ||
</span> | ||
<div class="u-tips"> | ||
<el-tooltip :content="`当前经验 ${data.experience || 0}`" placement="top"> | ||
<span class="u-level" :class="'lv-' + level" :style="{ backgroundColor: showLevelColor(level) }" | ||
>Lv.{{ level }}</span | ||
> | ||
</el-tooltip> | ||
<el-tooltip :content="vipTypeTitle" v-if="isPRO || isVIP" placement="top"> | ||
<a class="u-vip" href="/vip/premium?from=user_homepage" target="_blank"> | ||
<i class="u-icon vip">{{ vipType }}</i> | ||
</a> | ||
</el-tooltip> | ||
<el-tooltip content="签约作者" v-if="isSuperAuthor" placement="top"> | ||
<span class="u-superauthor"> | ||
<i class="u-icon superauthor">签约作者</i> | ||
</span> | ||
</el-tooltip> | ||
</div> | ||
|
||
<Honor :uid="uid"></Honor> | ||
</div> | ||
</div> | ||
</div> | ||
</template> | ||
<script> | ||
import Honor from "@jx3box/jx3box-common-ui/src/author/AuthorHonor.vue"; | ||
export default { | ||
name: "Me", | ||
components: { Honor }, | ||
props: { | ||
decorationMe: { | ||
type: Object, | ||
default: function () { | ||
return {}; | ||
}, | ||
}, | ||
}, | ||
watch: { | ||
decorationMe: { | ||
handler(val) { | ||
this.setDecorationStyle(); | ||
}, | ||
immediate: true, | ||
deep: true, | ||
}, | ||
}, | ||
data: function () { | ||
return {}; | ||
}, | ||
computed: { | ||
uid: function () { | ||
return this.$store.state.uid; | ||
}, | ||
data: function () { | ||
return User.userdata; | ||
}, | ||
avatar: function () { | ||
return this.data.user_avatar || ""; | ||
}, | ||
avatar_frame: function () { | ||
return this.data.user_avatar_frame || ""; | ||
}, | ||
}, | ||
filters: {}, | ||
methods: {}, | ||
}; | ||
</script> | ||
|
||
<style scoped lang="less"></style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters