工作流引擎编辑器
# npm 安装
npm install sam-flow-editor
# yarn 安装
yarn add 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)
}
<flow-editor ref="flowEditor" :data="editorData" @change="changeEvent"></flow-editor>
editorData: {
background: {
color: '#FFF',
image: '',
position: 'center',
size: 'auto',
repeat: 'no-repeat',
opacity: 0.2
},
cells: []
}