绿满眶商城微信小程序-uniapp
xiangpei
2025-07-09 a1c289e7dfc5d9a3b8dc7ca9b05857f276c05f8d
uni_modules/uni-drawer/components/uni-drawer/uni-drawer.vue
@@ -1,7 +1,7 @@
<template>
   <view v-if="visibleSync" :class="{ 'uni-drawer--visible': showDrawer }" class="uni-drawer" @touchmove.stop.prevent="clear">
      <view class="uni-drawer__mask" :class="{ 'uni-drawer__mask--visible': showDrawer && mask }" @tap="close('mask')" />
      <view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer,'custom-style':cusStyle}" :style="{width:drawerWidth+'px',maxHeight:drawerHeight}">
      <view class="uni-drawer__content" :class="{'uni-drawer--right': rightMode,'uni-drawer--left': !rightMode, 'uni-drawer__content--visible': showDrawer,'custom-style':cusStyle}" :style="{width:drawerWidth+'px',maxHeight:drawerHeight,top:drawerTop+'px'}">
         <slot />
      </view>
      <!-- #ifdef H5 -->
@@ -76,6 +76,10 @@
         cusStyle: {
            type: Boolean,
            default: false
         },
         drawerTop:{
            type: Number,
            default: 0
         }
      },
      data() {
@@ -92,7 +96,7 @@
         // #ifndef APP-NVUE
         this.drawerWidth = this.width
         this.drawerHeight = this.height
         console.log("执行了",this.drawerHeight,this.height)
         console.log("执行了",this.width,this.height)
         // #endif
         this.rightMode = this.mode === 'right'
      },
@@ -154,7 +158,7 @@
   }
   .custom-style{
      border-radius: 0 24rpx 24rpx 0;
      top: 100px;
      background-color: #f4f4f4;
   }
   .uni-drawer--left {