Skip to content

Commit

Permalink
Merge pull request #53 from bhabgs/master
Browse files Browse the repository at this point in the history
修复flow 自适应问题
  • Loading branch information
bhabgs authored Jun 23, 2021
2 parents f2e7155 + f2a48f1 commit 55807c3
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 5 deletions.
1 change: 1 addition & 0 deletions docs/.vitepress/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ module.exports = {
{ text: '介绍', link: '/' },
{ text: '日志', link: '/components/log' },
{ text: 'Button', link: '/components/button/' },
{ text: 'flow', link: '/components/flow/' },
{ text: 'Layout', link: '/components/layout/' },
{ text: 'contextmenu', link: '/components/contextmenu/' },
{ text: 'menu', link: '/components/menu/' },
Expand Down
11 changes: 11 additions & 0 deletions docs/components/flow/index.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# flow 规则引擎流程组件

## 参数以及方法

> functions:函数待选数组,格式:[{name:'',funcName:'',paramList:[{name:'',value:''}]}]
>
> rules:规则待选列表,格式:[{name:'',recordCode:''}]
>
> onRuleSearch:规则模糊搜索回调,包括一个参数为用户输入的值
>
> save:获取图表以及后台需要的json方法
2 changes: 1 addition & 1 deletion package/vitevui/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vitevui",
"version": "1.0.0-beta.23",
"version": "1.0.0-beta.25",
"description": "vue3.0 ui",
"main": "lib/index.js",
"homepage": "https://bhabgs.github.io/vite-vui-docs/",
Expand Down
4 changes: 2 additions & 2 deletions package/vitevui/src/flow/action.less
Original file line number Diff line number Diff line change
@@ -1,16 +1,16 @@
.flex {
display: flex;
}
.action {
.vuiFlow {
width: 100%;
height: 100%;
margin: 20px 0;
.drag {
width: 100%;
margin-top: 20px;
border: 1px solid #dddddd;
#graph {
flex: 1;
height: 800px;
}
#module {
flex: 0 0 280px;
Expand Down
4 changes: 2 additions & 2 deletions package/vitevui/src/flow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const viFlow = defineComponent({
target: this.graph,
title: '组件',
stencilGraphWidth: 280,
stencilGraphHeight: 800 - 32,
stencilGraphHeight: document.getElementsByClassName('vuiFlow')[0].clientHeight - 32,
});
const stencilContainer = document.querySelector('#module');
stencilContainer!.appendChild(this.stencil.container);
Expand Down Expand Up @@ -347,7 +347,7 @@ const viFlow = defineComponent({
},
render(h: any) {
return (
<div class='action'>
<div class='vuiFlow'>
<div class='flex drag'>
<div id='module'></div>
<div id='graph'></div>
Expand Down

0 comments on commit 55807c3

Please sign in to comment.