@dckj-npm/lowcode-plugin-code-generator 1.0.1 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -43,13 +43,18 @@ export function CodeGenActionBtn(_ref) {
|
|
|
43
43
|
case 4:
|
|
44
44
|
originalSchema = _context.sent;
|
|
45
45
|
console.log('ctx ', ctx);
|
|
46
|
-
|
|
46
|
+
console.log('isActive ', ctx.workspace.isActive);
|
|
47
|
+
console.log('window ', ctx.workspace.window);
|
|
48
|
+
console.log('skeleton ', ctx.workspace.skeleton);
|
|
49
|
+
console.log('windows ', ctx.workspace.windows);
|
|
50
|
+
console.log('ctx ', ctx.workspace.currentProject);
|
|
51
|
+
_context.next = 13;
|
|
47
52
|
return ctx.project.exportSchema();
|
|
48
|
-
case
|
|
53
|
+
case 13:
|
|
49
54
|
originalSchema2 = _context.sent;
|
|
50
|
-
_context.next =
|
|
55
|
+
_context.next = 16;
|
|
51
56
|
return fixSchema(originalSchema);
|
|
52
|
-
case
|
|
57
|
+
case 16:
|
|
53
58
|
schema = _context.sent;
|
|
54
59
|
console.log('got schema:222222 ', schema);
|
|
55
60
|
console.log('got schema:33333333 ', originalSchema2);
|
|
@@ -61,13 +66,13 @@ export function CodeGenActionBtn(_ref) {
|
|
|
61
66
|
});
|
|
62
67
|
|
|
63
68
|
// 出码...
|
|
64
|
-
_context.next =
|
|
69
|
+
_context.next = 22;
|
|
65
70
|
return CodeGenerator.generateCode({
|
|
66
71
|
solution: 'vuejs3',
|
|
67
72
|
schema: schema,
|
|
68
73
|
flattenResult: true
|
|
69
74
|
});
|
|
70
|
-
case
|
|
75
|
+
case 22:
|
|
71
76
|
result = _context.sent;
|
|
72
77
|
console.log('generated: ', result);
|
|
73
78
|
setState(function (prev) {
|
|
@@ -76,10 +81,10 @@ export function CodeGenActionBtn(_ref) {
|
|
|
76
81
|
result: result
|
|
77
82
|
});
|
|
78
83
|
});
|
|
79
|
-
_context.next =
|
|
84
|
+
_context.next = 31;
|
|
80
85
|
break;
|
|
81
|
-
case
|
|
82
|
-
_context.prev =
|
|
86
|
+
case 27:
|
|
87
|
+
_context.prev = 27;
|
|
83
88
|
_context.t0 = _context["catch"](0);
|
|
84
89
|
console.error('failed to run code generator: ', _context.t0);
|
|
85
90
|
setState(function (prev) {
|
|
@@ -88,11 +93,11 @@ export function CodeGenActionBtn(_ref) {
|
|
|
88
93
|
error: _context.t0 instanceof Error ? _context.t0 : new Error("" + ((_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || _context.t0))
|
|
89
94
|
});
|
|
90
95
|
});
|
|
91
|
-
case
|
|
96
|
+
case 31:
|
|
92
97
|
case "end":
|
|
93
98
|
return _context.stop();
|
|
94
99
|
}
|
|
95
|
-
}, _callee, null, [[0,
|
|
100
|
+
}, _callee, null, [[0, 27]]);
|
|
96
101
|
}));
|
|
97
102
|
return function handleClick() {
|
|
98
103
|
return _ref2.apply(this, arguments);
|
|
@@ -51,13 +51,18 @@ function CodeGenActionBtn(_ref) {
|
|
|
51
51
|
case 4:
|
|
52
52
|
originalSchema = _context.sent;
|
|
53
53
|
console.log('ctx ', ctx);
|
|
54
|
-
|
|
54
|
+
console.log('isActive ', ctx.workspace.isActive);
|
|
55
|
+
console.log('window ', ctx.workspace.window);
|
|
56
|
+
console.log('skeleton ', ctx.workspace.skeleton);
|
|
57
|
+
console.log('windows ', ctx.workspace.windows);
|
|
58
|
+
console.log('ctx ', ctx.workspace.currentProject);
|
|
59
|
+
_context.next = 13;
|
|
55
60
|
return ctx.project.exportSchema();
|
|
56
|
-
case
|
|
61
|
+
case 13:
|
|
57
62
|
originalSchema2 = _context.sent;
|
|
58
|
-
_context.next =
|
|
63
|
+
_context.next = 16;
|
|
59
64
|
return fixSchema(originalSchema);
|
|
60
|
-
case
|
|
65
|
+
case 16:
|
|
61
66
|
schema = _context.sent;
|
|
62
67
|
console.log('got schema:222222 ', schema);
|
|
63
68
|
console.log('got schema:33333333 ', originalSchema2);
|
|
@@ -69,13 +74,13 @@ function CodeGenActionBtn(_ref) {
|
|
|
69
74
|
});
|
|
70
75
|
|
|
71
76
|
// 出码...
|
|
72
|
-
_context.next =
|
|
77
|
+
_context.next = 22;
|
|
73
78
|
return CodeGenerator.generateCode({
|
|
74
79
|
solution: 'vuejs3',
|
|
75
80
|
schema: schema,
|
|
76
81
|
flattenResult: true
|
|
77
82
|
});
|
|
78
|
-
case
|
|
83
|
+
case 22:
|
|
79
84
|
result = _context.sent;
|
|
80
85
|
console.log('generated: ', result);
|
|
81
86
|
setState(function (prev) {
|
|
@@ -84,10 +89,10 @@ function CodeGenActionBtn(_ref) {
|
|
|
84
89
|
result: result
|
|
85
90
|
});
|
|
86
91
|
});
|
|
87
|
-
_context.next =
|
|
92
|
+
_context.next = 31;
|
|
88
93
|
break;
|
|
89
|
-
case
|
|
90
|
-
_context.prev =
|
|
94
|
+
case 27:
|
|
95
|
+
_context.prev = 27;
|
|
91
96
|
_context.t0 = _context["catch"](0);
|
|
92
97
|
console.error('failed to run code generator: ', _context.t0);
|
|
93
98
|
setState(function (prev) {
|
|
@@ -96,11 +101,11 @@ function CodeGenActionBtn(_ref) {
|
|
|
96
101
|
error: _context.t0 instanceof Error ? _context.t0 : new Error("" + ((_context.t0 === null || _context.t0 === void 0 ? void 0 : _context.t0.message) || _context.t0))
|
|
97
102
|
});
|
|
98
103
|
});
|
|
99
|
-
case
|
|
104
|
+
case 31:
|
|
100
105
|
case "end":
|
|
101
106
|
return _context.stop();
|
|
102
107
|
}
|
|
103
|
-
}, _callee, null, [[0,
|
|
108
|
+
}, _callee, null, [[0, 27]]);
|
|
104
109
|
}));
|
|
105
110
|
return function handleClick() {
|
|
106
111
|
return _ref2.apply(this, arguments);
|