mirror of https://github.com/ElemeFE/element
parent
127dfadb6a
commit
3d7c3d71df
|
@ -26,7 +26,7 @@
|
||||||
>
|
>
|
||||||
<header class="el-drawer__header" id="el-drawer__title" v-if="withHeader">
|
<header class="el-drawer__header" id="el-drawer__title" v-if="withHeader">
|
||||||
<slot name="title">
|
<slot name="title">
|
||||||
<span role="heading" tabindex="0" :title="title">{{ title }}</span>
|
<span role="heading" :title="title">{{ title }}</span>
|
||||||
</slot>
|
</slot>
|
||||||
<button
|
<button
|
||||||
:aria-label="`close ${title || 'drawer'}`"
|
:aria-label="`close ${title || 'drawer'}`"
|
||||||
|
@ -49,7 +49,6 @@
|
||||||
<script>
|
<script>
|
||||||
import Popup from 'element-ui/src/utils/popup';
|
import Popup from 'element-ui/src/utils/popup';
|
||||||
import emitter from 'element-ui/src/mixins/emitter';
|
import emitter from 'element-ui/src/mixins/emitter';
|
||||||
import Utils from 'element-ui/src/utils/aria-utils';
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: 'ElDrawer',
|
name: 'ElDrawer',
|
||||||
|
@ -133,9 +132,6 @@ export default {
|
||||||
document.body.appendChild(this.$el);
|
document.body.appendChild(this.$el);
|
||||||
}
|
}
|
||||||
this.prevActiveElement = document.activeElement;
|
this.prevActiveElement = document.activeElement;
|
||||||
this.$nextTick(() => {
|
|
||||||
Utils.focusFirstDescendant(this.$refs.drawer);
|
|
||||||
});
|
|
||||||
} else {
|
} else {
|
||||||
if (!this.closed) this.$emit('close');
|
if (!this.closed) this.$emit('close');
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
|
|
@ -119,6 +119,7 @@ $directions: rtl, ltr, ttb, btt;
|
||||||
0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
0 16px 24px 2px rgba(0, 0, 0, 0.14),
|
||||||
0 6px 30px 5px rgba(0, 0, 0, 0.12);
|
0 6px 30px 5px rgba(0, 0, 0, 0.12);
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
|
outline: 0;
|
||||||
|
|
||||||
@each $direction in $directions {
|
@each $direction in $directions {
|
||||||
@include animation-out($direction);
|
@include animation-out($direction);
|
||||||
|
|
Loading…
Reference in New Issue