cloudcc-cli 1.3.6 → 1.3.7
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.
- package/README.md +947 -939
- package/bin/build.js +5 -5
- package/bin/buildccbasesdk.js +5 -5
- package/bin/buildccsdk.js +5 -5
- package/bin/buildtag.js +6 -6
- package/bin/create.js +5 -5
- package/bin/publish.js +5 -5
- package/bin/publishh5.js +6 -6
- package/package.json +38 -38
- package/src/buildTag.js +74 -74
- package/src/builderBaseSDK.js +89 -89
- package/src/builderPlugin.js +194 -194
- package/src/builderSDK.js +160 -160
- package/src/creatorTemProject.js +90 -90
- package/src/publishProject.js +260 -264
- package/src/publishProjectH5.js +180 -180
- package/template/generateIDjs +4 -4
- package/template/httpjs +107 -107
- package/template/index.js +65 -65
- package/template/indexvue +343 -343
- package/template/mainjs +16 -16
- package/template/package-lockjson +12154 -12154
- package/template/packagejson +58 -58
- package/template/vueconfigjs +20 -20
- package/test/index.html +14 -14
- package/test/test.js +5 -5
- package/utils/askTool.js +95 -95
- package/utils/changeVersion copy.js +74 -74
- package/utils/changeVersion.js +26 -26
- package/utils/checkVersion.js +90 -90
- package/utils/deploy.js +8 -8
- package/utils/encryption.js +20 -20
- package/utils/http.js +95 -95
- package/utils/md2html.js +88 -88
- package/utils/notifyIM.js +86 -86
- package/utils/pushCode.js +185 -185
- package/utils/test.js +1 -1
- package/utils/trigger.js +15 -15
- package/utils/updatei18n.js +126 -126
package/template/indexvue
CHANGED
|
@@ -1,343 +1,343 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="cloudccButton" @mouseover="myMouseover">
|
|
3
|
-
<el-button
|
|
4
|
-
v-loading.fullscreen.lock="fullscreenLoading"
|
|
5
|
-
element-loading-text="loading..."
|
|
6
|
-
:style="`font-size:` + elePropObj.fontSize + `px;` + elePropObj.style"
|
|
7
|
-
:type="elePropObj.type"
|
|
8
|
-
@click="handleClick"
|
|
9
|
-
>{{ elePropObj.defaultValue }}</el-button
|
|
10
|
-
>
|
|
11
|
-
</div >
|
|
12
|
-
</template >
|
|
13
|
-
|
|
14
|
-
<script>
|
|
15
|
-
import axios from "../utils/http";
|
|
16
|
-
export default {
|
|
17
|
-
name: "my-button",
|
|
18
|
-
props: {
|
|
19
|
-
elePropObj: {
|
|
20
|
-
type: Object,
|
|
21
|
-
default: () => ({}),
|
|
22
|
-
},
|
|
23
|
-
eleEventObj: {
|
|
24
|
-
type: Object,
|
|
25
|
-
default: () => ({
|
|
26
|
-
myCreated: `function created(self) {
|
|
27
|
-
// self即this,本组件的vue实例
|
|
28
|
-
}`,
|
|
29
|
-
myMounted: `function mounted(self) {
|
|
30
|
-
// self即this,本组件的vue实例
|
|
31
|
-
}`,
|
|
32
|
-
myDestroyed: `function destroyed(self) {
|
|
33
|
-
// self即this,本组件的vue实例
|
|
34
|
-
}`,
|
|
35
|
-
myMouseover: `function myMouseover(self) {
|
|
36
|
-
// self即this,本组件的vue实例
|
|
37
|
-
}`,
|
|
38
|
-
}),
|
|
39
|
-
},
|
|
40
|
-
version: {
|
|
41
|
-
type: String,
|
|
42
|
-
default: "",
|
|
43
|
-
},
|
|
44
|
-
},
|
|
45
|
-
data() {
|
|
46
|
-
return {
|
|
47
|
-
fullscreenLoading: false,
|
|
48
|
-
componentInfo: {
|
|
49
|
-
component: "my-button",
|
|
50
|
-
// 按钮
|
|
51
|
-
compName: "我的按钮",
|
|
52
|
-
icon: "#icon-anniu",
|
|
53
|
-
sort: 1,
|
|
54
|
-
compDesc: "组件描述信息",
|
|
55
|
-
/* 组件分类:
|
|
56
|
-
* private:私有组件(自己组织可见)
|
|
57
|
-
* beta:组件测试版本
|
|
58
|
-
*/
|
|
59
|
-
category: "private", // public private
|
|
60
|
-
version: "0.0.1",
|
|
61
|
-
},
|
|
62
|
-
style: {
|
|
63
|
-
unit: "px",
|
|
64
|
-
width: 72,
|
|
65
|
-
height: 38,
|
|
66
|
-
top: 0,
|
|
67
|
-
left: 0,
|
|
68
|
-
rotate: 0,
|
|
69
|
-
opacity: 1,
|
|
70
|
-
},
|
|
71
|
-
styleOption: {
|
|
72
|
-
word: {
|
|
73
|
-
lable: "label.help",
|
|
74
|
-
type: "word",
|
|
75
|
-
link: "https://zucfl0psd6.feishu.cn/wiki/wikcnJNCCWZB05fOrvRkBuNQ7re",
|
|
76
|
-
},
|
|
77
|
-
unit: {
|
|
78
|
-
lable: "label.custom.unit",
|
|
79
|
-
type: "option",
|
|
80
|
-
options: [
|
|
81
|
-
{
|
|
82
|
-
value: "px",
|
|
83
|
-
label: "label.custom.pixel",
|
|
84
|
-
},
|
|
85
|
-
{
|
|
86
|
-
value: "%",
|
|
87
|
-
label: "label.percent",
|
|
88
|
-
},
|
|
89
|
-
{
|
|
90
|
-
value: "hw",
|
|
91
|
-
label: "label.custom.viewport",
|
|
92
|
-
},
|
|
93
|
-
],
|
|
94
|
-
},
|
|
95
|
-
width: {
|
|
96
|
-
lable: "label.custom.width",
|
|
97
|
-
type: "input",
|
|
98
|
-
inputType: "number",
|
|
99
|
-
},
|
|
100
|
-
height: {
|
|
101
|
-
lable: "label.custom.height",
|
|
102
|
-
type: "input",
|
|
103
|
-
inputType: "number",
|
|
104
|
-
},
|
|
105
|
-
top: {
|
|
106
|
-
lable: "label.dev.y.coordinate",
|
|
107
|
-
type: "input",
|
|
108
|
-
inputType: "number",
|
|
109
|
-
},
|
|
110
|
-
left: {
|
|
111
|
-
lable: "label.dev.x.coordinate",
|
|
112
|
-
type: "input",
|
|
113
|
-
inputType: "number",
|
|
114
|
-
},
|
|
115
|
-
},
|
|
116
|
-
propObj: {
|
|
117
|
-
id: "",
|
|
118
|
-
pageApi: "createPage",
|
|
119
|
-
defaultValue: "Button",
|
|
120
|
-
type: "primary",
|
|
121
|
-
fontSize: 16,
|
|
122
|
-
functionContent: `function test(conext,value) {
|
|
123
|
-
let requestParams = {
|
|
124
|
-
className: "TestUpdate", // 类名 string
|
|
125
|
-
methodName: "queryGao", // 方法名 string
|
|
126
|
-
params: [
|
|
127
|
-
{
|
|
128
|
-
"argType": "java.lang.String",
|
|
129
|
-
"argValue": "1111",
|
|
130
|
-
},
|
|
131
|
-
{
|
|
132
|
-
"argType": "java.lang.String",
|
|
133
|
-
"argValue": "2222",
|
|
134
|
-
}
|
|
135
|
-
], // 请求参数
|
|
136
|
-
};
|
|
137
|
-
return requestParams;
|
|
138
|
-
}`,
|
|
139
|
-
handleComponentId: "",
|
|
140
|
-
axiosAddres: "http://localhost:8080/api/pc/1.0/school/add",
|
|
141
|
-
returnBody: `function test(self,res) {
|
|
142
|
-
console.log(res)
|
|
143
|
-
if (res.returnCode == 200 || "1" == res.returnCode) {
|
|
144
|
-
self.$message({
|
|
145
|
-
message: "提交成功",
|
|
146
|
-
type: "success",
|
|
147
|
-
});
|
|
148
|
-
}
|
|
149
|
-
}`,
|
|
150
|
-
style: "",
|
|
151
|
-
},
|
|
152
|
-
propOption: {
|
|
153
|
-
style: {
|
|
154
|
-
lable: "label.style",
|
|
155
|
-
type: "input",
|
|
156
|
-
},
|
|
157
|
-
defaultValue: {
|
|
158
|
-
lable: "label.dev.defaultvalue",
|
|
159
|
-
type: "defaultValueInput",
|
|
160
|
-
},
|
|
161
|
-
type: {
|
|
162
|
-
lable: "label.dev.button.type",
|
|
163
|
-
type: "option",
|
|
164
|
-
options: [
|
|
165
|
-
{
|
|
166
|
-
value: "primary",
|
|
167
|
-
label: "primary",
|
|
168
|
-
},
|
|
169
|
-
{
|
|
170
|
-
value: "success",
|
|
171
|
-
label: "success",
|
|
172
|
-
},
|
|
173
|
-
{
|
|
174
|
-
value: "info",
|
|
175
|
-
label: "info",
|
|
176
|
-
},
|
|
177
|
-
{
|
|
178
|
-
value: "warning",
|
|
179
|
-
label: "warning",
|
|
180
|
-
},
|
|
181
|
-
{
|
|
182
|
-
value: "danger",
|
|
183
|
-
label: "danger",
|
|
184
|
-
},
|
|
185
|
-
],
|
|
186
|
-
},
|
|
187
|
-
fontSize: {
|
|
188
|
-
lable: "label.dev.font.size",
|
|
189
|
-
type: "input",
|
|
190
|
-
inputType: "number",
|
|
191
|
-
},
|
|
192
|
-
handleComponentId: {
|
|
193
|
-
lable: "label.dev.associated.compid",
|
|
194
|
-
type: "input",
|
|
195
|
-
},
|
|
196
|
-
functionContent: {
|
|
197
|
-
lable: "label.dev.request.body",
|
|
198
|
-
type: "code",
|
|
199
|
-
},
|
|
200
|
-
axiosAddres: {
|
|
201
|
-
lable: "label.dev.interface.address",
|
|
202
|
-
type: "code",
|
|
203
|
-
},
|
|
204
|
-
returnBody: {
|
|
205
|
-
lable: "label.dev.return.body",
|
|
206
|
-
type: "code",
|
|
207
|
-
},
|
|
208
|
-
},
|
|
209
|
-
events: {
|
|
210
|
-
myCreated: `function created(self) {
|
|
211
|
-
// self即this,本组件的vue实例
|
|
212
|
-
}`,
|
|
213
|
-
myMounted: `function mounted(self) {
|
|
214
|
-
// self即this,本组件的vue实例
|
|
215
|
-
}`,
|
|
216
|
-
myDestroyed: `function destroyed(self) {
|
|
217
|
-
// self即this,本组件的vue实例
|
|
218
|
-
}`,
|
|
219
|
-
myMouseover: `function myMouseover(self) {
|
|
220
|
-
// self即this,本组件的vue实例
|
|
221
|
-
}`,
|
|
222
|
-
},
|
|
223
|
-
eventsOption: {
|
|
224
|
-
myCreated: {
|
|
225
|
-
lable: "label.dev.created",
|
|
226
|
-
type: "code",
|
|
227
|
-
},
|
|
228
|
-
myMounted: {
|
|
229
|
-
lable: "label.dev.mounted",
|
|
230
|
-
type: "code",
|
|
231
|
-
},
|
|
232
|
-
myDestroyed: {
|
|
233
|
-
lable: "label.dev.destroyed",
|
|
234
|
-
type: "code",
|
|
235
|
-
},
|
|
236
|
-
myMouseover: {
|
|
237
|
-
lable: "label.dev.mouseover",
|
|
238
|
-
type: "code",
|
|
239
|
-
},
|
|
240
|
-
},
|
|
241
|
-
animations: [],
|
|
242
|
-
groupStyle: {},
|
|
243
|
-
isLock: false,
|
|
244
|
-
};
|
|
245
|
-
},
|
|
246
|
-
created() {
|
|
247
|
-
this.$Components.set(this.elePropObj.id, this);
|
|
248
|
-
if (this.$Components.get("editMode") == "edit") {
|
|
249
|
-
// 编辑模式不触发
|
|
250
|
-
return;
|
|
251
|
-
}
|
|
252
|
-
let myCreated = eval("(false || " + this.eleEventObj.myCreated + ")");
|
|
253
|
-
myCreated(this);
|
|
254
|
-
},
|
|
255
|
-
mounted() {
|
|
256
|
-
if (this.$Components.get("editMode") == "edit") {
|
|
257
|
-
// 编辑模式不触发
|
|
258
|
-
return;
|
|
259
|
-
}
|
|
260
|
-
let myMounted = eval("(false || " + this.eleEventObj.myMounted + ")");
|
|
261
|
-
myMounted(this);
|
|
262
|
-
},
|
|
263
|
-
destroyed() {
|
|
264
|
-
let myDestroyed = eval("(false || " + this.eleEventObj.myDestroyed + ")");
|
|
265
|
-
myDestroyed(this);
|
|
266
|
-
},
|
|
267
|
-
methods: {
|
|
268
|
-
myMouseover() {
|
|
269
|
-
let mouseoverEvent = eval(
|
|
270
|
-
"(false || " + this.eleEventObj.myMouseover + ")"
|
|
271
|
-
);
|
|
272
|
-
mouseoverEvent(this);
|
|
273
|
-
},
|
|
274
|
-
returnBodyHandle(res) {
|
|
275
|
-
let self = this;
|
|
276
|
-
let getReturnBody = eval("(false || " + this.elePropObj.returnBody + ")");
|
|
277
|
-
getReturnBody(self, res);
|
|
278
|
-
},
|
|
279
|
-
handleClick() {
|
|
280
|
-
if (
|
|
281
|
-
null == this.elePropObj.handleComponentId ||
|
|
282
|
-
"" == this.elePropObj.handleComponentId
|
|
283
|
-
) {
|
|
284
|
-
return;
|
|
285
|
-
}
|
|
286
|
-
let components = this.elePropObj.handleComponentId
|
|
287
|
-
.split(",")
|
|
288
|
-
.map((item) => {
|
|
289
|
-
return this.$Components.get(item);
|
|
290
|
-
});
|
|
291
|
-
let test = eval("(false || " + this.elePropObj.functionContent + ")");
|
|
292
|
-
// 接收请求体,访问接口
|
|
293
|
-
let body = test(
|
|
294
|
-
this.$Components.get(this.elePropObj.pageApi),
|
|
295
|
-
...components
|
|
296
|
-
);
|
|
297
|
-
if (this.elePropObj.axiosAddres && body) {
|
|
298
|
-
this.handleAxios(this.elePropObj.axiosAddres, body);
|
|
299
|
-
}
|
|
300
|
-
},
|
|
301
|
-
/**
|
|
302
|
-
* 网络请求
|
|
303
|
-
*/
|
|
304
|
-
handleAxios(path, params) {
|
|
305
|
-
this.fullscreenLoading = true;
|
|
306
|
-
axios
|
|
307
|
-
.postLight(path, params)
|
|
308
|
-
.then(
|
|
309
|
-
(res) => {
|
|
310
|
-
this.fullscreenLoading = false;
|
|
311
|
-
this.returnBodyHandle(res);
|
|
312
|
-
},
|
|
313
|
-
(err) => {
|
|
314
|
-
this.fullscreenLoading = false;
|
|
315
|
-
this.$message({
|
|
316
|
-
message: err,
|
|
317
|
-
type: "error",
|
|
318
|
-
});
|
|
319
|
-
}
|
|
320
|
-
)
|
|
321
|
-
.catch((error) => {
|
|
322
|
-
this.fullscreenLoading = false;
|
|
323
|
-
this.$message({
|
|
324
|
-
message: error,
|
|
325
|
-
type: "error",
|
|
326
|
-
});
|
|
327
|
-
});
|
|
328
|
-
},
|
|
329
|
-
},
|
|
330
|
-
};
|
|
331
|
-
</script>
|
|
332
|
-
<style >
|
|
333
|
-
.cloudccButton {
|
|
334
|
-
height: 100%;
|
|
335
|
-
width: 100%;
|
|
336
|
-
padding: 0px !important;
|
|
337
|
-
}
|
|
338
|
-
.cloudccButton .el-button {
|
|
339
|
-
height: 100%;
|
|
340
|
-
width: 100%;
|
|
341
|
-
padding: 0px !important;
|
|
342
|
-
}
|
|
343
|
-
</style>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="cloudccButton" @mouseover="myMouseover">
|
|
3
|
+
<el-button
|
|
4
|
+
v-loading.fullscreen.lock="fullscreenLoading"
|
|
5
|
+
element-loading-text="loading..."
|
|
6
|
+
:style="`font-size:` + elePropObj.fontSize + `px;` + elePropObj.style"
|
|
7
|
+
:type="elePropObj.type"
|
|
8
|
+
@click="handleClick"
|
|
9
|
+
>{{ elePropObj.defaultValue }}</el-button
|
|
10
|
+
>
|
|
11
|
+
</div >
|
|
12
|
+
</template >
|
|
13
|
+
|
|
14
|
+
<script>
|
|
15
|
+
import axios from "../utils/http";
|
|
16
|
+
export default {
|
|
17
|
+
name: "my-button",
|
|
18
|
+
props: {
|
|
19
|
+
elePropObj: {
|
|
20
|
+
type: Object,
|
|
21
|
+
default: () => ({}),
|
|
22
|
+
},
|
|
23
|
+
eleEventObj: {
|
|
24
|
+
type: Object,
|
|
25
|
+
default: () => ({
|
|
26
|
+
myCreated: `function created(self) {
|
|
27
|
+
// self即this,本组件的vue实例
|
|
28
|
+
}`,
|
|
29
|
+
myMounted: `function mounted(self) {
|
|
30
|
+
// self即this,本组件的vue实例
|
|
31
|
+
}`,
|
|
32
|
+
myDestroyed: `function destroyed(self) {
|
|
33
|
+
// self即this,本组件的vue实例
|
|
34
|
+
}`,
|
|
35
|
+
myMouseover: `function myMouseover(self) {
|
|
36
|
+
// self即this,本组件的vue实例
|
|
37
|
+
}`,
|
|
38
|
+
}),
|
|
39
|
+
},
|
|
40
|
+
version: {
|
|
41
|
+
type: String,
|
|
42
|
+
default: "",
|
|
43
|
+
},
|
|
44
|
+
},
|
|
45
|
+
data() {
|
|
46
|
+
return {
|
|
47
|
+
fullscreenLoading: false,
|
|
48
|
+
componentInfo: {
|
|
49
|
+
component: "my-button",
|
|
50
|
+
// 按钮
|
|
51
|
+
compName: "我的按钮",
|
|
52
|
+
icon: "#icon-anniu",
|
|
53
|
+
sort: 1,
|
|
54
|
+
compDesc: "组件描述信息",
|
|
55
|
+
/* 组件分类:
|
|
56
|
+
* private:私有组件(自己组织可见)
|
|
57
|
+
* beta:组件测试版本
|
|
58
|
+
*/
|
|
59
|
+
category: "private", // public private
|
|
60
|
+
version: "0.0.1",
|
|
61
|
+
},
|
|
62
|
+
style: {
|
|
63
|
+
unit: "px",
|
|
64
|
+
width: 72,
|
|
65
|
+
height: 38,
|
|
66
|
+
top: 0,
|
|
67
|
+
left: 0,
|
|
68
|
+
rotate: 0,
|
|
69
|
+
opacity: 1,
|
|
70
|
+
},
|
|
71
|
+
styleOption: {
|
|
72
|
+
word: {
|
|
73
|
+
lable: "label.help",
|
|
74
|
+
type: "word",
|
|
75
|
+
link: "https://zucfl0psd6.feishu.cn/wiki/wikcnJNCCWZB05fOrvRkBuNQ7re",
|
|
76
|
+
},
|
|
77
|
+
unit: {
|
|
78
|
+
lable: "label.custom.unit",
|
|
79
|
+
type: "option",
|
|
80
|
+
options: [
|
|
81
|
+
{
|
|
82
|
+
value: "px",
|
|
83
|
+
label: "label.custom.pixel",
|
|
84
|
+
},
|
|
85
|
+
{
|
|
86
|
+
value: "%",
|
|
87
|
+
label: "label.percent",
|
|
88
|
+
},
|
|
89
|
+
{
|
|
90
|
+
value: "hw",
|
|
91
|
+
label: "label.custom.viewport",
|
|
92
|
+
},
|
|
93
|
+
],
|
|
94
|
+
},
|
|
95
|
+
width: {
|
|
96
|
+
lable: "label.custom.width",
|
|
97
|
+
type: "input",
|
|
98
|
+
inputType: "number",
|
|
99
|
+
},
|
|
100
|
+
height: {
|
|
101
|
+
lable: "label.custom.height",
|
|
102
|
+
type: "input",
|
|
103
|
+
inputType: "number",
|
|
104
|
+
},
|
|
105
|
+
top: {
|
|
106
|
+
lable: "label.dev.y.coordinate",
|
|
107
|
+
type: "input",
|
|
108
|
+
inputType: "number",
|
|
109
|
+
},
|
|
110
|
+
left: {
|
|
111
|
+
lable: "label.dev.x.coordinate",
|
|
112
|
+
type: "input",
|
|
113
|
+
inputType: "number",
|
|
114
|
+
},
|
|
115
|
+
},
|
|
116
|
+
propObj: {
|
|
117
|
+
id: "",
|
|
118
|
+
pageApi: "createPage",
|
|
119
|
+
defaultValue: "Button",
|
|
120
|
+
type: "primary",
|
|
121
|
+
fontSize: 16,
|
|
122
|
+
functionContent: `function test(conext,value) {
|
|
123
|
+
let requestParams = {
|
|
124
|
+
className: "TestUpdate", // 类名 string
|
|
125
|
+
methodName: "queryGao", // 方法名 string
|
|
126
|
+
params: [
|
|
127
|
+
{
|
|
128
|
+
"argType": "java.lang.String",
|
|
129
|
+
"argValue": "1111",
|
|
130
|
+
},
|
|
131
|
+
{
|
|
132
|
+
"argType": "java.lang.String",
|
|
133
|
+
"argValue": "2222",
|
|
134
|
+
}
|
|
135
|
+
], // 请求参数
|
|
136
|
+
};
|
|
137
|
+
return requestParams;
|
|
138
|
+
}`,
|
|
139
|
+
handleComponentId: "",
|
|
140
|
+
axiosAddres: "http://localhost:8080/api/pc/1.0/school/add",
|
|
141
|
+
returnBody: `function test(self,res) {
|
|
142
|
+
console.log(res)
|
|
143
|
+
if (res.returnCode == 200 || "1" == res.returnCode) {
|
|
144
|
+
self.$message({
|
|
145
|
+
message: "提交成功",
|
|
146
|
+
type: "success",
|
|
147
|
+
});
|
|
148
|
+
}
|
|
149
|
+
}`,
|
|
150
|
+
style: "",
|
|
151
|
+
},
|
|
152
|
+
propOption: {
|
|
153
|
+
style: {
|
|
154
|
+
lable: "label.style",
|
|
155
|
+
type: "input",
|
|
156
|
+
},
|
|
157
|
+
defaultValue: {
|
|
158
|
+
lable: "label.dev.defaultvalue",
|
|
159
|
+
type: "defaultValueInput",
|
|
160
|
+
},
|
|
161
|
+
type: {
|
|
162
|
+
lable: "label.dev.button.type",
|
|
163
|
+
type: "option",
|
|
164
|
+
options: [
|
|
165
|
+
{
|
|
166
|
+
value: "primary",
|
|
167
|
+
label: "primary",
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
value: "success",
|
|
171
|
+
label: "success",
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
value: "info",
|
|
175
|
+
label: "info",
|
|
176
|
+
},
|
|
177
|
+
{
|
|
178
|
+
value: "warning",
|
|
179
|
+
label: "warning",
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
value: "danger",
|
|
183
|
+
label: "danger",
|
|
184
|
+
},
|
|
185
|
+
],
|
|
186
|
+
},
|
|
187
|
+
fontSize: {
|
|
188
|
+
lable: "label.dev.font.size",
|
|
189
|
+
type: "input",
|
|
190
|
+
inputType: "number",
|
|
191
|
+
},
|
|
192
|
+
handleComponentId: {
|
|
193
|
+
lable: "label.dev.associated.compid",
|
|
194
|
+
type: "input",
|
|
195
|
+
},
|
|
196
|
+
functionContent: {
|
|
197
|
+
lable: "label.dev.request.body",
|
|
198
|
+
type: "code",
|
|
199
|
+
},
|
|
200
|
+
axiosAddres: {
|
|
201
|
+
lable: "label.dev.interface.address",
|
|
202
|
+
type: "code",
|
|
203
|
+
},
|
|
204
|
+
returnBody: {
|
|
205
|
+
lable: "label.dev.return.body",
|
|
206
|
+
type: "code",
|
|
207
|
+
},
|
|
208
|
+
},
|
|
209
|
+
events: {
|
|
210
|
+
myCreated: `function created(self) {
|
|
211
|
+
// self即this,本组件的vue实例
|
|
212
|
+
}`,
|
|
213
|
+
myMounted: `function mounted(self) {
|
|
214
|
+
// self即this,本组件的vue实例
|
|
215
|
+
}`,
|
|
216
|
+
myDestroyed: `function destroyed(self) {
|
|
217
|
+
// self即this,本组件的vue实例
|
|
218
|
+
}`,
|
|
219
|
+
myMouseover: `function myMouseover(self) {
|
|
220
|
+
// self即this,本组件的vue实例
|
|
221
|
+
}`,
|
|
222
|
+
},
|
|
223
|
+
eventsOption: {
|
|
224
|
+
myCreated: {
|
|
225
|
+
lable: "label.dev.created",
|
|
226
|
+
type: "code",
|
|
227
|
+
},
|
|
228
|
+
myMounted: {
|
|
229
|
+
lable: "label.dev.mounted",
|
|
230
|
+
type: "code",
|
|
231
|
+
},
|
|
232
|
+
myDestroyed: {
|
|
233
|
+
lable: "label.dev.destroyed",
|
|
234
|
+
type: "code",
|
|
235
|
+
},
|
|
236
|
+
myMouseover: {
|
|
237
|
+
lable: "label.dev.mouseover",
|
|
238
|
+
type: "code",
|
|
239
|
+
},
|
|
240
|
+
},
|
|
241
|
+
animations: [],
|
|
242
|
+
groupStyle: {},
|
|
243
|
+
isLock: false,
|
|
244
|
+
};
|
|
245
|
+
},
|
|
246
|
+
created() {
|
|
247
|
+
this.$Components.set(this.elePropObj.id, this);
|
|
248
|
+
if (this.$Components.get("editMode") == "edit") {
|
|
249
|
+
// 编辑模式不触发
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
let myCreated = eval("(false || " + this.eleEventObj.myCreated + ")");
|
|
253
|
+
myCreated(this);
|
|
254
|
+
},
|
|
255
|
+
mounted() {
|
|
256
|
+
if (this.$Components.get("editMode") == "edit") {
|
|
257
|
+
// 编辑模式不触发
|
|
258
|
+
return;
|
|
259
|
+
}
|
|
260
|
+
let myMounted = eval("(false || " + this.eleEventObj.myMounted + ")");
|
|
261
|
+
myMounted(this);
|
|
262
|
+
},
|
|
263
|
+
destroyed() {
|
|
264
|
+
let myDestroyed = eval("(false || " + this.eleEventObj.myDestroyed + ")");
|
|
265
|
+
myDestroyed(this);
|
|
266
|
+
},
|
|
267
|
+
methods: {
|
|
268
|
+
myMouseover() {
|
|
269
|
+
let mouseoverEvent = eval(
|
|
270
|
+
"(false || " + this.eleEventObj.myMouseover + ")"
|
|
271
|
+
);
|
|
272
|
+
mouseoverEvent(this);
|
|
273
|
+
},
|
|
274
|
+
returnBodyHandle(res) {
|
|
275
|
+
let self = this;
|
|
276
|
+
let getReturnBody = eval("(false || " + this.elePropObj.returnBody + ")");
|
|
277
|
+
getReturnBody(self, res);
|
|
278
|
+
},
|
|
279
|
+
handleClick() {
|
|
280
|
+
if (
|
|
281
|
+
null == this.elePropObj.handleComponentId ||
|
|
282
|
+
"" == this.elePropObj.handleComponentId
|
|
283
|
+
) {
|
|
284
|
+
return;
|
|
285
|
+
}
|
|
286
|
+
let components = this.elePropObj.handleComponentId
|
|
287
|
+
.split(",")
|
|
288
|
+
.map((item) => {
|
|
289
|
+
return this.$Components.get(item);
|
|
290
|
+
});
|
|
291
|
+
let test = eval("(false || " + this.elePropObj.functionContent + ")");
|
|
292
|
+
// 接收请求体,访问接口
|
|
293
|
+
let body = test(
|
|
294
|
+
this.$Components.get(this.elePropObj.pageApi),
|
|
295
|
+
...components
|
|
296
|
+
);
|
|
297
|
+
if (this.elePropObj.axiosAddres && body) {
|
|
298
|
+
this.handleAxios(this.elePropObj.axiosAddres, body);
|
|
299
|
+
}
|
|
300
|
+
},
|
|
301
|
+
/**
|
|
302
|
+
* 网络请求
|
|
303
|
+
*/
|
|
304
|
+
handleAxios(path, params) {
|
|
305
|
+
this.fullscreenLoading = true;
|
|
306
|
+
axios
|
|
307
|
+
.postLight(path, params)
|
|
308
|
+
.then(
|
|
309
|
+
(res) => {
|
|
310
|
+
this.fullscreenLoading = false;
|
|
311
|
+
this.returnBodyHandle(res);
|
|
312
|
+
},
|
|
313
|
+
(err) => {
|
|
314
|
+
this.fullscreenLoading = false;
|
|
315
|
+
this.$message({
|
|
316
|
+
message: err,
|
|
317
|
+
type: "error",
|
|
318
|
+
});
|
|
319
|
+
}
|
|
320
|
+
)
|
|
321
|
+
.catch((error) => {
|
|
322
|
+
this.fullscreenLoading = false;
|
|
323
|
+
this.$message({
|
|
324
|
+
message: error,
|
|
325
|
+
type: "error",
|
|
326
|
+
});
|
|
327
|
+
});
|
|
328
|
+
},
|
|
329
|
+
},
|
|
330
|
+
};
|
|
331
|
+
</script>
|
|
332
|
+
<style >
|
|
333
|
+
.cloudccButton {
|
|
334
|
+
height: 100%;
|
|
335
|
+
width: 100%;
|
|
336
|
+
padding: 0px !important;
|
|
337
|
+
}
|
|
338
|
+
.cloudccButton .el-button {
|
|
339
|
+
height: 100%;
|
|
340
|
+
width: 100%;
|
|
341
|
+
padding: 0px !important;
|
|
342
|
+
}
|
|
343
|
+
</style>
|