Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions plugins/auth/client/login-form.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@
<k-icon name="user"></k-icon>
</el-input>
<el-input placeholder="密码" v-model="shared.password" @keypress.enter.stop="loginWithPassword"
:type="shared.showPass ? 'text' : 'password'">
:type="showPassword ? 'text' : 'password'">
<template #prefix><k-icon name="lock"></k-icon></template>
<template #suffix>
<k-icon :name="shared.showPass ? 'eye' : 'eye-slash'" @click="shared.showPass = !shared.showPass"></k-icon>
<k-icon :name="showPassword ? 'eye' : 'eye-slash'" @click="showPassword = !showPassword"></k-icon>
</template>
</el-input>
<p class="error" v-if="error">{{ error }}</p>
Expand All @@ -62,6 +62,7 @@ import { UserLogin } from '@koishijs/plugin-auth'

const error = ref<string>()
const user = ref<UserLogin>()
const showPassword = ref<boolean>(false)

let timestamp = 0
async function loginWithAccount() {
Expand Down
1 change: 0 additions & 1 deletion plugins/auth/client/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ interface SharedConfig extends Partial<LoginToken> {
authType: 0 | 1
platform?: string
userId?: string
showPass?: boolean
password?: string
}

Expand Down
Loading