[bugfix] Dialog: missing animation when first rendered

This commit is contained in:
陈嘉涵 2019-02-14 20:30:07 +08:00
parent b74fe6fffc
commit 1fea9aa31f
2 changed files with 14 additions and 11 deletions

View File

@ -114,17 +114,16 @@ export default sfc({
},
render(h) {
const titleSlots = CELL_SLOTS.reduce(
(slots, name) => {
if (this.slots(name)) {
slots[name] = () => this.slots(name);
}
return slots;
},
{
default: () => this.slots('value')
const titleSlots = CELL_SLOTS.reduce((slots, name) => {
if (this.slots(name)) {
slots[name] = () => this.slots(name);
}
);
return slots;
}, {});
if (this.slots('value')) {
titleSlots.default = this.slots('value');
}
const Title = (
<Cell

View File

@ -6,7 +6,11 @@ let instance;
const initInstance = () => {
instance = new (Vue.extend(VanDialog))({
el: document.createElement('div')
el: document.createElement('div'),
// avoid missing animation when first rendered
propsData: {
lazyRender: false
}
});
instance.$on('input', value => {