diff --git a/napcat.webui/package.json b/napcat.webui/package.json index b57951d1..fb89a689 100644 --- a/napcat.webui/package.json +++ b/napcat.webui/package.json @@ -9,6 +9,7 @@ "preview": "vite preview" }, "dependencies": { + "qrcode": "^1.5.4", "tdesign-vue-next": "^1.10.3", "vue": "^3.5.12" }, diff --git a/napcat.webui/src/App.vue b/napcat.webui/src/App.vue index 1a6e94b8..3c266b8b 100644 --- a/napcat.webui/src/App.vue +++ b/napcat.webui/src/App.vue @@ -1,9 +1,25 @@ - @@ -22,22 +21,16 @@ import { reactive, ref } from 'vue'; import { MessagePlugin } from 'tdesign-vue-next'; import { LockOnIcon } from 'tdesign-icons-vue-next'; -const formData = reactive({ - password: '', -}); -const errorMessage = ref(''); +const formData = reactive({ + token: '', +}); const onSubmit = async ({ validateResult, firstError }) => { if (validateResult === true) { - errorMessage.value = ''; - try { - // 处理表单提交逻辑 - } catch (error) { - errorMessage.value = '登录失败,请重试'; - } + MessagePlugin.success('登录中...'); } else { - errorMessage.value = firstError; + MessagePlugin.error('登录失败'); } }; diff --git a/napcat.webui/src/main.ts b/napcat.webui/src/main.ts index 91b995ec..484b8eea 100644 --- a/napcat.webui/src/main.ts +++ b/napcat.webui/src/main.ts @@ -1,12 +1,22 @@ import { createApp } from 'vue' import './style.css' import App from './App.vue' -import { Button as TButton, Input as TInput, Form as TForm, FormItem as TFormItem } from 'tdesign-vue-next'; +import { + Button as TButton, + Input as TInput, + Form as TForm, + FormItem as TFormItem, + Select as TSelect, + Option as TOption + +} from 'tdesign-vue-next'; const app = createApp(App); app.use(TButton); app.use(TInput); app.use(TForm); app.use(TFormItem); +app.use(TSelect); +app.use(TOption); app.mount('#app'); \ No newline at end of file