@fox-js/plugins-taro
TypeScript icon, indicating that this package has built-in type declarations

4.0.1-0 • Public • Published

Fox Plugins

Fox Shell的桥接接口

Install

NPM

npm i @fox-js/fox-plugins-taro -S

YARN

yarn add @fox-js/fox-plugins-taro

使用指南

步骤一.创建并初始化

import { createFoxPlugins } from '@fox-js/fox-plugins-taro'

// 参数
const options = {
   // 应用名称
  app: 'fox_base',
  // 请求URL
  url: '127.0.0.1:9705',
  // 是否启用SSL
  ssl: false,
  // debug请求URL
  // debug_url: '192.144.128.218:9292',
  // 是否启用debug SSL
  // debug_ssl: false,
  // web socket 通信方式
  webSocketType: 'get',
  // 调试模式
  debugModel: false,
   // 调试范围
  debugScope: ['fox.service', 'fox.device', 'fox.file', 'fox.native']
}

// 创建fox plugins
const FoxPlugins = createFoxPlugins(options)

// 注册到vue app中
createApp(App).use(FoxPlugins).mount('#app')

步骤二.获取api

import { useFoxPluginsComposer } from '@fox-js/fox-plugins'

// 获取plugin api
const { service } = useFoxPluginsComposer()

Readme

Keywords

Package Sidebar

Install

npm i @fox-js/plugins-taro

Weekly Downloads

0

Version

4.0.1-0

License

none

Unpacked Size

24.4 kB

Total Files

4

Last publish

Collaborators

  • jiangcheng316