Files
czzj-app/src/pages/change-password/index.vue
2026-10-21 17:09:53 +08:00

63 lines
1.4 KiB
Vue

<template>
<view class="auth-form-page">
<app-navbar title="修改密码" />
<view class="auth-form-page__body">
<text class="auth-form-page__heading">修改密码</text>
<base-input v-model="password" icon="lock" type="password" placeholder="请输入密码" />
<base-input v-model="confirmPassword" icon="lock" type="password" placeholder="确认密码" />
<text class="auth-form-page__hint">{{ passwordRuleHint }}</text>
<view class="auth-form-page__btn">
<primary-button text="确认修改" @click="submit" />
</view>
</view>
</view>
</template>
<script setup lang="ts">
import { PASSWORD_RULE_HINT } from '@/utils/validate'
import { useChangePassword } from './use-change-password'
const passwordRuleHint = `${PASSWORD_RULE_HINT}。`
const { password, confirmPassword, submit } = useChangePassword()
</script>
<style lang="scss" scoped>
.auth-form-page {
min-height: 100vh;
background: $color-bg-page;
}
.auth-form-page__body {
padding: 32rpx $page-padding-x 48rpx;
}
.auth-form-page__heading {
display: block;
font-size: 44rpx;
font-weight: 700;
color: $color-text;
margin-bottom: 48rpx;
}
.auth-form-page__hint {
display: block;
margin-top: 16rpx;
font-size: 24rpx;
color: $color-text-secondary;
line-height: 1.5;
}
.auth-form-page__btn {
margin-top: 16rpx;
}
:deep(.base-input) {
border: none;
box-shadow: 0 2rpx 12rpx rgba(0, 0, 0, 0.04);
}
</style>