<uni-drawer :style="{width: '280px', backgroundColor: 'red'}" ref="menu" mode="left" :mask-click="true" @maskClick="closeDrawer">
<view class="drawer-content" :style="{width: '280px', backgroundColor: 'green'}">
</view>
</uni-drawer>

- 发布:2025-05-18 18:41
- 更新:2025-05-18 18:41
- 阅读:18
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win10
HBuilderX类型: 正式
HBuilderX版本号: 4.64
手机系统: Android
手机系统版本号: Android 15
手机厂商: 小米
手机机型: note8
页面类型: nvue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
示例代码:
操作步骤:
<uni-drawer :style="{width: '280px', backgroundColor: 'red'}" ref="menu" mode="left" :mask-click="true" @maskClick="closeDrawer">
<view class="drawer-content" :style="{width: '280px', backgroundColor: 'green'}">
</view>
</uni-drawer>
设置
<uni-drawer :style="{width: '280px', backgroundColor: 'red'}" ref="menu" mode="left" :mask-click="true" @maskClick="closeDrawer">
<view class="drawer-content" :style="{width: '280px', backgroundColor: 'green'}">
</view>
</uni-drawer>
设置
预期结果:
上面的代码,只可以设置 uni-drawer 的宽度,但是内部 view class="drawer-content" 的宽度设置,没有效果。
上面的代码,只可以设置 uni-drawer 的宽度,但是内部 view class="drawer-content" 的宽度设置,没有效果。
实际结果:
上面的代码,只可以设置 uni-drawer 的宽度,但是内部 view class="drawer-content" 的宽度设置,没有效果。
上面的代码,只可以设置 uni-drawer 的宽度,但是内部 view class="drawer-content" 的宽度设置,没有效果。
bug描述:
nvue页面,设置 uni-drawer 抽屉宽度 没有效果
0 个回复