Index.vue 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="threeLine" @tap="openDrawer">
  5. <image src="../../static/picture/fourLine.png" style="width: 30px;height: 30px;margin-top: 10px;margin-left: 10px;"></image>
  6. </view>
  7. <view class="text">
  8. <view class="notice">
  9. <view class="icon cuIcon-notice text-white" v-if="badge != 0">
  10. <view class="cu-tag looknumber">
  11. <block v-if="badge != 1">{{ badge > 99 ? '99+' : badge }}</block>
  12. </view>
  13. </view>
  14. </view>
  15. 宁夏新能源公司
  16. </view>
  17. <view class="plus">+</view>
  18. </view>
  19. <!-- 抽屉组件 -->
  20. <div>
  21. <drawer ref="drawer"></drawer>
  22. </div>
  23. <!-- <view class="details">
  24. <view class="detailsText" @tap="common.navTo('/components/detail/Detail')"> 详情 〉</view>
  25. </view> -->
  26. </view>
  27. </template>
  28. <script>
  29. import drawer from '../../components/drawer/threeLineDrawer.vue'
  30. export default {
  31. components: {
  32. "drawer": drawer
  33. },
  34. data:function(){
  35. return{
  36. badge: 22,
  37. drawerList:["状态监视","矩阵监视","风场监视","人员监视"],
  38. inconList:["form","favor","question","edit"]
  39. }
  40. },
  41. methods:{
  42. openDrawer:function(){
  43. this.$refs.drawer.openDrawer(250,this.drawerList,this.inconList);
  44. },
  45. closeDrawer:function(){
  46. this.drawerIsShow=false;
  47. }
  48. }
  49. };
  50. </script>
  51. <style>
  52. page {
  53. }
  54. .top {
  55. width: 100%;
  56. height: 105upx;
  57. padding-top: 5upx;
  58. background-color: #3D6C8A;
  59. }
  60. .threeLine {
  61. width: 50px;
  62. height: 50px;
  63. float: left;
  64. }
  65. .text {
  66. width: calc(100% - 100px);
  67. height: 50px;
  68. float: left;
  69. color: white;
  70. line-height: 50px;
  71. text-align: center;
  72. font-size: 18px;
  73. }
  74. .notice{
  75. width: 50px;
  76. height: 50px;
  77. float: left;
  78. }
  79. .plus {
  80. width: 50px;
  81. height: 50px;
  82. float: right;
  83. color: white;
  84. font-size: 35px;
  85. line-height: 50px;
  86. text-align: center;
  87. }
  88. .details{
  89. width: 100%;
  90. height: 50px;
  91. background-color: #0081FF;
  92. float: left;
  93. }
  94. .detailsText{
  95. line-height: 50px;
  96. float: right;
  97. margin-right: 20px;
  98. font-size: 18px;
  99. color: white;
  100. }
  101. </style>