Skip to content

Commit 5492037

Browse files
rayhomieshijia.sjdennis.zpf
authored
Docs new dev (#1307)
* feat: 删除何时使用 * fix: 修改翻译 * feat: check lastset * fix: sticky initHeaderHeight --------- Co-authored-by: shijia.sj <[email protected]> Co-authored-by: dennis.zpf <[email protected]>
1 parent a819df4 commit 5492037

File tree

33 files changed

+32
-106
lines changed

33 files changed

+32
-106
lines changed

compiled/alipay/demo/pages/Card/index.axml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
title="标题"
2828
className="card-title-radius {{titleSticky ? 'card-demo-sticky' : ''}}"
2929
headSticky="{{true}}"
30-
stickyTop="{{0}}"
30+
stickyTop="{{100}}"
3131
stickyTransparentTitle="{{false}}"
3232
onTitleSticky="handleTitleSticky"
3333
>

compiled/alipay/demo/pages/Sticky/index.axml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
<view class="navigation-bar"></view>
22
<ant-container title="基础用法">
3-
<ant-sticky>
3+
<ant-sticky transparentTitle>
44
<view>
55
我会吸顶
66
</view>
77
</ant-sticky>
88
</ant-container>
99
<ant-container title="指定吸顶高度">
10-
<ant-sticky top="100px">
10+
<ant-sticky top="200px">
1111
<view>
12-
我会吸顶在距离顶部 100px 的地方
12+
我会吸顶在距离顶部 200px 的地方
1313
</view>
1414
</ant-sticky>
1515
</ant-container>
1616
<view style="height: 200px;"></view>
1717
<ant-container title="感知是否吸顶">
1818
<ant-sticky
19-
top="180px"
19+
top="300px"
2020
check
2121
onStickyChange="handleStickyChange"
2222
>
2323
<view>
24-
<view>我会吸顶在距离顶部 180px 的地方</view>
24+
<view>我会吸顶在距离顶部 300px 的地方</view>
2525
<view>是否吸上了 {{stickyStatus}}</view>
2626
</view>
2727
</ant-sticky>

compiled/alipay/src/Dialog/index.en.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog
1111

12-
## When to use
13-
1412
When the application needs to alert or remind the current operation behavior of the user, the dialog box may be used. The user needs to operate on the dialog box before ending.
1513

1614
## Introduction

compiled/alipay/src/Dialog/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog 对话框
1111

12-
## 何时使用
13-
1412
当应用中需要比较明显的对用户当前的操作行为进行警示或提醒时,可以使用对话框。用户需要针对对话框进行操作后方可结束。
1513

1614
## 引入

compiled/alipay/src/NoticeBar/index.en.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar
1111

12-
Shows a set of message notifications.
13-
14-
## When to use
15-
16-
For the notification of information in the current page, it is a more eye-catching way of notification in the page.
12+
Shows a set of message notifications. Usually used for the notification of information in the current page, is a more eye-catching in-page notification.
1713

1814
## Introduction
1915

compiled/alipay/src/NoticeBar/index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar 通告栏
1111

12-
展示一组消息通知。
13-
14-
## 何时使用
15-
16-
用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
12+
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
1713

1814
## 引入
1915

compiled/alipay/src/SafeArea/index.en.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea
11-
12-
## When to use
13-
1411
When the web page is displayed in full screen, the top and bottom of the screen can be adapted by means of a safe zone, such as a bang screen.
1512

1613
## Introduction

compiled/alipay/src/SafeArea/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea 安全区
11-
12-
## 何时使用
13-
1411
当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。
1512

1613
## 引入

compiled/alipay/src/Sticky/index.en.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc: 'content'
88
---
99

1010
# Sticky
11-
12-
## When to use
13-
14-
Need to be adsorbed in some places in the rolling situation.
11+
Used in cases where it is necessary to adsorb in some places during rolling.
1512

1613
## Precautions
1714

compiled/alipay/src/Sticky/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc: 'content'
88
---
99

1010
# Sticky 粘性吸附
11-
12-
## 何时使用
13-
14-
需要在滚动中吸附在某些地方的情况。
11+
用在需要在滚动中吸附在某些地方的情况。
1512

1613
## 注意事项
1714

compiled/alipay/src/Sticky/index.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,6 @@ Component(
6565
'sticky',
6666
'headerHeight',
6767
]);
68-
this.initHeaderHeight(headerHeight);
6968
if (sticky !== nextProps.sticky) {
7069
// 考虑到这个还是有点性能开销,用个属性控制
7170
if (nextProps.check && !this.stickyIO) {

compiled/wechat/demo/pages/Card/index.wxml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
title="标题"
2424
className="card-title-radius {{titleSticky ? 'card-demo-sticky' : ''}}"
2525
headSticky="{{true}}"
26-
stickyTop="{{0}}"
26+
stickyTop="{{100}}"
2727
stickyTransparentTitle="{{false}}"
2828
bind:titlesticky="handleTitleSticky"
2929
>

compiled/wechat/demo/pages/Sticky/index.wxml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
<view class="navigation-bar"></view>
22
<ant-container title="基础用法">
3-
<ant-sticky>
3+
<ant-sticky transparentTitle>
44
<view>我会吸顶</view>
55
</ant-sticky>
66
</ant-container>
77
<ant-container title="指定吸顶高度">
8-
<ant-sticky top="100px">
9-
<view>我会吸顶在距离顶部 100px 的地方</view>
8+
<ant-sticky top="200px">
9+
<view>我会吸顶在距离顶部 200px 的地方</view>
1010
</ant-sticky>
1111
</ant-container>
1212
<view style="height: 200px;"></view>
1313
<ant-container title="感知是否吸顶">
1414
<ant-sticky
15-
top="180px"
15+
top="300px"
1616
check
1717
bind:stickychange="handleStickyChange"
1818
>
1919
<view>
20-
<view>我会吸顶在距离顶部 180px 的地方</view>
20+
<view>我会吸顶在距离顶部 300px 的地方</view>
2121
<view>是否吸上了{{stickyStatus}}</view>
2222
</view>
2323
</ant-sticky>

compiled/wechat/src/Dialog/index.en.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog
1111

12-
## When to use
13-
1412
When the application needs to alert or remind the current operation behavior of the user, the dialog box may be used. The user needs to operate on the dialog box before ending.
1513

1614
## Introduction

compiled/wechat/src/Dialog/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog 对话框
1111

12-
## 何时使用
13-
1412
当应用中需要比较明显的对用户当前的操作行为进行警示或提醒时,可以使用对话框。用户需要针对对话框进行操作后方可结束。
1513

1614
## 引入

compiled/wechat/src/NoticeBar/index.en.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar
1111

12-
Shows a set of message notifications.
13-
14-
## When to use
15-
16-
For the notification of information in the current page, it is a more eye-catching way of notification in the page.
12+
Shows a set of message notifications. Usually used for the notification of information in the current page, is a more eye-catching in-page notification.
1713

1814
## Introduction
1915

compiled/wechat/src/NoticeBar/index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar 通告栏
1111

12-
展示一组消息通知。
13-
14-
## 何时使用
15-
16-
用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
12+
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
1713

1814
## 引入
1915

compiled/wechat/src/SafeArea/index.en.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea
11-
12-
## When to use
13-
1411
When the web page is displayed in full screen, the top and bottom of the screen can be adapted by means of a safe zone, such as a bang screen.
1512

1613
## Introduction

compiled/wechat/src/SafeArea/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea 安全区
11-
12-
## 何时使用
13-
1411
当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。
1512

1613
## 引入

compiled/wechat/src/Sticky/index.en.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc: 'content'
88
---
99

1010
# Sticky
11-
12-
## When to use
13-
14-
Need to be adsorbed in some places in the rolling situation.
11+
Used in cases where it is necessary to adsorb in some places during rolling.
1512

1613
## Precautions
1714

compiled/wechat/src/Sticky/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,6 @@ Component(StickyProps, {
7575
'sticky',
7676
'headerHeight',
7777
]), sticky = _a[0], headerHeight = _a[1];
78-
this.initHeaderHeight(headerHeight);
7978
if (sticky !== data.sticky) {
8079
// 考虑到这个还是有点性能开销,用个属性控制
8180
if (data.check && !this.stickyIO) {

compiled/wechat/src/Sticky/index.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc: 'content'
88
---
99

1010
# Sticky 粘性吸附
11-
12-
## 何时使用
13-
14-
需要在滚动中吸附在某些地方的情况。
11+
用在需要在滚动中吸附在某些地方的情况。
1512

1613
## 注意事项
1714

demo/pages/Card/index.axml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
title="标题"
2222
className="card-title-radius {{ titleSticky ? 'card-demo-sticky' : '' }}"
2323
headSticky="{{true}}"
24-
stickyTop="{{0}}"
24+
stickyTop="{{100}}"
2525
stickyTransparentTitle="{{ false }}"
2626
onTitleSticky="handleTitleSticky"
2727
>

demo/pages/Sticky/index.axml

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
<view class="navigation-bar"/>
22

33
<ant-container title="基础用法">
4-
<ant-sticky>
4+
<ant-sticky
5+
transparentTitle
6+
>
57
<view>
68
我会吸顶
79
</view>
@@ -10,10 +12,10 @@
1012

1113
<ant-container title="指定吸顶高度">
1214
<ant-sticky
13-
top="100px"
15+
top="200px"
1416
>
1517
<view>
16-
我会吸顶在距离顶部 100px 的地方
18+
我会吸顶在距离顶部 200px 的地方
1719
</view>
1820
</ant-sticky>
1921
</ant-container>
@@ -22,12 +24,12 @@
2224

2325
<ant-container title="感知是否吸顶">
2426
<ant-sticky
25-
top="180px"
27+
top="300px"
2628
check
2729
onStickyChange="handleStickyChange"
2830
>
2931
<view>
30-
<view>我会吸顶在距离顶部 180px 的地方</view>
32+
<view>我会吸顶在距离顶部 300px 的地方</view>
3133
<view>是否吸上了 {{ stickyStatus }}</view>
3234
</view>
3335
</ant-sticky>

src/Dialog/index.en.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog
1111

12-
## When to use
13-
1412
When the application needs to alert or remind the current operation behavior of the user, the dialog box may be used. The user needs to operate on the dialog box before ending.
1513

1614
## Introduction

src/Dialog/index.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@ toc: 'content'
99

1010
# Dialog 对话框
1111

12-
## 何时使用
13-
1412
当应用中需要比较明显的对用户当前的操作行为进行警示或提醒时,可以使用对话框。用户需要针对对话框进行操作后方可结束。
1513

1614
## 引入

src/NoticeBar/index.en.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar
1111

12-
Shows a set of message notifications.
13-
14-
## When to use
15-
16-
For the notification of information in the current page, it is a more eye-catching way of notification in the page.
12+
Shows a set of message notifications. Usually used for the notification of information in the current page, is a more eye-catching in-page notification.
1713

1814
## Introduction
1915

src/NoticeBar/index.md

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,7 @@ toc: content
99

1010
# NoticeBar 通告栏
1111

12-
展示一组消息通知。
13-
14-
## 何时使用
15-
16-
用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
12+
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
1713

1814
## 引入
1915

src/SafeArea/index.en.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea
11-
12-
## When to use
13-
1411
When the web page is displayed in full screen, the top and bottom of the screen can be adapted by means of a safe zone, such as a bang screen.
1512

1613
## Introduction

src/SafeArea/index.md

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,6 @@ toc: 'content'
88
---
99

1010
# SafeArea 安全区
11-
12-
## 何时使用
13-
1411
当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。
1512

1613
## 引入

src/Sticky/index.en.md

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,7 @@ toc: 'content'
88
---
99

1010
# Sticky
11-
12-
## When to use
13-
14-
Need to be adsorbed in some places in the rolling situation.
11+
Used in cases where it is necessary to adsorb in some places during rolling.
1512

1613
## Precautions
1714

0 commit comments

Comments
 (0)