Selaa lähdekoodia

chore: auto bump version and changelog [skip ci]

iwt 1 kuukausi sitten
vanhempi
sitoutus
6921801ffd

+ 4 - 2
cfc-frontend/pages/article-center/article-detail.vue

@@ -44,7 +44,7 @@
             <button class="comment-submit" @click="submitComment">发送</button>
           </view>
           <view v-if="comments.length === 0" class="comment-empty">暂无评论,来写第一条吧</view>
-          <view v-for="(c, i) in comments" :key="c.id || i" class="comment-item">
+          <view v-for="(c, i) in comments" :key="getCommentKey(c, i)" class="comment-item">
             <view class="comment-user">
               <text class="comment-avatar">{{ (c.userName || '?').charAt(0) }}</text>
               <text class="comment-name">{{ c.userName || '匿名' }}</text>
@@ -73,7 +73,7 @@
           <view class="review-header">
             <text class="review-title">待审核评论 ({{ pendingComments.length }})</text>
           </view>
-          <view v-for="(c, i) in pendingComments" :key="'pending-' + i" class="review-item">
+          <view v-for="(c, i) in pendingComments" :key="getPendingKey(i)" class="review-item">
             <view class="review-user">
               <text class="review-avatar">{{ (c.userName || '?').charAt(0) }}</text>
               <text class="review-name">{{ c.userName || '匿名' }}</text>
@@ -231,6 +231,8 @@ export default {
       catch (e) {}
     },
     formatDate(d) { return d ? d.slice(0, 10) : '' },
+    getCommentKey(c, i) { return c.id || i },
+    getPendingKey(i) { return 'pending-' + i },
     parseDimensions: function(article) {
       var dimMap = { body: { code: 'body', color: '#FF8C42', name: '身' }, mind: { code: 'mind', color: '#FF6B9D', name: '心' }, wisdom: { code: 'wisdom', color: '#6366F1', name: '智' }, action: { code: 'action', color: '#10B981', name: '行' }, wealth: { code: 'wealth', color: '#F59E0B', name: '富' } }
       var raw = article && article.relatedDimensions ? article.relatedDimensions.split(',').map(function(s) { return s.trim().toLowerCase() }) : []

+ 1 - 1
cfc-web/.last_build_commit

@@ -1 +1 @@
-92233c86683095e4e12fb18732e3a5dcf488829b
+ccfebb7382581f046a19f827f19047016a73f4eb