Taro 插件。用于支持编译为钉钉小程序。
请使用本插件的 ~0.2.0
版本
请使用本插件的 ~0.1.0
版本
请使用本插件的 ~0.0.5
版本
// Taro 项目配置
module.exports = {
// ...
plugins: [
'@tarojs/plugin-platform-alipay-dd'
]
}
taro build --type dd
taro build --type dd --watch
if (process.TARO_ENV === 'dd') {
// ...
}
钉钉小程序拓展了一些独有 API,可以通过 Taro.xxx
来调用,例:
Taro.showCallMenu()
钉钉小程序拓展了一些独有组件,可像普通 Taro 内置组件一样使用,例:
import { OpenAvatar } from '@tarojs/components'
function Index () {
return (
<>
<OpenAvatar />
</>
)
}
开发者在 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";
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.