Index.vue 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. <template>
  2. <view class="content">
  3. <view class="top">
  4. <view class="threeLine" @tap="openDrawer">
  5. <image src="../../static/picture/threeLine.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>
  24. </template>
  25. <script>
  26. import drawer from '../../components/drawer/threeLineDrawer.vue'
  27. export default {
  28. components: {
  29. "drawer": drawer
  30. },
  31. data:function(){
  32. return{
  33. badge: 22,
  34. drawerList:["状态监视","矩阵监视","风场监视","人员监视"]
  35. }
  36. },
  37. methods:{
  38. openDrawer:function(){
  39. this.$refs.drawer.openDrawer(this.drawerList,250);
  40. },
  41. closeDrawer:function(){
  42. this.drawerIsShow=false;
  43. }
  44. }
  45. };
  46. </script>
  47. <style>
  48. page {
  49. }
  50. .top {
  51. width: 100%;
  52. height: 140upx;
  53. padding-top: 40upx;
  54. background-color: #062e5e;
  55. }
  56. .threeLine {
  57. width: 50px;
  58. height: 50px;
  59. float: left;
  60. }
  61. .text {
  62. width: calc(100% - 100px);
  63. height: 50px;
  64. float: left;
  65. color: white;
  66. line-height: 50px;
  67. text-align: center;
  68. font-size: 18px;
  69. }
  70. .notice{
  71. width: 50px;
  72. height: 50px;
  73. float: left;
  74. }
  75. .plus {
  76. width: 50px;
  77. height: 50px;
  78. float: right;
  79. color: white;
  80. font-size: 35px;
  81. line-height: 50px;
  82. text-align: center;
  83. }
  84. </style>