WEB应用开发-“iot-plugin-panel”

更新时间:2018-04-18 15:50:44

简介

Web 应用集成Web 插件的容器组件。

安装

bnpm install @bone/iot-plugin-panel --save

使用

import React, {Component} from 'react';
import IotPluginPanel from '@boneweb/iot-plugin-panel';

export default class App extends Component {
    render() {
        return (
            <IotPluginPanel id="YOUR_PLUGIN_ID" api="https://api.link.aliyun.com/app/manifest/webplugin/router"/>
        );
    }
}

API

参数说明

参数 说明 类型 必填 默认值
id 插件的ID String true -
api 获取插件的api,请务必使用当前应用所在平台api接口,否则会鉴权失败。一站式开发平台:https://api.link.aliyun.com/app/manifest/webplugin/router String true -
url 页面路由地址,如:'/home'、'/home?id=123456',默认加载根路由'/' String false '/'
type 渲染类型,normal: 直接渲染到页面中;iframe: 以iframe方式渲染到页面中 String false normal
autoHeight 渲染类型为iframe方式时, 自适应内容高度 Boolean false true
style 自定义样式 Object false -
className 自定义样式名 String false -

results matching ""

    No results matching ""