cc-comment.vue 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719
  1. <template>
  2. <view>
  3. <view class="c_total">评论 {{ tableTotal }}</view>
  4. <template v-if="dataList && dataList.length">
  5. <view class="c_comment" v-for="(item1, index1) in dataList" :key="item1.id + index1">
  6. <!-- 一级评论 -->
  7. <CommonComp :data="item1" @likeClick="() => likeClick({ item1, index1 })"
  8. @replyClick="() => replyClick({ item1, index1 })"
  9. @deleteClick="() => deleteClick({ item1, index1 })" />
  10. <view class="children_item" v-if="item1.children && item1.children.length">
  11. <!-- 二级评论 -->
  12. <CommonComp v-for="(item2, index2) in item1.childrenShow" :key="item2.id" :data="item2"
  13. :pData="item1" @likeClick="() => likeClick({ item1, index1, item2, index2 })"
  14. @replyClick="() => replyClick({ item1, index1, item2, index2 })"
  15. @deleteClick="() => deleteClick({ item1, index1, item2, index2 })" />
  16. <!-- 展开二级评论 -->
  17. <view class="expand_reply" v-if="expandTxtShow({ item1, index1 })"
  18. @tap="() => expandReplyFun({ item1, index1 })">
  19. <span class="txt"> 展开{{ item1.children.length - item1.childrenShow.length }}条回复 </span>
  20. <uni-icons type="down" size="24" color="#007aff"></uni-icons>
  21. </view>
  22. <!-- 折叠二级评论 -->
  23. <view class="shrink_reply" v-if="shrinkTxtShow({ item1, index1 })"
  24. @tap="() => shrinkReplyFun({ item1, index1 })">
  25. <span class="txt"> 收起回复内容 </span>
  26. <uni-icons type="up" size="24" color="#007aff"></uni-icons>
  27. </view>
  28. </view>
  29. </view>
  30. </template>
  31. <!-- 空盒子 -->
  32. <view class="empty_box" v-else>
  33. <!-- <uni-icons type="chatboxes" size="36" color="#c0c0c0"></uni-icons> -->
  34. <image src="@/static/icon/quexing_01.png" style="width: 380rpx; height: 308rpx;"></image>
  35. <view>
  36. <span class="txt"> 来鼓励一下作者吧~ </span>
  37. <span class="txt click" @click="() => newCommentFun()">说点什么...</span>
  38. </view>
  39. </view>
  40. <!-- 评论弹窗 -->
  41. <uni-popup ref="cPopupRef" type="bottom" @change="popChange">
  42. <view class="c_popup_box">
  43. <view class="reply_text">
  44. <template v-if="Object.keys(replyTemp).length">
  45. <span class="text_aid">回复给</span>
  46. <img class="user_avatar"
  47. :src="replyTemp.item2 ? replyTemp.item2.user_avatar : replyTemp.item1.user_avatar" />
  48. <span class="text_main">{{ replyTemp.item2 ? replyTemp.item2.user_name :
  49. replyTemp.item1.user_name }}</span>
  50. </template>
  51. <span v-else class="text_main">发表新评论</span>
  52. </view>
  53. <view class="content">
  54. <view class="text_area">
  55. <textarea class="textarea" v-model="commentValue" :placeholder="commentPlaceholder"
  56. :focus="focus" maxlength="300" auto-height @focus="onTextareaFocus"
  57. @keydown="handleKeydown"></textarea>
  58. <view class="emoji-trigger" @tap="toggleEmojiPanel">
  59. <text class="fa fa-smile-o"></text>
  60. </view>
  61. </view>
  62. <view class="send_btn" @tap="() => sendClick()">发送</view>
  63. </view>
  64. <!-- 表情面板 -->
  65. <view class="emoji-panel" v-if="showEmojiPanel">
  66. <view class="emoji-grid">
  67. <view class="emoji-item" v-for="(emoji, index) in emojiList" :key="index"
  68. @tap="selectEmoji(emoji)">
  69. {{ emoji }}
  70. </view>
  71. </view>
  72. </view>
  73. </view>
  74. </uni-popup>
  75. <!-- 删除弹窗 -->
  76. <!-- <uni-popup ref="delPopupRef" type="dialog">
  77. <uni-popup-dialog mode="base" title="" content="确定删除这条评论吗?" :before-close="true" @close="delCloseFun"
  78. @confirm="delConfirmFun"></uni-popup-dialog>
  79. </uni-popup> -->
  80. <DialogBox ref="DialogBox"></DialogBox>
  81. </view>
  82. </template>
  83. <script>
  84. import CommonComp from "./componets/common";
  85. import { getStorage, setStorage, removeStorage } from "@/common/util.js";
  86. export default {
  87. components: {
  88. CommonComp
  89. },
  90. props: {
  91. /** 登陆用户信息
  92. * id: number // 登陆用户id
  93. * user_name: number // 登陆用户名
  94. * user_avatar: string // 登陆用户头像地址
  95. */
  96. myInfo: {
  97. type: Object,
  98. default: () => { },
  99. },
  100. /** 文章作者信息
  101. * id: number // 文章作者id
  102. * user_name: number // 文章作者名
  103. * user_avatar: string // 文章作者头像地址
  104. */
  105. userInfo: {
  106. type: Object,
  107. default: () => { },
  108. },
  109. /** 评论列表
  110. * id: number // 评论id
  111. * parent_id: number // 父级评论id
  112. * reply_id: number // 被回复人评论id
  113. * reply_name: string // 被回复人名称
  114. * user_name: string // 用户名
  115. * user_avatar: string // 评论者头像地址
  116. * user_content: string // 评论内容
  117. * is_like: boolean // 是否点赞
  118. * like_count: number // 点赞数统计
  119. * create_time: string // 创建时间
  120. */
  121. tableData: {
  122. type: Array,
  123. default: () => [],
  124. },
  125. // 评论总数
  126. tableTotal: {
  127. type: Number,
  128. default: 0,
  129. },
  130. // 评论删除模式
  131. // bind - 当被删除的一级评论存在回复评论, 那么该评论内容变更显示为[当前评论内容已被移除]
  132. // only - 仅删除当前评论(后端删除相关联的回复评论, 否则总数显示不对)
  133. // all - 删除所有评论包括回复评论
  134. deleteMode: {
  135. type: String,
  136. default: "all",
  137. },
  138. isComment: {
  139. default: true
  140. }
  141. },
  142. data() {
  143. return {
  144. dataList: [], // 渲染数据(前端的格式)
  145. replyTemp: {}, // 回复临时数据
  146. isNewComment: false, // 是否为新评论
  147. focus: false, // 评论弹窗
  148. commentValue: "", // 输入框值
  149. commentPlaceholder: "说点什么...", // 输入框占位符
  150. delTemp: {}, // 删除临时数据
  151. showEmojiPanel: false, // 是否显示表情面板
  152. emojiList: ['😀', '😃', '😄', '😁', '😆', '😅', '😂', '🤣', '🥲', '😊', '😇', '🙂', '🙃', '😉', '😌', '😍', '🥰', '😘', '😗', '😙', '😚', '😋', '😛', '😝', '😜', '🤪', '🤨', '🧐', '🤓', '😎', '🥸', '🤩', '🥳', '😏', '😒', '😞', '😔', '😟', '😕', '🙁', '☹️', '😣', '😖', '😫', '😩', '🥺', '😢', '😭', '😤', '😠', '😡', '🤬', '🤯', '😳', '🥵', '🥶', '😱', '😨', '😰', '😥', '😓', '🤗', '🤔', '🤭', '🤫', '🤥', '😶', '😐', '😑', '😬', '🙄', '😯', '😦', '😧', '😮', '😲', '🥱', '😴', '🤤', '😪', '😵', '🤐', '🥴', '🤢', '🤮', '🤧', '😷', '🤒', '🤕', '🤑', '🤠'
  153. ]
  154. };
  155. },
  156. watch: {
  157. tableData: {
  158. handler(newVal) {
  159. if (newVal.length !== this.dataList.length) {
  160. this.dataList = this.treeTransForm(newVal);
  161. }
  162. },
  163. deep: true,
  164. immediate: true,
  165. },
  166. },
  167. mounted() { },
  168. methods: {
  169. // 数据转换
  170. treeTransForm(data) {
  171. let newData = JSON.parse(JSON.stringify(data));
  172. let result = [];
  173. let map = {};
  174. newData.forEach((item, i) => {
  175. item.owner = item.user_id === this.myInfo.user_id; // 是否为当前登陆用户
  176. item.author = item.user_id === this.userInfo.user_id; // 是否为作者
  177. map[item.id] = item;
  178. });
  179. newData.forEach((item) => {
  180. let parent = map[item.parent_id];
  181. if (parent) {
  182. (parent.children || (parent.children = [])).push(item); // 所有回复
  183. if (parent.children.length === 1) {
  184. (parent.childrenShow = []).push(item); // 显示的回复
  185. }
  186. } else {
  187. result.push(item);
  188. }
  189. });
  190. return result;
  191. },
  192. // 点赞
  193. setLike(item) {
  194. item.is_like = !item.is_like;
  195. item.like_count = item.is_like ? item.like_count + 1 : item.like_count - 1;
  196. },
  197. likeClick({
  198. item1,
  199. index1,
  200. item2,
  201. index2
  202. }) {
  203. let item = item2 || item1;
  204. let that = this;
  205. this.setLike(item);
  206. this.$emit("likeFun", {
  207. params: item
  208. }, (res) => {
  209. // 请求后端失败, 重置点赞
  210. that.setLike(item);
  211. });
  212. },
  213. // 回复
  214. replyClick({
  215. item1,
  216. index1,
  217. item2,
  218. index2
  219. }) {
  220. uni.$emit('check_login', () => {
  221. var isContentRecommendation = getStorage("isContentRecommendation");
  222. if (isContentRecommendation != "false") {
  223. isContentRecommendation = true;
  224. } else {
  225. isContentRecommendation = false;
  226. }
  227. if (isContentRecommendation == false) {
  228. uni.showToast({
  229. title: '当前无法评论',
  230. icon: 'none'
  231. });
  232. return;
  233. }
  234. if (this.isComment == 0) {
  235. uni.showToast({
  236. title: '暂无评论权限',
  237. icon: 'none'
  238. })
  239. return
  240. }
  241. this.replyTemp = JSON.parse(JSON.stringify({
  242. item1,
  243. index1,
  244. item2,
  245. index2
  246. }));
  247. this.$refs["cPopupRef"].open();
  248. })
  249. },
  250. // 发起新评论
  251. newCommentFun() {
  252. var isContentRecommendation = getStorage("isContentRecommendation");
  253. if (isContentRecommendation != "false") {
  254. isContentRecommendation = true;
  255. } else {
  256. isContentRecommendation = false;
  257. }
  258. if (isContentRecommendation == false) {
  259. uni.showToast({
  260. title: '当前无法评论',
  261. icon: 'none'
  262. });
  263. return;
  264. }
  265. if (this.isComment == 0) {
  266. uni.showToast({
  267. title: '暂无评论权限',
  268. icon: 'none'
  269. })
  270. return
  271. }
  272. this.isNewComment = true;
  273. this.$refs["cPopupRef"].open();
  274. },
  275. // 评论弹窗
  276. popChange(e) {
  277. // 关闭弹窗
  278. if (!e.show) {
  279. this.commentValue = ""; // 清空输入框值
  280. this.replyTemp = {}; // 清空被回复人信息
  281. this.isNewComment = false; // 恢复是否为新评论默认值
  282. this.showEmojiPanel = false; // 隐藏表情面板
  283. }
  284. this.focus = e.show;
  285. },
  286. // 切换表情面板显示状态
  287. toggleEmojiPanel() {
  288. this.showEmojiPanel = !this.showEmojiPanel;
  289. },
  290. // 选择表情
  291. selectEmoji(emoji) {
  292. this.commentValue += emoji;
  293. },
  294. // 输入框获取焦点时
  295. onTextareaFocus() {
  296. // 可以选择不关闭表情面板,让用户同时使用键盘和表情
  297. // this.showEmojiPanel = false;
  298. },
  299. // 发送评论
  300. sendClick({
  301. item1,
  302. index1,
  303. item2,
  304. index2
  305. } = this.replyTemp) {
  306. let item = item2 || item1;
  307. let params = {};
  308. // 新评论
  309. if (this.isNewComment) {
  310. params = {
  311. id: Math.random(), // 评论id
  312. parent_id: null, // 父级评论id
  313. reply_id: null, // 被回复评论id
  314. reply_name: null, // 被回复人名称
  315. };
  316. } else {
  317. // 回复评论
  318. params = {
  319. id: Math.random(), // 评论id
  320. parent_id: item && item.parent_id ? item.parent_id : item.id, // 父级评论id
  321. reply_id: item.id, // 被回复评论id
  322. reply_name: item.user_name, // 被回复人名称
  323. };
  324. }
  325. params = {
  326. ...params,
  327. user_id: this.myInfo.user_id, // 用户id
  328. user_name: this.myInfo.user_name, // 用户名
  329. user_avatar: this.myInfo.user_avatar, // 用户头像地址
  330. user_content: this.commentValue, // 用户评论内容
  331. is_like: false, // 是否点赞
  332. like_count: 0, // 点赞数统计
  333. create_time: "刚刚", // 创建时间
  334. owner: true, // 是否为所有者 所有者可以进行删除 管理员默认true
  335. };
  336. uni.showLoading({
  337. title: "正在发送",
  338. mask: true,
  339. });
  340. this.$emit("replyFun", {
  341. params
  342. }, (res) => {
  343. uni.hideLoading();
  344. // 拿到后端返回的id赋值, 因为删除要用到id
  345. params = {
  346. ...params,
  347. id: res.id
  348. };
  349. // 新评论
  350. if (this.isNewComment) {
  351. this.dataList.push(params);
  352. } else {
  353. // 回复
  354. let c_data = this.dataList[index1];
  355. (c_data.children || (c_data.children = [])).push(params);
  356. // 如果已展开所有回复, 那么此时插入children长度会大于childrenShow长度1, 所以就直接展开显示即可
  357. if (c_data.children.length === (c_data.childrenShow || (c_data.childrenShow = [])).length +
  358. 1) {
  359. c_data.childrenShow.push(params);
  360. }
  361. }
  362. this.$emit("update:tableTotal", this.tableTotal + 1);
  363. this.$refs["cPopupRef"].close();
  364. });
  365. },
  366. //删除
  367. deleteClick({
  368. item1,
  369. index1,
  370. item2,
  371. index2
  372. }) {
  373. this.delTemp = JSON.parse(JSON.stringify({
  374. item1,
  375. index1,
  376. item2,
  377. index2
  378. }));
  379. this.$refs['DialogBox'].confirm({
  380. title: '提示',
  381. content: '确定要删除该评论及其回复吗?',
  382. DialogType: 'inquiry',
  383. btn1: '取消',
  384. btn2: '确定',
  385. animation: 0
  386. }).then(() => {
  387. this.delConfirmFun()
  388. }).catch(() => {
  389. this.delCloseFun()
  390. })
  391. },
  392. // 关闭删除弹窗
  393. delCloseFun() {
  394. this.delTemp = {};
  395. // this.$refs["delPopupRef"].close();
  396. },
  397. // 确定删除
  398. delConfirmFun({
  399. item1,
  400. index1,
  401. item2,
  402. index2
  403. } = this.delTemp) {
  404. const deleteMode = this.deleteMode;
  405. let c_data = this.dataList[index1];
  406. uni.showLoading({
  407. title: "正在删除",
  408. mask: true,
  409. });
  410. // 删除二级评论
  411. if (index2 >= 0) {
  412. this.$emit("deleteFun", {
  413. params: [c_data.children[index2].id],
  414. mode: deleteMode
  415. }, (res) => {
  416. uni.hideLoading();
  417. this.$emit("update:tableTotal", this.tableTotal - 1);
  418. c_data.children.splice(index2, 1);
  419. c_data.childrenShow.splice(index2, 1);
  420. });
  421. } else {
  422. // 删除一级评论
  423. if (c_data?.children?.length) {
  424. // 如果一级评论包含回复评论
  425. switch (deleteMode) {
  426. case "bind":
  427. // 一级评论内容展示修改为: 当前评论内容已被移除
  428. this.$emit(
  429. "deleteFun", {
  430. params: [c_data.id],
  431. mode: deleteMode,
  432. },
  433. (res) => {
  434. uni.hideLoading();
  435. c_data.user_content = "当前评论内容已被移除";
  436. }
  437. );
  438. break;
  439. case "only":
  440. // 后端自行根据删除的一级评论id, 查找关联的子评论进行删除
  441. this.$emit(
  442. "deleteFun", {
  443. params: [c_data.id],
  444. mode: deleteMode,
  445. },
  446. (res) => {
  447. uni.hideLoading();
  448. this.$emit("update:tableTotal", this.tableTotal - c_data.children.length + 1);
  449. this.dataList.splice(index1, 1);
  450. }
  451. );
  452. break;
  453. default:
  454. // all
  455. // 收集子评论id, 提交给后端统一删除
  456. let delIdArr = [c_data.id];
  457. c_data.children.forEach((_, i) => {
  458. delIdArr.push(_.id);
  459. });
  460. this.$emit("deleteFun", {
  461. params: delIdArr,
  462. mode: deleteMode
  463. }, (res) => {
  464. uni.hideLoading();
  465. this.$emit("update:tableTotal", this.tableTotal - c_data.children.length + 1);
  466. this.dataList.splice(index1, 1);
  467. });
  468. break;
  469. }
  470. } else {
  471. // 一级评论无回复, 直接删除
  472. this.$emit("deleteFun", {
  473. params: [c_data.id],
  474. mode: deleteMode
  475. }, (res) => {
  476. uni.hideLoading();
  477. this.$emit("update:tableTotal", this.tableTotal - 1);
  478. this.dataList.splice(index1, 1);
  479. });
  480. }
  481. }
  482. this.delCloseFun();
  483. },
  484. // 展开评论if
  485. expandTxtShow({
  486. item1,
  487. index1
  488. }) {
  489. return item1.childrenShow?.length && item1.children.length - item1.childrenShow.length;
  490. },
  491. // 展开更多评论
  492. expandReplyFun({
  493. item1,
  494. index1
  495. }) {
  496. let csLen = this.dataList[index1].childrenShow.length;
  497. this.dataList[index1].childrenShow.push(
  498. ...this.dataList[index1].children.slice(csLen, csLen + 6) // 截取5条评论
  499. );
  500. },
  501. // 收起评论if
  502. shrinkTxtShow({
  503. item1,
  504. index1
  505. }) {
  506. return item1.childrenShow?.length >= 2 && item1.children.length - item1.childrenShow.length === 0;
  507. },
  508. // 收起更多评论
  509. shrinkReplyFun({
  510. item1,
  511. index1
  512. }) {
  513. this.dataList[index1].childrenShow = [];
  514. this.dataList[index1].childrenShow.push(
  515. ...this.dataList[index1].children.slice(0, 1) // 截取1条评论
  516. );
  517. },
  518. handleKeydown(event) { // 新增方法
  519. console.log(event.key, event.shiftKey);
  520. if (event.key === 'Enter' && !event.shiftKey) {
  521. event.preventDefault();
  522. this.sendClick();
  523. }
  524. },
  525. },
  526. };
  527. </script>
  528. <style lang="scss" scoped>
  529. @font-face {
  530. font-family: 'FontAwesome';
  531. src: url('https://cdn.jsdelivr.net/npm/font-awesome@4.7.0/fonts/fontawesome-webfont.woff2') format('woff2');
  532. font-weight: normal;
  533. font-style: normal;
  534. }
  535. .fa {
  536. display: inline-block;
  537. font: normal normal normal 14px/1 FontAwesome;
  538. font-size: inherit;
  539. text-rendering: auto;
  540. -webkit-font-smoothing: antialiased;
  541. }
  542. .fa-smile-o:before {
  543. content: "\f118";
  544. }
  545. ////////////////////////
  546. .center {
  547. display: flex;
  548. align-items: center;
  549. }
  550. ////////////////////////
  551. .c_total {
  552. padding: 20rpx 30rpx 0 30rpx;
  553. font-size: 28rpx;
  554. }
  555. .empty_box {
  556. display: flex;
  557. justify-content: center;
  558. align-items: center;
  559. flex-direction: column;
  560. padding: 150rpx 10rpx;
  561. font-size: 28rpx;
  562. .txt {
  563. color: $uni-text-color-disable;
  564. }
  565. .click {
  566. color: $uni-color-primary;
  567. }
  568. }
  569. .c_comment {
  570. padding: 20rpx 30rpx;
  571. font-size: 28rpx;
  572. .children_item {
  573. padding: 10rpx 0rpx 10rpx 0rpx;
  574. margin-top: 10rpx;
  575. margin-left: 80rpx;
  576. background-color: $uni-bg-color-grey;
  577. .expand_reply,
  578. .shrink_reply {
  579. margin-top: 10rpx;
  580. margin-left: 80rpx;
  581. .txt {
  582. font-weight: 600;
  583. color: $uni-color-primary;
  584. font-size: 26rpx !important;
  585. }
  586. .uni-icons {
  587. font-size: 30rpx !important;
  588. }
  589. }
  590. }
  591. }
  592. .c_popup_box {
  593. background-color: #fff;
  594. margin-bottom: 0rpx;
  595. .reply_text {
  596. @extend .center;
  597. padding: 20rpx 20rpx 0 20rpx;
  598. font-size: 26rpx;
  599. .text_aid {
  600. color: $uni-text-color-grey;
  601. margin-right: 5rpx;
  602. }
  603. .user_avatar {
  604. width: 48rpx;
  605. height: 48rpx;
  606. border-radius: 50%;
  607. margin-right: 6rpx;
  608. margin-left: 12rpx;
  609. }
  610. }
  611. .content {
  612. @extend .center;
  613. .text_area {
  614. flex: 1;
  615. padding: 20rpx;
  616. position: relative;
  617. .textarea {
  618. width: 100%;
  619. min-height: 80rpx;
  620. font-size: 28rpx;
  621. color: #333;
  622. background: #f8f8f8;
  623. border: 2rpx solid #eee;
  624. border-radius: 8rpx;
  625. padding: 16rpx 50rpx 16rpx 16rpx;
  626. }
  627. .emoji-trigger {
  628. position: absolute;
  629. right: 30rpx;
  630. bottom: 30rpx;
  631. width: 60rpx;
  632. height: 60rpx;
  633. display: flex;
  634. align-items: center;
  635. justify-content: center;
  636. color: #666;
  637. font-size: 40rpx;
  638. &:active {
  639. opacity: 0.7;
  640. }
  641. }
  642. }
  643. .send_btn {
  644. @extend .center;
  645. justify-content: center;
  646. width: 120rpx;
  647. height: 60rpx;
  648. border-radius: 20rpx;
  649. font-size: 28rpx;
  650. color: #fff;
  651. background-color: $uni-color-primary;
  652. margin-right: 20rpx;
  653. margin-left: 5rpx;
  654. }
  655. }
  656. .emoji-panel {
  657. padding: 20rpx;
  658. background-color: #f8f8f8;
  659. border-top: 2rpx solid #eee;
  660. max-height: 40vh;
  661. overflow-y: scroll;
  662. .emoji-grid {
  663. display: flex;
  664. flex-wrap: wrap;
  665. // overflow-y: scroll;
  666. .emoji-item {
  667. width: 12.5%;
  668. height: 80rpx;
  669. display: flex;
  670. align-items: center;
  671. justify-content: center;
  672. font-size: 40rpx;
  673. &:active {
  674. background-color: rgba(0, 0, 0, 0.1);
  675. border-radius: 8rpx;
  676. }
  677. }
  678. }
  679. }
  680. }
  681. </style>