修复密码输入问题

This commit is contained in:
al 2024-11-14 20:04:20 +08:00
parent 18f9cf3ec8
commit fa72994ba1
4 changed files with 10 additions and 3 deletions

View File

@ -416,6 +416,7 @@ function Login({ handleLogin }) {
placeholder="请输入密码" placeholder="请输入密码"
name="password" name="password"
type="password" type="password"
maxLength={15}
onChange={(value) => { onChange={(value) => {
setLoginInfo({ ...loginInfo, password: value }); setLoginInfo({ ...loginInfo, password: value });
}} }}

View File

@ -169,7 +169,6 @@ export default function SpaceRefund() {
placeholder="请输入联系方式" placeholder="请输入联系方式"
onChange={(value) => setContact(value)} onChange={(value) => setContact(value)}
value={contact} value={contact}
maxLength={20}
className="bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2" className="bg-[#FFFFFF1A] text-white rounded-2xl mt-2 p-2"
style={{ style={{
"--placeholder-color": "#FFFFFF80", "--placeholder-color": "#FFFFFF80",

View File

@ -15,6 +15,7 @@ export default function OwnInput({
className, className,
inputClassName = "", inputClassName = "",
id, id,
maxLength = 999,
}) { }) {
return ( return (
<div className={`flex flex-1 relative ${className}`}> <div className={`flex flex-1 relative ${className}`}>
@ -24,7 +25,7 @@ export default function OwnInput({
disabled={disabled} disabled={disabled}
name={name} name={name}
type={type} type={type}
maxLength={11} maxLength={maxLength}
onChange={(e) => onChange(e.target?.value)} onChange={(e) => onChange(e.target?.value)}
value={value} value={value}
className={`w-full placeholder:text-[#FFFFFF80] text-[16px] focus:text-[16px] ${inputClassName}`} className={`w-full placeholder:text-[#FFFFFF80] text-[16px] focus:text-[16px] ${inputClassName}`}

View File

@ -1,3 +1,4 @@
import { Toast } from "antd-mobile";
//格式化时间戳 //格式化时间戳
export function formatDeadline(timestamp) { export function formatDeadline(timestamp) {
const date = new Date(timestamp * 1000); // 时间戳以秒为单位需要乘以1000转换成毫秒 const date = new Date(timestamp * 1000); // 时间戳以秒为单位需要乘以1000转换成毫秒
@ -144,7 +145,12 @@ export function getVideoBase64(url) {
// 监听视频事件,在发生错误时 Promise 会 reject // 监听视频事件,在发生错误时 Promise 会 reject
video.addEventListener("error", function () { video.addEventListener("error", function () {
reject(new Error("视频加载错误")); // reject(new Error("视频加载错误"));
Toast.show({
icon: "fail",
content: "请更换浏览器IOS用户建议使用Safari。",
position: "top",
});
// 清除内存 // 清除内存
canvas.remove(); canvas.remove();
video.remove(); video.remove();