tusen-ai / naive-ui

A Vue 3 Component Library. Fairly Complete. Theme Customizable. Uses TypeScript. Fast.
https://www.naiveui.com
MIT License
16.12k stars 1.67k forks source link

Add a `min-width` prop for Drawers #5147

Closed megasanjay closed 1 year ago

megasanjay commented 1 year ago

This function solves the problem (这个功能解决的问题)

This will allow for resizable drawers to have a minimum width. The default-width prop only works for opening the drawer and I think it makes sense to have a min width so the whole drawer is not accidentally resized to zero (especially for ones where the masks are set to false

Expected API (期望的 API)

<n-drawer v-model:show="active" :default-width="502" :minimum-width="300" :placement="placement" resizable

Stoner is a 1965 novel by the American writer John Williams.

<n-drawer v-model:show="active" :default-width="30%" :minimum-width="10%" :placement="placement" resizable

Stoner is a 1965 novel by the American writer John Williams.

megasanjay commented 1 year ago

Found drawer-class and that seems to work for what I need.