Open yxzhan opened 9 years ago
<template id="..." v-if="show">
data: function(){
return {
show: false
}
},
ready: {
this.showTimeDivider(some_item);
},
methods: {
showTimeDivider: function(item){
if(...)
this.show = true;
)
}
I got a 'time-divider' component, its display status is depend on whether its release time is equal to the release time of the latest message.
But my judgement function
(v-if="showTimeDivider(this)")
should that some time to execute, cause the component flash up and disappear(when the result is false)The flow is:
Component ready(visible) -> judgement function executing -> return false, hide component