完成删除智能体

This commit is contained in:
CGD
2025-03-24 09:16:48 +08:00
parent 19455f89d3
commit b59c097bca
4 changed files with 55 additions and 7 deletions
@@ -6,7 +6,7 @@
</div>
<div>
<img src="@/assets/home/delete.png" alt=""
style="width: 18px;height: 18px;margin-right: 10px;" />
style="width: 18px;height: 18px;margin-right: 10px;" @click.stop="handleDelete" />
<img src="@/assets/home/info.png" alt="" style="width: 18px;height: 18px;" />
</div>
</div>
@@ -44,6 +44,11 @@ export default {
},
data() {
return { switchValue: false }
},
methods: {
handleDelete() {
this.$emit('delete', this.device.agentId)
}
}
}
</script>
@@ -25,7 +25,7 @@
<img alt="" src="@/assets/home/avatar.png" style="width: 21px;height: 21px;"/>
<el-dropdown trigger="click">
<span class="el-dropdown-link">
{{ userInfo.username || '加载中...' }}<i class="el-icon-arrow-down el-icon--right"></i>
{{ userInfo.username }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item icon="el-icon-plus" @click.native="">个人中心</el-dropdown-item>
@@ -71,7 +71,10 @@ export default {
// 获取用户信息
fetchUserInfo() {
userApi.getUserInfo(({data}) => {
this.userInfo = data.data
this.userInfo = {
username: data.data.mobile, // 暂时先使用手机号作为用户名
mobile: data.data.mobile
}
})
},