This commit is contained in:
oneao committed 2025-10-10 21:43:09 +08:00
1 parent 5bc05923f2
commit 2db3eb2408
109 files changed
+6089 -16689

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
# Logs
logs
*.log
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
lerna-debug.log*
node_modules
dist
dist-ssr
*.local
# Editor directories and files
.vscode/*
!.vscode/extensions.json
.idea
.DS_Store
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw?
+3
View File
@@ -0,0 +1,3 @@
{
"recommendations": ["Vue.volar"]
}
+5
View File
@@ -0,0 +1,5 @@
# Vue 3 + Vite
This template should help get you started developing with Vue 3 in Vite. The template uses Vue 3 `<script setup>` SFCs, check out the [script setup docs](https://v3.vuejs.org/api/sfc-script-setup.html#sfc-script-setup) to learn more.
Learn more about IDE Support for Vue in the [Vue Docs Scaling up Guide](https://vuejs.org/guide/scaling-up/tooling.html#ide-support).
+22
View File
@@ -0,0 +1,22 @@
// eslint.config.mjs
import antfu from '@antfu/eslint-config'
export default antfu({
vue: true,
stylistic: {
indent: 2,
quotes: 'single',
},
formatters: {
css: true,
html: true,
markdown: 'prettier',
},
rules: {
'no-console': 'off', // 允许 console.log 不报错
"prefer-promise-reject-errors": "off"
},
})
+13
View File
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/vite.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>link-fronted</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
+22
View File
@@ -0,0 +1,22 @@
{
"name": "link-fronted",
"private": true,
"version": "0.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"vue": "^3.5.22",
"vue-router": "^4.5.1"
},
"devDependencies": {
"@antfu/eslint-config": "^5.2.1",
"@vitejs/plugin-vue": "^6.0.1",
"eslint": "^9.34.0",
"eslint-plugin-format": "^1.0.1",
"vite": "^7.1.7"
}
}
File diff suppressed because it is too large. Load diff
+1
View File
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="31.88" height="32" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 257"><defs><linearGradient id="IconifyId1813088fe1fbc01fb466" x1="-.828%" x2="57.636%" y1="7.652%" y2="78.411%"><stop offset="0%" stop-color="#41D1FF"></stop><stop offset="100%" stop-color="#BD34FE"></stop></linearGradient><linearGradient id="IconifyId1813088fe1fbc01fb467" x1="43.376%" x2="50.316%" y1="2.242%" y2="89.03%"><stop offset="0%" stop-color="#FFEA83"></stop><stop offset="8.333%" stop-color="#FFDD35"></stop><stop offset="100%" stop-color="#FFA800"></stop></linearGradient></defs><path fill="url(#IconifyId1813088fe1fbc01fb466)" d="M255.153 37.938L134.897 252.976c-2.483 4.44-8.862 4.466-11.382.048L.875 37.958c-2.746-4.814 1.371-10.646 6.827-9.67l120.385 21.517a6.537 6.537 0 0 0 2.322-.004l117.867-21.483c5.438-.991 9.574 4.796 6.877 9.62Z"></path><path fill="url(#IconifyId1813088fe1fbc01fb467)" d="M185.432.063L96.44 17.501a3.268 3.268 0 0 0-2.634 3.014l-5.474 92.456a3.268 3.268 0 0 0 3.997 3.378l24.777-5.718c2.318-.535 4.413 1.507 3.936 3.838l-7.361 36.047c-.495 2.426 1.782 4.5 4.151 3.78l15.304-4.649c2.372-.72 4.652 1.36 4.15 3.788l-11.698 56.621c-.732 3.542 3.979 5.473 5.943 2.437l1.313-2.028l72.516-144.72c1.215-2.423-.88-5.186-3.54-4.672l-25.505 4.922c-2.396.462-4.435-1.77-3.759-4.114l16.646-57.705c.677-2.35-1.37-4.583-3.769-4.113Z"></path></svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

+9
View File
@@ -0,0 +1,9 @@
<script setup>
</script>
<template>
<RouterView />
</template>
<style scoped>
</style>
@@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" aria-hidden="true" role="img" class="iconify iconify--logos" width="37.07" height="36" preserveAspectRatio="xMidYMid meet" viewBox="0 0 256 198"><path fill="#41B883" d="M204.8 0H256L128 220.8L0 0h97.92L128 51.2L157.44 0h47.36Z"></path><path fill="#41B883" d="m0 0l128 220.8L256 0h-51.2L128 132.48L50.56 0H0Z"></path><path fill="#35495E" d="M50.56 0L128 133.12L204.8 0h-47.36L128 51.2L97.92 0H50.56Z"></path></svg>

After

Width:  |  Height:  |  Size: 496 B

+6
View File
@@ -0,0 +1,6 @@
import { createApp } from 'vue'
import './style.css'
import App from './App.vue'
import router from '@/router/index'
createApp(App).use(router).mount('#app')
@@ -0,0 +1,21 @@
import { createRouter, createWebHistory } from 'vue-router'
import Im from '@/views/im/index.vue'
const routes = [
{
path: '/',
name: 'Home',
},
{
path: '/im',
name: 'Im',
component: Im,
},
]
const router = createRouter({
history: createWebHistory(),
routes,
})
export default router
Whitespace-only changes.
@@ -0,0 +1,13 @@
<script setup>
</script>
<template>
<div class="">
im
</div>
</template>
<style scoped>
</style>
+329
View File
@@ -0,0 +1,329 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>企业三栏聊天页面</title>
<style>
* {
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Segoe UI', Arial, sans-serif;
}
body {
background: #f0f2f5;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.chat-app {
display: flex;
width: 1300px;
height: 750px;
border-radius: 10px;
overflow: hidden;
box-shadow: 0 0 25px rgba(0, 0, 0, 0.15);
background: #fff;
}
/* 左侧列表 */
.sidebar {
width: 300px;
background: #2c3e50;
color: #fff;
display: flex;
flex-direction: column;
}
.sidebar-header {
padding: 20px;
font-size: 20px;
font-weight: bold;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.search-box {
padding: 10px 20px;
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.search-box input {
width: 100%;
padding: 8px;
border-radius: 5px;
border: none;
outline: none;
}
/* 单聊/群聊列表 */
.list-section {
flex: 1;
display: flex;
flex-direction: column;
overflow-y: auto;
padding: 10px 0;
}
.list-section h3 {
padding: 0 20px;
margin-bottom: 5px;
font-size: 14px;
color: #95a5a6;
text-transform: uppercase;
}
.list-item {
display: flex;
align-items: center;
padding: 10px 20px;
cursor: pointer;
transition: background 0.2s;
border-radius: 5px;
margin: 0 10px 5px 10px;
}
.list-item:hover,
.list-item.active {
background: #34495e;
}
.list-item img {
width: 40px;
height: 40px;
border-radius: 50%;
margin-right: 12px;
}
.list-item .info {
flex: 1;
}
.list-item .info .name {
font-weight: bold;
font-size: 16px;
}
.list-item .unread {
background: #e74c3c;
color: #fff;
font-size: 12px;
min-width: 18px;
height: 18px;
border-radius: 50%;
display: flex;
justify-content: center;
align-items: center;
margin-left: 8px;
padding: 0 5px;
}
/* 中间聊天区 */
.chat-container {
flex: 2;
display: flex;
flex-direction: column;
background: #ecf0f1;
border-left: 1px solid #ccc;
border-right: 1px solid #ccc;
}
.chat-header {
height: 60px;
display: flex;
align-items: center;
padding: 0 20px;
font-weight: bold;
font-size: 18px;
background: #fff;
border-bottom: 1px solid #ccc;
}
.chat-messages {
flex: 1;
padding: 20px;
overflow-y: auto;
display: flex;
flex-direction: column;
gap: 10px;
}
.message {
display: flex;
max-width: 70%;
padding: 10px 14px;
border-radius: 15px;
line-height: 1.4;
word-wrap: break-word;
position: relative;
align-items: flex-start;
}
.message.from-me {
background: #2c3e50;
color: #fff;
align-self: flex-end;
border-bottom-right-radius: 0;
flex-direction: row-reverse;
}
.message.from-other {
background: #bdc3c7;
color: #000;
align-self: flex-start;
border-bottom-left-radius: 0;
}
.message .avatar {
width: 35px;
height: 35px;
border-radius: 50%;
margin: 0 8px;
}
.message .content {
display: flex;
flex-direction: column;
}
.message .content .sender {
font-size: 12px;
color: #555;
margin-bottom: 4px;
font-weight: bold;
}
.message .content .timestamp {
font-size: 10px;
color: #888;
align-self: flex-end;
margin-top: 4px;
}
/* 输入区 */
.chat-input {
height: 70px;
display: flex;
padding: 10px 15px;
border-top: 1px solid #ccc;
background: #fff;
gap: 10px;
}
.chat-input input {
flex: 1;
padding: 10px;
border-radius: 5px;
border: 1px solid #ccc;
outline: none;
font-size: 16px;
}
.chat-input button {
width: 80px;
border: none;
border-radius: 5px;
background: #1abc9c;
color: #fff;
cursor: pointer;
font-size: 16px;
transition: background 0.2s;
}
.chat-input button:hover {
background: #16a085;
}
/* 右侧详情栏 */
.chat-detail {
width: 250px;
background: #f7f9fa;
padding: 20px;
overflow-y: auto;
}
.chat-detail h3 {
font-size: 16px;
margin-bottom: 10px;
color: #333;
}
.chat-detail ul {
list-style: none;
}
.chat-detail li {
padding: 6px 0;
font-size: 14px;
color: #555;
border-bottom: 1px solid #eee;
}
/* 滚动条 */
.list-section::-webkit-scrollbar,
.chat-messages::-webkit-scrollbar,
.chat-detail::-webkit-scrollbar {
width: 6px;
}
.list-section::-webkit-scrollbar-thumb,
.chat-messages::-webkit-scrollbar-thumb,
.chat-detail::-webkit-scrollbar-thumb {
background-color: rgba(0, 0, 0, 0.2);
border-radius: 3px;
}
</style>
</head>
<body>
<div class="chat-app">
<!-- 左侧列表 -->
<div class="sidebar">
<div class="sidebar-header">企业通信</div>
<div class="search-box">
<input type="text" placeholder="搜索联系人或群组..." />
</div>
<!-- 单聊 -->
<div class="list-section" id="singleList">
<h3>单聊联系人</h3>
<div class="list-item" data-type="single" data-id="enterprise1">
<img src="https://i.pravatar.cc/40?img=1" />
<div class="info"><div class="name">企业A</div></div>
<span class="unread">2</span>
</div>
<div class="list-item" data-type="single" data-id="enterprise2">
<img src="https://i.pravatar.cc/40?img=3" />
<div class="info"><div class="name">企业B</div></div>
</div>
</div>
<!-- 群聊 -->
<div class="list-section" id="groupList">
<h3>群聊群组</h3>
<div class="list-item" data-type="group" data-id="group1">
<img src="https://i.pravatar.cc/40?img=2" />
<div class="info"><div class="name">项目组X</div></div>
</div>
<div class="list-item" data-type="group" data-id="group2">
<img src="https://i.pravatar.cc/40?img=4" />
<div class="info"><div class="name">项目组Y</div></div>
</div>
</div>
</div>
<!-- 中间聊天区 -->
<div class="chat-container">
<div class="chat-header" id="chatHeader">请选择聊天对象</div>
<div class="chat-messages" id="chatMessages">
<!-- 示例消息 -->
<div class="message from-other">
<img class="avatar" src="https://i.pravatar.cc/35?img=1" />
<div class="content">
<div class="sender">企业A</div>
<div class="text">欢迎使用企业聊天系统。</div>
<div class="timestamp">09:30</div>
</div>
</div>
<div class="message from-me">
<img class="avatar" src="https://i.pravatar.cc/35?img=10" />
<div class="content">
<div class="sender">我</div>
<div class="text">收到,确认。</div>
<div class="timestamp">09:31</div>
</div>
</div>
</div>
<div class="chat-input">
<input type="text" placeholder="输入消息..." />
<button>发送</button>
</div>
</div>
<!-- 右侧详情 -->
<div class="chat-detail" id="chatDetail">
<h3>聊天详情</h3>
<ul>
<li>企业名称:企业A</li>
<li>联系人:张三</li>
<li>部门:技术部</li>
<li>未读消息:2</li>
<li>加入时间:2025-10-10</li>
</ul>
</div>
</div>
</body>
</html>
+13
View File
@@ -0,0 +1,13 @@
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import path from 'path'
// https://vite.dev/config/
export default defineConfig({
plugins: [vue()],
resolve: {
alias: {
'@': path.resolve(__dirname, 'src'),
},
},
})