1.0.3 • Published 2 years ago
sam-flow-editor v1.0.3
sam-flow-editor
工作流引擎编辑器
一、安装使用
1. 安装
# npm 安装
npm install sam-flow-editor
# yarn 安装
yarn add sam-flow-editor
2. 引入 sam-flow-editor
Vue 3
组件内引入
import { flowEditor } from 'sam-flow-editor';
import 'sam-flow-editor/index/style.css';
Vue3
全局引入
import { flowEditor } from 'flow-editor';
import 'sam-flow-editor/index/style.css';
const app = createApp(App)
app.use(VueCropper)
app.mount('#app')
nuxt
引入方式
if(process.browser) {
flowEditor = require('sam-flow-editor')
Vue.use(flowEditor)
}
3. 代码中使用
<flow-editor ref="flowEditor" :data="editorData" @change="changeEvent"></flow-editor>
二、文档
1. props 属性配置
editorData: {
background: {
color: '#FFF',
image: '',
position: 'center',
size: 'auto',
repeat: 'no-repeat',
opacity: 0.2
},
cells: []
}