Web优化 1

This commit is contained in:
2026-06-12 14:01:55 +08:00
parent 17ca339c66
commit 7e9df04bf8
10 changed files with 138 additions and 73 deletions
+4 -1
View File
@@ -22,6 +22,7 @@
type="primary"
attr-type="submit"
:loading="loading"
:disabled="!isValid"
block
>
登录
@@ -38,7 +39,7 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { ref, computed } from 'vue'
import { NForm, NFormItem, NInput, NButton } from 'naive-ui'
import { useRouter } from 'vue-router'
import { authApi } from '@/api/auth'
@@ -50,6 +51,8 @@ const password = ref('')
const loading = ref(false)
const error = ref('')
const isValid = computed(() => email.value.trim().length > 0 && password.value.length > 0)
const auth = useAuthStore()
const router = useRouter()