Sfoglia il codice sorgente

兼容vben浅色主题

Signed-off-by: skywolf627 <skywolf627@qq.com>
skywolf627 3 anni fa
parent
commit
80485f7215
1 ha cambiato i file con 10 aggiunte e 13 eliminazioni
  1. 10 13
      Vben2/src/extension/components/OnlineUser/OnlineUser.vue

+ 10 - 13
Vben2/src/extension/components/OnlineUser/OnlineUser.vue

@@ -83,11 +83,12 @@
   const { hasPermission } = usePermission();
   const onlineUserList = ref<any>([]);
   const drawerShow = ref(false);
-  console.log(userStore.getUserInfo);
+  //console.log(userStore.getUserInfo);
 
   function toggleDrawer() {
     drawerShow.value = !drawerShow.value;
   }
+
   async function onForceExist(connectionId) {
     console.log(connectionId);
     await connection.send('ForceExistUser', { connectionId }).catch(function (err) {
@@ -126,8 +127,6 @@
     onlineUserList.value = data.list;
     notification.open({
       message: `${data.offline ? `${data.name}离开了` : `欢迎${data.name}上线`}`,
-      // description:
-      //   'This is the content of the notification. This is the content of the notification. This is the content of the notification.',
       placement: 'bottomRight',
     });
   });
@@ -141,22 +140,20 @@
   connection.onreconnected(() => {
     //重新连接成功
   });
-
-  //启动连接并发送消息测试
   connection.start().then(() => {
     //第一次连接成功
   });
-
-  // const sendMsg = async () => {
-  //   console.log(messages.value);
-  //   await connection.send('SendMessage', messages.value).catch(function (err) {
-  //     console.log(err);
-  //   });
-  // };
 </script>
 
+<style>
+  /*兼容vben浅色主题 */
+  .vben-layout-header--light .online-user-wrapper {
+    color: #000;
+  }
+</style>
+
 <style scoped>
   .extra-wrapper ::v-deep(.anticon) {
     margin-right: 8px;
   }
-</style>
+</style>