mirror of
https://github.com/flarum/framework.git
synced 2025-02-15 01:22:52 +08:00
Rename onshow and onhide
animateShow and animateHide are more descriptive
This commit is contained in:
parent
e798cb104b
commit
12bfff9b5d
|
@ -24,7 +24,7 @@ export default class Modal extends Component {
|
||||||
oncreate(vnode) {
|
oncreate(vnode) {
|
||||||
super.oncreate(vnode);
|
super.oncreate(vnode);
|
||||||
|
|
||||||
this.attrs.onshow(() => this.onready());
|
this.attrs.animateShow(() => this.onready());
|
||||||
}
|
}
|
||||||
|
|
||||||
onbeforeremove() {
|
onbeforeremove() {
|
||||||
|
@ -32,7 +32,7 @@ export default class Modal extends Component {
|
||||||
// we've just opened up a new one, and accordingly,
|
// we've just opened up a new one, and accordingly,
|
||||||
// we don't need to show a hide animation.
|
// we don't need to show a hide animation.
|
||||||
if (!this.attrs.state.modal) {
|
if (!this.attrs.state.modal) {
|
||||||
this.attrs.onhide();
|
this.attrs.animateHide();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -14,8 +14,8 @@ export default class ModalManager extends Component {
|
||||||
{modal
|
{modal
|
||||||
? modal.componentClass.component({
|
? modal.componentClass.component({
|
||||||
...modal.attrs,
|
...modal.attrs,
|
||||||
onshow: this.animateShow.bind(this),
|
animateShow: this.animateShow.bind(this),
|
||||||
onhide: this.animateHide.bind(this),
|
animateHide: this.animateHide.bind(this),
|
||||||
state: this.attrs.state,
|
state: this.attrs.state,
|
||||||
})
|
})
|
||||||
: ''}
|
: ''}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user