threeLineDrawer.vue 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108
  1. <template>
  2. <view>
  3. <!-- 抽屜 -->
  4. <uni-drawer :visible="drawerIsShow" :width="width" @close="closeDrawer">
  5. <view style="padding:0rpx;">
  6. <view class="picture">
  7. <image src="../../static/picture/fengji.png" style="width: 100%;height: 200px;"></image>
  8. </view>
  9. <uni-list>
  10. <view class="list">
  11. <view class="item" v-for="(item,index) in drawerList" :key="index">
  12. <view class="itemIcon">
  13. <view class="icon text-black" :class="['cuIcon-' + inconList[index]]" style="font-size: 20px;margin-top: 10px;margin-left: 20px;">
  14. </view>
  15. </view>
  16. <uni-list-item :title="item" style="margin-left: 40px;"/>
  17. </view>
  18. </view>
  19. </uni-list>
  20. <view class="cu-bar tabbar bg-white">
  21. <view class="action">
  22. <view class="icon cuIcon-repair text-black">
  23. </view>
  24. <view class="text-black">设置</view>
  25. </view>
  26. <view class="action" style="margin-left: -32px;">
  27. <view class="icon cuIcon-command text-black">
  28. </view>
  29. <view class="text-black">修改密码</view>
  30. </view>
  31. </view>
  32. </view>
  33. </uni-drawer>
  34. </view>
  35. </template>
  36. <script>
  37. import uniDrawer from "@/uni-drawer/uni-drawer.vue"
  38. import uniList from '@/uni-list/uni-list.vue'
  39. import uniListItem from '@/uni-list-item/uni-list-item.vue'
  40. import uniIcons from '@/uni-icons/uni-icons.vue'
  41. export default{
  42. components: {
  43. uniDrawer,
  44. uniList,
  45. uniListItem,
  46. uniIcons
  47. },
  48. data:function(){
  49. return{
  50. drawerIsShow:false,
  51. drawerList:[],
  52. width:250,
  53. inconList:[]
  54. }
  55. },
  56. methods:{
  57. openDrawer:function(width,drawerList,inconList){
  58. this.drawerIsShow=true;
  59. this.drawerList=drawerList;
  60. this.width=width;
  61. this.inconList=inconList;
  62. },
  63. closeDrawer:function(){
  64. this.drawerIsShow=false;
  65. }
  66. }
  67. }
  68. </script>
  69. <style>
  70. .picture{
  71. width: 100%;
  72. height: 200px;
  73. }
  74. .cu-bar{
  75. position: fixed;
  76. top: calc(100% - 50px);
  77. width: 100%;
  78. }
  79. .icon{
  80. float: left;
  81. }
  82. .text-black{
  83. float: left;
  84. line-height: 28px;
  85. font-size: 15px;
  86. }
  87. .list{
  88. width: 100%;
  89. height: 100%;
  90. }
  91. .item{
  92. width: 100%;
  93. height: 100%;
  94. float: right;
  95. margin-right: 10px;
  96. /* border-bottom: 1px solid black; */
  97. }
  98. .itemIcon{
  99. width: 20px;
  100. height: 20px;
  101. float: left;
  102. }
  103. </style>