Skip to content

Commit

Permalink
Merge pull request #85 from bhabgs/master
Browse files Browse the repository at this point in the history
组件增加加载
  • Loading branch information
mengziwen authored Jul 14, 2021
2 parents b306f86 + e917ba7 commit 7a40667
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
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.35",
"version": "1.0.0-beta.36",
"description": "vue3.0 ui",
"main": "lib/index.js",
"homepage": "https://bhabgs.github.io/vite-vui-docs/",
Expand Down
2 changes: 0 additions & 2 deletions package/vitevui/src/flow/graphCom/FUNCTION.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,6 @@ export default defineComponent({
});
};
const handleChange = (val: string) => {
debugger;
props.funAll.forEach((element: any) => {
if (element.funcName === val) {
state.resData.name = element.name;
Expand All @@ -70,7 +69,6 @@ export default defineComponent({
state.resData.dynamically = true;
}
});
debugger;
context.emit('ok', state.resData);
};
const renderFun = () => {
Expand Down
61 changes: 25 additions & 36 deletions package/vitevui/src/flow/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,32 @@ const coms: any = {
SWITCHLine,
};

const props = {
// 模板:template
type: {
type: String,
default: '',
},
id: {
type: String,
default: '',
},
functions: {
default: [],
},
rules: {
default: [],
},
data: {
default: [],
},
};

const viFlow = defineComponent({
props,
// setup(props, context) {
// const test = () => {
// console.log(2);
// };
// context.expose({
// test,
// });
// },
props: {
// 模板:template
type: {
type: String,
default: '',
},
id: {
type: String,
default: '',
},
functions: {
default: [],
},
rules: {
default: [],
},
data: {
type: Array as any,
default: [],
},
},

data() {
return {
recordType: 0 as any, // 0规则 1决策
recordType: 1 as any, // 0规则 1决策
graph: undefined as any,
stencil: undefined as any,
action: {
Expand Down Expand Up @@ -91,15 +82,14 @@ const viFlow = defineComponent({
this.$nextTick(() => {
this.initGraph();
});
// this.recordType = this.$route.query.recordType;
// this.id = this.$route.query.id;
if (this.id) {
if (this.data.length != 0) {
this.init();
}
},
methods: {
async init() {
this.graph.fromJSON(this.data);
this.graph.fromJSON(this.data[0].cells);
[, this.action] = this.data;
},
initGraph() {
this.graph = new Graph({
Expand Down Expand Up @@ -215,7 +205,6 @@ const viFlow = defineComponent({
this.graph.redo();
});
this.graph.on('node:dblclick', (arg: any) => {
debugger;
this.selectedObj = arg.node;
this.diaObj = { ...this.selectedObj.store };
this.diaVisible = true;
Expand Down

0 comments on commit 7a40667

Please sign in to comment.