Skip to content

Commit

Permalink
Docs new dev (#1307)
Browse files Browse the repository at this point in the history
* feat: 删除何时使用

* fix: 修改翻译

* feat: check lastset

* fix: sticky initHeaderHeight

---------

Co-authored-by: shijia.sj <[email protected]>
Co-authored-by: dennis.zpf <[email protected]>
  • Loading branch information
3 people authored Nov 25, 2024
1 parent a819df4 commit 5492037
Show file tree
Hide file tree
Showing 33 changed files with 32 additions and 106 deletions.
2 changes: 1 addition & 1 deletion compiled/alipay/demo/pages/Card/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
title="标题"
className="card-title-radius {{titleSticky ? 'card-demo-sticky' : ''}}"
headSticky="{{true}}"
stickyTop="{{0}}"
stickyTop="{{100}}"
stickyTransparentTitle="{{false}}"
onTitleSticky="handleTitleSticky"
>
Expand Down
10 changes: 5 additions & 5 deletions compiled/alipay/demo/pages/Sticky/index.axml
Original file line number Diff line number Diff line change
@@ -1,27 +1,27 @@
<view class="navigation-bar"></view>
<ant-container title="基础用法">
<ant-sticky>
<ant-sticky transparentTitle>
<view>
我会吸顶
</view>
</ant-sticky>
</ant-container>
<ant-container title="指定吸顶高度">
<ant-sticky top="100px">
<ant-sticky top="200px">
<view>
我会吸顶在距离顶部 100px 的地方
我会吸顶在距离顶部 200px 的地方
</view>
</ant-sticky>
</ant-container>
<view style="height: 200px;"></view>
<ant-container title="感知是否吸顶">
<ant-sticky
top="180px"
top="300px"
check
onStickyChange="handleStickyChange"
>
<view>
<view>我会吸顶在距离顶部 180px 的地方</view>
<view>我会吸顶在距离顶部 300px 的地方</view>
<view>是否吸上了 {{stickyStatus}}</view>
</view>
</ant-sticky>
Expand Down
2 changes: 0 additions & 2 deletions compiled/alipay/src/Dialog/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog

## When to use

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.

## Introduction
Expand Down
2 changes: 0 additions & 2 deletions compiled/alipay/src/Dialog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog 对话框

## 何时使用

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

## 引入
Expand Down
6 changes: 1 addition & 5 deletions compiled/alipay/src/NoticeBar/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar

Shows a set of message notifications.

## When to use

For the notification of information in the current page, it is a more eye-catching way of notification in the page.
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.

## Introduction

Expand Down
6 changes: 1 addition & 5 deletions compiled/alipay/src/NoticeBar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar 通告栏

展示一组消息通知。

## 何时使用

用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。

## 引入

Expand Down
3 changes: 0 additions & 3 deletions compiled/alipay/src/SafeArea/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea

## When to use

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.

## Introduction
Expand Down
3 changes: 0 additions & 3 deletions compiled/alipay/src/SafeArea/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea 安全区

## 何时使用

当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。

## 引入
Expand Down
5 changes: 1 addition & 4 deletions compiled/alipay/src/Sticky/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ toc: 'content'
---

# Sticky

## When to use

Need to be adsorbed in some places in the rolling situation.
Used in cases where it is necessary to adsorb in some places during rolling.

## Precautions

Expand Down
5 changes: 1 addition & 4 deletions compiled/alipay/src/Sticky/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ toc: 'content'
---

# Sticky 粘性吸附

## 何时使用

需要在滚动中吸附在某些地方的情况。
用在需要在滚动中吸附在某些地方的情况。

## 注意事项

Expand Down
1 change: 0 additions & 1 deletion compiled/alipay/src/Sticky/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,6 @@ Component(
'sticky',
'headerHeight',
]);
this.initHeaderHeight(headerHeight);
if (sticky !== nextProps.sticky) {
// 考虑到这个还是有点性能开销,用个属性控制
if (nextProps.check && !this.stickyIO) {
Expand Down
2 changes: 1 addition & 1 deletion compiled/wechat/demo/pages/Card/index.wxml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
title="标题"
className="card-title-radius {{titleSticky ? 'card-demo-sticky' : ''}}"
headSticky="{{true}}"
stickyTop="{{0}}"
stickyTop="{{100}}"
stickyTransparentTitle="{{false}}"
bind:titlesticky="handleTitleSticky"
>
Expand Down
10 changes: 5 additions & 5 deletions compiled/wechat/demo/pages/Sticky/index.wxml
Original file line number Diff line number Diff line change
@@ -1,23 +1,23 @@
<view class="navigation-bar"></view>
<ant-container title="基础用法">
<ant-sticky>
<ant-sticky transparentTitle>
<view>我会吸顶</view>
</ant-sticky>
</ant-container>
<ant-container title="指定吸顶高度">
<ant-sticky top="100px">
<view>我会吸顶在距离顶部 100px 的地方</view>
<ant-sticky top="200px">
<view>我会吸顶在距离顶部 200px 的地方</view>
</ant-sticky>
</ant-container>
<view style="height: 200px;"></view>
<ant-container title="感知是否吸顶">
<ant-sticky
top="180px"
top="300px"
check
bind:stickychange="handleStickyChange"
>
<view>
<view>我会吸顶在距离顶部 180px 的地方</view>
<view>我会吸顶在距离顶部 300px 的地方</view>
<view>是否吸上了{{stickyStatus}}</view>
</view>
</ant-sticky>
Expand Down
2 changes: 0 additions & 2 deletions compiled/wechat/src/Dialog/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog

## When to use

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.

## Introduction
Expand Down
2 changes: 0 additions & 2 deletions compiled/wechat/src/Dialog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog 对话框

## 何时使用

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

## 引入
Expand Down
6 changes: 1 addition & 5 deletions compiled/wechat/src/NoticeBar/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar

Shows a set of message notifications.

## When to use

For the notification of information in the current page, it is a more eye-catching way of notification in the page.
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.

## Introduction

Expand Down
6 changes: 1 addition & 5 deletions compiled/wechat/src/NoticeBar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar 通告栏

展示一组消息通知。

## 何时使用

用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。

## 引入

Expand Down
3 changes: 0 additions & 3 deletions compiled/wechat/src/SafeArea/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea

## When to use

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.

## Introduction
Expand Down
3 changes: 0 additions & 3 deletions compiled/wechat/src/SafeArea/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea 安全区

## 何时使用

当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。

## 引入
Expand Down
5 changes: 1 addition & 4 deletions compiled/wechat/src/Sticky/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ toc: 'content'
---

# Sticky

## When to use

Need to be adsorbed in some places in the rolling situation.
Used in cases where it is necessary to adsorb in some places during rolling.

## Precautions

Expand Down
1 change: 0 additions & 1 deletion compiled/wechat/src/Sticky/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,6 @@ Component(StickyProps, {
'sticky',
'headerHeight',
]), sticky = _a[0], headerHeight = _a[1];
this.initHeaderHeight(headerHeight);
if (sticky !== data.sticky) {
// 考虑到这个还是有点性能开销,用个属性控制
if (data.check && !this.stickyIO) {
Expand Down
5 changes: 1 addition & 4 deletions compiled/wechat/src/Sticky/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ toc: 'content'
---

# Sticky 粘性吸附

## 何时使用

需要在滚动中吸附在某些地方的情况。
用在需要在滚动中吸附在某些地方的情况。

## 注意事项

Expand Down
2 changes: 1 addition & 1 deletion demo/pages/Card/index.axml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
title="标题"
className="card-title-radius {{ titleSticky ? 'card-demo-sticky' : '' }}"
headSticky="{{true}}"
stickyTop="{{0}}"
stickyTop="{{100}}"
stickyTransparentTitle="{{ false }}"
onTitleSticky="handleTitleSticky"
>
Expand Down
12 changes: 7 additions & 5 deletions demo/pages/Sticky/index.axml
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
<view class="navigation-bar"/>

<ant-container title="基础用法">
<ant-sticky>
<ant-sticky
transparentTitle
>
<view>
我会吸顶
</view>
Expand All @@ -10,10 +12,10 @@

<ant-container title="指定吸顶高度">
<ant-sticky
top="100px"
top="200px"
>
<view>
我会吸顶在距离顶部 100px 的地方
我会吸顶在距离顶部 200px 的地方
</view>
</ant-sticky>
</ant-container>
Expand All @@ -22,12 +24,12 @@

<ant-container title="感知是否吸顶">
<ant-sticky
top="180px"
top="300px"
check
onStickyChange="handleStickyChange"
>
<view>
<view>我会吸顶在距离顶部 180px 的地方</view>
<view>我会吸顶在距离顶部 300px 的地方</view>
<view>是否吸上了 {{ stickyStatus }}</view>
</view>
</ant-sticky>
Expand Down
2 changes: 0 additions & 2 deletions src/Dialog/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog

## When to use

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.

## Introduction
Expand Down
2 changes: 0 additions & 2 deletions src/Dialog/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,6 @@ toc: 'content'

# Dialog 对话框

## 何时使用

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

## 引入
Expand Down
6 changes: 1 addition & 5 deletions src/NoticeBar/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar

Shows a set of message notifications.

## When to use

For the notification of information in the current page, it is a more eye-catching way of notification in the page.
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.

## Introduction

Expand Down
6 changes: 1 addition & 5 deletions src/NoticeBar/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,7 @@ toc: content

# NoticeBar 通告栏

展示一组消息通知。

## 何时使用

用于当前页面内信息的通知,是一种较醒目的页面内通知方式。
展示一组消息通知。通常用于当前页面内信息的通知,是一种较醒目的页面内通知方式。

## 引入

Expand Down
3 changes: 0 additions & 3 deletions src/SafeArea/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea

## When to use

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.

## Introduction
Expand Down
3 changes: 0 additions & 3 deletions src/SafeArea/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,6 @@ toc: 'content'
---

# SafeArea 安全区

## 何时使用

当网页被全屏展示时,可借助安全区进行屏幕顶部和底部适配,如刘海屏。

## 引入
Expand Down
5 changes: 1 addition & 4 deletions src/Sticky/index.en.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@ toc: 'content'
---

# Sticky

## When to use

Need to be adsorbed in some places in the rolling situation.
Used in cases where it is necessary to adsorb in some places during rolling.

## Precautions

Expand Down
Loading

0 comments on commit 5492037

Please sign in to comment.