父组件:
<button @click="handleLoad">
<s-echart :key="timer"></s-echart>
</button>
<script>
import sEchart from './schart.vue'
export default {
name: '',
components: {sEchart},
data() {
return {
timer:'',
}
},
methods: {
handleLoad(){
this.dialogSlowLogVisible=true;
},
}
}
</script>
子组件无需修改。