0.3.1 • Published 8 months ago

@tarojs/plugin-platform-alipay-dd v0.3.1

Weekly downloads
5
License
MIT
Repository
github
Last release
8 months ago

@tarojs/plugin-platform-alipay-dd

Taro 插件。用于支持编译为钉钉小程序。

版本要求

Taro 3.5+

请使用本插件的 ~0.2.0 版本

Taro 3.3.8+

请使用本插件的 ~0.1.0 版本

Taro 3.1 & 3.2

请使用本插件的 ~0.0.5 版本

使用

1. 配置插件

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

2. 编译为钉钉小程序

taro build --type dd
taro build --type dd --watch

其它

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

钉钉小程序拓展了一些独有 API,可以通过 Taro.xxx 来调用,例:

Taro.showCallMenu()
组件

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

import { OpenAvatar } from '@tarojs/components'

function Index () {
  return (
    <>
      <OpenAvatar />
    </>
  )
}

Typings

开发者在 global.d.ts 中加入 /// <reference types="@tarojs/plugin-platform-alipay-dd/types/shims-dd.d.ts" /> 即可获得类型提示。

例如:

/// <reference types="@tarojs/plugin-platform-alipay-dd/types/shims-dd.d.ts" />
/// <reference types="@tarojs/taro" />

declare module "*.png";
declare module "*.gif";
declare module "*.jpg";
declare module "*.jpeg";
declare module "*.svg";
declare module "*.css";
declare module "*.less";
declare module "*.scss";
declare module "*.sass";
declare module "*.styl";

License

MIT License

Copyright (c) O2Team

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

0.3.0

10 months ago

0.3.1

8 months ago

0.2.0

1 year ago

0.1.3

2 years ago

0.1.2

2 years ago

0.1.1

3 years ago

0.1.0

3 years ago

0.0.5

3 years ago

0.0.4

3 years ago

0.0.3

3 years ago

0.0.2

4 years ago

0.0.1

4 years ago