taro-plugin-platform-alipay-iot
所属分类:物联网
开发工具:TypeScript
文件大小:10KB
下载次数:0
上传日期:2021-03-12 12:04:55
上 传 者:
sh-1993
说明: 支付宝 IOT 端小程序平台插件
(Alipay IOT end applet platform plug-in)
文件列表:
index.js (92, 2021-03-12)
package.json (941, 2021-03-12)
rollup.config.js (1071, 2021-03-12)
src (0, 2021-03-12)
src\apis-list.ts (1348, 2021-03-12)
src\apis.ts (1399, 2021-03-12)
src\components-react.ts (256, 2021-03-12)
src\components.ts (495, 2021-03-12)
src\index.ts (306, 2021-03-12)
src\program.ts (819, 2021-03-12)
src\runtime.ts (475, 2021-03-12)
tsconfig.json (565, 2021-03-12)
types (0, 2021-03-12)
types\apis-list.d.ts (102, 2021-03-12)
types\apis.d.ts (54, 2021-03-12)
types\components-react.d.ts (264, 2021-03-12)
types\components.d.ts (613, 2021-03-12)
types\index.d.ts (138, 2021-03-12)
types\program.d.ts (510, 2021-03-12)
types\runtime.d.ts (12, 2021-03-12)
types\shims-iot.d.ts (3755, 2021-03-12)
# `@tarojs/plugin-platform-alipay-iot`
Taro 插件。用于支持编译为支付宝 IOT 端小程序。
## 使用
#### 1. 配置插件
```js
// Taro 项目配置
module.exports = {
// ...
plugins: [
'@tarojs/plugin-platform-alipay-iot'
]
}
```
#### 2. 编译为支付宝 IOT 端小程序
```shell
taro build --type iot
taro build --type iot --watch
```
#### 其它
##### 平台判断
```js
if (process.TARO_ENV === 'iot') {
// ...
}
```
##### API
支付宝 IOT 端小程序拓展了一些独有 API,可以通过 `Taro.iot.xxx` 来调用,例:
```js
Taro.ix.getSysProp({
key: 'ro.serialno'
})
.then(res => console.log(res))
```
##### 组件
支付宝 IOT 端小程序拓展了一些独有组件,可像普通 Taro 内置组件一样使用,例:
```js
import { Poster, IxGrid, IxNativeList, IxNativeGrid } from '@tarojs/components'
function Index () {
return (
<>
>
)
}
```
近期下载者:
相关文件:
收藏者: