Skip to content

Commit b822ed9

Browse files
docs(Sticky): add string type to container att (#805)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
1 parent 595ad76 commit b822ed9

File tree

5 files changed

+6
-4
lines changed

5 files changed

+6
-4
lines changed

db/TDesign.db

0 Bytes
Binary file not shown.

packages/products/tdesign-mobile-vue/src/sticky/props.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { PropType } from 'vue';
1010
export default {
1111
/** 指定容器对应的NodesRef节点为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置 */
1212
container: {
13-
type: Object as PropType<TdStickyProps['container']>,
13+
type: [String, Object] as PropType<TdStickyProps['container']>,
1414
},
1515
/** 是否禁用组件 */
1616
disabled: Boolean,

packages/products/tdesign-mobile-vue/src/sticky/sticky.en-US.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@
66

77
name | type | default | description | required
88
-- | -- | -- | -- | --
9-
container | Object | - | Typescript`Element` | N
9+
container | String / Object | - | Typescript: `Element` | N
1010
disabled | Boolean | false | \- | N
1111
offsetTop | String / Number | 0 | \- | N
1212
zIndex | Number | 99 | \- | N
13-
onScroll | Function | | Typescript`(context: { scrollTop: number, isFixed: boolean }) => void`<br/> | N
13+
onScroll | Function | | Typescript: `(context: { scrollTop: number, isFixed: boolean }) => void`<br/> | N
1414

1515
### Sticky Events
1616

packages/products/tdesign-mobile-vue/src/sticky/sticky.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
名称 | 类型 | 默认值 | 描述 | 必传
88
-- | -- | -- | -- | --
9-
container | Object | - | 指定容器对应的NodesRef节点为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置。TS 类型:`Element` | N
9+
container | String / Object | - | 指定容器对应的NodesRef节点为组件的外部容器,滚动时组件会始终保持在容器范围内,当组件即将超出容器底部时,会返回原位置。TS 类型:`Element` | N
1010
disabled | Boolean | false | 是否禁用组件 | N
1111
offsetTop | String / Number | 0 | 吸顶时与顶部的距离,单位`px` | N
1212
zIndex | Number | 99 | 吸顶时的 z-index | N

packages/scripts/api.json

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115451,6 +115451,7 @@
115451115451
"field_category": 1,
115452115452
"field_name": "container",
115453115453
"field_type": [
115454+
"1",
115454115455
"8"
115455115456
],
115456115457
"field_default_value": "",
@@ -115476,6 +115477,7 @@
115476115477
"Vue(Mobile)"
115477115478
],
115478115479
"field_type_text": [
115480+
"String",
115479115481
"Object"
115480115482
]
115481115483
},

0 commit comments

Comments
 (0)