Skip to content

Commit

Permalink
docs: 修改 input、textarea 注意事项
Browse files Browse the repository at this point in the history
  • Loading branch information
zhetengbiji committed May 13, 2020
1 parent aa9c752 commit 0645dbb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/component/input.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
**Tips**

- `input` 事件处理函数可以直接 return 一个字符串,将替换输入框的内容。仅微信小程序支持。
- `input` 事件处理函数内实时修改当前值不生效,可以延迟设置,例如:``setTimeout(() => { this.value = 100 }, 0)``
- 如果遇到 value 属性设置不生效的问题参考:[组件属性设置不生效解决办法](/use?id=%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
- `input` 组件上有默认的 `min-height` 样式,如果 `min-height` 的值大于 `height` 的值那么 `height` 样式无效。

**type 有效值**
Expand Down
2 changes: 1 addition & 1 deletion docs/component/textarea.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ export default {
**Tips**

- textarea 的 blur 事件会晚于页面上的 tap 事件,如果需要在 button 的点击事件获取 textarea,可以使用 form 的 @submit
- `input` 事件处理函数内实时修改当前值不生效,可以延迟设置,例如:``setTimeout(() => { this.value = 100 }, 0)``
- 如果遇到 value 属性设置不生效的问题参考:[组件属性设置不生效解决办法](/use?id=%E5%B8%B8%E8%A7%81%E9%97%AE%E9%A2%98)
- 微信小程序、百度小程序、字节跳动小程序中,textarea是原生组件,层级高于前端组件,请勿在 scroll-view、swiper、picker-view、movable-view 中使用 textarea 组件。覆盖textarea需要使用cover-view。[详见](/component/native-component)
- 小程序端 css 动画对 textarea 组件无效。
- H5 平台只能在用户交互时修改 focus 生效。
Expand Down
1 change: 1 addition & 0 deletions docs/use.md
Original file line number Diff line number Diff line change
Expand Up @@ -574,6 +574,7 @@ export default {
},
methods: {
scroll: function(e) {
// 如果使用此方法,请自行增加防抖处理
this.scrollTop = e.detail.scrollTop
},
goTop: function(e) {
Expand Down

0 comments on commit 0645dbb

Please sign in to comment.