@tarojs/plugin-platform-alipay-iot
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

@tarojs/plugin-platform-alipay-iot

Taro 插件。用于支持编译为支付宝 IOT 端小程序。

使用

1. 配置插件

// Taro 项目配置
module.exports = {
  // ...
  plugins: [
    '@tarojs/plugin-platform-alipay-iot'
  ]
}

2. 编译为支付宝 IOT 端小程序

taro build --type iot
taro build --type iot --watch

其它

平台判断
if (process.TARO_ENV === 'iot') {
  // ...
}
API

支付宝 IOT 端小程序拓展了一些独有 API,可以通过 Taro.iot.xxx 来调用,例:

Taro.ix.getSysProp({
  key: 'ro.serialno'
})
  .then(res => console.log(res))
组件

支付宝 IOT 端小程序拓展了一些独有组件,可像普通 Taro 内置组件一样使用,例:

import { Poster, IxGrid, IxNativeList, IxNativeGrid } from '@tarojs/components'

function Index () {
  return (
    <>
      <Poster></Poster>
      <IxGrid></IxGrid>
      <IxNativeList></IxNativeList>
      <IxNativeGrid></IxNativeGrid>
    </>
  )
}

Readme

Keywords

Package Sidebar

Install

npm i @tarojs/plugin-platform-alipay-iot

Weekly Downloads

2

Version

0.0.4

License

MIT

Unpacked Size

29.4 kB

Total Files

17

Last publish

Collaborators

  • qq592743779
  • baosiqing
  • zakary
  • advancedcat
  • yuche
  • xuanzebin
  • defaultlee
  • drchan
  • kyjo