Skip to content

Commit f6d1d06

Browse files
author
wenlixiu
committed
api扩展组件更改
1 parent 7d14bf4 commit f6d1d06

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+381
-494
lines changed

program-docs/docs/develop/api/media/animationvideo_swan-createAnimationVideo.md

+5-4
Original file line numberDiff line numberDiff line change
@@ -46,10 +46,10 @@ AnimationVideo
4646

4747
### 代码示例
4848

49+
4950

50-
* 在 swan 文件中
51-
52-
```html
51+
:::codeTab
52+
```swan
5353
<view class="wrap">
5454
<animation-video
5555
id ="myAnimationVideo"
@@ -64,7 +64,7 @@ AnimationVideo
6464
</view>
6565
```
6666

67-
* 在 js 文件中
67+
6868

6969
```js
7070
Page({
@@ -77,3 +77,4 @@ Page({
7777
}
7878
});
7979
```
80+
:::

program-docs/docs/develop/api/show/background_swan-setBackgroundColor.md

+8-12
Original file line numberDiff line numberDiff line change
@@ -55,9 +55,8 @@ Object object
5555

5656
<a href="swanide://fragment/66f332965704ae69bbdcaefe3db158fa1575139212532" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
5757

58-
* 在 swan 文件中
59-
60-
```js
58+
:::codeTab
59+
```swan
6160
<view class="container">
6261
<view class="card-area">
6362
<view class="top-description border-bottom">
@@ -73,8 +72,7 @@ Object object
7372
</view>
7473
```
7574

76-
77-
* 在 js 文件中
75+
7876

7977
```js
8078
Page({
@@ -91,7 +89,7 @@ Page({
9189
}
9290
});
9391
```
94-
92+
:::
9593
### 图片示例
9694

9795
<div class="m-doc-custom-examples">
@@ -110,8 +108,7 @@ Page({
110108

111109
<a href="swanide://fragment/78fa2cb4a9f355eb08b78ce9ad2cf41d1575139455048" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
112110

113-
* 在 js 文件中
114-
111+
:::codeTab
115112
```js
116113
Page({
117114
setBackgroundColor() {
@@ -127,7 +124,7 @@ Page({
127124
}
128125
});
129126
```
130-
127+
:::
131128
### 图片示例
132129

133130
<div class="m-doc-custom-examples">
@@ -146,8 +143,7 @@ Page({
146143

147144
<a href="swanide://fragment/b748d492aae0dcbcd9fe4aa8b0dea4251575139563423" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
148145

149-
* 在 js 文件中
150-
146+
:::codeTab
151147
```js
152148
Page({
153149
setBackgroundColor() {
@@ -163,7 +159,7 @@ Page({
163159
}
164160
});
165161
```
166-
162+
:::
167163
## 错误码
168164
### Android
169165

program-docs/docs/develop/api/show/canvas_swan-createCanvasContext.md

+7-5
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,10 @@ CanvasContext
4848

4949

5050

51-
* 在 swan 文件中
51+
5252

53-
```html
53+
:::codeTab
54+
```swan
5455
<view class="container">
5556
<view>
5657
<view class="card-area">
@@ -72,8 +73,7 @@ CanvasContext
7273
</view>
7374
```
7475

75-
76-
* 在 js 文件中
76+
7777

7878
```js
7979
const canvas = require('./canvas.js');
@@ -111,8 +111,10 @@ Page({
111111
});
112112

113113
```
114+
:::
114115
* 在 canvas.js 文件中
115116

117+
:::codeTab
116118
```js
117119
const canvas = {};
118120

@@ -396,6 +398,6 @@ canvas.setMiterLimit = function (context) {
396398

397399
module.exports = canvas;
398400
```
399-
401+
:::
400402

401403

program-docs/docs/develop/api/show/menu_info.md

+11-24
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: swan.getMenuButtonBoundingClientRect
33
header: develop
44
nav: api
55
sidebar: menu_info
6-
# webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/getMenuButtonBoundingClientRect/getMenuButtonBoundingClientRect
6+
webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/getMenuButtonBoundingClientRect/getMenuButtonBoundingClientRect
77
---
88

99

@@ -36,27 +36,15 @@ sidebar: menu_info
3636
<font color=#777 12px>请使用百度APP扫码</font>
3737
</div>
3838

39-
### 图片示例
40-
<div class="m-doc-custom-examples">
41-
<div class="m-doc-custom-examples-correct">
42-
<img src="https://b.bdstatic.com/miniapp/image/getMenuButtonBoundingClientRect.gif">
43-
</div>
44-
<div class="m-doc-custom-examples-correct">
45-
<img src=" ">
46-
</div>
47-
<div class="m-doc-custom-examples-correct">
48-
<img src=" ">
49-
</div>
50-
</div>
5139

5240

5341
### 代码示例1 - 属性全集
5442

5543
<a href="swanide://fragment/b7950613332a792d444e4e4842d063291569477029937" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
5644

57-
* 在 swan 文件中
58-
59-
```html
45+
46+
:::codeTab
47+
```swan
6048
<view class="container">
6149
<view class="card-area">
6250
<view class="list-area border-bottom" s-for="item in infoList">
@@ -67,8 +55,7 @@ sidebar: menu_info
6755
</view>
6856
</view>
6957
```
70-
71-
* 在 js 文件中
58+
7259

7360
```js
7461
Page({
@@ -123,19 +110,18 @@ Page({
123110
}
124111
});
125112
```
126-
113+
:::
127114
### 代码示例2 - 应用场景
128115

129116
<a href="swanide://fragment/50a8932d2b9cd6ee093c3b6895f5f3d81576573561180" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
130117

131-
* 在 swan 文件中
132-
133-
```html
118+
119+
:::codeTab
120+
```swan
134121
<view class="status-height" style="height:{{ statusHeight }}px">状态栏</view>
135122
<view class="nav-height" style="height:{{ navHeight }}px">导航栏</view>
136123
```
137-
138-
* 在 js 文件中
124+
139125

140126
```js
141127
Page({
@@ -164,3 +150,4 @@ Page({
164150
});
165151

166152
```
153+
:::

program-docs/docs/develop/api/show/nacomponent.md

+6-32
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: swan.showFavoriteGuide
33
header: develop
44
nav: api
55
sidebar: nacomponent
6-
# webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/showFavoriteGuide/showFavoriteGuide
6+
webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/showFavoriteGuide/showFavoriteGuide
77
---
88

99

@@ -48,59 +48,33 @@ Object object
4848
</div>
4949

5050

51-
### 图片示例
5251

5352
目前关注小程序引导组件支持以下两种类型,开发者可根据自身业务进行选择:
5453
1. 浮层引导(type=bar)
5554
一直展现:用户点击关闭,浮层引导消失;点击关注按钮可直接关注小程序。
56-
<div class="m-doc-custom-examples">
57-
<div class="m-doc-custom-examples-correct">
58-
<img src="../../../../img/api/nacomponent/强引导.png">
59-
</div>
60-
<div class="m-doc-custom-examples-correct">
61-
<img src=" ">
62-
</div>
63-
</div>
64-
65-
66-
67-
68-
69-
70-
71-
### 代码示例 1
55+
:::codeTab
7256

7357
```js
7458
swan.showFavoriteGuide({
7559
type: 'bar',
7660
content:'关注小程序'
7761
})
7862
```
63+
:::
7964

80-
81-
### 图片示例
65+
8266
2. 气泡引导(type=tip)
8367
引导组件 5s 后自动消失,组件箭头指向小程序菜单。
8468

85-
<div class="m-doc-custom-examples">
86-
<div class="m-doc-custom-examples-correct">
87-
<img src="../../../../img/api/nacomponent/弱引导.png">
88-
</div>
89-
<div class="m-doc-custom-examples-correct">
90-
<img src=" ">
91-
</div>
92-
</div>
93-
94-
95-
### 代码示例 2
69+
:::codeTab
9670

9771
```js
9872
swan.showFavoriteGuide({
9973
type: 'tip',
10074
content: '关注小程序,下次使用更便捷。'
10175
})
10276
```
103-
77+
:::
10478
用户通过引导关注组件“关注小程序”后,可以在百度APP-我的“我的小程序”中看到它。
10579

10680
## Bug & Tip

program-docs/docs/develop/api/show/navigationbar_swan-hideNavigationBarLoading.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: swan.hideNavigationBarLoading
33
header: develop
44
nav: api
55
sidebar: navigationbar_swan-hideNavigationBarLoading
6-
# webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/navigationBarLoading/navigationBarLoading
6+
webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/navigationBarLoading/navigationBarLoading
77
---
88

99

@@ -40,19 +40,17 @@ sidebar: navigationbar_swan-hideNavigationBarLoading
4040

4141
### 代码示例
4242

43+
4344

44-
45-
* 在 swan 文件中
46-
47-
```html
45+
:::codeTab
46+
```swan
4847
<view class="wrap">
4948
<button bind:tap="showNavigationBarLoading" type="primary" hover-stop-propagation="true">显示加载动画</button>
5049
5150
<button bind:tap="hideNavigationBarLoading" type="primary" hover-stop-propagation="true">隐藏加载动画</button>
5251
</view>
5352
```
54-
55-
* 在 js 文件中
53+
5654

5755
```js
5856
Page({
@@ -66,6 +64,7 @@ Page({
6664
}
6765
});
6866
```
67+
:::
6968
## 错误码
7069

7170
### Android

program-docs/docs/develop/api/show/navigationbar_swan-setNavigationBarColor.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ title: swan.setNavigationBarColor
33
header: develop
44
nav: api
55
sidebar: navigationbar_swan-setNavigationBarColor
6-
# webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/setNavigationBarColor/setNavigationBarColor
6+
webUrl: https://qft12m.smartapps.cn/subPackages/apiPackage/pages/setNavigationBarColor/setNavigationBarColor
77
---
88

99

@@ -75,9 +75,10 @@ Object object
7575

7676
<a href="swanide://fragment/dace5658a19b604ff4d62d0c760fb7351574136817988" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
7777

78-
* 在 swan 文件中
78+
7979

80-
```html
80+
:::codeTab
81+
```swan
8182
<view class="container">
8283
<view class="card-area">
8384
<view class="top-description border-bottom">
@@ -89,7 +90,7 @@ Object object
8990
</view>
9091
```
9192

92-
* 在 js 文件中
93+
9394

9495
```js
9596
Page({
@@ -111,13 +112,12 @@ Page({
111112
}
112113
});
113114
```
114-
115+
:::
115116
### 代码示例2 :
116117

117118
<a href="swanide://fragment/47a5315cec46d13b001064d0d919933d1575225061501" title="在开发者工具中预览效果" target="_self">在开发者工具中预览效果</a>
118119

119-
* 在 js 文件中
120-
120+
:::codeTab
121121
```js
122122
Page({
123123
setNavigationBarColor() {
@@ -138,7 +138,7 @@ Page({
138138
}
139139
});
140140
```
141-
141+
:::
142142
## 错误码
143143

144144
### Android

0 commit comments

Comments
 (0)