mirror of
https://github.com/element-plus/element-plus.git
synced 2026-03-13 07:51:17 +08:00
fix: add drawer deprecated custom-class warning (#10745)
This commit is contained in:
@@ -26,6 +26,7 @@
|
||||
:aria-label="title || undefined"
|
||||
:aria-labelledby="!title ? titleId : undefined"
|
||||
:aria-describedby="bodyId"
|
||||
v-bind="$attrs"
|
||||
:class="[ns.b(), direction, visible && 'open', customClass]"
|
||||
:style="
|
||||
isHorizontal ? 'width: ' + drawerSize : 'height: ' + drawerSize
|
||||
@@ -99,6 +100,7 @@ export default defineComponent({
|
||||
ElIcon,
|
||||
Close,
|
||||
},
|
||||
inheritAttrs: false,
|
||||
props: drawerProps,
|
||||
emits: drawerEmits,
|
||||
|
||||
@@ -113,6 +115,17 @@ export default defineComponent({
|
||||
},
|
||||
computed(() => !!slots.title)
|
||||
)
|
||||
useDeprecated(
|
||||
{
|
||||
scope: 'el-drawer',
|
||||
from: 'custom-class',
|
||||
replacement: 'class',
|
||||
version: '2.3.0',
|
||||
ref: 'https://element-plus.org/en-US/component/drawer.html#attributes',
|
||||
type: 'Attribute',
|
||||
},
|
||||
computed(() => !!props.customClass)
|
||||
)
|
||||
|
||||
const drawerRef = ref<HTMLElement>()
|
||||
const focusStartRef = ref<HTMLElement>()
|
||||
|
||||
Reference in New Issue
Block a user