Refactor
parent
aa4ac46411
commit
93845f6a0c
|
@ -1,5 +1,5 @@
|
|||
<template>
|
||||
<transition name="p-dialog" @enter="onEnter" @leave="onLeave" @appear="onEnter">
|
||||
<transition name="p-dialog" @enter="onEnter" @leave="onLeave" @appear="onAppear">
|
||||
<div ref="container" :class="containerClass" v-if="visible">
|
||||
<div class="p-dialog-titlebar" v-if="showHeader">
|
||||
<slot name="header">
|
||||
|
@ -78,6 +78,11 @@ export default {
|
|||
this.disableModality();
|
||||
}
|
||||
},
|
||||
onAppear() {
|
||||
if (this.visible) {
|
||||
this.onEnter();
|
||||
}
|
||||
},
|
||||
focus() {
|
||||
let focusable = DomHandler.findSingle(this.$refs.container, 'input,button');
|
||||
if (focusable) {
|
||||
|
|
Loading…
Reference in New Issue