index.vue 2.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <template>
  2. <view class="component-wrapper u000242" :style="wrapper_style">
  3. <view class="public_top">
  4. {{"空白"}}关联的公众号
  5. </view>
  6. <view class="public_bottom">
  7. <image class="img" :src="emptyImage"></image>
  8. <view class="info">
  9. <view class="public_info">{{"智慧农场"}}</view>
  10. <view class="public_info info_a">{{"智慧农场系统官方研发团队,数字化农业系统"}}</view>
  11. </view>
  12. <view :style="img_style">查看</view>
  13. </view>
  14. </view>
  15. </template>
  16. <script>
  17. export default {
  18. props: ['styles', 'datas'],
  19. data() {
  20. let siteinfo = getApp().globalData.siteinfo;
  21. return {
  22. settingFile: siteinfo,
  23. emptyImage: siteinfo.root_img + '/static/app/image.png',
  24. }
  25. },
  26. computed: {
  27. /** 样式 */
  28. wrapper_style() {
  29. const {
  30. bg_color,
  31. padding_top,
  32. padding_bottom,
  33. padding_left,
  34. padding_right,
  35. } = this.datas;
  36. return `
  37. min-height: 40px;
  38. padding: ${padding_top}px ${padding_right}px ${padding_bottom}px ${padding_left}px;
  39. background-color: ${bg_color};
  40. background-size: 100% auto;
  41. bakcground-position: center;
  42. `;
  43. },
  44. /** 标题样式 */
  45. title_style() {
  46. const {
  47. text_align,
  48. text_size,
  49. text_color
  50. } = this.datas;
  51. return `
  52. margin-left: 10px;
  53. text-align: ${text_align};
  54. font-size: ${text_size}px;
  55. color: ${text_color};
  56. `;
  57. },
  58. //文字颜色
  59. weather_style() {
  60. const { text_color } = this.datas
  61. return `
  62. color:${text_color};
  63. `;
  64. },
  65. img_style() {
  66. const { text_color } = this.datas
  67. return `
  68. height:15px;
  69. font-size:14px;
  70. line-height:14px;
  71. border-radius:3px;
  72. padding: 5px 10px;
  73. text-align: center;
  74. margin-left:5px;
  75. color:${text_color};
  76. border:1px solid ${text_color} ;
  77. `;
  78. },
  79. /** 标题 */
  80. title() {
  81. return '公告内容';
  82. },
  83. },
  84. mounted() {
  85. this.$emit('loaded');
  86. }
  87. };
  88. </script>
  89. <style lang="less" scoped>
  90. .component-wrapper {
  91. display: block;
  92. max-width: 100%;
  93. // text-align: center;
  94. margin-left: auto;
  95. margin-right: auto;
  96. overflow: hidden;
  97. text-decoration: none;
  98. align-items: center;
  99. .public_top {
  100. font-size: 10px;
  101. color: #999;
  102. }
  103. .public_bottom {
  104. display: flex;
  105. align-items: center;
  106. margin-top: 10px;
  107. .img {
  108. width: 50px;
  109. height: 50px;
  110. border-radius: 25px;
  111. margin-right: 10px;
  112. }
  113. .info {
  114. width: 65%;
  115. .public_info {
  116. white-space: nowrap;
  117. text-overflow: ellipsis;
  118. overflow: hidden;
  119. }
  120. .info_a {
  121. font-size: 10px;
  122. color: #999;
  123. margin-top: 10px;
  124. }
  125. }
  126. }
  127. }
  128. </style>