@@ -35,9 +36,3 @@ const drag = ({ width, height }) => {
TinyModal.message({ message: `抽屉的宽为${width},高为${height}`, status: 'info' })
}
-
-
diff --git a/examples/sites/demos/pc/app/drawer/dragable.vue b/examples/sites/demos/pc/app/drawer/dragable.vue
index 76b5c48072..5b1a3a55dd 100644
--- a/examples/sites/demos/pc/app/drawer/dragable.vue
+++ b/examples/sites/demos/pc/app/drawer/dragable.vue
@@ -10,8 +10,9 @@
:visible="visible"
@update:visible="visible = $event"
@drag="drag"
+ height="600px"
>
-
+
横向拖拽左边框可改变抽屉主体宽度。
竖向拖拽上边框可改变抽屉主体高度。
@@ -44,9 +45,3 @@ export default {
}
}
-
-
diff --git a/examples/sites/demos/pc/app/drawer/placement-composition-api.vue b/examples/sites/demos/pc/app/drawer/placement-composition-api.vue
index a3bed2d36a..17b9b5fc11 100644
--- a/examples/sites/demos/pc/app/drawer/placement-composition-api.vue
+++ b/examples/sites/demos/pc/app/drawer/placement-composition-api.vue
@@ -10,6 +10,7 @@
title="标题"
:placement="placement"
v-model:visible="visible"
+ height="600px"
>
left或者right内容区域
diff --git a/examples/sites/demos/pc/app/drawer/placement.vue b/examples/sites/demos/pc/app/drawer/placement.vue
index 8792828a20..fc472ab622 100644
--- a/examples/sites/demos/pc/app/drawer/placement.vue
+++ b/examples/sites/demos/pc/app/drawer/placement.vue
@@ -9,6 +9,7 @@
title="标题"
:placement="placement"
v-model:visible="visible"
+ height="600px"
>
left或者right内容区域
diff --git a/packages/vue/src/drawer/src/index.ts b/packages/vue/src/drawer/src/index.ts
index 7f675438f4..f1c5843cfe 100644
--- a/packages/vue/src/drawer/src/index.ts
+++ b/packages/vue/src/drawer/src/index.ts
@@ -10,7 +10,7 @@ export const $constants = {
return (scrollLockClasses[mode] || '') as string
},
DEFAULT_WIDTH: '500px',
- DEFAULT_HEIGHT: '500px'
+ DEFAULT_HEIGHT: '100vh'
}
export const drawerProps = {
diff --git a/packages/vue/src/drawer/src/pc.vue b/packages/vue/src/drawer/src/pc.vue
index f930d2b8ac..7b29a5f531 100644
--- a/packages/vue/src/drawer/src/pc.vue
+++ b/packages/vue/src/drawer/src/pc.vue
@@ -31,7 +31,7 @@
]"
:style="{
width: ['left', 'right'].includes(placement) ? state.computedWidth : null,
- height: ['top', 'bottom'].includes(placement) || dragable ? state.computedHeight : null,
+ height: ['top', 'bottom', 'left', 'right'].includes(placement) || dragable ? state.computedHeight : null,
zIndex
}"
v-show="state.visible"