@ -1143,6 +1143,19 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
@@ -1143,6 +1143,19 @@ ___CSS_LOADER_EXPORT___.push([module.id, `
. form - group input . error [ data - v - 52 d75f2c ] {
border - color : # f44336 ;
}
/* 确保禁用状态下的输入框仍然可见 */
. form - group input [ data - v - 52 d75f2c ] : disabled {
opacity : 0.7 ;
background : var ( -- bg - secondary ) ;
cursor : not - allowed ;
}
/* 测试焦点样式 */
. form - group input [ data - v - 52 d75f2c ] : focus {
outline : 2 px solid # ff9800 ;
outline - offset : 2 px ;
}
. error - message [ data - v - 52 d75f2c ] {
color : # f44336 ;
font - size : 12 px ;
@ -3718,21 +3731,14 @@ __webpack_require__.r(__webpack_exports__);
@@ -3718,21 +3731,14 @@ __webpack_require__.r(__webpack_exports__);
// 方法
const loadPasswordPolicy = async ( ) => {
try {
console . log ( '开始加载密码策略...' )
const response = await _services _userService _ _WEBPACK _IMPORTED _MODULE _1 _ _ . userService . getPasswordPolicy ( )
console . log ( '密码策略API响应:' , response )
console . log ( '响应类型:' , typeof response )
console . log ( 'response.data 类型:' , typeof response . data )
console . log ( 'response.data 内容:' , response . data )
// 修复:直接检查response.data的结构
if ( response . data && response . data . code === 200 && response . data . data ) {
policy . value = response . data . data
console . log ( '密码策略加载成功:' , policy . value )
} else if ( response && response . code === 200 && response . data ) {
// 备用检查:如果response.data不存在,直接检查response
policy . value = response . data
console . log ( '密码策略加载成功(备用路径):' , policy . value )
} else {
console . warn ( '密码策略响应格式不正确:' , response )
console . warn ( '尝试解析响应结构...' )
@ -3784,9 +3790,7 @@ __webpack_require__.r(__webpack_exports__);
@@ -3784,9 +3790,7 @@ __webpack_require__.r(__webpack_exports__);
}
try {
console . log ( '正在验证密码:' , form . newPassword )
const response = await _services _userService _ _WEBPACK _IMPORTED _MODULE _1 _ _ . userService . validatePassword ( form . newPassword )
console . log ( '后端验证响应:' , response )
// 修复:检查多种可能的响应结构
let result = null
@ -3797,7 +3801,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -3797,7 +3801,6 @@ __webpack_require__.r(__webpack_exports__);
}
if ( result ) {
console . log ( '验证结果:' , result )
if ( ! result . is _valid ) {
// 确保错误信息是数组格式
@ -3813,8 +3816,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -3813,8 +3816,6 @@ __webpack_require__.r(__webpack_exports__);
passwordStrength . value = result . strength || 0
passwordLevel . value = result . level || 0
console . log ( '设置密码强度:' , passwordStrength . value , '等级:' , passwordLevel . value )
// 更新要求满足状态
updateRequirements ( form . newPassword )
} else {
@ -3830,7 +3831,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -3830,7 +3831,6 @@ __webpack_require__.r(__webpack_exports__);
}
const updateRequirements = ( password ) => {
console . log ( 'updateRequirements 被调用,密码:' , password )
// 重置所有状态
requirements . length = false
@ -3865,14 +3865,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -3865,14 +3865,6 @@ __webpack_require__.r(__webpack_exports__);
}
}
console . log ( '字符类型检测结果:' , {
hasUppercase : hasUppercase ,
hasLowercase : hasLowercase ,
hasNumbers : hasNumbers ,
hasSpecial : hasSpecial ,
length : password . length
} )
// 更新要求状态
requirements . length = password . length >= 6 // 要求至少6位
requirements . uppercase = hasUppercase
@ -3891,15 +3883,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -3891,15 +3883,6 @@ __webpack_require__.r(__webpack_exports__);
const strength = calculatePasswordStrength ( password , charTypes )
passwordStrength . value = strength
passwordLevel . value = strength
console . log ( '更新后的要求状态:' , {
length : requirements . length ,
uppercase : requirements . uppercase ,
lowercase : requirements . lowercase ,
numbers : requirements . numbers ,
special : requirements . special
} )
console . log ( '计算出的密码强度:' , strength )
}
// 前端密码强度计算方法
@ -3953,6 +3936,11 @@ __webpack_require__.r(__webpack_exports__);
@@ -3953,6 +3936,11 @@ __webpack_require__.r(__webpack_exports__);
loading . value = true
// 清除之前的错误信息
Object . keys ( errors ) . forEach ( key => {
errors [ key ] = ''
} )
try {
const requestData = {
current _password : form . currentPassword ,
@ -3960,12 +3948,9 @@ __webpack_require__.r(__webpack_exports__);
@@ -3960,12 +3948,9 @@ __webpack_require__.r(__webpack_exports__);
confirm _password : form . confirmPassword
}
await _services _userService _ _WEBPACK _IMPORTED _MODULE _1 _ _ . userService . changePassword ( requestData )
// 成功
emit ( 'success' )
handleClose ( )
const response = await _services _userService _ _WEBPACK _IMPORTED _MODULE _1 _ _ . userService . changePassword ( requestData )
// 成功处理
// 显示成功消息
if ( window . showToast ) {
window . showToast ( {
@ -3973,21 +3958,62 @@ __webpack_require__.r(__webpack_exports__);
@@ -3973,21 +3958,62 @@ __webpack_require__.r(__webpack_exports__);
title : '密码修改成功' ,
content : '您的密码已成功修改'
} )
} else {
// 如果没有全局toast,使用alert作为后备
alert ( '密码修改成功!' )
}
// 延迟关闭弹窗,让用户看到成功提示
setTimeout ( ( ) => {
emit ( 'success' )
handleClose ( )
} , 1500 )
} catch ( error ) {
console . error ( '修改密码失败:' , error )
// 显示错误消息
if ( error . response ? . data ? . message ) {
if ( error . response . data . message . includes ( '当前密码不正确' ) ) {
errors . currentPassword = '当前密码不正确'
} else if ( error . response . data . message . includes ( '新密码不符合要求' ) ) {
errors . newPassword = error . response . data . message
} else {
errors . newPassword = error . response . data . message
// 改进错误信息处理
let errorMessage = '修改密码失败,请重试'
let targetField = 'newPassword'
if ( error . response ? . data ) {
const responseData = error . response . data
// 处理不同的错误情况
if ( responseData . error ) {
// 优先使用error字段,这通常包含具体的错误信息
errorMessage = responseData . error
// 根据错误信息内容判断应该显示在哪个字段
if ( errorMessage . includes ( '当前密码' ) || errorMessage . includes ( 'current password' ) ) {
targetField = 'currentPassword'
} else if ( errorMessage . includes ( '新密码' ) || errorMessage . includes ( 'new password' ) ) {
targetField = 'newPassword'
} else if ( errorMessage . includes ( '确认密码' ) || errorMessage . includes ( 'confirm password' ) ) {
targetField = 'confirmPassword'
}
} else if ( responseData . message ) {
// 如果没有error字段,使用message字段
errorMessage = responseData . message
// 根据错误信息内容判断应该显示在哪个字段
if ( errorMessage . includes ( '当前密码' ) || errorMessage . includes ( 'current password' ) ) {
targetField = 'currentPassword'
} else if ( errorMessage . includes ( '新密码' ) || errorMessage . includes ( 'new password' ) ) {
targetField = 'newPassword'
} else if ( errorMessage . includes ( '确认密码' ) || errorMessage . includes ( 'confirm password' ) ) {
targetField = 'confirmPassword'
}
}
} else {
errors . newPassword = '修改密码失败,请重试'
} else if ( error . message ) {
errorMessage = error . message
}
// 显示错误信息
errors [ targetField ] = errorMessage
// 如果是强制修改密码模式,错误信息也显示在newPassword字段
if ( props . isForceChange && targetField === 'currentPassword' ) {
errors . newPassword = errorMessage
}
} finally {
loading . value = false
@ -3997,23 +4023,8 @@ __webpack_require__.r(__webpack_exports__);
@@ -3997,23 +4023,8 @@ __webpack_require__.r(__webpack_exports__);
const handleClose = ( ) => {
if ( loading . value ) return
// 重置表单
form . currentPassword = ''
form . newPassword = ''
form . confirmPassword = ''
// 清除错误
Object . keys ( errors ) . forEach ( key => {
errors [ key ] = ''
} )
// 重置要求状态
Object . keys ( requirements ) . forEach ( key => {
requirements [ key ] = false
} )
passwordStrength . value = 0
passwordLevel . value = 0
// 使用统一的重置函数
resetFormState ( )
emit ( 'close' )
}
@ -4024,19 +4035,98 @@ __webpack_require__.r(__webpack_exports__);
@@ -4024,19 +4035,98 @@ __webpack_require__.r(__webpack_exports__);
// 只有通过明确的取消按钮或关闭按钮才能关闭
return false
}
const clearCurrentPasswordError = ( ) => {
errors . currentPassword = ''
}
const clearNewPasswordError = ( ) => {
errors . newPassword = ''
}
const clearConfirmPasswordError = ( ) => {
errors . confirmPassword = ''
}
const handleNewPasswordInput = ( ) => {
clearNewPasswordError ( )
validatePassword ( )
}
const handleConfirmPasswordInput = ( ) => {
clearConfirmPasswordError ( )
validateConfirmPassword ( )
}
// 监听器
; ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . watch ) ( ( ) => props . visible , ( newVal ) => {
if ( newVal ) {
console . log ( '模态框显示,开始加载密码策略' )
// 每次打开弹窗时,确保完全重置所有状态
resetFormState ( )
loadPasswordPolicy ( )
// 延迟测试输入框焦点和强制聚焦
; ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . nextTick ) ( ( ) => {
if ( ! props . isForceChange && form . currentPassword === '' ) {
// 尝试强制聚焦到第一个输入框
try {
const currentPasswordInput = document . querySelector ( 'input[type="password"]' )
if ( currentPasswordInput ) {
currentPasswordInput . focus ( )
}
} catch ( error ) {
console . error ( '聚焦失败:' , error )
}
} else {
// 尝试强制聚焦到新密码输入框
try {
const newPasswordInput = document . querySelectorAll ( 'input[type="password"]' ) [ 1 ]
if ( newPasswordInput ) {
newPasswordInput . focus ( )
}
} catch ( error ) {
console . error ( '聚焦失败:' , error )
}
}
} )
}
} )
// 重置表单状态的函数
const resetFormState = ( ) => {
// 重置表单数据
form . currentPassword = ''
form . newPassword = ''
form . confirmPassword = ''
// 清除所有错误信息
Object . keys ( errors ) . forEach ( key => {
errors [ key ] = ''
} )
// 重置密码要求状态
Object . keys ( requirements ) . forEach ( key => {
requirements [ key ] = false
} )
// 重置密码强度和等级
passwordStrength . value = 0
passwordLevel . value = 0
// 重置加载状态 - 这是关键!
loading . value = false
// 强制触发响应式更新
; ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . nextTick ) ( ( ) => {
} )
}
// 监听密码变化,实时更新要求状态
; ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . watch ) ( ( ) => form . newPassword , ( newPassword ) => {
if ( newPassword ) {
console . log ( '密码变化,更新要求状态:' , newPassword )
updateRequirements ( newPassword )
} else {
// 密码为空时重置所有状态
@ -4051,7 +4141,6 @@ __webpack_require__.r(__webpack_exports__);
@@ -4051,7 +4141,6 @@ __webpack_require__.r(__webpack_exports__);
// 生命周期
; ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . onMounted ) ( ( ) => {
console . log ( '组件挂载,检查是否需要加载密码策略' )
if ( props . visible ) {
loadPasswordPolicy ( )
}
@ -4080,7 +4169,13 @@ __webpack_require__.r(__webpack_exports__);
@@ -4080,7 +4169,13 @@ __webpack_require__.r(__webpack_exports__);
updateRequirements ,
handleSubmit ,
handleClose ,
handleOverlayClick
handleOverlayClick ,
clearCurrentPasswordError ,
clearNewPasswordError ,
clearConfirmPasswordError ,
handleNewPasswordInput ,
handleConfirmPasswordInput ,
resetFormState // 暴露重置函数
}
}
} ) ;
@ -5413,32 +5508,35 @@ const _hoisted_3 = {
@@ -5413,32 +5508,35 @@ const _hoisted_3 = {
key : 0 ,
class : "form-group"
}
const _hoisted _4 = {
const _hoisted _4 = [ "disabled" ]
const _hoisted _5 = {
key : 0 ,
class : "error-message"
}
const _hoisted _5 = { class : "form-group" }
const _hoisted _6 = {
const _hoisted _6 = { class : "form-group" }
const _hoisted _7 = [ "disabled" ]
const _hoisted _8 = {
key : 0 ,
class : "error-message"
}
const _hoisted _7 = { class : "password-strength" }
const _hoisted _8 = { class : "strength-bar" }
const _hoisted _9 = { class : "strength-text" }
const _hoisted _10 = { class : "password-requirements" }
const _hoisted _11 = { class : "form-group" }
const _hoisted _12 = {
const _hoisted _9 = { class : "password-strength" }
const _hoisted _10 = { class : "strength-bar" }
const _hoisted _11 = { class : "strength-text" }
const _hoisted _12 = { class : "password-requirements" }
const _hoisted _13 = { class : "form-group" }
const _hoisted _14 = [ "disabled" ]
const _hoisted _15 = {
key : 0 ,
class : "error-message"
}
const _hoisted _13 = { class : "form-actions" }
const _hoisted _14 = [ "disabled" ]
const _hoisted _15 = [ "disabled" ]
const _hoisted _16 = {
const _hoisted _16 = { class : "form-actions" }
const _hoisted _17 = [ "disabled" ]
const _hoisted _18 = [ "disabled" ]
const _hoisted _19 = {
key : 0 ,
class : "loading-spinner"
}
const _hoisted _17 = {
const _hoisted _20 = {
key : 1 ,
class : "force-change-notice"
}
@ -5448,11 +5546,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -5448,11 +5546,11 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , {
key : 0 ,
class : "password-modal-overlay" ,
onClick : _cache [ 10 ] || ( _cache [ 10 ] = ( ... args ) => ( $setup . handleOverlayClick && $setup . handleOverlayClick ( ... args ) ) )
onClick : _cache [ 11 ] || ( _cache [ 11 ] = ( ... args ) => ( $setup . handleOverlayClick && $setup . handleOverlayClick ( ... args ) ) )
} , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , {
class : "password-modal" ,
onClick : _cache [ 9 ] || ( _cache [ 9 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withModifiers ) ( ( ) => { } , [ "stop" ] ) )
onClick : _cache [ 10 ] || ( _cache [ 10 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withModifiers ) ( ( ) => { } , [ "stop" ] ) )
} , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _1 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "h3" , null , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . title ) , 1 /* TEXT */ ) ,
@ -5463,55 +5561,64 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -5463,55 +5561,64 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _2 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "form" , {
onSubmit : _cache [ 8 ] || ( _cache [ 8 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withModifiers ) ( ( ... args ) => ( $setup . handleSubmit && $setup . handleSubmit ( ... args ) ) , [ "prevent" ] ) )
onSubmit : _cache [ 9 ] || ( _cache [ 9 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withModifiers ) ( ( ... args ) => ( $setup . handleSubmit && $setup . handleSubmit ( ... args ) ) , [ "prevent" ] ) )
} , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 当前密码 " ) ,
( ! $props . isForceChange )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _3 , [
_cache [ 11 ] || ( _cache [ 11 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "当前密码 *" , - 1 /* CACHED */ ) ) ,
_cache [ 12 ] || ( _cache [ 12 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "当前密码 *" , - 1 /* CACHED */ ) ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withDirectives ) ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "input" , {
"onUpdate:modelValue" : _cache [ 1 ] || ( _cache [ 1 ] = $event => ( ( $setup . form . currentPassword ) = $event ) ) ,
type : "password" ,
required : "" ,
placeholder : "请输入当前密码" ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . currentPassword } )
} , null , 2 /* CLASS */ ) , [
onInput : _cache [ 2 ] || ( _cache [ 2 ] = ( ... args ) => ( $setup . clearCurrentPasswordError && $setup . clearCurrentPasswordError ( ... args ) ) ) ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . currentPassword } ) ,
disabled : $setup . loading ,
ref : "currentPasswordInput" ,
tabindex : "1" ,
autocomplete : "current-password"
} , null , 42 /* CLASS, PROPS, NEED_HYDRATION */ , _hoisted _4 ) , [
[ vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . vModelText , $setup . form . currentPassword ]
] ) ,
( $setup . errors . currentPassword )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _4 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . currentPassword ) , 1 /* TEXT */ ) )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _5 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . currentPassword ) , 1 /* TEXT */ ) )
: ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( "v-if" , true )
] ) )
: ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( "v-if" , true ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 新密码 " ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _5 , [
_cache [ 12 ] || ( _cache [ 12 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "新密码 *" , - 1 /* CACHED */ ) ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _6 , [
_cache [ 13 ] || ( _cache [ 13 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "新密码 *" , - 1 /* CACHED */ ) ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withDirectives ) ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "input" , {
"onUpdate:modelValue" : _cache [ 2 ] || ( _cache [ 2 ] = $event => ( ( $setup . form . newPassword ) = $event ) ) ,
"onUpdate:modelValue" : _cache [ 3 ] || ( _cache [ 3 ] = $event => ( ( $setup . form . newPassword ) = $event ) ) ,
type : "password" ,
required : "" ,
placeholder : "请输入新密码" ,
onInput : _cache [ 3 ] || ( _cache [ 3 ] = ( ... args ) => ( $setup . validatePassword && $setup . validatePassword ( ... args ) ) ) ,
onKeyup : _cache [ 4 ] || ( _cache [ 4 ] = $event => ( $setup . updateRequirements ( $setup . form . newPassword ) ) ) ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . newPassword } )
} , null , 34 /* CLASS, NEED_HYDRATION */ ) , [
onInput : _cache [ 4 ] || ( _cache [ 4 ] = ( ... args ) => ( $setup . handleNewPasswordInput && $setup . handleNewPasswordInput ( ... args ) ) ) ,
onKeyup : _cache [ 5 ] || ( _cache [ 5 ] = $event => ( $setup . updateRequirements ( $setup . form . newPassword ) ) ) ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . newPassword } ) ,
disabled : $setup . loading ,
ref : "newPasswordInput" ,
tabindex : "2" ,
autocomplete : "new-password"
} , null , 42 /* CLASS, PROPS, NEED_HYDRATION */ , _hoisted _7 ) , [
[ vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . vModelText , $setup . form . newPassword ]
] ) ,
( $setup . errors . newPassword )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _6 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . newPassword ) , 1 /* TEXT */ ) )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _8 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . newPassword ) , 1 /* TEXT */ ) )
: ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( "v-if" , true ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 密码强度指示器 " ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _7 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _8 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _9 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _10 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , {
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( [ "strength-fill" , $setup . strengthClass ] ) ,
style : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeStyle ) ( { width : $setup . strengthPercentage + '%' } )
} , null , 6 /* CLASS, STYLE */ )
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _9 , " 强度: " + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . strengthText ) + " (" + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . passwordLevel ) + "级) " , 1 /* TEXT */ )
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _11 , " 强度: " + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . strengthText ) + " (" + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . passwordLevel ) + "级) " , 1 /* TEXT */ )
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 密码要求提示 " ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _10 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _12 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , {
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( [ "requirement" , { 'met' : $setup . requirements . length } ] )
} , " ✓ 密码长度" + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . form . newPassword . length ) + "位 " , 3 /* TEXT, CLASS */ ) ,
@ -5530,44 +5637,48 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
@@ -5530,44 +5637,48 @@ function render(_ctx, _cache, $props, $setup, $data, $options) {
] )
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 确认新密码 " ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _11 , [
_cache [ 13 ] || ( _cache [ 13 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "确认新密码 *" , - 1 /* CACHED */ ) ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _13 , [
_cache [ 14 ] || ( _cache [ 14 ] = ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "label" , null , "确认新密码 *" , - 1 /* CACHED */ ) ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . withDirectives ) ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "input" , {
"onUpdate:modelValue" : _cache [ 5 ] || ( _cache [ 5 ] = $event => ( ( $setup . form . confirmPassword ) = $event ) ) ,
"onUpdate:modelValue" : _cache [ 6 ] || ( _cache [ 6 ] = $event => ( ( $setup . form . confirmPassword ) = $event ) ) ,
type : "password" ,
required : "" ,
placeholder : "请再次输入新密码" ,
onInput : _cache [ 6 ] || ( _cache [ 6 ] = ( ... args ) => ( $setup . validateConfirmPassword && $setup . validateConfirmPassword ( ... args ) ) ) ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . confirmPassword } )
} , null , 34 /* CLASS, NEED_HYDRATION */ ) , [
onInput : _cache [ 7 ] || ( _cache [ 7 ] = ( ... args ) => ( $setup . handleConfirmPasswordInput && $setup . handleConfirmPasswordInput ( ... args ) ) ) ,
class : ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . normalizeClass ) ( { 'error' : $setup . errors . confirmPassword } ) ,
disabled : $setup . loading ,
ref : "confirmPasswordInput" ,
tabindex : "3" ,
autocomplete : "new-password"
} , null , 42 /* CLASS, PROPS, NEED_HYDRATION */ , _hoisted _14 ) , [
[ vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . vModelText , $setup . form . confirmPassword ]
] ) ,
( $setup . errors . confirmPassword )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _12 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . confirmPassword ) , 1 /* TEXT */ ) )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _15 , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . errors . confirmPassword ) , 1 /* TEXT */ ) )
: ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( "v-if" , true )
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 操作按钮 " ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _13 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , _hoisted _16 , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "button" , {
type : "button" ,
class : "btn btn-secondary" ,
onClick : _cache [ 7 ] || ( _cache [ 7 ] = ( ... args ) => ( $setup . handleClose && $setup . handleClose ( ... args ) ) ) ,
onClick : _cache [ 8 ] || ( _cache [ 8 ] = ( ... args ) => ( $setup . handleClose && $setup . handleClose ( ... args ) ) ) ,
disabled : $setup . loading
} , " 取消 " , 8 /* PROPS */ , _hoisted _14 ) ,
} , " 取消 " , 8 /* PROPS */ , _hoisted _17 ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "button" , {
type : "submit" ,
class : "btn btn-primary" ,
disabled : $setup . loading || ! $setup . isFormValid
} , [
( $setup . loading )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "span" , _hoisted _16 ) )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "span" , _hoisted _19 ) )
: ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( "v-if" , true ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createTextVNode ) ( " " + ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . toDisplayString ) ( $setup . submitText ) , 1 /* TEXT */ )
] , 8 /* PROPS */ , _hoisted _15 )
] , 8 /* PROPS */ , _hoisted _18 )
] ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createCommentVNode ) ( " 强制修改密码提示 " ) ,
( $props . isForceChange )
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _17 , _cache [ 14 ] || ( _cache [ 14 ] = [
? ( ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . openBlock ) ( ) , ( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementBlock ) ( "div" , _hoisted _20 , _cache [ 15 ] || ( _cache [ 15 ] = [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , { class : "notice-icon" } , "⚠️ " , - 1 /* CACHED */ ) ,
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "div" , { class : "notice-text" } , [
( 0 , vue _ _WEBPACK _IMPORTED _MODULE _0 _ _ . createElementVNode ) ( "strong" , null , "重要提示:" ) ,
@ -8698,7 +8809,7 @@ __webpack_require__.r(__webpack_exports__);
@@ -8698,7 +8809,7 @@ __webpack_require__.r(__webpack_exports__);
/******/
/******/ /* webpack/runtime/getFullHash */
/******/ ( ( ) => {
/******/ _ _webpack _require _ _ . h = ( ) => ( "37a1d732559d3aaa " )
/******/ _ _webpack _require _ _ . h = ( ) => ( "7737269bf8e5d297 " )
/******/ } ) ( ) ;
/******/
/******/ /* webpack/runtime/hasOwnProperty shorthand */