Browse Source

fix: login error

xingyu 1 year ago
parent
commit
44efb13c0e

+ 1 - 1
src/views/Login/components/LoginForm.vue

@@ -9,7 +9,7 @@
     label-width="120px"
     size="large"
   >
-    <el-row style="maring-left: -10px; maring-right: -10px">
+    <el-row style="margin-left: -10px; margin-right: -10px">
       <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
         <el-form-item>
           <LoginFormTitle style="width: 100%" />

+ 1 - 1
src/views/Login/components/QrCodeForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <el-row v-show="getShow" style="maring-left: -10px; maring-right: -10px">
+  <el-row v-show="getShow" style="margin-left: -10px; margin-right: -10px">
     <el-col :span="24" style="padding-left: 10px; padding-right: 10px">
       <LoginFormTitle style="width: 100%" />
     </el-col>

+ 12 - 2
src/views/Login/components/SSOLogin.vue

@@ -55,7 +55,14 @@ const client = ref({
   name: '',
   logo: ''
 })
-const queryParams = reactive({
+interface queryType {
+  responseType: string
+  clientId: string
+  redirectUri: string
+  state: string
+  scopes: string[]
+}
+const queryParams = reactive<queryType>({
   // URL 上的 client_id、scope 等参数
   responseType: '',
   clientId: '',
@@ -64,7 +71,10 @@ const queryParams = reactive({
   scopes: [] // 优先从 query 参数获取;如果未传递,从后端获取
 })
 const ssoVisible = computed(() => unref(getLoginState) === LoginStateEnum.SSO) // 是否展示 SSO 登录的表单
-const formData = reactive({
+interface formType {
+  scopes: string[]
+}
+const formData = reactive<formType>({
   scopes: [] // 已选中的 scope 数组
 })
 const formLoading = ref(false) // 表单是否提交中