fix: add drawer deprecated custom-class warning (#10745)

This commit is contained in:
0song
2022-11-24 14:04:22 +08:00
committed by GitHub
parent 29c4833193
commit ff2c984d12

View File

@@ -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>()