mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
[bugfix] Dialog: missing animation when first rendered
This commit is contained in:
parent
b74fe6fffc
commit
1fea9aa31f
@ -114,17 +114,16 @@ export default sfc({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render(h) {
|
render(h) {
|
||||||
const titleSlots = CELL_SLOTS.reduce(
|
const titleSlots = CELL_SLOTS.reduce((slots, name) => {
|
||||||
(slots, name) => {
|
if (this.slots(name)) {
|
||||||
if (this.slots(name)) {
|
slots[name] = () => this.slots(name);
|
||||||
slots[name] = () => this.slots(name);
|
|
||||||
}
|
|
||||||
return slots;
|
|
||||||
},
|
|
||||||
{
|
|
||||||
default: () => this.slots('value')
|
|
||||||
}
|
}
|
||||||
);
|
return slots;
|
||||||
|
}, {});
|
||||||
|
|
||||||
|
if (this.slots('value')) {
|
||||||
|
titleSlots.default = this.slots('value');
|
||||||
|
}
|
||||||
|
|
||||||
const Title = (
|
const Title = (
|
||||||
<Cell
|
<Cell
|
||||||
|
@ -6,7 +6,11 @@ let instance;
|
|||||||
|
|
||||||
const initInstance = () => {
|
const initInstance = () => {
|
||||||
instance = new (Vue.extend(VanDialog))({
|
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 => {
|
instance.$on('input', value => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user