Skip to content

Commit f0b3b31

Browse files
fifthThirteenCopilot
andcommitted
fix:author
Co-authored-by: Copilot <copilot@github.com>
1 parent 7cc836a commit f0b3b31

2 files changed

Lines changed: 20 additions & 15 deletions

File tree

src/components/author/mobile/MobileMe.vue

Lines changed: 17 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
<div class="m-header">
1212
<div class="m-name-avatar">
1313
<div class="m-avatar-box" :class="{ 'no-frame': !avatar_frame }">
14-
<Avatar :uid="uid" :url="avatar" :size="80" />
14+
<CommonAvatar :uid="uid" :url="avatar" :size="80" />
1515
<img class="u-frame" :src="frameUrl" />
1616
</div>
1717
<div class="u-name-uid">
@@ -72,11 +72,14 @@ import ReplyList from "@/components/author/mobile/Pannel/ReplyList.vue";
7272
import FaceList from "@/components/author/mobile/Pannel/FaceList.vue";
7373
import BodyList from "@/components/author/mobile/Pannel/BodyList.vue";
7474
import SimpleMoreAction from "@/components/author/mobile/MoreAction.vue";
75+
import CommonAvatar from "@jx3box/jx3box-ui/src/author/Avatar.vue";
7576
import wx from "weixin-js-sdk";
77+
import { markRaw } from "vue";
7678
7779
export default {
7880
name: "MobileMe",
7981
components: {
82+
CommonAvatar,
8083
SimpleMoreAction,
8184
ContentTabList,
8285
},
@@ -154,19 +157,19 @@ export default {
154157
{
155158
label: "角色",
156159
value: "UserInfo",
157-
component: RoleInfo,
160+
component: markRaw(RoleInfo),
158161
key: "role_is_public",
159162
},
160163
{
161164
label: "动态",
162165
value: "BoxMoment",
163-
component: BoxMoment,
166+
component: markRaw(BoxMoment),
164167
key: "personal_activities_is_public",
165168
},
166169
{
167170
label: "文章",
168171
value: "Works",
169-
component: CmsPosts,
172+
component: markRaw(CmsPosts),
170173
key: "article_is_public",
171174
172175
children: [
@@ -196,36 +199,36 @@ export default {
196199
label: "帖子",
197200
value: "Other",
198201
key: "community_topic_is_public",
199-
component: SubTabContent,
202+
component: markRaw(SubTabContent),
200203
children: [
201204
{
202205
label: "发帖",
203206
value: "Topic",
204-
component: TopicList,
207+
component: markRaw(TopicList),
205208
},
206209
{
207210
label: "回帖",
208211
value: "Reply",
209-
component: ReplyList,
212+
component: markRaw(ReplyList),
210213
},
211214
],
212215
},
213216
{
214217
label: "捏脸",
215218
value: "Data",
216219
key: "make_face_is_public",
217-
component: SubTabContent,
220+
component: markRaw(SubTabContent),
218221
children: [
219222
{
220223
label: "捏脸",
221224
value: "face",
222-
component: FaceList,
225+
component: markRaw(FaceList),
223226
icon: "el-icon-grape",
224227
},
225228
{
226229
label: "体型",
227230
value: "body",
228-
component: BodyList,
231+
component: markRaw(BodyList),
229232
icon: "el-icon-watermelon",
230233
},
231234
],
@@ -353,7 +356,10 @@ export default {
353356
354357
return res;
355358
},
356-
time: (val) => {
359+
},
360+
methods: {
361+
showAvatar,
362+
time(val) {
357363
return dateFormat(new Date(val));
358364
},
359365
formatBoxcoin(val) {
@@ -362,9 +368,6 @@ export default {
362368
}
363369
return val;
364370
},
365-
},
366-
methods: {
367-
showAvatar,
368371
onSelect(item) {
369372
if (item.method === "black") {
370373
this.joinBlacklist();

src/pages/author/index.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,9 @@ app.use(ElementPlus, {
7272
});
7373
import * as ElementPlusIconsVue from "@element-plus/icons-vue";
7474
for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
75-
app.component(key, component);
75+
if (!app.component(key)) {
76+
app.component(key, component);
77+
}
7678
}
7779

7880
// 6.3 Tailwind

0 commit comments

Comments
 (0)