Skip to content

feat: 添加 u-input 组件禁用状态样式#155

Merged
anyup merged 5 commits into
anyup:masterfrom
1361176289:master
May 14, 2026
Merged

feat: 添加 u-input 组件禁用状态样式#155
anyup merged 5 commits into
anyup:masterfrom
1361176289:master

Conversation

@1361176289

@1361176289 1361176289 commented May 13, 2026

Copy link
Copy Markdown
Contributor

Description

本 PR 包含以下两个修复:

  1. 【问题反馈】input输入框设置disabled属性时,样式看不出是置灰禁用状态 #154u-input 组件添加 disabled 状态样式支持
  2. IndexList组件点击右侧索引字母弹出的却不是点击字母? #152 修复索引列表侧边栏滑动计算错误问题

Changes

u-input disabled 样式支持

  • 新增 u-input--disabled class
  • 添加禁用状态样式逻辑

索引列表滑动修复

  • 修复侧边栏滑动过程中索引计算异常问题
  • 优化滑动定位逻辑

Testing

  • 已在 uniapp 项目中进行测试
  • 验证 disabled 状态显示正常
  • 验证索引列表滑动行为正常
image image

添加 u-input--disabled 类及对应样式,使禁用状态下输入框与文本域呈现灰色背景与文字颜
@netlify

netlify Bot commented May 13, 2026

Copy link
Copy Markdown

Deploy Preview for h5-uview-pro ready!

Name Link
🔨 Latest commit 8730821
🔍 Latest deploy log https://app.netlify.com/projects/h5-uview-pro/deploys/6a056a68b89caa0008ee1cca
😎 Deploy Preview https://deploy-preview-155--h5-uview-pro.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@anyup anyup left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

--u-disabled-color 这个色值目前没有,在theme.scss中挑选合适的禁用色值,不要使用硬编码色值

@anyup anyup left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这样修改,副作用很多,内部都是以children做的处理,导致不同步,这个先不用改了~

- 阻止禁用状态下触发 click 事件
- 更新禁用状态背景色变量
- 修复禁用状态下输入框和文本域的缩进及样式
@anyup anyup merged commit 1145d99 into anyup:master May 14, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants