Skip to content

ripeBoy/taro-plugin-platform-tt-fb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

@tarojs/plugin-platform-tt-fb

see

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

使用

1. 配置插件

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

2. 编译为飞书小程序

taro build --type fb
taro build --type fb --watch

其它

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

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

Taro.enterChat()
组件

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

import { editor } from '@tarojs/components'

function Index () {
  return (
    <>
      <editor
              id="editor"
              placeholder="{{placeholder}}"
              contents="{{contents}}"
              read-only="{{readOnly}}"
              plugins="{{plugins}}"
              placeholderStyle="{{placeholderStyle}}"
              bindready="onEditorReady"
              bindmentionselect = "onMentionSelect"
              bindmentionclick = "onMentionClick"
              bindinput="onEditorInputValueChange"
              bindinsertimage="onInsertImages"
              bindgetfileinfo="onGetFileInfo"
              bindeditorclick="onEditorClick">
      </editor> 
    </>
  )
}

About

taro飞书小程序编译插件

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published