aiot-studio-render

0.1.5 • Public • Published

Install

npm install aiot-studio-anonymous -S
npm install aiot-studio-render -S

Quick Start

  • 1、全局注册组件aiot-studio-anonymous
// main.ts
import { Anonymous } from '@aiot/studio-anonymous'
Vue.component('anonymous-component', Anonymous)
  • 2、在window上挂载vue实例
// main.ts
declare var window: any
window.Vue = Vue
  • 3、使用渲染组件aiot-studio-render
<template>
    <preview-comp
      :components="components"
      :setting="setting"
    ></preview-comp>
</template>

<script lang="ts">
import { Component, Prop, Vue } from 'vue-property-decorator'
import { PreviewComp } from 'aiot-studio-render'

@Component({ components: {
  PreviewComp
} })
export default class PageName extends Vue {
  // 属性components和setting 由可视化项目的提供的接口获得
  private components = []
  private setting = {}
}
</script>

Readme

Keywords

none

Package Sidebar

Install

npm i aiot-studio-render

Weekly Downloads

1

Version

0.1.5

License

none

Unpacked Size

4.04 MB

Total Files

5

Last publish

Collaborators

  • scaler1125