Skip to content

Commit 7994929

Browse files
authored
Merge pull request #25 from wangle201210/feat/fe-opt
Feat/fe opt
2 parents c035342 + c275f3b commit 7994929

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

69 files changed

+8618
-1764
lines changed

.DS_Store

6 KB
Binary file not shown.

.gitignore

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,12 +27,14 @@ go.work.sum
2727

2828
server/manifest/config/config.yaml
2929
/server/uploads/
30-
/node_modules/
31-
/fe/package-lock.json
30+
**/package-lock.json
3231
/server/static/fe/
33-
/fe/.vite
32+
**/.vite
3433
/server/go-rag-server
3534
/server/logs/
3635
/data/
3736
/server/manifest/config/config-docker.yaml
3837
/server/manifest/config/frpc.toml
38+
**/node_modules/
39+
**/dist/
40+
**/build/

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ all: build
77

88
# 构建前端
99
build-fe:
10-
cd fe && npm install && npm run build
10+
cd fe && pnpm install && pnpm run build
1111
mkdir -p server/static/fe
1212
cp -r fe/dist/* server/static/fe/
1313

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
1. 创建知识库
44
![](./server/static/kb.png)
55
2. 选择需要使用的知识库,上传文档
6-
![](./server/static/kb-select.png)
76
![](./server/static/indexer.png)
87
3. 文档列表 & chunk 编辑
98
![](./server/static/doc-list.png)
@@ -110,3 +109,9 @@ npm run dev
110109

111110
- 清理构建产物 `make clean`
112111

112+
## 联系方式
113+
114+
> 如果使用上遇到什么问题,欢迎加微信交流(尽量使用github issue 交流)
115+
- 参与项目开发备注:go-rag 开发
116+
- 问题咨询备注:go-rag 咨询
117+
![微信](./server/static/wx.jpg)

fe/.env.development

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
VITE_API_BASE_URL=http://localhost:8000/api

fe/.gitignore

Lines changed: 0 additions & 24 deletions
This file was deleted.

fe/.npmrc

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
shamefully-hoist=true
2+
strict-peer-dependencies=false

fe/README.md

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# element-plus-vite-starter
2+
3+
> A starter kit for Element Plus with Vite
4+
5+
- Preview: <https://vite-starter.element-plus.org>
6+
7+
This is an example of on-demand element-plus with [unplugin-vue-components](https://github.com/antfu/unplugin-vue-components).
8+
9+
> If you want to import all, it may be so simple that no examples are needed. Just follow [quickstart | Docs](https://element-plus.org/zh-CN/guide/quickstart.html) and import them.
10+
11+
If you just want an on-demand import example `manually`, you can check [unplugin-element-plus/examples/vite](https://github.com/element-plus/unplugin-element-plus/tree/main/examples/vite).
12+
13+
If you want to a nuxt starter, see [element-plus-nuxt-starter](https://github.com/element-plus/element-plus-nuxt-starter/).
14+
15+
## Project setup
16+
17+
```bash
18+
pnpm install
19+
20+
# npm install
21+
# yarn install
22+
```
23+
24+
### Compiles and hot-reloads for development
25+
26+
```bash
27+
npm run dev
28+
```
29+
30+
### Compiles and minifies for production
31+
32+
```bash
33+
npm run build
34+
```
35+
36+
## Usage
37+
38+
```bash
39+
git clone https://github.com/element-plus/element-plus-vite-starter
40+
cd element-plus-vite-starter
41+
npm i
42+
npm run dev
43+
```
44+
45+
### Custom theme
46+
47+
See `src/styles/element/index.scss`.

fe/eslint.config.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import antfu from '@antfu/eslint-config'
2+
3+
export default antfu({
4+
formatters: true,
5+
unocss: true,
6+
vue: true,
7+
})

fe/index.html

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,18 @@
1-
<!DOCTYPE html>
2-
<html lang="zh-CN">
1+
<!doctype html>
2+
<html lang="en">
33
<head>
44
<meta charset="UTF-8" />
5-
<link rel="icon" href="/favicon.ico" />
5+
<link rel="icon" href="/logo.svg" />
66
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
7-
<title>Go-RAG - 基于检索增强生成的智能问答系统</title>
7+
<title>GO-RAG</title>
8+
<!-- element css cdn, if you use custom theme, remove it. -->
9+
<!-- <link
10+
rel="stylesheet"
11+
href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css"
12+
/> -->
813
</head>
914
<body>
1015
<div id="app"></div>
11-
<script type="module" src="/src/main.js"></script>
16+
<script type="module" src="/src/main.ts"></script>
1217
</body>
13-
</html>
18+
</html>

0 commit comments

Comments
 (0)