threeLineDrawer.vue 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. <uni-list-item :title="item" v-for="(item,index) in drawerList" :key="index" />
  11. </uni-list>
  12. <view class="cu-bar tabbar bg-white">
  13. <view class="action">
  14. <view class="icon cuIcon-repair text-black">
  15. </view>
  16. <view class="text-black">设置</view>
  17. </view>
  18. <view class="action">
  19. <view class="icon cuIcon-command text-black">
  20. </view>
  21. <view class="text-black">修改密码</view>
  22. </view>
  23. </view>
  24. </view>
  25. </uni-drawer>
  26. </view>
  27. </template>
  28. <script>
  29. import uniDrawer from "@/uni-drawer/uni-drawer.vue"
  30. import uniList from '@/uni-list/uni-list.vue'
  31. import uniListItem from '@/uni-list-item/uni-list-item.vue'
  32. import uniIcons from '@/uni-icons/uni-icons.vue'
  33. export default{
  34. components: {
  35. uniDrawer,
  36. uniList,
  37. uniListItem,
  38. uniIcons
  39. },
  40. data:function(){
  41. return{
  42. drawerIsShow:false,
  43. drawerList:[],
  44. width:250
  45. }
  46. },
  47. methods:{
  48. openDrawer:function(drawerList,width){
  49. this.drawerIsShow=true;
  50. this.drawerList=drawerList;
  51. this.width=width;
  52. },
  53. closeDrawer:function(){
  54. this.drawerIsShow=false;
  55. }
  56. }
  57. }
  58. </script>
  59. <style>
  60. .picture{
  61. width: 100%;
  62. height: 200px;
  63. }
  64. .cu-bar{
  65. position: fixed;
  66. top: calc(100% - 50px);
  67. width: 100%;
  68. }
  69. .icon{
  70. float: left;
  71. }
  72. .text-black{
  73. float: left;
  74. line-height: 28px;
  75. font-size: 15px;
  76. }
  77. </style>