提交 59d427d3 编写于 作者: D dolymood

docs(bs): fix link

上级 64297f2c
......@@ -6,6 +6,6 @@ This module exports a default function called `BetterScroll`, for more informat
About better-scroll:
- [Home](https://ustbhuangyi.github.io/better-scroll/#/)
- [Home](https://better-scroll.github.io/docs-v1/#/)
- [Example](https://ustbhuangyi.github.io/better-scroll/#/examples/en)
- [Example](https://better-scroll.github.io/docs-v1/#/examples/en)
......@@ -231,7 +231,7 @@
| data | data to be displayed | Array | [] |
| navbar | whether need navbar | Boolean | true |
| speed | when click the navigator, the transition time of scrolling to the specific anchor (unit: ms). | number | 0 |
| options<sup>1.9.8+</sup> | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>}<br>`Notice`: After `1.12.38`, as [BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| options<sup>1.9.8+</sup> | the options of better-scroll, you could find details at [BS Document](https://better-scroll.github.io/docs-v1/doc/en/options.html) | Object | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>}<br>`Notice`: After `1.12.38`, as [BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| pullUpLoad<sup>1.8.0+</sup> | pull-up-load, the detail config is same as the `options.pullUpLoad` of Scroll. `Deprecated`, please use the property `options` instead. | Boolean/Object | false |
| pullDownRefresh<sup>1.8.0+</sup> | pull-down-refresh, the detail config is same as the `options.pullDownRefresh` of Scroll. `Deprecated`, please use the property `options` instead. | Boolean/Object | false |
......
......@@ -143,4 +143,4 @@ For details, see [create-api module](#/en-US/docs/create-api)。
[better-scroll](https://github.com/ustbhuangyi/better-scroll) is a library in `cube-ui`'s dependencies. To avoid duplicately importing, we expose the module.
For more detailed use, please refer to [official documentation](https://ustbhuangyi.github.io/better-scroll/)
For more detailed use, please refer to [official documentation](https://better-scroll.github.io/docs-v1/)
......@@ -112,7 +112,7 @@ Scroll navigation bar component, like DiDi business navigation.
| labels | the collection if all the item's keys | Array | - | [] |
| txts | the text of showcases, it's order is correspondence with `labels`, the item can be a HTML string value | Array | - | default equals to `labels` Prop |
| current | the key of the active item | String/Number | - | '' |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {}<br>`Notice`: After `1.12.38`, as [BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| options | the options of better-scroll, you could find details at [BS Document](https://better-scroll.github.io/docs-v1/doc/en/options.html) | Object | - | {}<br>`Notice`: After `1.12.38`, as [BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
### Slot
......
......@@ -146,7 +146,7 @@ ScrollNav component. You can use it to sticky your navigation bar and content.
| side | If set to `true` then the navigation bar will be at the side position | Boolean | true/false | false |
| current | the default navigation value(label of panel) | String/Number | - | '' |
| speed | speed of navigating to target panel | Number | - | 300 |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {}<br>`Notice`: After `1.12.38`, as [BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| options | the options of better-scroll, you could find details at [BS Document](https://better-scroll.github.io/docs-v1/doc/en/options.html) | Object | - | {}<br>`Notice`: After `1.12.38`, as [BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
#### CubeScrollNavPanel
......
......@@ -86,7 +86,7 @@ Seven sample code to quickly understand how to use the Scroll component.
display: inline-block
```
> **Note**:1. As the scrolling principle above, the CSS style setting here is required, and scrolling is possible only when the scrolling content is wider than the container width. 2. Sometimes we want to use the `Scroll` component to simulate the horizontal scroll, vertically retaining the browser's native scrolling, or vice versa. At this point you need to pass the better-scroll configuration item [eventPassthrough](http://ustbhuangyi.github.io/better-scroll/doc/en/options.html#eventpassthrough)
> **Note**:1. As the scrolling principle above, the CSS style setting here is required, and scrolling is possible only when the scrolling content is wider than the container width. 2. Sometimes we want to use the `Scroll` component to simulate the horizontal scroll, vertically retaining the browser's native scrolling, or vice versa. At this point you need to pass the better-scroll configuration item [eventPassthrough](https://better-scroll.github.io/docs-v1/doc/en/options.html#eventpassthrough)
Here giving a brief explanation of the style settings. `list-item` items with `display: inline-block` lead to all `list-item` elements showing on one line. `list-wrapper` adds `white-space: nowrap` hope `list-item` also showing on one line when reaching the outer element boundary. And the most important is setting `cube-scroll-content` with `display: inline-block`, which make the width of `cube-scroll-content` bigger enough so that `cube-scroll-content` can wrap descendants elements. Styles with the same properties are floating elements and absolutely positioned elements. When no specific width is set, the width is the minimum width of the wrapped descendant element.
......@@ -411,7 +411,7 @@ Scroll components can meet the scrolling needs of most mobile applications. In t
| - | - | - | - | - |
| data | data used for list rendering | Array | - | [] |
| direction | scrolling direction | String | 'vertical', 'horizontal' | 'vertical' |
| options | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/en/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>}<br>`Notice`: After `1.12.38`, as [BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| options | the options of better-scroll, you could find details at [BS Document](https://better-scroll.github.io/docs-v1/doc/en/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>}<br>`Notice`: After `1.12.38`, as [BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) `iOS13.4` issue [#978](https://github.com/ustbhuangyi/better-scroll/issues/978), we set `useTransition` to `fasle` by default |
| scrollEvents<sup>1.9.0</sup> | configure which scroll events need be triggered | Array | could include: 'scroll', 'before-scroll-start', 'scroll-end' | [] |
| listenScroll | whether to dispatch scroll event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |
| listenBeforeScroll | whether to dispatch before-scroll-start event. `Deprecated`, please use the property `scroll-events` instead. | Boolean | true/false | false |
......
......@@ -187,7 +187,7 @@
| autoPlay | whether to play automatically | Boolean | true/false | true |
| interval | interval of play | Number | - | 4000 |
| direction | slide direction | String | horizontal/vertical | horizontal |
| options<sup>1.9.0</sup> | the options of better-scroll, you could find details at [BS Document](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {<br> momentum: false,<br> click: true,<br> observeDOM: false<br>} |
| options<sup>1.9.0</sup> | the options of better-scroll, you could find details at [BS Document](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | - | {<br> momentum: false,<br> click: true,<br> observeDOM: false<br>} |
| threshold | sliding threshold of switching pages | Number | (0, 1) | 0.3 |
| speed | speed of switching pages | Number | - | 400 |
| allowVertical | whether to allow vertical scrolling. `Deprecated`, please use the property `options` instead. | Boolean | true/false | false |
......
......@@ -6,6 +6,6 @@
关于 better-scroll 详细的文档以及示例,请参考:
- [官方文档](https://ustbhuangyi.github.io/better-scroll/#/zh)
- [官方文档](https://better-scroll.github.io/docs-v1/)
- [官方示例](https://ustbhuangyi.github.io/better-scroll/#/examples/zh)
- [官方示例](https://better-scroll.github.io/docs-v1/#/examples/zh)
......@@ -231,7 +231,7 @@
| data | 需要展示的数据 | Array | [] |
| navbar | 是否需要导航栏 | Boolean | true |
| speed | 点击导航栏索引时,滚动到相应位置的动画时间(单位:ms) | number | 0 |
| options<sup>1.9.8+</sup> | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
| options<sup>1.9.8+</sup> | better-scroll 配置项,具体请参考[BS 官方文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
| pullUpLoad<sup>1.8.0+</sup> | 上拉加载,具体配置参考 scroll 组件的 `options.pullUpLoad``即将废弃`,推荐使用 `options` 属性 | Boolean/Object | false |
| pullDownRefresh<sup>1.8.0+</sup> | 下拉刷新,具体配置参考 scroll 组件的 `options.pullDownRefresh``即将废弃`,推荐使用 `options` 属性 | Boolean/Object | false |
......
......@@ -110,7 +110,7 @@
| labels | 所有的 key 值集合 | Array | - | [] |
| txts | 显示所有文案集合,和 labels 一一对应,每项可以是 HTML 字符串 | Array | - | 默认等于 labes |
| current | 当前 active 的 key 值 | String/Number | - | '' |
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | - | {} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
### 插槽
......
......@@ -146,7 +146,7 @@
| side | 是否是侧边样式 | Boolean | true/false | false |
| current | 当前导航 active 项的 key 值 | String/Number | - | '' |
| speed | 点击导航切换到指定位置的速度 | Number | - | 300 |
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978) |
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | - | {} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978) |
#### CubeScrollNavPanel
......
......@@ -86,7 +86,7 @@
display: inline-block
```
> **注意**:1. 由上面的滚动原理可知,这里的 CSS 样式设置是必须的,只有在滚动内容的宽度大于容器宽度时才可滚动。2. 有时候我们希望横向滚动使用`Scroll`组件来模拟,纵向保留浏览器原生滚动,或者相反的情况。这时你需要传递 better-scroll 配置项 [eventPassthrough](http://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html#eventpassthrough)。
> **注意**:1. 由上面的滚动原理可知,这里的 CSS 样式设置是必须的,只有在滚动内容的宽度大于容器宽度时才可滚动。2. 有时候我们希望横向滚动使用`Scroll`组件来模拟,纵向保留浏览器原生滚动,或者相反的情况。这时你需要传递 better-scroll 配置项 [eventPassthrough](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html#eventpassthrough)。
这里对样式的设定做简要的解释,为`list-item`元素添加`display: inline-block`是希望元素能够不换行,单行显示。`list-wrapper`添加`white-space: nowrap`是希望遇到父元素边界,依然不换行。另外,关键是`cube-scroll-content`元素添加`display: inline-block`样式,此时`cube-scroll-content`元素的宽度为能够包裹子孙元素的最小宽度,即为连续内联`list-item`元素的宽度之和子元素的最大宽度。具有同样性质的样式还有,浮动元素和绝对定位元素,在不设置具体宽度时,其宽度为包裹子孙元素的最小宽度。
......@@ -412,7 +412,7 @@
| - | - | - | - | - |
| data | 用于列表渲染的数据 | Array | - | [] |
| direction | 滚动方向 | String | 'vertical', 'horizontal' | 'vertical' |
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
| options | better-scroll 配置项,具体请参考[BS 官方文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | - | {<br> observeDOM: true,<br> click: true,<br> probeType: 1,<br> scrollbar: false,<br> pullDownRefresh: false,<br> pullUpLoad: false<br>} <br>`注意`:从`1.12.38`版本开始,因修复[BS](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html)`iOS13.4`版本的滚动问题,`useTransition`在iOS版本>=13.4时默认为`fasle`<br>具体请参考[#978](https://github.com/ustbhuangyi/better-scroll/issues/978)|
| scrollEvents<sup>1.9.0</sup> | 配置需要派发的 scroll 事件 | Array | 可包含子项:'scroll', 'before-scroll-start', 'scroll-end' | [] |
| listenScroll | 是否派发 scroll 事件。`即将废弃`,推荐使用 `scroll-events` 属性 | Boolean | true/false | false |
| listenBeforeScroll | 是否派发 before-scroll-start 事件。`即将废弃`,推荐使用 `scroll-events` 属性 | Boolean | true/false | false |
......@@ -481,4 +481,4 @@
| 属性名 | 说明 |
| - | - |
| scroll | 可以通过该属性获得内部实现滚动核心的 BScoll 实例,从而获得更多 BScoll 的底层能力,如监听`touchEnd`事件,获得滚动中的中间状态等,具体可查看[ better-scroll 文档](http://ustbhuangyi.github.io/better-scroll/doc/zh-hans/) |
| scroll | 可以通过该属性获得内部实现滚动核心的 BScoll 实例,从而获得更多 BScoll 的底层能力,如监听`touchEnd`事件,获得滚动中的中间状态等,具体可查看[ better-scroll 文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/) |
......@@ -185,7 +185,7 @@
| autoPlay | 是否自动播放 | Boolean | true/false | true |
| interval | 播放间隔 | Number | - | 4000 |
| direction | 轮播方向 | String | horizontal/vertical | horizontal |
| options<sup>1.9.0</sup> | better-scroll 配置项,具体请参考[BS 官方文档](https://ustbhuangyi.github.io/better-scroll/doc/zh-hans/options.html) | Object | - | {<br> momentum: false,<br> click: true,<br> observeDOM: false<br>} |
| options<sup>1.9.0</sup> | better-scroll 配置项,具体请参考[BS 官方文档](https://better-scroll.github.io/docs-v1/doc/zh-hans/options.html) | Object | - | {<br> momentum: false,<br> click: true,<br> observeDOM: false<br>} |
| threshold | 切换页面的滑动阈值 | Number | (0, 1) | 0.3 |
| speed | 切换页面的速度 | Number | - | 400 |
| allowVertical | 是否允许竖向滚动。`即将废弃`,推荐使用 `options` 属性 | Boolean | true/false | false |
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册