<sidebar v-if="renderComponent" ></sidebar> <script> methods: { reloadC(){//重新加载组件 this.renderComponent = false; this.$nextTick(() => { this.renderComponent = true; }); } } </script>
<sidebar v-if="renderComponent" ></sidebar> <script> methods: { reloadC(){//重新加载组件 this.renderComponent = false; this.$nextTick(() => { this.renderComponent = true; }); } } </script>