mirror of
https://github.com/yangjian102621/geekai.git
synced 2025-09-17 16:56:38 +08:00
fix: unbind event for login page when the component is unmount
This commit is contained in:
parent
998cbace92
commit
64d6bff6d9
@ -42,7 +42,7 @@ ChatGLM,讯飞星火,文心一言等多个平台的大语言模型。集成了
|
|||||||
|
|
||||||
### 会员充值
|
### 会员充值
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
### 自动调用函数插件
|
### 自动调用函数插件
|
||||||
|
|
||||||
@ -437,8 +437,7 @@ make clean linux
|
|||||||
|
|
||||||
如果你觉得这个项目对你有帮助,并且情况允许的话,可以请作者喝杯咖啡,非常感谢你的支持~
|
如果你觉得这个项目对你有帮助,并且情况允许的话,可以请作者喝杯咖啡,非常感谢你的支持~
|
||||||
|
|
||||||

|

|
||||||

|
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
version: '3'
|
version: '3'
|
||||||
services:
|
services:
|
||||||
# 后端 API 程序
|
|
||||||
mysql:
|
mysql:
|
||||||
image: mysql:8.0.33
|
image: mysql:8.0.33
|
||||||
container_name: chatgpt-plus-mysql
|
container_name: chatgpt-plus-mysql
|
||||||
|
BIN
docs/imgs/donate.png
Normal file
BIN
docs/imgs/donate.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 170 KiB |
Before Width: | Height: | Size: 95 KiB After Width: | Height: | Size: 95 KiB |
Binary file not shown.
Before Width: | Height: | Size: 88 KiB |
@ -48,7 +48,7 @@
|
|||||||
|
|
||||||
<script setup>
|
<script setup>
|
||||||
|
|
||||||
import {onMounted, ref} from "vue";
|
import {onMounted, onUnmounted, ref} from "vue";
|
||||||
import {Lock, UserFilled} from "@element-plus/icons-vue";
|
import {Lock, UserFilled} from "@element-plus/icons-vue";
|
||||||
import {httpPost} from "@/utils/http";
|
import {httpPost} from "@/utils/http";
|
||||||
import {ElMessage} from "element-plus";
|
import {ElMessage} from "element-plus";
|
||||||
@ -74,12 +74,17 @@ checkSession().then(() => {
|
|||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
})
|
})
|
||||||
|
|
||||||
|
const handleKeyup = (e) => {
|
||||||
|
if (e.key === 'Enter') {
|
||||||
|
login();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
document.addEventListener('keyup', (e) => {
|
document.addEventListener('keyup', handleKeyup)
|
||||||
if (e.key === 'Enter') {
|
})
|
||||||
login();
|
onUnmounted(() => {
|
||||||
}
|
document.removeEventListener('keyup', handleKeyup)
|
||||||
});
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const login = function () {
|
const login = function () {
|
||||||
|
Loading…
Reference in New Issue
Block a user