diff --git a/src/_common b/src/_common index 05c1f59e..06dc841e 160000 --- a/src/_common +++ b/src/_common @@ -1 +1 @@ -Subproject commit 05c1f59ef27bea7da2fcfd09f98b0b838516d538 +Subproject commit 06dc841eb354f23b00fab18f33de38bf87453d88 diff --git a/src/sticky/_example/index.jsx b/src/sticky/_example/index.jsx index 1eead7d6..8ed2d521 100644 --- a/src/sticky/_example/index.jsx +++ b/src/sticky/_example/index.jsx @@ -4,7 +4,7 @@ import TDemoHeader from '../../../site/mobile/components/DemoHeader'; import './style/index.less'; import BaseDemo from './base'; -import OffsetTopDemo from './offsetTop'; +import OffsetTopDemo from './offset'; import ContainerDemo from './container'; export default function Base() { @@ -12,7 +12,7 @@ export default function Base() {
- + diff --git a/src/sticky/_example/offsetTop.jsx b/src/sticky/_example/offset.jsx similarity index 100% rename from src/sticky/_example/offsetTop.jsx rename to src/sticky/_example/offset.jsx diff --git a/src/sticky/sticky.en-US.md b/src/sticky/sticky.en-US.md new file mode 100644 index 00000000..f5ec663d --- /dev/null +++ b/src/sticky/sticky.en-US.md @@ -0,0 +1,16 @@ +:: BASE_DOC :: + +## API + + +### Sticky Props + +name | type | default | description | required +-- | -- | -- | -- | -- +className | String | - | className of component | N +style | Object | - | CSS(Cascading Style Sheets),Typescript:`React.CSSProperties` | N +container | String / Function | body | Typescript:`ScrollContainer`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N +disabled | Boolean | false | \- | N +offsetTop | String / Number | 0 | \- | N +zIndex | Number | 99 | \- | N +onScroll | Function | | Typescript:`(context: { scrollTop: number, isFixed: boolean }) => void`
Typescript:`TNode`。[see more ts definition](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N diff --git a/src/sticky/sticky.md b/src/sticky/sticky.md index ce2f3b81..3405914f 100644 --- a/src/sticky/sticky.md +++ b/src/sticky/sticky.md @@ -1,13 +1,14 @@ :: BASE_DOC :: ## API + ### Sticky Props -名称 | 类型 | 默认值 | 说明 | 必传 +名称 | 类型 | 默认值 | 描述 | 必传 -- | -- | -- | -- | -- className | String | - | 类名 | N style | Object | - | 样式,TS 类型:`React.CSSProperties` | N -container | String / Function | body | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer` | N +container | String / Function | body | 指定滚动的容器。数据类型为 String 时,会被当作选择器处理,进行节点查询。示例:'body' 或 () => document.body。TS 类型:`ScrollContainer`。[通用类型定义](https://github.com/Tencent/tdesign-mobile-react/blob/develop/src/common.ts) | N disabled | Boolean | false | 是否禁用组件 | N offsetTop | String / Number | 0 | 吸顶时与顶部的距离,单位`px` | N zIndex | Number | 99 | 吸顶时的 z-index | N diff --git a/src/sticky/style/index.js b/src/sticky/style/index.js index f75b026a..531cf765 100644 --- a/src/sticky/style/index.js +++ b/src/sticky/style/index.js @@ -1 +1 @@ -import '../../_common/style/mobile/components/sticky/_index.less'; +import '../../_common/style/mobile/components/sticky/_index.less'; \ No newline at end of file