tianheng-ui 0.0.43 → 0.0.46
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/lib/03250ed25fc1b305e9980cf7cf0dfb09.js +1 -0
- package/lib/c755e7fc08446566ee8dd3a8aa8fe43f.js +1715 -0
- package/lib/index.js +1 -1
- package/lib/tianheng-ui.js +26 -16
- package/lib/tianheng-ui.js.map +1 -1
- package/package.json +65 -58
- package/packages/formMaking/Container.vue +22 -9
- package/packages/formMaking/FormConfig.vue +12 -3
- package/packages/formMaking/GenerateFormItem.vue +516 -266
- package/packages/formMaking/WidgetConfig.vue +1361 -760
- package/packages/formMaking/WidgetForm.vue +167 -116
- package/packages/formMaking/WidgetFormItem.vue +466 -284
- package/packages/formMaking/componentsConfig.js +402 -332
package/package.json
CHANGED
@@ -1,58 +1,65 @@
|
|
1
|
-
{
|
2
|
-
"name": "tianheng-ui",
|
3
|
-
"description": "A Vue.js project",
|
4
|
-
"version": "0.0.
|
5
|
-
"author": "shu lang <403732931@qq.com>",
|
6
|
-
"license": "MIT",
|
7
|
-
"private": false,
|
8
|
-
"main": "./lib/tianheng-ui.js",
|
9
|
-
"scripts": {
|
10
|
-
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
11
|
-
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
12
|
-
},
|
13
|
-
"dependencies": {
|
14
|
-
"ace-builds": "^1.4.13",
|
15
|
-
"axios": "^0.27.2",
|
16
|
-
"clipboard": "^2.0.11",
|
17
|
-
"element-ui": "^2.15.6",
|
18
|
-
"normalize.css": "^8.0.1",
|
19
|
-
"nprogress": "^0.2.0",
|
20
|
-
"viewerjs": "^1.10.5",
|
21
|
-
"vue": "^2.5.11",
|
22
|
-
"vue-i18n": "^5.0.3",
|
23
|
-
"vue-router": "^3.5.3",
|
24
|
-
"
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
"
|
29
|
-
"
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
"babel
|
34
|
-
"babel-
|
35
|
-
"babel-
|
36
|
-
"
|
37
|
-
"
|
38
|
-
"
|
39
|
-
"
|
40
|
-
"
|
41
|
-
"
|
42
|
-
"
|
43
|
-
"
|
44
|
-
"
|
45
|
-
"
|
46
|
-
"
|
47
|
-
|
48
|
-
|
49
|
-
"
|
50
|
-
"
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
1
|
+
{
|
2
|
+
"name": "tianheng-ui",
|
3
|
+
"description": "A Vue.js project",
|
4
|
+
"version": "0.0.46",
|
5
|
+
"author": "shu lang <403732931@qq.com>",
|
6
|
+
"license": "MIT",
|
7
|
+
"private": false,
|
8
|
+
"main": "./lib/tianheng-ui.js",
|
9
|
+
"scripts": {
|
10
|
+
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --hot",
|
11
|
+
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
|
12
|
+
},
|
13
|
+
"dependencies": {
|
14
|
+
"ace-builds": "^1.4.13",
|
15
|
+
"axios": "^0.27.2",
|
16
|
+
"clipboard": "^2.0.11",
|
17
|
+
"element-ui": "^2.15.6",
|
18
|
+
"normalize.css": "^8.0.1",
|
19
|
+
"nprogress": "^0.2.0",
|
20
|
+
"viewerjs": "^1.10.5",
|
21
|
+
"vue": "^2.5.11",
|
22
|
+
"vue-i18n": "^5.0.3",
|
23
|
+
"vue-router": "^3.5.3",
|
24
|
+
"vue2-editor": "^2.10.3",
|
25
|
+
"vuedraggable": "^2.24.3"
|
26
|
+
},
|
27
|
+
"browserslist": [
|
28
|
+
"> 1%",
|
29
|
+
"last 2 versions",
|
30
|
+
"not ie <= 8"
|
31
|
+
],
|
32
|
+
"devDependencies": {
|
33
|
+
"@babel/core": "^7.0.0",
|
34
|
+
"@babel/plugin-proposal-class-properties": "^7.0.0",
|
35
|
+
"@babel/plugin-proposal-json-strings": "^7.0.0",
|
36
|
+
"@babel/plugin-syntax-dynamic-import": "^7.0.0",
|
37
|
+
"@babel/plugin-syntax-import-meta": "^7.0.0",
|
38
|
+
"@babel/preset-env": "^7.0.0",
|
39
|
+
"@types/ace": "0.0.42",
|
40
|
+
"babel-loader": "^8.2.5",
|
41
|
+
"cross-env": "^5.0.5",
|
42
|
+
"css-loader": "^0.28.7",
|
43
|
+
"file-loader": "^1.1.4",
|
44
|
+
"less": "^3.9.0",
|
45
|
+
"less-loader": "^4.1.0",
|
46
|
+
"sass": "^1.26.5",
|
47
|
+
"sass-loader": "^7.3.1",
|
48
|
+
"uglifyjs-webpack-plugin": "^2.2.0",
|
49
|
+
"vue-loader": "^14.2.4",
|
50
|
+
"vue-template-compiler": "^2.4.4",
|
51
|
+
"webpack": "^4.46.0",
|
52
|
+
"webpack-cli": "^3.3.12",
|
53
|
+
"webpack-dev-server": "^3.11.3"
|
54
|
+
},
|
55
|
+
"files": [
|
56
|
+
"lib",
|
57
|
+
"packages"
|
58
|
+
],
|
59
|
+
"homepage": "",
|
60
|
+
"keywords": [
|
61
|
+
"tianheng",
|
62
|
+
"tianheng-ui"
|
63
|
+
],
|
64
|
+
"style": "lib/theme-chalk/index.css"
|
65
|
+
}
|
@@ -176,6 +176,7 @@
|
|
176
176
|
<widget-config
|
177
177
|
v-show="configTab == 'widget'"
|
178
178
|
:data="widgetFormSelect"
|
179
|
+
:remoteApis="remoteApis"
|
179
180
|
></widget-config>
|
180
181
|
<form-config
|
181
182
|
v-show="configTab == 'form'"
|
@@ -298,6 +299,14 @@
|
|
298
299
|
</template>
|
299
300
|
|
300
301
|
<script>
|
302
|
+
import ace from "ace-builds";
|
303
|
+
import "ace-builds/src-min-noconflict/mode-json";
|
304
|
+
import "ace-builds/src-min-noconflict/mode-html";
|
305
|
+
import htmlWorkerUrl from "file-loader!ace-builds/src-min-noconflict/worker-html";
|
306
|
+
ace.config.setModuleUrl("ace/mode/html_worker", htmlWorkerUrl);
|
307
|
+
import jsonWorkerUrl from "file-loader!ace-builds/src-noconflict/worker-json";
|
308
|
+
ace.config.setModuleUrl("ace/mode/json_worker", jsonWorkerUrl);
|
309
|
+
|
301
310
|
import Draggable from "vuedraggable";
|
302
311
|
import Clipboard from "clipboard";
|
303
312
|
import WidgetConfig from "./WidgetConfig";
|
@@ -370,6 +379,10 @@ export default {
|
|
370
379
|
layoutFields: {
|
371
380
|
type: Array,
|
372
381
|
default: () => ["grid"]
|
382
|
+
},
|
383
|
+
remoteApis: {
|
384
|
+
type: Array,
|
385
|
+
default: () => []
|
373
386
|
}
|
374
387
|
},
|
375
388
|
data() {
|
@@ -423,7 +436,8 @@ export default {
|
|
423
436
|
uploadEditor: null,
|
424
437
|
jsonCopyValue: "",
|
425
438
|
jsonClipboard: null,
|
426
|
-
jsonEg: `
|
439
|
+
jsonEg: `
|
440
|
+
{
|
427
441
|
"list": [],
|
428
442
|
"config": {
|
429
443
|
"labelWidth": 100,
|
@@ -465,16 +479,16 @@ export default {
|
|
465
479
|
this.configTab = value;
|
466
480
|
},
|
467
481
|
handleMoveEnd(evt) {
|
468
|
-
console.log("end", evt);
|
482
|
+
// console.log("end", evt);
|
469
483
|
},
|
470
484
|
handleMoveStart({ oldIndex }) {
|
471
|
-
console.log("start", oldIndex, this.basicComponents);
|
485
|
+
// console.log("start", oldIndex, this.basicComponents);
|
472
486
|
},
|
473
487
|
handleMove() {
|
474
488
|
return true;
|
475
489
|
},
|
476
490
|
handlePreview() {
|
477
|
-
console.log(this.widgetForm);
|
491
|
+
// console.log(this.widgetForm);
|
478
492
|
this.previewVisible = true;
|
479
493
|
},
|
480
494
|
handleTest() {
|
@@ -494,7 +508,6 @@ export default {
|
|
494
508
|
handleGenerateJson() {
|
495
509
|
this.jsonVisible = true;
|
496
510
|
this.jsonTemplate = this.widgetForm;
|
497
|
-
console.log(JSON.stringify(this.widgetForm));
|
498
511
|
this.$nextTick(() => {
|
499
512
|
const editor = ace.edit("jsoneditor");
|
500
513
|
editor.session.setMode("ace/mode/json");
|
@@ -502,7 +515,7 @@ export default {
|
|
502
515
|
if (!this.jsonClipboard) {
|
503
516
|
this.jsonClipboard = new Clipboard(".json-btn");
|
504
517
|
this.jsonClipboard.on("success", e => {
|
505
|
-
this.$message.success(
|
518
|
+
this.$message.success("复制成功");
|
506
519
|
});
|
507
520
|
}
|
508
521
|
this.jsonCopyValue = JSON.stringify(this.widgetForm);
|
@@ -566,18 +579,18 @@ export default {
|
|
566
579
|
}
|
567
580
|
},
|
568
581
|
handleInput(val) {
|
569
|
-
console.log(val);
|
582
|
+
// console.log(val);
|
570
583
|
this.blank = val;
|
571
584
|
},
|
572
585
|
handleDataChange(field, value, data) {
|
573
|
-
console.log(field, value, data);
|
586
|
+
// console.log(field, value, data);
|
574
587
|
}
|
575
588
|
},
|
576
589
|
watch: {
|
577
590
|
widgetForm: {
|
578
591
|
deep: true,
|
579
592
|
handler: function(val) {
|
580
|
-
console.log(this.$refs.widgetForm);
|
593
|
+
// console.log(this.$refs.widgetForm);
|
581
594
|
}
|
582
595
|
},
|
583
596
|
$lang: function(val) {
|
@@ -1,6 +1,10 @@
|
|
1
1
|
<template>
|
2
2
|
<div class="form-config-container">
|
3
3
|
<el-form label-position="top">
|
4
|
+
<el-form-item label="表单标题">
|
5
|
+
<el-input v-model="data.title"></el-input>
|
6
|
+
</el-form-item>
|
7
|
+
|
4
8
|
<el-form-item label="标签对齐方式">
|
5
9
|
<el-radio-group v-model="data.labelPosition">
|
6
10
|
<el-radio-button label="left">左对齐</el-radio-button>
|
@@ -10,7 +14,12 @@
|
|
10
14
|
</el-form-item>
|
11
15
|
|
12
16
|
<el-form-item label="表单标签宽度">
|
13
|
-
<el-input-number
|
17
|
+
<el-input-number
|
18
|
+
v-model="data.labelWidth"
|
19
|
+
:min="0"
|
20
|
+
:max="200"
|
21
|
+
:step="10"
|
22
|
+
></el-input-number>
|
14
23
|
</el-form-item>
|
15
24
|
|
16
25
|
<el-form-item label="组件尺寸">
|
@@ -26,6 +35,6 @@
|
|
26
35
|
|
27
36
|
<script>
|
28
37
|
export default {
|
29
|
-
props: [
|
30
|
-
}
|
38
|
+
props: ["data"]
|
39
|
+
};
|
31
40
|
</script>
|