vue文件
<template>
<div>
<div>
<el-input
class="username"
v-model="username"
clearable
/>
<el-button
type="primary"
@click="handleUser"
>确认</el-button>
</div>
<div>
<el-input
class="send-box"
v-model="message"
clearable
/>
<el-button
type="primary"
@click="sendMessage"
>发送</el-button>
</div>
<div
class="message-box"
v-for="item in msgData"
:key="item.id"
>
<p><span>昵称:{
{item.user}}