From 186de06aade2edacd4740f2758f2c0248314a0f6 Mon Sep 17 00:00:00 2001 From: wangqiujuan0808 <578331299@qq.com> Date: Sat, 23 Mar 2024 14:44:47 +0800 Subject: [PATCH] Update Room.vue --- src/views/Room.vue | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/views/Room.vue b/src/views/Room.vue index 5633d7a..8c87710 100644 --- a/src/views/Room.vue +++ b/src/views/Room.vue @@ -151,7 +151,7 @@ import { usrRoomStore } from '../store/project' import { Plus } from '@element-plus/icons-vue' import myApi from "@/api/myApi.js"; import { useRoute, useRouter } from 'vue-router' - +import { ElMessage,ElMessageBox } from "element-plus"; const router = useRouter() const route = useRoute() @@ -186,8 +186,7 @@ const room_info = reactive({ }) - -var currentRoom = reactive(room_info); +var currentRoom = ref({}); const get_project = async () => { const param = { action: 100, @@ -197,6 +196,10 @@ const get_project = async () => { } const res = await myApi.getProjects(param); if (res.code === 0) { + ElMessage({ + message: res.message, + type: "success", + }); project.name = res.data.name; project.description = res.data.description; if (Array.isArray(res.data.content)) { @@ -220,7 +223,7 @@ onMounted(() => { }); const select_room = (item) => { - currentRoom = item; + currentRoom.value = item; console.log(123, currentRoom); } const add_room = () => {