-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
129 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
--- | ||
title: Ad | ||
sidebar_label: Ad | ||
--- | ||
|
||
##### Banner 广告 | ||
|
||
> 组件 支持度 | ||
| 微信小程序 | | ||
| :-: | | ||
| ✔ | | ||
|
||
|
||
>具体用法请看小程序官方文档 | ||
[微信小程序 Ad](https://developers.weixin.qq.com/miniprogram/dev/component/ad.html)。 | ||
|
||
```jsx | ||
import Taro, { Component } from '@tarojs/taro' | ||
// 引入 Ad 组件 | ||
import { Ad } from '@tarojs/components' | ||
|
||
class App extends Component { | ||
render () { | ||
return ( | ||
<Ad | ||
unit-id='' | ||
ad-intervals={60} | ||
onLoad={() => console.log('ad onLoad')} | ||
onError={() => console.log('ad onError')} | ||
onClose={() => console.log('ad onClose')} | ||
/> | ||
) | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
title: OfficialAccount | ||
sidebar_label: OfficialAccount | ||
--- | ||
|
||
##### 公众号关注组件。当用户扫小程序码打开小程序时,开发者可在小程序内配置公众号关注组件,方便用户快捷关注公众号,可嵌套在原生组件内。 | ||
|
||
> 组件 支持度 | ||
| 微信小程序 | | ||
| :-: | | ||
| ✔ | | ||
|
||
|
||
>具体用法请看小程序官方文档 | ||
[微信小程序 OfficialAccount](https://developers.weixin.qq.com/miniprogram/dev/component/official-account.html)。 | ||
|
||
```jsx | ||
import Taro, { Component } from '@tarojs/taro' | ||
// 引入 OfficialAccount 组件 | ||
import { OfficialAccount } from '@tarojs/components' | ||
|
||
class App extends Component { | ||
render () { | ||
return ( | ||
<OfficialAccount | ||
onLoad={() => console.log('official-account onLoad')} | ||
onError={() => console.log('official-account onError')} | ||
/> | ||
) | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,19 +1,33 @@ | ||
--- | ||
title: 其他 | ||
sidebar_label: 其他 | ||
title: OpenData | ||
sidebar_label: OpenData | ||
--- | ||
|
||
##### 其他组件 | ||
##### 用于展示小程序开放的数据。 | ||
|
||
除导航列表的一些组件外,还有一些差异化组件,每个端不同,后续计划将这些统一封装。目前差异化组件请详看各小程序官网。 | ||
> 组件 支持度 | ||
>其他组件请看各小程序官方文档 | ||
| 微信小程序 | 百度小程序 | | ||
| :-: | :-: | | ||
| ✔ | ✔ | | ||
|
||
[微信小程序](https://developers.weixin.qq.com/miniprogram/dev/component/)。 | ||
|
||
[百度小程序](https://smartprogram.baidu.com/docs/develop/component/view/)。 | ||
>具体用法请看小程序官方文档 | ||
[支付宝小程序](https://docs.alipay.com/mini/component/overview)。 | ||
[微信小程序 OpenData](https://developers.weixin.qq.com/miniprogram/dev/component/open-data.html)。 | ||
|
||
[字节跳动小程序](https://developer.toutiao.com/docs/comp/)。 | ||
[百度小程序 OpenData](https://smartprogram.baidu.com/docs/develop/component/open/#open-data/)。 | ||
|
||
```jsx | ||
import Taro, { Component } from '@tarojs/taro' | ||
// 引入 Ad 组件 | ||
import { OpenData } from '@tarojs/components' | ||
|
||
class App extends Component { | ||
render () { | ||
return ( | ||
<OpenData type=''/> | ||
) | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
--- | ||
title: 其他 | ||
sidebar_label: 其他 | ||
--- | ||
|
||
##### 其他组件 | ||
|
||
除导航列表的一些组件外,还有一些差异化组件,每个端不同,后续计划将这些统一封装。目前差异化组件请详看各小程序官网。 | ||
|
||
>其他组件请看各小程序官方文档 | ||
[微信小程序](https://developers.weixin.qq.com/miniprogram/dev/component/)。 | ||
|
||
[百度小程序](https://smartprogram.baidu.com/docs/develop/component/view/)。 | ||
|
||
[支付宝小程序](https://docs.alipay.com/mini/component/overview)。 | ||
|
||
[字节跳动小程序](https://developer.toutiao.com/docs/comp/)。 | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters