tianheng-ui 0.1.38 → 0.1.40
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/theme-chalk/styles/feature.scss +2 -4
- package/lib/theme-chalk/styles/variable.scss +2 -0
- package/lib/tianheng-ui.js +5 -5
- package/package.json +1 -1
- package/packages/Dialog/index.vue +1 -4
- package/packages/FormMaking/GenerateForm.vue +1 -1
- package/packages/FormMaking/WidgetConfig.vue +29 -34
- package/packages/FormMaking/WidgetForm.vue +15 -0
- package/packages/FormMaking/WidgetTools.vue +2 -3
- package/packages/FormMaking/custom/items/upload.vue +1 -1
- package/packages/FormMaking/index.vue +2 -0
- package/packages/FormMaking/styles/index.scss +1 -242
- package/packages/TableMaking/WidgetTools.vue +3 -3
- package/packages/TableMaking/custom/items/search/index-h5.vue +13 -2
- package/packages/TableMaking/custom/items/search/index-pc.vue +12 -1
- package/packages/TableMaking/custom/items/table/index-pc.vue +13 -1
- package/packages/TableMaking/generateTable.vue +1 -1
- package/packages/TableMaking/widgetConfig.vue +130 -55
- package/packages/TableMaking/widgetTable.vue +4 -2
- package/packages/FormMaking/FormConfig.vue +0 -190
package/package.json
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
<el-dialog
|
3
3
|
class="th-dialog"
|
4
4
|
:class="[customClass]"
|
5
|
-
:style="{'z-index':zIndex}"
|
6
5
|
:visible.sync="visible"
|
7
6
|
:width="width"
|
8
7
|
:top="top"
|
@@ -88,9 +87,7 @@ export default {
|
|
88
87
|
showFullscreen: { type: Boolean, default: true },
|
89
88
|
fullscreenIcon: { type: String, default: "el-icon-full-screen" },
|
90
89
|
|
91
|
-
showFooter: { type: Boolean, default: true }
|
92
|
-
|
93
|
-
zIndex: Number
|
90
|
+
showFooter: { type: Boolean, default: true }
|
94
91
|
},
|
95
92
|
data() {
|
96
93
|
return {
|
@@ -6,7 +6,7 @@
|
|
6
6
|
:key="index"
|
7
7
|
class="tabs-item"
|
8
8
|
:class="{ 'tabs-item__active': activeTab.value === item.value }"
|
9
|
-
@click="
|
9
|
+
@click="activeTab = item"
|
10
10
|
>
|
11
11
|
{{ item.title }}
|
12
12
|
</div>
|
@@ -14,6 +14,7 @@
|
|
14
14
|
|
15
15
|
<div v-if="activeTab.value === 'field'">
|
16
16
|
<el-form
|
17
|
+
v-if="data.model"
|
17
18
|
:model="data"
|
18
19
|
label-position="left"
|
19
20
|
label-width="80px"
|
@@ -132,6 +133,7 @@
|
|
132
133
|
</el-collapse-item>
|
133
134
|
</el-collapse>
|
134
135
|
</el-form>
|
136
|
+
<th-empty v-else description="请左侧拖拽来添加字段"></th-empty>
|
135
137
|
</div>
|
136
138
|
<div v-if="activeTab.value === 'form'">
|
137
139
|
<el-form
|
@@ -264,17 +266,19 @@
|
|
264
266
|
</el-collapse>
|
265
267
|
</el-form>
|
266
268
|
</div>
|
267
|
-
<div v-if="activeTab.value === 'css'"
|
269
|
+
<div v-if="activeTab.value === 'css'">
|
270
|
+
<th-empty description="开发中,敬请期待..."></th-empty>
|
271
|
+
</div>
|
268
272
|
|
269
273
|
<th-dialog
|
270
|
-
title="动作设置"
|
271
274
|
v-model="eventsDialog.visible"
|
275
|
+
title="动作设置"
|
272
276
|
:modal-append-to-body="false"
|
273
277
|
@on-fullscreen="$refs.codeEditor && $refs.codeEditor.resize()"
|
274
278
|
>
|
275
|
-
<div class="eventsSetting">
|
276
|
-
<div class="list">
|
277
|
-
<div class="
|
279
|
+
<div class="eventsSetting th-flex_box th-is_border">
|
280
|
+
<div class="list th-flex_aside">
|
281
|
+
<div class="events-header">
|
278
282
|
<div>动作库</div>
|
279
283
|
<el-button
|
280
284
|
type="text"
|
@@ -285,8 +289,12 @@
|
|
285
289
|
>
|
286
290
|
</div>
|
287
291
|
<div
|
288
|
-
class="list-item"
|
289
292
|
v-for="(item, index) in eventsDialog.eventScript"
|
293
|
+
class="list-item th-is_hover"
|
294
|
+
:class="{
|
295
|
+
'th-is_active':
|
296
|
+
eventsDialog.active && eventsDialog.active.label === item.label
|
297
|
+
}"
|
290
298
|
:key="item.key"
|
291
299
|
@click="eventsDialog.active = item"
|
292
300
|
>
|
@@ -302,7 +310,7 @@
|
|
302
310
|
</el-popconfirm>
|
303
311
|
</div>
|
304
312
|
</div>
|
305
|
-
<div class="detail" v-if="eventsDialog.active">
|
313
|
+
<div class="detail th-fiex_content" v-if="eventsDialog.active">
|
306
314
|
<div>
|
307
315
|
<span>Function Name</span>
|
308
316
|
<el-input
|
@@ -474,13 +482,6 @@ export default {
|
|
474
482
|
}
|
475
483
|
},
|
476
484
|
methods: {
|
477
|
-
handleTabsChange(item) {
|
478
|
-
if (!this.data.model)
|
479
|
-
return this.$message.warning("请从左侧拖拽来添加组件");
|
480
|
-
|
481
|
-
this.activeTab = item;
|
482
|
-
},
|
483
|
-
|
484
485
|
handleEventDialogShow() {
|
485
486
|
this.eventsDialog = {
|
486
487
|
visible: true,
|
@@ -577,6 +578,7 @@ export default {
|
|
577
578
|
display: flex;
|
578
579
|
align-items: center;
|
579
580
|
height: 45px;
|
581
|
+
z-index: 10;
|
580
582
|
|
581
583
|
.tabs-item {
|
582
584
|
flex: 1;
|
@@ -599,8 +601,18 @@ export default {
|
|
599
601
|
|
600
602
|
.eventsSetting {
|
601
603
|
height: 100%;
|
602
|
-
|
603
|
-
|
604
|
+
|
605
|
+
.events-header {
|
606
|
+
position: sticky;
|
607
|
+
top: 0;
|
608
|
+
display: flex;
|
609
|
+
align-items: center;
|
610
|
+
justify-content: space-between;
|
611
|
+
padding: 5px;
|
612
|
+
line-height: 30px;
|
613
|
+
border-bottom: 1px solid #eee;
|
614
|
+
background: #f2f6fc;
|
615
|
+
}
|
604
616
|
|
605
617
|
.list {
|
606
618
|
width: 270px;
|
@@ -608,18 +620,6 @@ export default {
|
|
608
620
|
overflow-y: overlay;
|
609
621
|
border-right: 1px solid #eee;
|
610
622
|
|
611
|
-
.list-header {
|
612
|
-
position: sticky;
|
613
|
-
top: 0;
|
614
|
-
display: flex;
|
615
|
-
align-items: center;
|
616
|
-
justify-content: space-between;
|
617
|
-
padding: 5px;
|
618
|
-
line-height: 30px;
|
619
|
-
border-bottom: 1px solid #eee;
|
620
|
-
background: #f2f6fc;
|
621
|
-
}
|
622
|
-
|
623
623
|
.list-item {
|
624
624
|
display: flex;
|
625
625
|
// align-items: center;
|
@@ -640,14 +640,9 @@ export default {
|
|
640
640
|
cursor: pointer;
|
641
641
|
}
|
642
642
|
}
|
643
|
-
|
644
|
-
.list-item:hover {
|
645
|
-
background-color: #f2f6fc;
|
646
|
-
}
|
647
643
|
}
|
648
644
|
|
649
645
|
.detail {
|
650
|
-
flex: 1;
|
651
646
|
padding: 10px;
|
652
647
|
|
653
648
|
> div:nth-child(1) {
|
@@ -121,5 +121,20 @@ export default {
|
|
121
121
|
position: relative;
|
122
122
|
width: 100%;
|
123
123
|
height: calc(100% - 45px);
|
124
|
+
overflow-y: scroll;
|
125
|
+
|
126
|
+
.form-empty {
|
127
|
+
position: absolute;
|
128
|
+
text-align: center;
|
129
|
+
width: 400px;
|
130
|
+
top: 200px;
|
131
|
+
left: 50%;
|
132
|
+
margin-left: -200px;
|
133
|
+
color: #ccc;
|
134
|
+
|
135
|
+
.th-empty-description {
|
136
|
+
font-size: 20px;
|
137
|
+
}
|
138
|
+
}
|
124
139
|
}
|
125
140
|
</style>
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="widgetTools
|
2
|
+
<div class="widgetTools">
|
3
3
|
<div class="left">
|
4
4
|
<slot> </slot>
|
5
5
|
</div>
|
@@ -215,7 +215,6 @@
|
|
215
215
|
title="获取数据"
|
216
216
|
:modal-append-to-body="false"
|
217
217
|
:showFooter="false"
|
218
|
-
:z-index="99999"
|
219
218
|
@on-close="dialogResultData.show = false"
|
220
219
|
@on-fullscreen="$refs.dataCodeEditor.resize()"
|
221
220
|
>
|
@@ -506,7 +505,7 @@ export default {
|
|
506
505
|
width: 100%;
|
507
506
|
height: 45px;
|
508
507
|
padding: 0 15px;
|
509
|
-
|
508
|
+
border-bottom: solid 1px #e4e7ed;
|
510
509
|
|
511
510
|
.left {
|
512
511
|
}
|
@@ -263,6 +263,7 @@ export default {
|
|
263
263
|
},
|
264
264
|
config(val) {
|
265
265
|
this.setConfig(val);
|
266
|
+
this.initApiConfig()
|
266
267
|
},
|
267
268
|
apiOptions(val) {
|
268
269
|
this.initApiConfig();
|
@@ -314,6 +315,7 @@ export default {
|
|
314
315
|
this.apiConfig[item.id] = item;
|
315
316
|
});
|
316
317
|
}
|
318
|
+
this.formConfig.config.network = this.apiConfig;
|
317
319
|
},
|
318
320
|
|
319
321
|
handleConfigSelect(value) {
|
@@ -1,7 +1,7 @@
|
|
1
1
|
$primary-color: #409eff;
|
2
2
|
$primary-background-color: #ecf5ff;
|
3
3
|
|
4
|
-
.formMaking {
|
4
|
+
.th-formMaking {
|
5
5
|
height: 100%;
|
6
6
|
|
7
7
|
*,
|
@@ -22,16 +22,6 @@ $primary-background-color: #ecf5ff;
|
|
22
22
|
padding: 0;
|
23
23
|
}
|
24
24
|
|
25
|
-
.fa-icon {
|
26
|
-
width: auto;
|
27
|
-
height: 1em; /* 或任意其它字体大小相对值 */
|
28
|
-
|
29
|
-
/* 要在 Safari 中正常工作,需要再引入如下两行代码 */
|
30
|
-
max-width: 100%;
|
31
|
-
max-height: 100%;
|
32
|
-
vertical-align: middle;
|
33
|
-
}
|
34
|
-
|
35
25
|
.isHideFormLabel {
|
36
26
|
.el-form-item__label {
|
37
27
|
display: none;
|
@@ -41,160 +31,7 @@ $primary-background-color: #ecf5ff;
|
|
41
31
|
}
|
42
32
|
}
|
43
33
|
|
44
|
-
.container-box {
|
45
|
-
background: #fff;
|
46
|
-
height: 100%;
|
47
|
-
border: 1px solid #e0e0e0;
|
48
|
-
|
49
|
-
.el-container {
|
50
|
-
height: 100% !important;
|
51
|
-
}
|
52
|
-
|
53
|
-
& > .el-container {
|
54
|
-
background: #fff;
|
55
|
-
}
|
56
|
-
.fm2-main {
|
57
|
-
position: relative;
|
58
|
-
|
59
|
-
& > .el-container {
|
60
|
-
position: absolute;
|
61
|
-
top: 0;
|
62
|
-
bottom: 0;
|
63
|
-
left: 0;
|
64
|
-
right: 0;
|
65
|
-
}
|
66
|
-
}
|
67
|
-
main {
|
68
|
-
padding: 0;
|
69
|
-
}
|
70
|
-
|
71
|
-
footer {
|
72
|
-
height: 30px;
|
73
|
-
line-height: 30px;
|
74
|
-
border-top: 1px solid #e0e0e0;
|
75
|
-
font-size: 12px;
|
76
|
-
text-align: right;
|
77
|
-
color: $primary-color;
|
78
|
-
background: #fafafa;
|
79
|
-
|
80
|
-
a {
|
81
|
-
color: $primary-color;
|
82
|
-
}
|
83
|
-
}
|
84
|
-
|
85
|
-
.codeDialog {
|
86
|
-
.el-tabs {
|
87
|
-
height: 100%;
|
88
|
-
}
|
89
|
-
.el-tabs__content {
|
90
|
-
height: calc(100% - 40px);
|
91
|
-
}
|
92
|
-
.el-tab-pane {
|
93
|
-
height: 100%;
|
94
|
-
}
|
95
|
-
}
|
96
|
-
}
|
97
|
-
|
98
|
-
// 顶部操作区
|
99
|
-
.center-container {
|
100
|
-
border-left: 1px solid #e0e0e0;
|
101
|
-
border-right: 1px solid #e0e0e0;
|
102
|
-
|
103
|
-
.el-main {
|
104
|
-
padding: 0;
|
105
|
-
position: relative;
|
106
|
-
background: #fafafa;
|
107
|
-
}
|
108
|
-
}
|
109
|
-
|
110
|
-
// 左侧字段区
|
111
|
-
.components-list {
|
112
|
-
padding: 8px 0;
|
113
|
-
width: 100%;
|
114
|
-
height: 100%;
|
115
|
-
|
116
|
-
.widget-cate {
|
117
|
-
padding: 8px 12px;
|
118
|
-
font-size: 13px;
|
119
|
-
}
|
120
|
-
|
121
|
-
ul {
|
122
|
-
position: relative;
|
123
|
-
overflow: hidden;
|
124
|
-
padding: 0 10px 10px;
|
125
|
-
margin: 0;
|
126
|
-
}
|
127
|
-
|
128
|
-
.form-edit-widget-label {
|
129
|
-
font-size: 12px;
|
130
|
-
display: block;
|
131
|
-
width: 48%;
|
132
|
-
line-height: 26px;
|
133
|
-
position: relative;
|
134
|
-
float: left;
|
135
|
-
left: 0;
|
136
|
-
overflow: hidden;
|
137
|
-
text-overflow: ellipsis;
|
138
|
-
white-space: nowrap;
|
139
|
-
margin: 1%;
|
140
|
-
color: #333;
|
141
|
-
border: 1px solid #f4f6fc;
|
142
|
-
transition: 0.25s;
|
143
|
-
|
144
|
-
&:hover {
|
145
|
-
color: $primary-color !important;
|
146
|
-
border: 1px dashed $primary-color;
|
147
|
-
|
148
|
-
a {
|
149
|
-
color: $primary-color !important;
|
150
|
-
}
|
151
|
-
}
|
152
|
-
|
153
|
-
& > a {
|
154
|
-
color: #333;
|
155
|
-
display: block;
|
156
|
-
cursor: move;
|
157
|
-
background: #f4f6fc;
|
158
|
-
border: 1px solid #f4f6fc;
|
159
|
-
transition: 0.25s;
|
160
|
-
|
161
|
-
.icon {
|
162
|
-
margin-right: 6px;
|
163
|
-
margin-left: 8px;
|
164
|
-
font-size: 14px;
|
165
|
-
display: inline-block;
|
166
|
-
vertical-align: middle;
|
167
|
-
}
|
168
|
-
|
169
|
-
span {
|
170
|
-
display: inline-block;
|
171
|
-
vertical-align: middle;
|
172
|
-
}
|
173
|
-
}
|
174
|
-
}
|
175
|
-
}
|
176
|
-
|
177
34
|
.widget-form-container {
|
178
|
-
// position: absolute;
|
179
|
-
top: 0;
|
180
|
-
left: 0;
|
181
|
-
right: 0;
|
182
|
-
bottom: 0;
|
183
|
-
|
184
|
-
.form-empty {
|
185
|
-
position: absolute;
|
186
|
-
text-align: center;
|
187
|
-
width: 400px;
|
188
|
-
top: 200px;
|
189
|
-
left: 50%;
|
190
|
-
margin-left: -200px;
|
191
|
-
color: #ccc;
|
192
|
-
|
193
|
-
.th-empty-description {
|
194
|
-
font-size: 20px;
|
195
|
-
}
|
196
|
-
}
|
197
|
-
|
198
35
|
.draggable {
|
199
36
|
height: 100%;
|
200
37
|
}
|
@@ -589,88 +426,10 @@ $primary-background-color: #ecf5ff;
|
|
589
426
|
}
|
590
427
|
}
|
591
428
|
|
592
|
-
.config-container {
|
593
|
-
position: relative;
|
594
|
-
|
595
|
-
.el-header {
|
596
|
-
border-bottom: solid 2px #e4e7ed;
|
597
|
-
padding: 0 2px;
|
598
|
-
|
599
|
-
.config-tab {
|
600
|
-
height: 45px;
|
601
|
-
line-height: 45px;
|
602
|
-
display: inline-block;
|
603
|
-
width: 145px;
|
604
|
-
text-align: center;
|
605
|
-
font-size: 14px;
|
606
|
-
font-weight: 500;
|
607
|
-
position: relative;
|
608
|
-
cursor: pointer;
|
609
|
-
|
610
|
-
&.active {
|
611
|
-
border-bottom: solid 2px $primary-color;
|
612
|
-
}
|
613
|
-
}
|
614
|
-
}
|
615
|
-
|
616
|
-
.config-container-content {
|
617
|
-
// padding: 10px;
|
618
|
-
|
619
|
-
// .el-form-item__label {
|
620
|
-
// padding: 0;
|
621
|
-
// font-weight: 500;
|
622
|
-
// }
|
623
|
-
|
624
|
-
// .el-form-item {
|
625
|
-
// border-bottom: solid 1px #e1e1e1;
|
626
|
-
// padding-bottom: 10px;
|
627
|
-
// }
|
628
|
-
|
629
|
-
.config-pattern-input {
|
630
|
-
.el-input-group__prepend,
|
631
|
-
.el-input-group__append {
|
632
|
-
padding: 0 8px;
|
633
|
-
}
|
634
|
-
}
|
635
|
-
}
|
636
|
-
|
637
|
-
.ghost {
|
638
|
-
background: #fff;
|
639
|
-
border: 1px dashed $primary-color;
|
640
|
-
|
641
|
-
&::after {
|
642
|
-
background: #fff;
|
643
|
-
display: block;
|
644
|
-
content: "";
|
645
|
-
position: absolute;
|
646
|
-
top: 0;
|
647
|
-
left: 0;
|
648
|
-
right: 0;
|
649
|
-
bottom: 0;
|
650
|
-
}
|
651
|
-
}
|
652
|
-
|
653
|
-
ul {
|
654
|
-
margin: 0;
|
655
|
-
padding: 0;
|
656
|
-
}
|
657
|
-
|
658
|
-
li.ghost {
|
659
|
-
list-style: none;
|
660
|
-
font-size: 0;
|
661
|
-
display: block;
|
662
|
-
position: relative;
|
663
|
-
}
|
664
|
-
}
|
665
|
-
|
666
429
|
.widget-divider {
|
667
430
|
display: flex;
|
668
431
|
align-items: center;
|
669
432
|
}
|
670
|
-
|
671
|
-
// .filler {
|
672
|
-
// margin-bottom: 0 !important;
|
673
|
-
// }
|
674
433
|
}
|
675
434
|
|
676
435
|
.configComponents {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="widgetTools
|
2
|
+
<div class="widgetTools">
|
3
3
|
<div class="left">
|
4
4
|
<slot> </slot>
|
5
5
|
</div>
|
@@ -123,7 +123,7 @@
|
|
123
123
|
<th-dialog
|
124
124
|
v-model="dialog.show"
|
125
125
|
:title="dialogTitles[dialog.action]"
|
126
|
-
:modal="
|
126
|
+
:modal="false"
|
127
127
|
:modal-append-to-body="false"
|
128
128
|
:showFooter="['importJson', 'importTemplate'].includes(dialog.action)"
|
129
129
|
@on-fullscreen="handleDialogFullscreen"
|
@@ -245,7 +245,7 @@ export default {
|
|
245
245
|
width: 100%;
|
246
246
|
height: 45px;
|
247
247
|
padding: 0 15px;
|
248
|
-
|
248
|
+
border-bottom: solid 1px #e4e7ed;
|
249
249
|
|
250
250
|
.left {
|
251
251
|
}
|
@@ -2,9 +2,9 @@
|
|
2
2
|
<div class="generateTable-search">
|
3
3
|
<el-row :gutter="10">
|
4
4
|
<el-col
|
5
|
-
v-for="item in
|
5
|
+
v-for="item in getList"
|
6
6
|
:key="item.prop"
|
7
|
-
:span="24 /
|
7
|
+
:span="24 / getList.length"
|
8
8
|
>
|
9
9
|
<el-input
|
10
10
|
v-if="item.type === 'input' || item.elType === 'input'"
|
@@ -81,6 +81,17 @@ export default {
|
|
81
81
|
data() {
|
82
82
|
return {};
|
83
83
|
},
|
84
|
+
computed: {
|
85
|
+
getList() {
|
86
|
+
if (this.options) {
|
87
|
+
const data = this.options.filter(item => {
|
88
|
+
return !item.hide;
|
89
|
+
});
|
90
|
+
return data;
|
91
|
+
}
|
92
|
+
return [];
|
93
|
+
}
|
94
|
+
},
|
84
95
|
methods: {
|
85
96
|
doSearch() {
|
86
97
|
this.$emit("search", this.data);
|
@@ -2,7 +2,7 @@
|
|
2
2
|
<div class="generateTable-search">
|
3
3
|
<el-form :inline="true" :model="data" size="small">
|
4
4
|
<el-form-item
|
5
|
-
v-for="item in
|
5
|
+
v-for="item in getList"
|
6
6
|
:key="item.prop"
|
7
7
|
:label="item.label"
|
8
8
|
>
|
@@ -95,6 +95,17 @@ export default {
|
|
95
95
|
data() {
|
96
96
|
return {};
|
97
97
|
},
|
98
|
+
computed: {
|
99
|
+
getList() {
|
100
|
+
if (this.options) {
|
101
|
+
const data = this.options.filter(item => {
|
102
|
+
return !item.hide;
|
103
|
+
});
|
104
|
+
return data;
|
105
|
+
}
|
106
|
+
return [];
|
107
|
+
}
|
108
|
+
},
|
98
109
|
methods: {
|
99
110
|
doSearch() {
|
100
111
|
this.$emit("search", this.data);
|
@@ -9,7 +9,7 @@
|
|
9
9
|
v-loading="config.loading.show"
|
10
10
|
:element-loading-text="config.loading.text"
|
11
11
|
>
|
12
|
-
<template v-for="item in
|
12
|
+
<template v-for="item in getList">
|
13
13
|
<el-table-column
|
14
14
|
v-if="item.type"
|
15
15
|
:key="item.prop"
|
@@ -54,6 +54,18 @@ export default {
|
|
54
54
|
data() {
|
55
55
|
return {};
|
56
56
|
},
|
57
|
+
|
58
|
+
computed: {
|
59
|
+
getList() {
|
60
|
+
if (this.config.options) {
|
61
|
+
const data = this.config.options.filter(item => {
|
62
|
+
return !item.hide;
|
63
|
+
});
|
64
|
+
return data;
|
65
|
+
}
|
66
|
+
return [];
|
67
|
+
}
|
68
|
+
},
|
57
69
|
created() {},
|
58
70
|
mounted() {},
|
59
71
|
methods: {}
|