chunk-20becc2c.3427157e.js.map 29 KB

1
  1. {"version":3,"sources":["webpack:///./src/views/forum/forum-answer-item.vue?76cc","webpack:///./src/views/forum/forum-answer-item.vue","webpack:///src/views/forum/forum-answer-item.vue","webpack:///./src/views/forum/forum-answer-item.vue?08ba","webpack:///./src/views/forum/forum-answer-item.vue?5e88"],"names":["render","_vm","this","_c","_self","staticClass","on","$event","$router","back","attrs","require","_v","info","headimg","_s","name","slot","title","class","hide","detail_show","domProps","content","style","transform","concat","is_like","handleLike","like_num","comment_num","openAllComment","reportVisible","current","params","sort_type","page","getCommentList","userInfo","directives","rawName","value","edit_value","expression","target","composing","handleComment","_l","list","item","index","option","reportType","data","handleReply","handleDelete","model","callback","$$v","ref","staticRenderFns","components","Report","ForumCommentCard","ForumAllComment","all_comment","page_num","loading","finished","computed","_objectSpread","mapState","_this","listApi","ForumService","getReplyCommentList","forum_id","reply_id","id","likeApi","forumTags","postApi","commentReply","postReplyApi","comment","forumSecondComment","delApi","batchesDel","type","mounted","$route","query","window","scrollTo","getAnswerDetail","methods","TouchBottom","_this2","getReplyInfo","then","_ref","detail","_this3","_ref2","length","pageNum","total_count","_this4","like_id","_ref3","msg","tags","Number","$message","success","_this5","_ref4","can_delete","console","log","parent_comment","JSON","parse","stringify","splice","$refs","open","component"],"mappings":"mHAAA,W,yDCAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EAAG,MAAM,CAACE,YAAY,UAAU,CAACF,EAAG,MAAM,CAACE,YAAY,OAAOC,GAAG,CAAC,MAAQ,SAASC,GAAQ,OAAON,EAAIO,QAAQC,UAAU,CAACN,EAAG,MAAM,CAACO,MAAM,CAAC,IAAMC,EAAQ,WAA6BR,EAAG,OAAO,CAACF,EAAIW,GAAG,YAAYT,EAAG,MAAM,CAACE,YAAY,WAAW,CAACF,EAAG,MAAM,CAACE,YAAY,QAAQ,CAACF,EA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AvE,EACAtB,QAAA,EACA0F,WAAA,IAEA,KAAArE,KACA,QAAAd,OAAAC,UACA,CAAAiD,GAAA1D,OAAA,KAAAsB,MACA,KAAAA,KAAAtB,OAAA,CAAA0D,KAGA7B,aAAA,SAAAL,GACA,IAAAF,EAAAyE,KAAAC,MAAAD,KAAAE,UAAA,KAAA3E,OACAA,EAAA4E,OAAA1E,EAAA,GACA,KAAAF,QAGAjB,eAAA,WACA,KAAA8F,MAAA,mBAAAC,KAAA,cAAAjH,SC5Q0W,I,yBCQtWkH,EAAY,eACd,EACA/H,EACA4D,GACA,EACA,KACA,WACA,MAIa,aAAAmE,E","file":"js/chunk-20becc2c.3427157e.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!./forum-answer-item.vue?vue&type=style&index=0&id=15e158c0&prod&lang=scss&scoped=true&\"","var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',{staticClass:\"wrap\"},[_c('div',{staticClass:\"header\"},[_c('div',{staticClass:\"back\",on:{\"click\":function($event){return _vm.$router.back()}}},[_c('img',{attrs:{\"src\":require(\"@/assets/icon/back.png\")}}),_c('span',[_vm._v(\"返回\")])])]),_c('div',{staticClass:\"content\"},[_c('div',{staticClass:\"info\"},[_c('div',{staticClass:\"header\"},[_c('div',{staticClass:\"user\"},[_c('img',{staticClass:\"avatar\",attrs:{\"src\":_vm.info.headimg,\"alt\":\"\"}}),_c('div',{staticClass:\"name\"},[_vm._v(_vm._s(_vm.info.name))])])]),_c('div',{staticClass:\"question-content\",attrs:{\"slot\":\"content\"},slot:\"content\"},[_c('div',{staticClass:\"title\"},[_vm._v(_vm._s(_vm.info.title))]),_c('div',{staticClass:\"detail\",class:{ hide: !_vm.detail_show },domProps:{\"innerHTML\":_vm._s(_vm.info.content)}}),_c('div',{staticClass:\"show-all\",on:{\"click\":function($event){_vm.detail_show = !_vm.detail_show}}},[_c('span',[_vm._v(_vm._s(_vm.detail_show ? \"收起\" : \"展开\")+\"全部\")]),_c('img',{style:({\n transform: `rotate(${_vm.detail_show ? '270deg' : '90deg'})`,\n }),attrs:{\"src\":require(\"@/assets/icon/arrow-blue.png\")}})])]),_c('div',{staticClass:\"footer\"},[_c('div',{staticClass:\"btn-box\"},[_c('div',{staticClass:\"tag-btn\",class:{ 'tag-btn-select': !!_vm.info.is_like },on:{\"click\":_vm.handleLike}},[_c('img',{staticClass:\"icon\",attrs:{\"src\":require(`@/assets/icon/${\n _vm.info.is_like ? 'dianzan_fill_blue' : 'dianzan_border_grey'\n }.png`)}}),_c('span',[_vm._v(_vm._s(_vm.info.like_num)+\" 点赞\")])]),_c('div',{staticClass:\"tag-btn\",on:{\"click\":function($event){_vm.info.comment_num ? _vm.openAllComment() : ''}}},[_c('img',{staticClass:\"icon\",attrs:{\"src\":require(\"@/assets/icon/pinglun_fill_grey.png\")}}),_c('span',[_vm._v(_vm._s(_vm.info.comment_num)+\" 评论\")])]),_c('div',{staticClass:\"tag-btn\",on:{\"click\":function($event){_vm.reportVisible = true}}},[_c('img',{staticClass:\"icon\",attrs:{\"src\":require(\"@/assets/icon/report.png\")}}),_c('span',[_vm._v(\"举报\")])])])])]),_c('div',{staticClass:\"line\"}),_c('div',{staticClass:\"comment\"},[_c('div',{staticClass:\"header\"},[_c('div',{staticClass:\"comment-num\"},[_vm._v(\"评论 \"+_vm._s(_vm.info.comment_num))]),_c('div',{staticClass:\"right\"},[_c('div',{staticClass:\"sort\"},[_c('span',{class:{ current: _vm.params.sort_type == 1 },on:{\"click\":function($event){_vm.params.sort_type = 1;\n _vm.params.page = 1;\n _vm.getCommentList();}}},[_vm._v(\"最新\")]),_vm._v(\"\\n |\\n \"),_c('span',{class:{ current: _vm.params.sort_type == 2 },on:{\"click\":function($event){_vm.params.sort_type = 2;\n _vm.params.page = 1;\n _vm.getCommentList();}}},[_vm._v(\"最热\")])])])]),_c('div',{staticClass:\"edit\"},[_c('img',{staticClass:\"avatar\",attrs:{\"src\":_vm.userInfo.headimg,\"alt\":\"\"}}),_c('div',{staticClass:\"edit-box\"},[_c('textarea',{directives:[{name:\"model\",rawName:\"v-model\",value:(_vm.edit_value),expression:\"edit_value\"}],staticClass:\"edit-value\",attrs:{\"placeholder\":\"发布一条友善的评论\"},domProps:{\"value\":(_vm.edit_value)},on:{\"input\":function($event){if($event.target.composing)return;_vm.edit_value=$event.target.value}}}),_c('div',{staticClass:\"edit-btn\",class:{ 'can-user': !!_vm.edit_value },on:{\"click\":function($event){_vm.edit_value ? _vm.handleComment() : ''}}},[_vm._v(\"\\n 发表评论\\n \")])])]),_c('div',{staticClass:\"list\"},_vm._l((_vm.list),function(item,index){return _c('div',{staticClass:\"list-item\"},[_c('ForumCommentCard',{attrs:{\"comment\":item,\"option\":_vm.option,\"reportType\":_vm.option.reportType},on:{\"reply\":(data) => _vm.handleReply(data, item),\"delete\":function($event){return _vm.handleDelete(index)}}})],1)}),0)])]),_c('Report',{attrs:{\"type\":_vm.option.reportType,\"info\":_vm.info},model:{value:(_vm.reportVisible),callback:function ($$v) {_vm.reportVisible=$$v},expression:\"reportVisible\"}}),_c('ForumAllComment',{ref:\"forumAllComment\",attrs:{\"option\":_vm.option}})],1)\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"wrap\">\r\n <div class=\"header\">\r\n <div class=\"back\" @click=\"$router.back()\">\r\n <img src=\"@/assets/icon/back.png\" /><span>返回</span>\r\n </div>\r\n </div>\r\n <div class=\"content\">\r\n <div class=\"info\">\r\n <div class=\"header\">\r\n <div class=\"user\">\r\n <img class=\"avatar\" :src=\"info.headimg\" alt=\"\" />\r\n <div class=\"name\">{{ info.name }}</div>\r\n </div>\r\n </div>\r\n <div class=\"question-content\" slot=\"content\">\r\n <div class=\"title\">{{ info.title }}</div>\r\n <div\r\n class=\"detail\"\r\n v-html=\"info.content\"\r\n :class=\"{ hide: !detail_show }\"\r\n ></div>\r\n <div class=\"show-all\" @click=\"detail_show = !detail_show\">\r\n <span>{{ detail_show ? \"收起\" : \"展开\" }}全部</span>\r\n <img\r\n src=\"@/assets/icon/arrow-blue.png\"\r\n :style=\"{\r\n transform: `rotate(${detail_show ? '270deg' : '90deg'})`,\r\n }\"\r\n />\r\n </div>\r\n </div>\r\n <div class=\"footer\">\r\n <div class=\"btn-box\">\r\n <div\r\n class=\"tag-btn\"\r\n :class=\"{ 'tag-btn-select': !!info.is_like }\"\r\n @click=\"handleLike\"\r\n >\r\n <img\r\n class=\"icon\"\r\n :src=\"\r\n require(`@/assets/icon/${\r\n info.is_like ? 'dianzan_fill_blue' : 'dianzan_border_grey'\r\n }.png`)\r\n \"\r\n />\r\n <span>{{ info.like_num }} 点赞</span>\r\n </div>\r\n <div\r\n class=\"tag-btn\"\r\n @click=\"info.comment_num ? openAllComment() : ''\"\r\n >\r\n <img class=\"icon\" src=\"@/assets/icon/pinglun_fill_grey.png\" />\r\n <span>{{ info.comment_num }} 评论</span>\r\n </div>\r\n <div class=\"tag-btn\" @click=\"reportVisible = true\">\r\n <img class=\"icon\" src=\"@/assets/icon/report.png\" />\r\n <span>举报</span>\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"line\"></div>\r\n <div class=\"comment\">\r\n <div class=\"header\">\r\n <div class=\"comment-num\">评论 {{ info.comment_num }}</div>\r\n <div class=\"right\">\r\n <div class=\"sort\">\r\n <span\r\n :class=\"{ current: params.sort_type == 1 }\"\r\n @click=\"\r\n params.sort_type = 1;\r\n params.page = 1;\r\n getCommentList();\r\n \"\r\n >最新</span\r\n >\r\n |\r\n <span\r\n :class=\"{ current: params.sort_type == 2 }\"\r\n @click=\"\r\n params.sort_type = 2;\r\n params.page = 1;\r\n getCommentList();\r\n \"\r\n >最热</span\r\n >\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"edit\">\r\n <img class=\"avatar\" :src=\"userInfo.headimg\" alt=\"\" />\r\n <div class=\"edit-box\">\r\n <textarea\r\n class=\"edit-value\"\r\n placeholder=\"发布一条友善的评论\"\r\n v-model=\"edit_value\"\r\n ></textarea>\r\n <div\r\n class=\"edit-btn\"\r\n :class=\"{ 'can-user': !!edit_value }\"\r\n @click=\"edit_value ? handleComment() : ''\"\r\n >\r\n 发表评论\r\n </div>\r\n </div>\r\n </div>\r\n <div class=\"list\">\r\n <div class=\"list-item\" v-for=\"(item, index) in list\">\r\n <ForumCommentCard\r\n :comment=\"item\"\r\n :option=\"option\"\r\n :reportType=\"option.reportType\"\r\n @reply=\"(data) => handleReply(data, item)\"\r\n @delete=\"handleDelete(index)\"\r\n />\r\n </div>\r\n </div>\r\n </div>\r\n </div>\r\n <Report :type=\"option.reportType\" :info=\"info\" v-model=\"reportVisible\" />\r\n <ForumAllComment ref=\"forumAllComment\" :option=\"option\" />\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport Report from \"@/components/module/report.vue\";\r\nimport ForumCommentCard from \"@/components/card/forum/forum-comment-card.vue\";\r\nimport ForumAllComment from \"@/components/forum/forum-all-comment.vue\";\r\nimport { ForumService } from \"@/common/service\";\r\nimport { mapState } from \"vuex\";\r\nexport default {\r\n components: { Report, ForumCommentCard, ForumAllComment },\r\n data() {\r\n return {\r\n info: {},\r\n reportVisible: false,\r\n all_comment: false,\r\n edit_value: \"\",\r\n params: {\r\n page: 1,\r\n page_num: 10,\r\n sort_type: 1,\r\n },\r\n list: [],\r\n detail_show: false,\r\n loading: false,\r\n finished: false,\r\n };\r\n },\r\n computed: {\r\n ...mapState([\"userInfo\"]),\r\n option() {\r\n return {\r\n // 列表api\r\n listApi: (params) =>\r\n ForumService.getReplyCommentList({\r\n ...params,\r\n forum_id: this.info.forum_id,\r\n reply_id: this.info.id,\r\n }),\r\n // 点赞\r\n likeApi: (params) => ForumService.forumTags(params),\r\n // 发布评论\r\n postApi: (params) =>\r\n ForumService.commentReply({\r\n ...params,\r\n forum_id: this.info.forum_id,\r\n }),\r\n // 回复评论\r\n postReplyApi: (params, comment) =>\r\n ForumService.forumSecondComment({\r\n ...params,\r\n id: comment.id,\r\n }),\r\n reportType: 12,\r\n // 删除评论\r\n delApi: (params) => ForumService.batchesDel({ id: params.id, type: 9 }),\r\n };\r\n },\r\n },\r\n mounted() {\r\n this.info.id = this.$route.query.reply_id;\r\n this.info.forum_id = this.$route.query.forum_id;\r\n window.scrollTo(0, 0);\r\n this.getAnswerDetail();\r\n },\r\n methods: {\r\n // 触底事件\r\n TouchBottom() {\r\n if (this.finished || this.loading) return;\r\n this.getCommentList();\r\n },\r\n // 获取回答详情\r\n getAnswerDetail() {\r\n ForumService.getReplyInfo({ id: this.info.id }).then(({ data }) => {\r\n this.info = data.detail;\r\n this.loading = true;\r\n this.getCommentList();\r\n });\r\n },\r\n // 获取评论数据\r\n getCommentList() {\r\n this.loading = true;\r\n this.option.listApi(this.params).then(({ data }) => {\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.loading = false;\r\n this.finished =\r\n data.list.length < this.params.pageNum ||\r\n this.list.length == data.total_count;\r\n this.info.comment_num = data.total_count;\r\n });\r\n },\r\n // 点赞\r\n handleLike() {\r\n this.option\r\n .likeApi({\r\n like_id: this.info.id,\r\n type: 3,\r\n })\r\n .then(({ data, msg }) => {\r\n this.info.is_like = data.tags;\r\n this.info.like_num = data.tags\r\n ? Number(this.info.like_num) + 1\r\n : Number(this.info.like_num) - 1;\r\n this.$message.success(msg);\r\n });\r\n },\r\n // 发布评论\r\n handleComment() {\r\n const params = { content: this.edit_value };\r\n params.reply_id = this.info.id;\r\n this.option.postApi(params).then(({ data, msg }) => {\r\n this.edit_value = \"\";\r\n this.$message.success(msg);\r\n data.detail.is_like = 0;\r\n data.detail.can_delete = 1;\r\n this.list =\r\n this.params.sort_type == 1\r\n ? [data.detail].concat(this.list)\r\n : this.list.concat([data.detail]);\r\n });\r\n },\r\n // 回复评论\r\n handleReply(data, item) {\r\n console.log(data);\r\n let comment = {\r\n ...data,\r\n parent_comment: item,\r\n is_like: 0,\r\n can_delete: 1,\r\n };\r\n this.list =\r\n this.params.sort_type == 1\r\n ? [comment].concat(this.list)\r\n : this.list.concat([comment]);\r\n },\r\n // 删除评论\r\n handleDelete(index) {\r\n const list = JSON.parse(JSON.stringify(this.list));\r\n list.splice(index, 1);\r\n this.list = list;\r\n },\r\n // 打开全部评论弹窗\r\n openAllComment() {\r\n this.$refs[\"forumAllComment\"].open(\"answer\", this.info);\r\n },\r\n },\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped>\r\n.wrap {\r\n max-width: 1000px;\r\n min-width: 750px;\r\n padding: 0 15px;\r\n box-sizing: border-box;\r\n margin: 10px auto;\r\n > .header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n margin-bottom: 15px;\r\n .back {\r\n width: 100px;\r\n height: 40px;\r\n line-height: 40px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #222222;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n background-color: white;\r\n border-radius: 4px;\r\n cursor: pointer;\r\n img {\r\n width: 7px;\r\n height: 14px;\r\n margin-right: 10px;\r\n }\r\n }\r\n }\r\n .content {\r\n padding: 15px 15px 30px;\r\n background-color: white;\r\n .info {\r\n .header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n .user {\r\n display: flex;\r\n align-items: center;\r\n .avatar {\r\n width: 30px;\r\n height: 30px;\r\n border-radius: 50%;\r\n }\r\n .name {\r\n margin-left: 10px;\r\n font-size: 16px;\r\n color: #555555;\r\n }\r\n }\r\n }\r\n .question-content {\r\n .title {\r\n font-size: 24px;\r\n font-weight: 500;\r\n color: #222222;\r\n margin-top: 10px;\r\n }\r\n .detail {\r\n margin-top: 10px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #333333;\r\n word-wrap: break-word;\r\n }\r\n .hide {\r\n max-height: 120px;\r\n display: -webkit-box;\r\n -webkit-line-clamp: 2;\r\n overflow: hidden;\r\n text-overflow: ellipsis;\r\n -webkit-box-orient: vertical;\r\n }\r\n .show-all {\r\n width: 123px;\r\n height: 38px;\r\n border-radius: 19px;\r\n border: 1px solid #2a63f3;\r\n margin: 15px auto;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #2a63f3;\r\n display: flex;\r\n align-items: center;\r\n justify-content: center;\r\n cursor: pointer;\r\n img {\r\n width: 6px;\r\n height: 12px;\r\n margin: 0 5px;\r\n }\r\n }\r\n }\r\n .footer {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n .btn-box {\r\n display: flex;\r\n align-items: center;\r\n .tag-btn {\r\n display: flex;\r\n align-items: center;\r\n padding: 5px 8px;\r\n cursor: pointer;\r\n .icon {\r\n width: 16px;\r\n height: 16px;\r\n margin-right: 5px;\r\n }\r\n span {\r\n font-size: 14px;\r\n font-weight: 400;\r\n color: #666666;\r\n }\r\n }\r\n .tag-btn-select {\r\n background: rgba(42, 99, 243, 0.06);\r\n span {\r\n color: #2a63f3;\r\n }\r\n }\r\n .btn {\r\n width: 96px;\r\n height: 32px;\r\n border-radius: 2px;\r\n border: 1px solid #0054f7;\r\n font-size: 14px;\r\n font-weight: 400;\r\n color: #0054f7;\r\n line-height: 32px;\r\n text-align: center;\r\n margin-left: 10px;\r\n cursor: pointer;\r\n }\r\n .btn-select {\r\n background: #0054f7;\r\n color: white;\r\n }\r\n }\r\n }\r\n }\r\n .line {\r\n width: 100%;\r\n height: 1px;\r\n background: #f4f4f4;\r\n margin: 30px 0;\r\n }\r\n .comment {\r\n .header {\r\n display: flex;\r\n align-items: center;\r\n justify-content: space-between;\r\n .comment-num {\r\n font-size: 18px;\r\n font-weight: 400;\r\n color: #222222;\r\n }\r\n .right {\r\n display: flex;\r\n align-items: center;\r\n .sort {\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #999999;\r\n span {\r\n cursor: pointer;\r\n }\r\n .current {\r\n color: #222222;\r\n }\r\n }\r\n .open {\r\n background: #0054f7;\r\n .tips {\r\n color: white;\r\n transform: translate(18px, 0);\r\n }\r\n .btn {\r\n transform: translate(-40px, 0);\r\n }\r\n }\r\n .close {\r\n background: #cccccc;\r\n .tips {\r\n color: #666666;\r\n }\r\n .btn {\r\n transform: translate(0, 0);\r\n }\r\n }\r\n }\r\n }\r\n .edit {\r\n margin-top: 15px;\r\n width: 100%;\r\n display: flex;\r\n align-items: flex-start;\r\n .avatar {\r\n width: 40px;\r\n height: 40px;\r\n border-radius: 50%;\r\n }\r\n .edit-box {\r\n width: calc(100% - 50px);\r\n min-height: 100px;\r\n background: #f4f4f4;\r\n border-radius: 10px;\r\n position: relative;\r\n margin-left: 10px;\r\n .edit-value {\r\n width: 100%;\r\n height: 100px;\r\n outline: none;\r\n border: none;\r\n background: transparent;\r\n resize: none;\r\n box-sizing: border-box;\r\n padding: 10px 15px;\r\n font-size: 18px;\r\n }\r\n .edit-value::placeholder {\r\n font-size: 18px;\r\n font-weight: 400;\r\n color: #999999;\r\n }\r\n .edit-btn {\r\n width: 110px;\r\n height: 46px;\r\n background: #b6b6b6;\r\n border-radius: 6px;\r\n text-align: center;\r\n line-height: 46px;\r\n font-size: 16px;\r\n font-weight: 400;\r\n color: #ffffff;\r\n position: absolute;\r\n right: 10px;\r\n bottom: 10px;\r\n user-select: none;\r\n }\r\n .can-user {\r\n background: #0054f7;\r\n cursor: pointer;\r\n }\r\n }\r\n }\r\n .list {\r\n margin-top: 15px;\r\n .list-item {\r\n margin-bottom: 15px;\r\n }\r\n }\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!./forum-answer-item.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!./forum-answer-item.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./forum-answer-item.vue?vue&type=template&id=15e158c0&scoped=true&\"\nimport script from \"./forum-answer-item.vue?vue&type=script&lang=js&\"\nexport * from \"./forum-answer-item.vue?vue&type=script&lang=js&\"\nimport style0 from \"./forum-answer-item.vue?vue&type=style&index=0&id=15e158c0&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 \"15e158c0\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}