不用cdn了。本地部署本地使用直接把js借过来快多了,起码每次省半秒,快的时候省好几秒。

This commit is contained in:
高子兴 2024-10-26 20:38:49 +08:00
parent 6261d3eba1
commit d3bd8d6d15
7 changed files with 108 additions and 10 deletions

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>习题识别工具</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css">
<link rel="stylesheet" href="static/element-plus/index.css">
<style>
body {
display: flex;
@ -55,8 +55,8 @@
</el-row>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<script src="https://cdn.jsdelivr.net/npm/element-plus"></script>
<script src="static/vue@3.js"></script>
<script src="static/element-plus.js"></script>
<script>
const {createApp} = Vue;
const {ElButton, ElRow, ElCol} = ElementPlus;

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

20
html/static/vue@3.js Normal file

File diff suppressed because one or more lines are too long

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>接收终端</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css">
<link rel="stylesheet" href="static/element-plus/index.css">
<style>
body {
display: flex;
@ -99,8 +99,8 @@
></el-image-viewer>
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<script src="https://cdn.jsdelivr.net/npm/element-plus"></script>
<script src="static/vue@3.js"></script>
<script src="static/element-plus.js"></script>
<script>
const {createApp} = Vue;
const {ElInput, ElButton, ElRow, ElCol, ElMessage, ElImageViewer} = ElementPlus;

View File

@ -4,7 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>习题上传</title>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/element-plus/dist/index.css">
<link rel="stylesheet" href="static/element-plus/index.css">
<style>
body {
display: flex;
@ -125,9 +125,8 @@
</div>
<script src="https://cdn.jsdelivr.net/npm/vue@3"></script>
<script src="https://cdn.jsdelivr.net/npm/element-plus"></script>
<script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script>
<script src="static/vue@3.js"></script>
<script src="static/element-plus.js"></script>
<script>
const {createApp} = Vue;

View File

@ -119,3 +119,8 @@ async def test():
@app.get("/favicon.ico", response_class=FileResponse)
async def favicon():
return FileResponse("html/favicon.ico")
@app.get("/static/{path:path}", response_class=FileResponse)
async def static(path: str):
return FileResponse(f"html/static/{path}")