Revert "pref(ticket): 优化工单评论显示,我的回复显示在右边,其它回复均显示在左边 (#356)"

This reverts commit cea03df4eb.
This commit is contained in:
老广
2020-09-02 10:15:02 +08:00
committed by GitHub
parent 93408e52c1
commit 7d71aa96b9

View File

@@ -5,7 +5,7 @@
</div> </div>
<template v-if="comments"> <template v-if="comments">
<div v-for="item in comments" :key="item.user_display + item.body" class="feed-activity-list"> <div v-for="item in comments" :key="item.user_display + item.body" class="feed-activity-list">
<div class="feed-element" :class="{'flex-container': isFlexRight(item.user_display)}"> <div class="feed-element">
<a href="#" class="pull-left"> <a href="#" class="pull-left">
<el-avatar :src="imageUrl" class="header-avatar" /> <el-avatar :src="imageUrl" class="header-avatar" />
</a> </a>
@@ -13,9 +13,9 @@
<strong>{{ item.user_display }}</strong> <small class="text-muted">{{ formatTime(item.date_created) }}</small> <strong>{{ item.user_display }}</strong> <small class="text-muted">{{ formatTime(item.date_created) }}</small>
<br> <br>
<small class="text-muted">{{ toSafeLocalDateStr(item.date_created) }}</small> <small class="text-muted">{{ toSafeLocalDateStr(item.date_created) }}</small>
<div style="padding-top: 10px; white-space: pre-line "> <pre style="padding-top: 10px">
{{ item.body }} {{ item.body }}
</div> </pre>
</div> </div>
</div> </div>
</div> </div>
@@ -69,8 +69,6 @@
import IBox from '@/components/IBox' import IBox from '@/components/IBox'
import { formatTime, getDateTimeStamp } from '@/utils' import { formatTime, getDateTimeStamp } from '@/utils'
import { toSafeLocalDateStr } from '@/utils/common' import { toSafeLocalDateStr } from '@/utils/common'
import { mapGetters } from 'vuex'
export default { export default {
name: 'Comments', name: 'Comments',
components: { IBox }, components: { IBox },
@@ -103,9 +101,6 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters([
'currentUser'
]),
hasActionPerm() { hasActionPerm() {
return this.object.assignees.indexOf(this.$store.state.users.profile.id) !== -1 return this.object.assignees.indexOf(this.$store.state.users.profile.id) !== -1
} }
@@ -186,9 +181,6 @@ export default {
}, },
reloadPage() { reloadPage() {
window.location.reload() window.location.reload()
},
isFlexRight(value) {
return this.currentUser.name + '(' + this.currentUser.username + ')' === value
} }
} }
@@ -228,8 +220,4 @@ export default {
.text-muted { .text-muted {
color: #888888; color: #888888;
} }
.flex-container {
display: flex;
justify-content: flex-end;
}
</style> </style>