1
0
mirror of https://github.com/ialley-workshop-open/uni-halo.git synced 2026-06-12 13:19:31 +08:00

新增:文章版权说明;

新增:文章详情点击标签跳转查询标签下的文章列表;
优化:调整markdown文字大小
This commit is contained in:
小莫唐尼
2022-12-10 14:24:36 +08:00
parent 70c5b34de0
commit e46c5c2b6f
12 changed files with 319 additions and 33 deletions
+5 -1
View File
@@ -33,7 +33,7 @@
</view>
</view>
<view v-if="useActions" class="">
<tm-button size="s" text theme="blue" @click="$emit('on-comment', { type: 'user', comment: comment })">回复</tm-button>
<tm-button v-if="!disallowComment" size="s" text theme="blue" @click="$emit('on-comment', { type: 'user', comment: comment })">回复</tm-button>
<tm-button size="s" text theme="grey" @click="$emit('on-copy', comment.content)">复制</tm-button>
</view>
</view>
@@ -59,6 +59,10 @@ export default {
type: Array,
default: () => []
},
disallowComment: {
type: Boolean,
default: false
},
useActions: {
type: Boolean,
default: true
+22 -6
View File
@@ -12,7 +12,6 @@
<!-- <text class="filter-item">全部</text> -->
</view>
</view>
<!-- <view v-if="disallowComment" class="disallow-comment"><tm-empty icon="icon-shiliangzhinengduixiang-" label="文章已开启禁止评论"></tm-empty></view> -->
<!-- 内容区域 -->
<view class="comment-list_content">
<view v-if="loading != 'success'" class="loading-wrap flex">
@@ -27,9 +26,22 @@
</view>
</view>
<block v-else>
<tm-alerts
v-if="disallowComment && dataList.length !== 0"
color="red"
text
:margin="[0, 0]"
:shadow="0"
label="Ծ‸Ծ博主已设置该文章禁止评论!"
:round="3"
close
></tm-alerts>
<view class="empty pt-50" v-if="dataList.length == 0">
<tm-empty icon="icon-shiliangzhinengduixiang-" label="暂无评论">
<tm-button theme="bg-gradient-light-blue-accent" size="m" v-if="!disallowComment" @click="fnToComment(null)">抢沙发</tm-button>
<tm-empty v-if="disallowComment" icon="icon-shiliangzhinengduixiang-" label="暂无评论">
<text class="text-red text-size-s">- 文章已开启禁止评论 -</text>
</tm-empty>
<tm-empty v-else icon="icon-shiliangzhinengduixiang-" label="暂无评论">
<tm-button theme="bg-gradient-light-blue-accent" size="m" @click="fnToComment(null)">抢沙发</tm-button>
</tm-empty>
</view>
<block v-else>
@@ -40,6 +52,7 @@
:isChild="false"
:comment="comment"
:postId="postId"
:disallowComment="disallowComment"
@on-copy="fnCopyContent"
@on-comment="fnToComment"
@on-todo="fnToDo"
@@ -54,6 +67,7 @@
:isChild="true"
:comment="childComment"
:postId="postId"
:disallowComment="disallowComment"
@on-copy="fnCopyContent"
@on-comment="fnToComment"
@on-todo="fnToDo"
@@ -74,9 +88,11 @@
<script>
import tmEmpty from '@/tm-vuetify/components/tm-empty/tm-empty.vue';
import tmButton from '@/tm-vuetify/components/tm-button/tm-button.vue';
import tmAlerts from '@/tm-vuetify/components/tm-alerts/tm-alerts.vue';
export default {
name: 'comment-list',
components: { tmEmpty, tmButton },
components: { tmEmpty, tmButton, tmAlerts },
props: {
// 是否禁用评论
disallowComment: {
@@ -200,7 +216,7 @@ export default {
position: relative;
box-sizing: border-box;
padding-left: 24rpx;
font-size: 34rpx;
font-size: 30rpx;
font-weight: bold;
&:before {
@@ -209,7 +225,7 @@ export default {
left: 0rpx;
top: 8rpx;
width: 8rpx;
height: 30rpx;
height: 26rpx;
background-color: rgb(3, 174, 252);
border-radius: 6rpx;
}