Skip to content

Commit d4b8d14

Browse files
committed
fix: component cannot be rendered due to switch routing
1 parent d615104 commit d4b8d14

File tree

5 files changed

+4647
-6414
lines changed

5 files changed

+4647
-6414
lines changed

package-lock.json

+12-12
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"axios": "^0.21.1",
2020
"core-js": "^3.6.5",
2121
"dayjs": "^1.10.4",
22-
"element-plus": "^1.0.2-beta.55",
22+
"element-plus": "^1.0.2-beta.70",
2323
"event-source-polyfill": "^1.0.7",
2424
"fastscan": "^1.0.4",
2525
"good-storage": "^1.1.0",

src/component/layout/app-main.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<template>
22
<section class="container">
33
<div class="wrapper" id="wrapper">
4-
<router-view v-slot="{ Component }">
4+
<router-view v-slot="{ Component }" :key="$route.fullPath">
55
<transition appear name="fade-transform" mode="out-in">
66
<component :is="Component" />
77
</transition>

src/view/center/center.vue

+5-4
Original file line numberDiff line numberDiff line change
@@ -59,20 +59,21 @@
5959
</el-row>
6060
</div>
6161
<!-- 修改头像 -->
62-
<!-- <avatar :originalImage="cropImg" :cropVisible="cropVisible" @switchCropVisible="switchCropVisible"></avatar> -->
62+
<avatar :originalImage="cropImg" :cropVisible="cropVisible" @switchCropVisible="switchCropVisible"></avatar>
6363
</div>
6464
</template>
6565

6666
<script>
67+
import { mapActions, mapGetters } from 'vuex'
68+
6769
import User from '@/lin/model/user'
6870
import axios from '@/lin/plugin/axios'
69-
import { mapActions, mapGetters } from 'vuex'
7071
import defaultAvatar from '@/assets/image/user/user.png'
71-
// import Avatar from '../../component/layout/avatar.vue'
72+
import Avatar from '../../component/layout/avatar.vue'
7273
7374
export default {
7475
name: 'Center',
75-
// components: { Avatar },
76+
components: { Avatar },
7677
data() {
7778
const oldPassword = (rule, value, callback) => {
7879
if (!value) {

0 commit comments

Comments
 (0)