修复(斗鱼履约): 保持角色名警告态文字可读

This commit is contained in:
yml
2026-11-20 13:04:53 +08:00
parent b1aa0d3cd2
commit a584e26016
3 changed files with 16 additions and 3 deletions
@@ -406,12 +406,12 @@ export default function DouyuFulfillmentPage() {
/> />
<label className="customer-collect-label">游戏角色名</label> <label className="customer-collect-label">游戏角色名</label>
<Input <Input
className="customer-collect-input" className={`customer-collect-input${roleNameIssue ? ' is-warning' : ''}`}
value={roleName} value={roleName}
onChange={(event) => setRoleName(event.target.value)} onChange={(event) => setRoleName(event.target.value)}
placeholder="请输入和平精英角色名" placeholder="请输入和平精英角色名"
maxLength={100} maxLength={100}
status={roleNameIssue ? 'warning' : undefined} aria-invalid={Boolean(roleNameIssue)}
aria-describedby="douyu-role-name-help" aria-describedby="douyu-role-name-help"
/> />
<p <p
@@ -574,6 +574,15 @@
color: #fbbf24; color: #fbbf24;
} }
.customer-auth-page.is-douyu .customer-collect-input.ant-input.is-warning,
.customer-auth-page.is-douyu .customer-collect-input.ant-input.is-warning:hover,
.customer-auth-page.is-douyu .customer-collect-input.ant-input.is-warning:focus {
background: #1b2436 !important;
border-color: #fbbf24 !important;
color: #fff !important;
box-shadow: 0 0 0 2px rgba(251, 191, 36, 0.16) !important;
}
.customer-auth-page.is-douyu .customer-collect-submit.ant-btn:hover, .customer-auth-page.is-douyu .customer-collect-submit.ant-btn:hover,
.customer-auth-page.is-douyu .customer-collect-submit.ant-btn:focus-visible { .customer-auth-page.is-douyu .customer-collect-submit.ant-btn:focus-visible {
color: #fff !important; color: #fff !important;
@@ -33,7 +33,11 @@ test('识别角色名中混入的 UID、区服和登录方式', () => {
test('客户填写时实时提示,并在提交前阻止混合资料', () => { test('客户填写时实时提示,并在提交前阻止混合资料', () => {
assert.ok(page.includes('const roleNameIssue = useMemo(() => getDouyuRoleNameIssue(roleName)')) assert.ok(page.includes('const roleNameIssue = useMemo(() => getDouyuRoleNameIssue(roleName)'))
assert.ok(page.includes("status={roleNameIssue ? 'warning' : undefined}")) assert.ok(
page.includes("className={`customer-collect-input${roleNameIssue ? ' is-warning' : ''}`}"),
)
assert.ok(page.includes('aria-invalid={Boolean(roleNameIssue)}'))
assert.ok(!page.includes("status={roleNameIssue ? 'warning' : undefined}"))
assert.ok(page.includes('{roleNameIssue || DOUYU_ROLE_NAME_FORMAT_HINT}')) assert.ok(page.includes('{roleNameIssue || DOUYU_ROLE_NAME_FORMAT_HINT}'))
assert.ok(page.includes('if (roleNameIssue) {')) assert.ok(page.includes('if (roleNameIssue) {'))
}) })