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