1 |
- {"version":3,"sources":["webpack:///./src/components/module/comment-all.vue?6e03","webpack:///./src/components/module/comment-all.vue","webpack:///src/components/module/comment-all.vue","webpack:///./src/components/module/comment-all.vue?2808","webpack:///./src/components/module/comment-all.vue?e8c2","webpack:///./src/components/module/comment.vue?3560","webpack:///./src/components/card/comment-detail-card.vue?47b3","webpack:///./src/components/module/comment.vue","webpack:///./src/components/card/comment-detail-card.vue","webpack:///src/components/card/comment-detail-card.vue","webpack:///./src/components/card/comment-detail-card.vue?bfb0","webpack:///./src/components/card/comment-detail-card.vue?d878","webpack:///src/components/module/comment.vue","webpack:///./src/components/module/comment.vue?d567","webpack:///./src/components/module/comment.vue?d537"],"names":["render","_vm","this","_c","_self","visible","attrs","_","$emit","on","$event","ref","staticClass","handleJump","_e","staticRenderFns","name","components","Comment","props","type","Boolean","default","option","Object","listApi","likeApi","postApi","postReplyApi","delApi","model","prop","event","watch","val","_this","setTimeout","$refs","init","methods","top","scrollTop","component","_v","_s","total_num","userInfo","headimg","require","class","expand","directives","rawName","value","content","expression","domProps","hideSendBox","target","composing","style","opacity","isSend","handlePost","select","params","sort_type","changeSwitch","_l","list","item","key","id","refInFor","reportType","handleReply","handleDelete","finished","getList","childHeadimg","isChild","comment","childTitle","is_top","create_at","slice","send","handleTags","is_like","like_num","reportVisible","can_delete","deleteVisible","concat","parent_comment","_g","$listeners","callback","$$v","OverflowContent","Report","Delete","Number","data","computed","$store","state","mounted","then","_ref","msg","tags","$message","success","_this2","_ref2","children","push","detail","_this3","_ref3","CommentDetailCard","page","page_num","length","comment_detail","_objectSpread","unshift","box","offsetTop","window","scrollTo","filter","i","j"],"mappings":"gHAAA,W,kFCAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAQF,EAAII,QAASF,EAAG,YAAY,CAACG,MAAM,CAAC,MAAQ,OAAO,MAAQ,SAAS,QAAUL,EAAII,QAAQ,eAAe,SAACE,GAAC,OAAKN,EAA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ACA,KACA,WACA,OAIa,S","file":"js/chunk-7fe22ffa.9e25bbae.js","sourcesContent":["export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-all.vue?vue&type=style&index=0&id=66373e9e&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return (_vm.visible)?_c('el-dialog',{attrs:{\"title\":\"全部评论\",\"width\":\"1000px\",\"visible\":_vm.visible,\"before-close\":(_) => _vm.$emit('visible', false)},on:{\"update:visible\":function($event){_vm.visible=$event}}},[_c('div',{ref:\"comment-all\",staticClass:\"comment-all\"},[_c('Comment',{ref:\"comment\",attrs:{\"box\":true},on:{\"handleJump\":_vm.handleJump}})],1)]):_vm._e()\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <el-dialog\r\n title=\"全部评论\"\r\n v-if=\"visible\"\r\n width=\"1000px\"\r\n :visible.sync=\"visible\"\r\n :before-close=\"(_) => $emit('visible', false)\"\r\n >\r\n <div class=\"comment-all\" ref=\"comment-all\">\r\n <Comment ref=\"comment\" :box=\"true\" @handleJump=\"handleJump\" />\r\n </div>\r\n </el-dialog>\r\n</template>\r\n\r\n<script>\r\nimport Comment from \"@/components/module/comment.vue\";\r\nexport default {\r\n name: \"CommentAll\",\r\n components: { Comment },\r\n props: {\r\n visible: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n // 交互配置\r\n option: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n // 列表api\r\n listApi: (_) => {},\r\n // 点赞api\r\n likeApi: (_) => {},\r\n // 评论api\r\n postApi: (_) => {},\r\n // 回复api\r\n postReplyApi: (_) => {},\r\n // 删除api\r\n delApi: (_) => {},\r\n };\r\n },\r\n },\r\n },\r\n model: {\r\n prop: \"visible\",\r\n event: \"visible\",\r\n },\r\n watch: {\r\n visible(val) {\r\n setTimeout((_) => {\r\n val ? this.$refs[\"comment\"].init(this.option) : \"\";\r\n }, 100);\r\n },\r\n },\r\n methods: {\r\n handleJump(top) {\r\n this.$refs[\"comment-all\"].scrollTop = top - 84;\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.comment-all {\r\n max-height: 600px;\r\n overflow: auto;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-all.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-all.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./comment-all.vue?vue&type=template&id=66373e9e&scoped=true&\"\nimport script from \"./comment-all.vue?vue&type=script&lang=js&\"\nexport * from \"./comment-all.vue?vue&type=script&lang=js&\"\nimport style0 from \"./comment-all.vue?vue&type=style&index=0&id=66373e9e&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"66373e9e\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment.vue?vue&type=style&index=0&id=5e5c4f8c&prod&lang=scss&scoped=true&\"","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--8-oneOf-1-0!../../../node_modules/css-loader/index.js??ref--8-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--8-oneOf-1-2!../../../node_modules/sass-loader/dist/cjs.js??ref--8-oneOf-1-3!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-detail-card.vue?vue&type=style&index=0&id=bd18b4ec&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"comment\"},[_c('div',{staticClass:\"title\"},[_vm._v(\"评论 \"+_vm._s(_vm.total_num))]),_c('div',{staticClass:\"send\"},[_c('img',{staticClass:\"headimg\",attrs:{\"src\":_vm.userInfo.headimg || require('@/assets/icon/avatar.png')}}),_c('div',{staticClass:\"send-box\",class:{ expand: _vm.expand }},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.content),expression:\"content\"}],staticClass:\"sendText\",attrs:{\"placeholder\":\"发布一条友善的评论\"},domProps:{\"value\":(_vm.content)},on:{\"focus\":function($event){_vm.expand = false},\"blur\":_vm.hideSendBox,\"input\":function($event){if($event.target.composing)return;_vm.content=$event.target.value}}}),_c('div',{staticClass:\"sendBtn\",style:({ opacity: !!_vm.content ? '1' : '0.3' }),on:{\"click\":(_) => {\n _vm.isSend = true;\n !!_vm.content ? _vm.handlePost() : '';\n }}},[_vm._v(\"\\n 发布\\n \")])])]),_c('div',{staticClass:\"switch\"},[_c('div',{staticClass:\"switch-btn\",class:{ select: _vm.params.sort_type == 2 },on:{\"click\":function($event){return _vm.changeSwitch(2)}}},[_vm._v(\"\\n 最热\\n \")]),_c('div',{staticClass:\"switch-btn\",class:{ select: _vm.params.sort_type == 1 },on:{\"click\":function($event){return _vm.changeSwitch(1)}}},[_vm._v(\"\\n 最新\\n \")])]),_c('div',{staticClass:\"list\"},_vm._l((_vm.list),function(item){return _c('div',{key:'comment' + item.id,ref:'comment' + item.id,refInFor:true,staticClass:\"list-item\"},[_c('CommentDetailCard',{attrs:{\"comment\":item,\"option\":_vm.option,\"reportType\":_vm.option.reportType},on:{\"jump\":_vm.handleJump,\"reply\":_vm.handleReply,\"delete\":_vm.handleDelete}})],1)}),0),(!_vm.finished)?_c('div',{staticClass:\"loadmore\",on:{\"click\":function($event){return _vm.getList()}}},[_vm._v(\"\\n 点击查看更多评论\\n \")]):_vm._e(),_c('div',{staticClass:\"empty\"},[(_vm.finished)?_c('el-empty',{attrs:{\"description\":\"没有更多数据\"}}):_vm._e()],1)])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"comment-detail-card\"},[_c('img',{staticClass:\"card-headimg\",class:{ childHeadimg: _vm.isChild },attrs:{\"src\":_vm.comment.headimg}}),_c('div',{staticClass:\"card-content\"},[_c('div',{staticClass:\"title\",class:{ childTitle: _vm.isChild }},[_c('div',{staticClass:\"name\"},[_vm._v(_vm._s(_vm.comment.name))]),(_vm.comment.is_top)?_c('div',{staticClass:\"is-top\"},[_vm._v(\"置顶\")]):_vm._e()]),_c('div',{staticClass:\"content\"},[_c('OverflowContent',{attrs:{\"value\":_vm.comment.content}})],1),_c('div',{staticClass:\"footer\"},[_c('div',{staticClass:\"time\"},[_vm._v(\"\\n \"+_vm._s(_vm.comment.create_at ? _vm.comment.create_at.slice(5, 16) : \"--:--\")+\"\\n \")]),_c('div',{staticClass:\"interactive\"},[(!_vm.send)?_c('div',{staticClass:\"item\",on:{\"click\":function($event){_vm.send = true}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/huifu_border_grey.png\"),\"alt\":\"\"}}),_c('span',[_vm._v(\"回复\")])]):_c('div',{staticClass:\"item\",on:{\"click\":function($event){_vm.send = false}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/huifu_border_blue.png\"),\"alt\":\"\"}}),_c('span',{staticClass:\"select\"},[_vm._v(\"取消回复\")])]),(!_vm.isChild)?_c('div',{staticClass:\"item\",on:{\"click\":_vm.handleTags}},[_c('img',{attrs:{\"src\":require(_vm.comment.is_like === 0\n ? '@/assets/icon/dianzan_border_grey.png'\n : '@/assets/icon/dianzan_fill_blue.png'),\"alt\":\"\"}}),_c('span',{class:{ select: _vm.comment.is_like === 1 }},[_vm._v(_vm._s(_vm.comment.like_num || \"0\"))])]):_vm._e(),(!_vm.isChild)?_c('div',{staticClass:\"item\",on:{\"click\":function($event){_vm.reportVisible = true}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/jubao_border_grey.png\"),\"alt\":\"\"}}),_c('span',[_vm._v(\"举报\")])]):_vm._e(),(!_vm.isChild && _vm.comment.can_delete)?_c('div',{staticClass:\"item\",on:{\"click\":function($event){_vm.deleteVisible = true}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/shanchu.png\"),\"alt\":\"\"}}),_c('span',[_vm._v(\"删除\")])]):_vm._e(),(_vm.isChild)?_c('div',{staticClass:\"item\",on:{\"click\":function($event){return _vm.$emit('jump', _vm.comment)}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/tiaozhuan.png\"),\"alt\":\"\"}}),_c('span',[_vm._v(\"跳转\")])]):_vm._e()])]),(_vm.send)?_c('div',{staticClass:\"send-box\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.content),expression:\"content\"}],staticClass:\"sendText\",attrs:{\"placeholder\":`回复 ${_vm.comment.name}`},domProps:{\"value\":(_vm.content)},on:{\"input\":function($event){if($event.target.composing)return;_vm.content=$event.target.value}}}),_c('div',{staticClass:\"sendBtn\",style:({ opacity: !!_vm.content ? '1' : '0.3' }),on:{\"click\":(_) => (!!_vm.content ? _vm.handleReply() : '')}},[_vm._v(\"\\n 发布\\n \")])]):_vm._e(),(_vm.comment.parent_comment)?_c('div',{staticClass:\"parent-box\"},[_c('CommentDetailCard',_vm._g({attrs:{\"comment\":_vm.comment.parent_comment,\"isChild\":true,\"option\":_vm.option}},_vm.$listeners))],1):_vm._e()]),_c('Report',{attrs:{\"type\":_vm.reportType,\"info\":_vm.comment},model:{value:(_vm.reportVisible),callback:function ($$v) {_vm.reportVisible=$$v},expression:\"reportVisible\"}}),_c('Delete',{on:{\"handleDelete\":_vm.handleDelete},model:{value:(_vm.deleteVisible),callback:function ($$v) {_vm.deleteVisible=$$v},expression:\"deleteVisible\"}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"comment-detail-card\">\r\n <img\r\n class=\"card-headimg\"\r\n :src=\"comment.headimg\"\r\n :class=\"{ childHeadimg: isChild }\"\r\n />\r\n <div class=\"card-content\">\r\n <div class=\"title\" :class=\"{ childTitle: isChild }\">\r\n <div class=\"name\">{{ comment.name }}</div>\r\n <div class=\"is-top\" v-if=\"comment.is_top\">置顶</div>\r\n </div>\r\n <div class=\"content\">\r\n <OverflowContent :value=\"comment.content\" />\r\n </div>\r\n <div class=\"footer\">\r\n <div class=\"time\">\r\n {{ comment.create_at ? comment.create_at.slice(5, 16) : \"--:--\" }}\r\n </div>\r\n <div class=\"interactive\">\r\n <div class=\"item\" v-if=\"!send\" @click=\"send = true\">\r\n <img src=\"@/assets/icon/huifu_border_grey.png\" alt=\"\" />\r\n <span>回复</span>\r\n </div>\r\n <div class=\"item\" v-else @click=\"send = false\">\r\n <img src=\"@/assets/icon/huifu_border_blue.png\" alt=\"\" />\r\n <span class=\"select\">取消回复</span>\r\n </div>\r\n <div class=\"item\" v-if=\"!isChild\" @click=\"handleTags\">\r\n <img\r\n :src=\"\r\n require(comment.is_like === 0\r\n ? '@/assets/icon/dianzan_border_grey.png'\r\n : '@/assets/icon/dianzan_fill_blue.png')\r\n \"\r\n alt=\"\"\r\n />\r\n <span :class=\"{ select: comment.is_like === 1 }\">{{\r\n comment.like_num || \"0\"\r\n }}</span>\r\n </div>\r\n <div class=\"item\" v-if=\"!isChild\" @click=\"reportVisible = true\">\r\n <img src=\"@/assets/icon/jubao_border_grey.png\" alt=\"\" />\r\n <span>举报</span>\r\n </div>\r\n <div\r\n class=\"item\"\r\n v-if=\"!isChild && comment.can_delete\"\r\n @click=\"deleteVisible = true\"\r\n >\r\n <img src=\"@/assets/icon/shanchu.png\" alt=\"\" />\r\n <span>删除</span>\r\n </div>\r\n <div class=\"item\" v-if=\"isChild\" @click=\"$emit('jump', comment)\">\r\n <img src=\"@/assets/icon/tiaozhuan.png\" alt=\"\" />\r\n <span>跳转</span>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"send-box\" v-if=\"send\">\r\n <textarea\r\n class=\"sendText\"\r\n :placeholder=\"`回复 ${comment.name}`\"\r\n v-model=\"content\"\r\n >\r\n </textarea>\r\n <div\r\n class=\"sendBtn\"\r\n :style=\"{ opacity: !!content ? '1' : '0.3' }\"\r\n @click=\"(_) => (!!content ? handleReply() : '')\"\r\n >\r\n 发布\r\n </div>\r\n </div>\r\n <!-- <div\r\n class=\"children-box\"\r\n v-if=\"comment.children && comment.children.length\"\r\n >\r\n <div\r\n class=\"children\"\r\n v-for=\"child in comment.children\"\r\n v-if=\"!child.is_deleted\"\r\n >\r\n <CommentDetailCard\r\n :comment=\"child\"\r\n :isChild=\"true\"\r\n :option=\"option\"\r\n v-on=\"$listeners\"\r\n />\r\n </div>\r\n </div> -->\r\n <div class=\"parent-box\" v-if=\"comment.parent_comment\">\r\n <CommentDetailCard\r\n :comment=\"comment.parent_comment\"\r\n :isChild=\"true\"\r\n :option=\"option\"\r\n v-on=\"$listeners\"\r\n />\r\n </div>\r\n </div>\r\n <Report :type=\"reportType\" :info=\"comment\" v-model=\"reportVisible\" />\r\n <Delete v-model=\"deleteVisible\" @handleDelete=\"handleDelete\" />\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport OverflowContent from \"@/components/module/overflow-content.vue\";\r\nimport Report from \"@/components/module/report.vue\";\r\nimport Delete from \"@/components/module/delete.vue\";\r\nexport default {\r\n name: \"CommentDetailCard\",\r\n components: { OverflowContent, Report, Delete },\r\n props: {\r\n comment: {\r\n type: Object,\r\n },\r\n isChild: {\r\n type: Boolean,\r\n default: false,\r\n },\r\n option: {\r\n type: Object,\r\n default: () => {\r\n return {\r\n // 列表api\r\n listApi: (_) => {},\r\n // 点赞api\r\n likeApi: (_) => {},\r\n // 评论api\r\n postApi: (_) => {},\r\n // 回复api\r\n postReplyApi: (_) => {},\r\n // 删除api\r\n delApi: (_) => {},\r\n };\r\n },\r\n },\r\n reportType: {\r\n type: Number,\r\n },\r\n },\r\n data() {\r\n return {\r\n send: false,\r\n content: \"\",\r\n reportVisible: false,\r\n deleteVisible: false,\r\n };\r\n },\r\n computed: {\r\n userInfo() {\r\n return this.$store.state.userInfo;\r\n },\r\n },\r\n mounted() {},\r\n methods: {\r\n // 点赞\r\n handleTags() {\r\n this.option.likeApi(this.comment).then(({ data, msg }) => {\r\n this.comment.is_like = data.tags;\r\n this.comment.like_num = data.tags\r\n ? Number(this.comment.like_num) + 1\r\n : Number(this.comment.like_num) - 1;\r\n this.$message.success(msg);\r\n });\r\n },\r\n // 回复\r\n handleReply() {\r\n this.option\r\n .postReplyApi({ content: this.content }, this.comment)\r\n .then(({ data, msg }) => {\r\n this.$message.success(msg);\r\n this.content = \"\";\r\n this.send = false;\r\n if (!this.isChild) {\r\n this.comment.children.push(data.detail);\r\n this.$emit(\"reply\", data.detail);\r\n }\r\n });\r\n },\r\n // 删除\r\n handleDelete() {\r\n this.option.delApi(this.comment).then(({ msg }) => {\r\n this.$message.success(msg);\r\n this.$emit(\"delete\", this.comment);\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.comment-detail-card {\r\n display: flex;\r\n justify-content: flex-start;\r\n align-items: flex-start;\r\n .card-headimg {\r\n width: 60px;\r\n height: 60px;\r\n border-radius: 50%;\r\n }\r\n .childHeadimg {\r\n width: 45px;\r\n height: 45px;\r\n }\r\n\r\n .card-content {\r\n margin-left: 15px;\r\n width: calc(100% - 75px);\r\n\r\n .title {\r\n display: flex;\r\n align-items: center;\r\n justify-content: flex-start;\r\n height: 60px;\r\n\r\n .name {\r\n font-size: 18px;\r\n font-weight: 500;\r\n color: #222222;\r\n }\r\n .is-top {\r\n width: 34px;\r\n height: 20px;\r\n border-radius: 3px;\r\n border: 1px solid #2a63f3;\r\n font-size: 12px;\r\n font-weight: 400;\r\n color: #2a63f3;\r\n text-align: center;\r\n line-height: 20px;\r\n margin-left: 10px;\r\n }\r\n }\r\n .childTitle {\r\n height: 50px;\r\n }\r\n .content {\r\n width: 100%;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #151625;\r\n }\r\n .footer {\r\n display: flex;\r\n align-items: center;\r\n margin-top: 15px;\r\n user-select: none;\r\n .time {\r\n font-size: 14px;\r\n font-weight: 400;\r\n color: #666666;\r\n }\r\n .interactive {\r\n display: flex;\r\n align-items: center;\r\n margin-left: 10px;\r\n .item {\r\n display: flex;\r\n align-items: center;\r\n margin-right: 10px;\r\n img {\r\n width: 16px;\r\n height: 16px;\r\n }\r\n span {\r\n font-size: 14px;\r\n font-weight: 400;\r\n color: #151625;\r\n margin-left: 3px;\r\n }\r\n .select {\r\n color: #2a63f3;\r\n }\r\n }\r\n }\r\n }\r\n .send-box {\r\n width: 100%;\r\n border-radius: 12px;\r\n position: relative;\r\n margin-top: 10px;\r\n .sendText {\r\n width: 100%;\r\n height: 180px;\r\n outline: none;\r\n border: none;\r\n resize: none;\r\n padding: 20px 15px;\r\n background: #f4f4f4;\r\n font-size: 18px;\r\n font-weight: 400;\r\n box-sizing: border-box;\r\n }\r\n .sendText::placeholder {\r\n font-size: 18px;\r\n font-weight: 400;\r\n color: #999999;\r\n }\r\n .sendBtn {\r\n width: 90px;\r\n height: 45px;\r\n text-align: center;\r\n line-height: 45px;\r\n background-color: #2a63f3;\r\n border-radius: 23px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #ffffff;\r\n position: absolute;\r\n top: 120px;\r\n right: 10px;\r\n cursor: pointer;\r\n }\r\n }\r\n .children-box {\r\n margin-top: 15px;\r\n }\r\n .parent-box {\r\n margin-top: 15px;\r\n }\r\n }\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-detail-card.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment-detail-card.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./comment-detail-card.vue?vue&type=template&id=bd18b4ec&scoped=true&\"\nimport script from \"./comment-detail-card.vue?vue&type=script&lang=js&\"\nexport * from \"./comment-detail-card.vue?vue&type=script&lang=js&\"\nimport style0 from \"./comment-detail-card.vue?vue&type=style&index=0&id=bd18b4ec&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"bd18b4ec\",\n null\n \n)\n\nexport default component.exports","<template>\r\n <div class=\"comment\">\r\n <div class=\"title\">评论 {{ total_num }}</div>\r\n <div class=\"send\">\r\n <img\r\n class=\"headimg\"\r\n :src=\"userInfo.headimg || require('@/assets/icon/avatar.png')\"\r\n />\r\n <div class=\"send-box\" :class=\"{ expand: expand }\">\r\n <textarea\r\n class=\"sendText\"\r\n placeholder=\"发布一条友善的评论\"\r\n v-model=\"content\"\r\n @focus=\"expand = false\"\r\n @blur=\"hideSendBox\"\r\n >\r\n </textarea>\r\n <div\r\n class=\"sendBtn\"\r\n :style=\"{ opacity: !!content ? '1' : '0.3' }\"\r\n @click=\"\r\n (_) => {\r\n isSend = true;\r\n !!content ? handlePost() : '';\r\n }\r\n \"\r\n >\r\n 发布\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"switch\">\r\n <div\r\n class=\"switch-btn\"\r\n :class=\"{ select: params.sort_type == 2 }\"\r\n @click=\"changeSwitch(2)\"\r\n >\r\n 最热\r\n </div>\r\n <div\r\n class=\"switch-btn\"\r\n :class=\"{ select: params.sort_type == 1 }\"\r\n @click=\"changeSwitch(1)\"\r\n >\r\n 最新\r\n </div>\r\n </div>\r\n <div class=\"list\">\r\n <div\r\n class=\"list-item\"\r\n v-for=\"item in list\"\r\n :ref=\"'comment' + item.id\"\r\n :key=\"'comment' + item.id\"\r\n >\r\n <CommentDetailCard\r\n :comment=\"item\"\r\n :option=\"option\"\r\n :reportType=\"option.reportType\"\r\n @jump=\"handleJump\"\r\n @reply=\"handleReply\"\r\n @delete=\"handleDelete\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"loadmore\" v-if=\"!finished\" @click=\"getList()\">\r\n 点击查看更多评论\r\n </div>\r\n <div class=\"empty\">\r\n <el-empty v-if=\"finished\" description=\"没有更多数据\"></el-empty>\r\n </div>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport CommentDetailCard from \"@/components/card/comment-detail-card.vue\";\r\nexport default {\r\n name: \"Comment\",\r\n components: { CommentDetailCard },\r\n props: [\"box\"],\r\n data() {\r\n return {\r\n // 输入框聚焦\r\n expand: true,\r\n isSend: false,\r\n // 输入框内容\r\n content: \"\",\r\n\r\n // 获取评论列表参数\r\n params: {\r\n // 页码\r\n page: 1,\r\n // 条目\r\n page_num: 10,\r\n // 排序方式\r\n sort_type: 2,\r\n },\r\n\r\n // 交互配置\r\n option: {\r\n // 列表api\r\n listApi: (_) => {},\r\n // 点赞api\r\n likeApi: (_) => {},\r\n // 评论api\r\n postApi: (_) => {},\r\n // 回复api\r\n postReplyApi: (_) => {},\r\n // 删除api\r\n delApi: (_) => {},\r\n // 举报类型\r\n reportType: 0,\r\n },\r\n\r\n // 数据列表\r\n list: [],\r\n // 数据总条目\r\n total_num: 0,\r\n // 无更多\r\n finished: false,\r\n };\r\n },\r\n computed: {\r\n userInfo() {\r\n return this.$store.state.userInfo;\r\n },\r\n },\r\n mounted() {},\r\n methods: {\r\n // 初始化\r\n init(option) {\r\n this.option = option;\r\n this.getList();\r\n },\r\n // 隐藏发送区域\r\n hideSendBox() {\r\n setTimeout((_) => {\r\n this.expand = this.isSend ? false : true;\r\n this.isSend = false;\r\n }, 100);\r\n },\r\n // 更换排序方式\r\n changeSwitch(type) {\r\n this.params.page = 1;\r\n this.params.sort_type = type;\r\n this.getList();\r\n },\r\n // 获取评论列表\r\n getList() {\r\n this.option.listApi(this.params).then(({ data }) => {\r\n this.total_num = data.total_num;\r\n this.list =\r\n this.params.page == 1 ? data.list : this.list.concat(data.list);\r\n this.params.page++;\r\n this.finished = data.list.length < this.params.page_num;\r\n });\r\n },\r\n // 评论\r\n handlePost() {\r\n this.option\r\n .postApi({ content: this.content }, this.comment)\r\n .then(({ data, msg }) => {\r\n this.$message.success(msg);\r\n this.content = \"\";\r\n this.send = false;\r\n let comment_detail = {\r\n is_like: 0,\r\n like_num: 0,\r\n can_delete: 1,\r\n ...data.detail,\r\n };\r\n this.params.sort_type == 1\r\n ? this.list.unshift(comment_detail)\r\n : this.list.push(comment_detail);\r\n });\r\n },\r\n // 跳转\r\n handleJump(item) {\r\n if (!this.$refs[\"comment\" + item.id]) return;\r\n if (!this.box) {\r\n window.scrollTo(0, this.$refs[\"comment\" + item.id][0].offsetTop);\r\n } else {\r\n this.$emit(\"handleJump\", this.$refs[\"comment\" + item.id][0].offsetTop);\r\n }\r\n },\r\n // 回复\r\n handleReply(item) {\r\n let comment_detail = {\r\n is_like: 0,\r\n like_num: 0,\r\n can_delete: 1,\r\n ...item,\r\n };\r\n this.params.sort_type == 1\r\n ? this.list.unshift(comment_detail)\r\n : this.list.push(comment_detail);\r\n },\r\n // 删除\r\n handleDelete(item) {\r\n this.list = this.list.filter((i) => {\r\n i.children =\r\n i.children &&\r\n i.children.filter((j) => {\r\n return j.id != item.id;\r\n });\r\n return i.id != item.id;\r\n });\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.comment {\r\n padding-bottom: 100px;\r\n .title {\r\n font-size: 38px;\r\n font-weight: 600;\r\n color: #151625;\r\n }\r\n .send {\r\n display: flex;\r\n align-items: flex-start;\r\n margin-top: 20px;\r\n\r\n .headimg {\r\n width: 60px;\r\n height: 60px;\r\n border-radius: 50%;\r\n }\r\n .send-box {\r\n height: 200px;\r\n margin-left: 15px;\r\n width: calc(100% - 80px);\r\n border-radius: 12px;\r\n position: relative;\r\n overflow: hidden;\r\n background: #f4f4f4;\r\n .sendText {\r\n width: 100%;\r\n height: 140px;\r\n outline: none;\r\n border: none;\r\n resize: none;\r\n padding: 20px 15px;\r\n background: #f4f4f4;\r\n font-size: 18px;\r\n font-weight: 400;\r\n box-sizing: border-box;\r\n }\r\n .sendText::placeholder {\r\n font-size: 18px;\r\n font-weight: 400;\r\n color: #999999;\r\n }\r\n .sendBtn {\r\n width: 90px;\r\n height: 45px;\r\n text-align: center;\r\n line-height: 45px;\r\n background-color: #2a63f3;\r\n border-radius: 23px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #ffffff;\r\n // position: absolute;\r\n // top: 125px;\r\n // right: 10px;\r\n float: right;\r\n transform: translate(-20px, 5px);\r\n cursor: pointer;\r\n }\r\n }\r\n .expand {\r\n height: 60px;\r\n }\r\n }\r\n .switch {\r\n display: flex;\r\n align-items: center;\r\n margin-top: 20px;\r\n .switch-btn {\r\n width: 75px;\r\n height: 40px;\r\n text-align: center;\r\n line-height: 40px;\r\n border-radius: 22px;\r\n font-weight: 400;\r\n font-size: 14px;\r\n background: #f4f4f4;\r\n color: #646464;\r\n margin-right: 10px;\r\n cursor: pointer;\r\n }\r\n .select {\r\n background: #2a63f3;\r\n color: #f3f3f3;\r\n }\r\n }\r\n .list {\r\n margin-top: 20px;\r\n .list-item {\r\n margin-top: 10px;\r\n }\r\n }\r\n .loadmore {\r\n width: 100%;\r\n height: 60px;\r\n line-height: 60px;\r\n text-align: center;\r\n background: #f4f4f4;\r\n border-radius: 10px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #717171;\r\n margin-top: 40px;\r\n cursor: pointer;\r\n }\r\n .empty {\r\n margin-top: 40px;\r\n }\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--12-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--0-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./comment.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./comment.vue?vue&type=template&id=5e5c4f8c&scoped=true&\"\nimport script from \"./comment.vue?vue&type=script&lang=js&\"\nexport * from \"./comment.vue?vue&type=script&lang=js&\"\nimport style0 from \"./comment.vue?vue&type=style&index=0&id=5e5c4f8c&prod&lang=scss&scoped=true&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"5e5c4f8c\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}
|