From e1ac52be71fbb41af389770afa044412971a7a71 Mon Sep 17 00:00:00 2001 From: jiutianzhiyu Date: Thu, 25 Mar 2021 19:23:20 +0800 Subject: [PATCH] =?UTF-8?q?=E7=9B=91=E5=90=AC=E5=9B=BE=E7=89=87=E5=8A=A0?= =?UTF-8?q?=E8=BD=BD=E9=94=99=E8=AF=AF=E4=BA=8B=E4=BB=B6=E8=A7=A3=E5=86=B3?= =?UTF-8?q?=E5=A4=B4=E5=83=8F=E5=8A=A0=E8=BD=BD=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/layout/components/Navbar.vue | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/layout/components/Navbar.vue b/src/layout/components/Navbar.vue index 245edac..ebb4cc3 100644 --- a/src/layout/components/Navbar.vue +++ b/src/layout/components/Navbar.vue @@ -11,7 +11,7 @@
- + {{ $store.getters.name }}
@@ -54,6 +54,11 @@ export default { async logout() { await this.$store.dispatch('user/logout') this.$router.push(`/login?redirect=${this.$route.fullPath}`) + }, + // 头像加载失败处理 + photoErrorHandle(e) { + // console.log(e.target) + e.target.src = 'https://dss0.bdstatic.com/70cFuHSh_Q1YnxGkpoWK1HF6hhy/it/u=1851283359,3457678391&fm=26&gp=0.jpg' } } }