add opened event and auto center height to demo: SizeModal

This commit is contained in:
DaxChen
2017-10-06 16:24:00 +08:00
parent e1d4993a4a
commit 6f54bbc9a9

View File

@@ -4,13 +4,15 @@
classes="demo-modal-class"
:min-width="200"
:min-height="200"
:pivot-y="0.25"
:pivot-y="0.5"
:adaptive="true"
:scrollable="true"
:reset="true"
width="60%"
height="auto"
@before-open="beforeOpen"
@opened="opened"
@closed="closed"
@before-close="beforeClose">
<div class="size-modal-content">
<div>A new paragraph will be added every 5 sec to show how <b>height</b> scales.</div>
@@ -40,6 +42,15 @@
clearInterval(this.timer)
this.timer = null
this.paragraphs = []
},
opened (e) {
// e.ref should not be undefined here
console.log('opened', e)
},
closed (e) {
console.log('closed', e)
}
}
}