You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

1 line
5.6 KiB

{"remainingRequest":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/vue-loader/lib/index.js??vue-loader-options!/Users/linhuakun/Downloads/nodejs/codewhy/src/components/content/moments/MomentListItem.vue?vue&type=script&lang=js&","dependencies":[{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/src/components/content/moments/MomentListItem.vue","mtime":1609427215849},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/babel-loader/lib/index.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/cache-loader/dist/cjs.js","mtime":499162500000},{"path":"/Users/linhuakun/Downloads/nodejs/codewhy/node_modules/vue-loader/lib/index.js","mtime":499162500000}],"contextDependencies":[],"result":[{"type":"Buffer","data":"base64:Ly8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KLy8KCgpleHBvcnQgZGVmYXVsdCB7CiAgbmFtZTogIk1vbWVudExpc3RJdGVtIiwKICBwcm9wczogewogICAgbW9tZW50czogewogICAgICB0eXBlOiBPYmplY3QsCiAgICAgIGRlZmF1bHQoKSB7CiAgICAgICAgcmV0dXJuIHt9OwogICAgICB9LAogICAgfSwKICB9LAogIGRhdGEoKSB7CiAgICByZXR1cm4gewogICAgICBpZDogdGhpcy5tb21lbnRzLmlkLAogICAgICBpc0V4aXN0OiB0cnVlLAogICAgICBpbWFnZXM6IFtdLAogICAgfTsKICB9LAogIGNyZWF0ZWQoKSB7CgogIH0sCiAgbWV0aG9kczogewogICAgdXBsb2FkYXZhdGFyKCkgewogICAgICB0aGlzLiRidXMuJGVtaXQoInVwbG9hZCIpOwogICAgfSwKICAgIGFzeW5jIHJlbW92ZSgpIHsKICAgICAgY29uc3QgeyBkYXRhOiByZXMgfSA9IGF3YWl0IHRoaXMuJGh0dHAuZGVsZXRlKCIvbW9tZW50LyIgKyB0aGlzLmlkKTsKICAgICAgaWYgKHJlcy5zdGF0dXMgPT0gMjAwKSB7CiAgICAgICAgdGhpcy5pc0V4aXN0ID0gIXRoaXMuaXNFeGlzdDsKICAgICAgICByZXR1cm4gdGhpcy4kbWVzc2FnZS5zdWNjZXNzKCLliKDpmaTmiJDlip8iKTsKICAgICAgICB0aGlzLiRidXMuJGVtaXQoInVwbG9hZCIpOwogICAgICB9IGVsc2UgewogICAgICAgIHJldHVybiB0aGlzLiRtZXNzYWdlLmVycm9yKCLkvaDkuI3lhbflpIfliKDpmaTor6XliqjmgIHmnYPpmZAiKTsKICAgICAgfQogICAgfSwKICAgIGNvbW1lbnQoKSB7CiAgICAgIHRoaXMuJHJvdXRlci5wdXNoKCJkZXRhaWxjb21tZW50LyIgKyB0aGlzLm1vbWVudHMuaWQpOwogICAgfSwKICB9LAp9Owo="},{"version":3,"sources":["MomentListItem.vue"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA8CA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"MomentListItem.vue","sourceRoot":"src/components/content/moments","sourcesContent":["<template>\n <div class=\"moment-items\" v-if=\"isExist\">\n <div>\n <img\n class=\"avatar\"\n :src=\"moments.author.avatarUrl\"\n @load=\"uploadavatar\"\n />\n </div>\n <div class=\"name\">{{ moments.author.name }}</div>\n\n <i @click=\"remove\" id=\"delete\" class=\"el-icon-delete\" style=\"font-size: 20px\"></i>\n\n <div class=\"time\">\n {{ this.$moment(moments.createAT).format(\"YYYY-MM-DD HH:mm:ss\") }}\n </div>\n <div class=\"content\">\n <div class=\"text\">{{ moments.content }}</div>\n <div class=\"image\">\n <li v-for=\"(item, index) in moments.images\" :key=\"index\" class=\"picture\">\n <img :src=\"item\" @load=\"uploadavatar\" width=\"100px\" height=\"100px\" />\n </li>\n </div>\n </div>\n\n <div class=\"icon\">\n <i id=\"icon-1\" class=\"el-icon-thumb\" style=\"font-size: 20px\"></i>\n <i\n id=\"icon-1\"\n class=\"el-icon-chat-dot-square\"\n style=\"font-size: 20px\"\n @click=\"comment\"\n ></i>\n <div class=\"number\">{{ moments.commentCount }}</div>\n </div>\n <!-- <img v-lazy=\"showImage\" alt=\"\" @load=\"imageLoad\">\n <div class=\"goods-info\">\n <p>{{goodsItem.title}}</p>\n <span class=\"price\">{{goodsItem.price}}</span>\n <span class=\"collect\">{{goodsItem.cfav}}</span>\n </div> -->\n </div>\n</template>\n\n<script>\n\nexport default {\n name: \"MomentListItem\",\n props: {\n moments: {\n type: Object,\n default() {\n return {};\n },\n },\n },\n data() {\n return {\n id: this.moments.id,\n isExist: true,\n images: [],\n };\n },\n created() {\n\n },\n methods: {\n uploadavatar() {\n this.$bus.$emit(\"upload\");\n },\n async remove() {\n const { data: res } = await this.$http.delete(\"/moment/\" + this.id);\n if (res.status == 200) {\n this.isExist = !this.isExist;\n return this.$message.success(\"删除成功\");\n this.$bus.$emit(\"upload\");\n } else {\n return this.$message.error(\"你不具备删除该动态权限\");\n }\n },\n comment() {\n this.$router.push(\"detailcomment/\" + this.moments.id);\n },\n },\n};\n</script>\n\n<style scoped>\n.moment-items {\n position: relative;\n background-color: rgb(255, 255, 255);\n width: 100%;\n font-size: 5px;\n}\n.avatar {\n float: left;\n width: 50px;\n height: 50px;\n border-radius: 20px;\n}\n.name {\n float: left;\n margin-top: 5px;\n margin-left: 10px;\n color: rgb(0, 0, 0);\n font-size: 15px;\n}\n.time {\n margin-left: 60px;\n margin-top: 30px;\n font-size: 6px;\n}\n.content {\n margin-top: 15px;\n margin-left: 5px;\n font-size: 15px;\n margin-bottom: 15px;\n}\n.icon {\n margin-top: 15px;\n display: flex;\n border-top-style: solid;\n border-width: 0.1px;\n border-color: rgb(230, 220, 220);\n}\n#icon-1 {\n margin-left: 30%;\n}\n#delete {\n float: right;\n}\n.el-icon-delete {\n margin-left: 20px;\n}\n.remove {\n margin-left: 20px;\n}\n.picture{\n margin-top:30px;\n display: inline;\n}\n\n.text{\n margin-top:15px;\n}\n.image{\n margin-top:10px;\n}\n</style>\n"]}]}