Skip to content

Commit

Permalink
sync:common ui
Browse files Browse the repository at this point in the history
  • Loading branch information
iRuxu committed May 22, 2024
2 parents 2ffc2e6 + 45d42bd commit 286950d
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 8 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"dependencies": {
"@jx3box/jx3box-comment-ui": "^1.8.8",
"@jx3box/jx3box-common": "^8.2.18",
"@jx3box/jx3box-common-ui": "^8.5.0",
"@jx3box/jx3box-common-ui": "^8.5.9",
"@jx3box/jx3box-data": "^3.5.8",
"@jx3box/jx3box-editor": "^2.1.9",
"@jx3box/jx3box-talent": "^1.2.7",
Expand Down
17 changes: 16 additions & 1 deletion src/components/cms-single.vue
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,10 @@ export default {
return User.getInfo()?.uid == this.author_id || this.isEditor;
}
return true;
}
},
community_id: function () {
return this.post?.community_id || 0;
},
},
methods: {
updateCollection: function (val) {
Expand Down Expand Up @@ -227,6 +230,18 @@ export default {
}
},
},
community_id: {
immediate: true,
handler(val) {
if (val && val != 0) {
// 防止死循环
if (location.href.includes(`/community/${val}`)) {
return;
}
location.href = `/community/${val}`;
}
}
}
},
};
</script>
Expand Down
7 changes: 1 addition & 6 deletions src/layout/SingleLayout.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
>
<template #op-prepend>
<!-- <AdminDirectMessage :user-id="user_id" :sourceId="String(post.ID)" :sourceType="post.post_type"></AdminDirectMessage> -->
<AdminDrop v-if="isTeammate" :post="post" :user-id="user_id" />
<AdminDrop v-if="isTeammate" :post="post" :user-id="user_id" :showMove="true"/>
</template>
<template #title>
<span>
Expand Down Expand Up @@ -78,9 +78,4 @@ export default {

<style lang="less">
@import "~@/assets/css/list.less";
.m-bps-single {
.c-admin-drop {
margin-right: 0;
}
}
</style>

0 comments on commit 286950d

Please sign in to comment.