diff --git a/docs/.vitepress/config.js b/docs/.vitepress/config.js index 279d563..dfb8c10 100644 --- a/docs/.vitepress/config.js +++ b/docs/.vitepress/config.js @@ -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/' }, diff --git a/docs/components/flow/index.md b/docs/components/flow/index.md new file mode 100644 index 0000000..ef6c770 --- /dev/null +++ b/docs/components/flow/index.md @@ -0,0 +1,11 @@ +# flow 规则引擎流程组件 + +## 参数以及方法 + +> functions:函数待选数组,格式:[{name:'',funcName:'',paramList:[{name:'',value:''}]}] +> +> rules:规则待选列表,格式:[{name:'',recordCode:''}] +> +> onRuleSearch:规则模糊搜索回调,包括一个参数为用户输入的值 +> +> save:获取图表以及后台需要的json方法 \ No newline at end of file diff --git a/package/vitevui/package.json b/package/vitevui/package.json index 74e4896..3ce62f4 100644 --- a/package/vitevui/package.json +++ b/package/vitevui/package.json @@ -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/", diff --git a/package/vitevui/src/flow/action.less b/package/vitevui/src/flow/action.less index 143ab78..2edff48 100644 --- a/package/vitevui/src/flow/action.less +++ b/package/vitevui/src/flow/action.less @@ -1,8 +1,9 @@ .flex { display: flex; } -.action { +.vuiFlow { width: 100%; + height: 100%; margin: 20px 0; .drag { width: 100%; @@ -10,7 +11,6 @@ border: 1px solid #dddddd; #graph { flex: 1; - height: 800px; } #module { flex: 0 0 280px; diff --git a/package/vitevui/src/flow/index.tsx b/package/vitevui/src/flow/index.tsx index 8603dcc..29ad8f7 100644 --- a/package/vitevui/src/flow/index.tsx +++ b/package/vitevui/src/flow/index.tsx @@ -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); @@ -347,7 +347,7 @@ const viFlow = defineComponent({ }, render(h: any) { return ( -