meesage.vue 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. <template>
  2. <div id="meesage">
  3. <el-row>
  4. <el-col :span="24">
  5. <el-col :span="2" class="zuixinMess">
  6. <el-image style="width:65px;height:95px;" :src="url"></el-image>
  7. </el-col>
  8. <el-col :span="21" class="info">
  9. <el-col :span="24" class="title">
  10. <p class="textOver">{{ messageInfo.title }}</p>
  11. </el-col>
  12. <el-col :span="24" class="content">
  13. <p>{{ messageInfo.content }}</p>
  14. <el-button type="text" size="mini">[详情]</el-button>
  15. </el-col>
  16. </el-col>
  17. </el-col>
  18. </el-row>
  19. </div>
  20. </template>
  21. <script>
  22. export default {
  23. name: 'meesage',
  24. props: {
  25. messageInfo: null,
  26. },
  27. components: {},
  28. data: () => ({
  29. url: require('@/assets/messages.png'),
  30. }),
  31. created() {},
  32. computed: {},
  33. methods: {},
  34. };
  35. </script>
  36. <style lang="less" scoped>
  37. p {
  38. padding: 0;
  39. margin: 0;
  40. }
  41. .textOver {
  42. overflow: hidden;
  43. text-overflow: ellipsis;
  44. white-space: nowrap;
  45. }
  46. .zuixinMess {
  47. width: 65px;
  48. height: 95px;
  49. margin: 0 40px 0 20px;
  50. }
  51. .info .title {
  52. padding: 10px 0;
  53. }
  54. .info .title p {
  55. font-size: 25px;
  56. color: #cc3333;
  57. font-family: '微軟雅黑';
  58. font-weight: 600;
  59. }
  60. .info .content p {
  61. font-size: 20px;
  62. color: #333;
  63. text-indent: 2rem;
  64. overflow: hidden;
  65. text-overflow: ellipsis;
  66. -webkit-line-clamp: 3;
  67. word-break: break-all;
  68. display: -webkit-box;
  69. -webkit-box-orient: vertical;
  70. }
  71. .info .content .el-button {
  72. position: absolute;
  73. right: 45px;
  74. color: #cc3333;
  75. font-weight: 600;
  76. }
  77. </style>