我想根据我的标志的值在部分中显示特定的div。清除缓存并尝试加载后,我将无法立即显示它。这仅是第一次发生,即在我第一次清除缓存并加载响应后。其余时间工作正常。
tried using v-if and v-else-if, in where I had two seactions, But that gave other issues like some of my tables and columns did not load.
// .js file
processResponse: function(response){
if(!response.data){
return false;
}
if(response.data.error !== undefined){
this.animateResults();
} else {
this.flag = response.data.flag
if(this.flag){
$("div.scheme-lookup-component-descoped").show();
$("div.scheme-lookup-component-results-notdescoped").hide();
}
else{
$("div.scheme-lookup-component-results-notdescoped").show();
$("div.scheme-lookup-component-descoped").hide();
//this.animateResults();
}
}
animateResults: function() {
const self = this;
if(!this.resultsShown) {
Vue.nextTick(function() {
$(".scheme-lookup-component-results").velocity("slideDown", {
duration: 500,
complete: function () {
$('.scheme-lookup-component-results__title-section').velocity('scroll', {duration:1000, easing: "ease-in-out", offset: -16});
customPrint.preparePageForPrint();
self.resultsShown = true;
}
},);
})
# html code #
<section class="scheme-lookup-component-results" style="display: none">
<div class="scheme-lookup-component-descoped" style="display: none" v-html="resultsContentData.deScopedEppMessage"></div>
<div class = "scheme-lookup-component-results-notdescoped">
</div>
</section>
预期结果是,即使清除缓存并加载它,我也应该能够查看我的div。到目前为止,清理缓存后我无法查看结果