22 <CommunitySingleLayout :post =" post " >
33 <div class =" m-community-single" v-loading =" loading" >
44 <!-- 头部 -->
5- <div class =" m-community-header" >
5+ <!-- < div class="m-community-header">
66 <PostHeader :post="post" :stat="stat">
77 <template #append>
88 <el-pagination
1616 class="m-pageheader-pagination"
1717 ></el-pagination>
1818 </template>
19- </PostHeader >
19+ </PostHeader> -->
2020 <!-- 文集小册 -->
21- <Collection
21+ <!-- < Collection
2222 class="m-single-collection"
2323 :id="collection_id"
2424 :defaultVisible="collection_collapse"
2525 @collectionUpdate="updateCollection"
2626 />
27- <el-divider content-position =" left" >JX3BOX</el-divider >
28- </div >
27+ <el-divider content-position="left">JX3BOX</el-divider> -->
28+ <!-- < /div> -- >
2929
3030 <div class =" m-list-box" >
3131 <!-- 楼主 -->
3737 :post =" post "
3838 @onReplyTopic =" handleReplyTopic "
3939 @enterPwd =" enterPwd "
40- />
40+ >
41+ <template #header >
42+ <!-- 头部 -->
43+ <div class =" m-community-header" >
44+ <PostHeader :post =" post " :stat =" stat " >
45+ <template #append >
46+ <el-pagination
47+ layout =" prev, pager, next"
48+ :hide-on-single-page =" true"
49+ :page-size =" per"
50+ :total =" total"
51+ :current-page.sync =" page"
52+ @current-change =" changePage"
53+ size =" small"
54+ class =" m-pageheader-pagination"
55+ ></el-pagination >
56+ </template >
57+ </PostHeader >
58+ <!-- 文集小册 -->
59+ <Collection
60+ class="m-single-collection"
61+ :id =" collection_id "
62+ :defaultVisible =" collection_collapse "
63+ @collectionUpdate =" updateCollection "
64+ />
65+ <el-divider content-position =" left" >JX3BOX</el-divider >
66+ </div >
67+ </template >
68+ </ReplyItem >
4169 </div >
4270
4371 <!-- 帖子回复 -->
82110 <div class =" u-editor" >
83111 <el-divider content-position =" left" >回帖</el-divider >
84112 <CommentEditor @submit =" onReplyTopic " v-if =" ! isDisabledComment " />
85- <el-alert :show-close =" false" center v-else class =" m-disabled-comment-tip" >作者已关闭回帖功能</el-alert >
113+ <el-alert :show-close =" false" center v-else class =" m-disabled-comment-tip"
114+ >作者已关闭回帖功能</el-alert
115+ >
86116 </div >
87117 </div >
88118 </div >
@@ -206,7 +236,7 @@ export default {
206236 };
207237 },
208238 computed: {
209- styles : function () {
239+ styles : function () {
210240 let item = this .categoryList .find ((item ) => item .value === this .post .category );
211241 if (item) {
212242 return item;
@@ -218,7 +248,7 @@ export default {
218248 };
219249 }
220250 },
221- id : function () {
251+ id : function () {
222252 return this .$route .params .id ;
223253 },
224254 isAuthor () {
@@ -228,25 +258,25 @@ export default {
228258 return window .innerWidth < 768 ;
229259 },
230260 // 是否显示加载更多
231- hasNextPage: function () {
261+ hasNextPage: function () {
232262 return this .pageTotal >= 1 && this .per * this .page < this .total ;
233263 },
234264 collection_id () {
235265 return this .post .collection_id ;
236266 },
237- collection_collapse : function () {
267+ collection_collapse : function () {
238268 return this .post ? .collection_collapse ;
239269 },
240- null_tip: function () {
270+ null_tip: function () {
241271 let str = " 作者设置了【" ;
242272 str += __visibleMap[this .post ? .visible ];
243273 str += " 】" ;
244274 return str;
245275 },
246- visible: function () {
276+ visible: function () {
247277 return !! this .post ? .visible_validate ;
248278 },
249- isDisabledComment: function () {
279+ isDisabledComment: function () {
250280 return !! this .post ? .disable_comment ;
251281 },
252282 },
@@ -281,7 +311,7 @@ export default {
281311 " $route.query" : {
282312 deep: true ,
283313 immediate: true ,
284- handler : function (query ) {
314+ handler : function (query ) {
285315 if (Object .keys (query).length ) {
286316 for (let key in query) {
287317 // for:element分页组件兼容性问题
@@ -299,7 +329,7 @@ export default {
299329 /**
300330 * 获取url楼诚参数
301331 */
302- getJumpFloor : function () {
332+ getJumpFloor : function () {
303333 const hash = window .location .hash ;
304334 const floor = hash .substring (1 ).split (" ?" )[0 ];
305335 if (floor) {
@@ -322,7 +352,7 @@ export default {
322352 });
323353 },
324354 // 翻页按钮
325- nextPage : function () {
355+ nextPage : function () {
326356 this .getReplyList (true );
327357 },
328358 onSearch () {
@@ -341,7 +371,7 @@ export default {
341371 this .getReplyList ();
342372 },
343373
344- buildQuery : function () {
374+ buildQuery : function () {
345375 let _query = {
346376 index: this .page ,
347377 pageSize: this .per ,
@@ -354,10 +384,10 @@ export default {
354384 this .replaceRoute ({ page: this .page , onlyAuthor: this .onlyAuthor });
355385 return _query;
356386 },
357- getTopicData : function () {
387+ getTopicData : function () {
358388 return this .post ;
359389 },
360- getDetails : function () {
390+ getDetails : function () {
361391 let fun = getTopicDetails;
362392 if (this .mode == " admin" ) {
363393 fun = getTopicDetailsFromAdmin;
@@ -400,7 +430,7 @@ export default {
400430 }
401431 });
402432 },
403- getReplyList : function (appendMode ) {
433+ getReplyList : function (appendMode ) {
404434 if (this .mode == " admin" ) return ;
405435 this .loading = true ;
406436 if (appendMode) {
@@ -516,7 +546,7 @@ export default {
516546 this .getReplyList ();
517547 },
518548 // 路由绑定
519- replaceRoute: function (extend ) {
549+ replaceRoute: function (extend ) {
520550 return this .$router
521551 .push ({ name: this .$route .name , query: Object .assign ({}, this .$route .query , extend) })
522552 .then (() => {
@@ -528,7 +558,7 @@ export default {
528558 // 展示快捷回复弹窗
529559 this .showComment = true ;
530560 },
531- updateCollection : function (val ) {
561+ updateCollection : function (val ) {
532562 this .collection_data = val;
533563 },
534564
0 commit comments