123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- <template>
- <router-view v-if="routerState"/>
- </template>
- <script>
- export default {
- data(){
- return{
- routerState: true
- }
- },
- provide() {
- return {
- reload: this.reload
- }
- },
- methods: {
- reload() { //重载组件
- this.routerState = false;
- this.$nextTick(() => {
- this.routerState = true;
- })
- }
- }
- }
- </script>
- <style lang="less">
- *{
- list-style: none;
- margin: 0;
- padding: 0;
- }
- body,HTML{
- width: 100%;
- height: 100%;
- }
- .flexc{display: flex;align-items: center;}
- .flexcc{display: flex;align-items: center;justify-content: center;}
- .flex0{flex: 0 0 auto;}
- .flex1{flex:1;}
- </style>
|