瀏覽代碼

update

tags/Baseline_30082024_FRONTEND_UAT
MSI\derek 1 年之前
父節點
當前提交
78d4437c19
共有 1 個文件被更改,包括 4 次插入10 次删除
  1. +4
    -10
      src/components/ChangePassword/ChangePasswordForm.tsx

+ 4
- 10
src/components/ChangePassword/ChangePasswordForm.tsx 查看文件

@@ -93,11 +93,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
}
});
};

if (!/[-!@#$%^&=+_*(),.?":{}|<>]/.test('12')) {
console.log(!/[-!@#$%^&=+_*(),.?":{}|<>]/.test('12'))
}

const handleInputChange = (event: React.ChangeEvent<HTMLInputElement>) => {
// Update the theme with the new color based on the input value
const newInputValue = event.target.value;
@@ -191,9 +187,7 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
component: (props) => {
return (
<FormHelperText {...props}>
{(props.children as string[]).map((line, index) => {
console.log(index, getColorFromInput(inputValue, msgList)[index])
return (
{(props.children as string[]).map((line, index) => (
<span
key={index}
style={{
@@ -210,11 +204,11 @@ const ChagnePasswordForm: React.FC<PasswordRulesProps> = ({ pwRules:rules }) =>
)}
{line}
{index <
(props.children as string[]).length && (
(props.children as string[]).length - 1 && (
<br />
)}
</span>
)}
)
)}
</FormHelperText>
);


Loading…
取消
儲存