From 583581fbee35e213dfeacc2db4a98ec21a6a4c08 Mon Sep 17 00:00:00 2001 From: nemo-shen Date: Tue, 7 Sep 2021 10:05:43 +0800 Subject: [PATCH] docs(IndexBar): add Q&A (#4459) * docs(IndexBar): add Q&A * docs(IndexBar): update doc --- packages/index-bar/README.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/packages/index-bar/README.md b/packages/index-bar/README.md index 1cdd296f..82811a30 100644 --- a/packages/index-bar/README.md +++ b/packages/index-bar/README.md @@ -105,3 +105,12 @@ Page({ | 名称 | 说明 | | ---- | -------------------------------- | | - | 锚点位置显示内容,默认为索引字符 | + + +## 常见问题 + +### 嵌套在滚动元素中 IndexAnchor 失效? + +由于 `` 内部使用 wx.pageScrollTo 滚动到指定位置,因此只支持页面级滚动,无法在滚动元素中嵌套使用,例如:`view` 使用 `overflow: scroll;` 或者 `scroll-view`, +具体可查看[微信小程序文档](https://developers.weixin.qq.com/miniprogram/dev/api/ui/scroll/wx.pageScrollTo.html)。 +历史issue: [#4252](https://github.com/youzan/vant-weapp/issues/4252)