problem description
I use elementui"s dialog pop-up window to include < router-view >
,
click on different data, and the pop-up window displays different components. When the component data is displayed more, there will be a delay in the pop-up window. Excuse me, boss, how to solve this?
the environmental background of the problems and what methods you have tried
try to pop up the window first. If the route is loaded in $nextTick, there will also be a delay. It may be due to the fact that there is too much data in the original component, resulting in slower display.
related codes
/ / Please paste the code text below (do not replace the code with pictures)
<el-dialog :title="dialogTitle" custom-class="dialogYs" :visible.sync="dialogVisible">
<router-view></router-view>
</el-dialog>
openWindow(url,data,title){
var _that=this;
this.dialogTitle=title;
this.dialogVisible=true;
this.$nextTick(()=>{
_that.$router.push({
path:url,
query:{
id:data.id
}
})
})
}
what result do you expect? What is the error message actually seen?
how can I pop up the window immediately, and then jump to change the route after the pop-up window? What is the cause of the pop-up window delay? Is there more data in the component?