Commit 11106b7d authored by 李苏's avatar 李苏 💬

头像

parent 18dc1f16
......@@ -17,7 +17,8 @@
<el-dropdown class="avatar-container right-menu-item hover-effect" trigger="click">
<div class="avatar-wrapper">
<img :src="'https://p9-passport.byteacctimg.com/img/user-avatar/9e20870d6d673cafe6a0e22aa2f2aa96~300x300.image'" class="user-avatar">
<el-avatar> {{user}} </el-avatar>
<!-- <img :src="'https://p9-passport.byteacctimg.com/img/user-avatar/9e20870d6d673cafe6a0e22aa2f2aa96~300x300.image'" class="user-avatar"> -->
<i class="el-icon-caret-bottom" />
</div>
<el-dropdown-menu slot="dropdown">
......@@ -58,6 +59,14 @@ export default {
RuoYiGit,
RuoYiDoc
},
mounted(){
this.user=localStorage.getItem('username')||'用户'
},
data(){
return{
user:'用户'
}
},
computed: {
...mapGetters([
'sidebar',
......
......@@ -119,12 +119,15 @@ Vue.prototype.$asRun = function() {
for (let i = 0; i < length; i++) {
fnArr[i](e[i])
}
})
}
)
}
/* alert */
Vue.prototype.$warning = function(text) {
var text = text || '警告'
this.$message({ showClose: true, message: text, type: 'warning'
this.$message({ showClose: true, message: text,
type: 'warning'
});
}
Vue.prototype.$success = function(text) {
......@@ -134,7 +137,9 @@ Vue.prototype.$success = function(text) {
}
Vue.prototype.$error = function(text) {
var text = text || 'no info'
this.$message({ showClose: true, message: text, type: 'error'
this.$message({ showClose: true,
message: text,
type: 'error'
});
}
......@@ -145,5 +150,7 @@ new Vue({
el: '#app',
router,
store,
render: h => h(App)
render:function(h){
return h(App)
}
})
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment