項目首頁增加聊天入口
添加一個消息按鈕
Home.vue
<el-header class="header">
<h3 class="title">微人事</h3>
<div>
<el-button icon="el-icon-bell" type="text" style="margin-right: 8px;color: #000000" size="normal" @click="gochat"></el-button>
<el-dropdown @command="handleCommand">
<span class="el-dropdown-link">
{{user.name}}<i><img :src="user.userface" alt=""></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="#">個人中心</el-dropdown-item>
<el-dropdown-item command="#">設(shè)置</el-dropdown-item>
<el-dropdown-item divided command="logout">退出登錄</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</el-header>
添加點(diǎn)擊事件方法
文章來源:http://www.zghlxwxcb.cn/news/detail-657435.html
gochat(){
this.$router.replace("/chat")
},
創(chuàng)建聊天頁面組件
添加路由文章來源地址http://www.zghlxwxcb.cn/news/detail-657435.html
到了這里,關(guān)于微人事項目在線聊天(一)的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!