feat: support markmap svg export and download as png image

This commit is contained in:
RockYang
2024-04-22 14:20:51 +08:00
parent 8a1c55c731
commit 9eb1353455
5 changed files with 67 additions and 11 deletions

View File

@@ -378,7 +378,12 @@ const initData = () => {
httpGet(`/api/role/list`).then((res) => {
roles.value = res.data;
console.log()
roleId.value = parseInt(router.currentRoute.value.params["role_id"]) ?? roles.value[0]['id'];
if (router.currentRoute.value.params.role_id) {
roleId.value = parseInt(router.currentRoute.value.params["role_id"])
} else {
roleId.value = roles.value[0]['id']
}
newChat();
}).catch((e) => {
ElMessage.error('获取聊天角色失败: ' + e.messages)