tianheng-ui 0.1.37 → 0.1.39
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 +9 -0
- package/lib/tianheng-ui.js +13 -13
- package/package.json +1 -1
- package/packages/Dialog/index.vue +4 -1
- package/packages/FormMaking/WidgetConfig.vue +317 -218
- package/packages/FormMaking/WidgetForm.vue +22 -0
- package/packages/FormMaking/WidgetTools.vue +3 -2
- package/packages/FormMaking/index.vue +246 -203
- package/packages/FormMaking/styles/index.scss +1 -242
- package/packages/TableMaking/WidgetTools.vue +3 -2
- package/packages/TableMaking/generateTable.vue +1 -0
- package/packages/TableMaking/index.vue +2 -12
- package/packages/TableMaking/widgetConfig.vue +85 -64
@@ -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 th-sticky_top">
|
3
3
|
<div class="left">
|
4
4
|
<slot> </slot>
|
5
5
|
</div>
|
@@ -123,6 +123,7 @@
|
|
123
123
|
<th-dialog
|
124
124
|
v-model="dialog.show"
|
125
125
|
:title="dialogTitles[dialog.action]"
|
126
|
+
:modal="dialog.action !== 'previewPc'"
|
126
127
|
:modal-append-to-body="false"
|
127
128
|
:showFooter="['importJson', 'importTemplate'].includes(dialog.action)"
|
128
129
|
@on-fullscreen="handleDialogFullscreen"
|
@@ -244,7 +245,7 @@ export default {
|
|
244
245
|
width: 100%;
|
245
246
|
height: 45px;
|
246
247
|
padding: 0 15px;
|
247
|
-
|
248
|
+
z-index: 999;
|
248
249
|
|
249
250
|
.left {
|
250
251
|
}
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="th-
|
2
|
+
<div class="th-tableMaking th-flex_box">
|
3
3
|
<div class="th-fiex_content">
|
4
4
|
<widget-tools
|
5
5
|
:config="tableConfig"
|
@@ -164,21 +164,11 @@ export default {
|
|
164
164
|
</script>
|
165
165
|
|
166
166
|
<style lang="scss" scoped>
|
167
|
-
.th-
|
167
|
+
.th-tableMaking {
|
168
168
|
height: 100%;
|
169
169
|
background-color: white;
|
170
170
|
border: 1px solid #dcdfe6;
|
171
171
|
|
172
|
-
.client {
|
173
|
-
flex: 1;
|
174
|
-
.el-button {
|
175
|
-
color: #333;
|
176
|
-
}
|
177
|
-
.active {
|
178
|
-
color: #409eff;
|
179
|
-
}
|
180
|
-
}
|
181
|
-
|
182
172
|
.el-container {
|
183
173
|
height: 100%;
|
184
174
|
}
|
@@ -1,49 +1,53 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
3
|
-
<div class="tabs">
|
2
|
+
<div class="tableWidgetConfig">
|
3
|
+
<div class="tabs ">
|
4
4
|
<div
|
5
5
|
v-for="(item, index) in tabsMenus"
|
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>
|
13
13
|
</div>
|
14
|
-
<div v-if="activeTab.value ===
|
15
|
-
<el-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
14
|
+
<div v-if="activeTab.value === 'field'" class="configItem fieldsView">
|
15
|
+
<el-collapse v-model="collapseValue">
|
16
|
+
<el-collapse-item title="查询字段" name="group-fields_search">
|
17
|
+
<el-checkbox
|
18
|
+
v-model="searchField.isCheckAll"
|
19
|
+
:indeterminate="searchField.isIndeterminate"
|
20
|
+
@change="val => handleCheckAllChange(val, 'searchField')"
|
21
|
+
>全选</el-checkbox
|
22
|
+
>
|
23
|
+
<el-checkbox
|
24
|
+
v-for="item in fields"
|
25
|
+
:label="item.prop"
|
26
|
+
:key="`searchField-${item.prop}-${item.isSearch}`"
|
27
|
+
:checked="item.isSearch"
|
28
|
+
@change="val => handleCheckboxChange(val, 'searchField', item)"
|
29
|
+
>{{ item.label }}</el-checkbox
|
30
|
+
>
|
31
|
+
</el-collapse-item>
|
32
|
+
<el-collapse-item title="列表字段" name="group-fields_list">
|
33
|
+
<el-checkbox
|
34
|
+
v-model="tableField.isCheckAll"
|
35
|
+
:indeterminate="tableField.isIndeterminate"
|
36
|
+
@change="val => handleCheckAllChange(val, 'tableField')"
|
37
|
+
>全选</el-checkbox
|
38
|
+
>
|
39
|
+
<el-checkbox
|
40
|
+
v-for="item in fields"
|
41
|
+
:label="item.prop"
|
42
|
+
:key="`tableField-${item.prop}-${item.isTable}`"
|
43
|
+
:checked="item.isTable"
|
44
|
+
@change="val => handleCheckboxChange(val, 'tableField', item)"
|
45
|
+
>{{ item.label }}</el-checkbox
|
46
|
+
>
|
47
|
+
</el-collapse-item>
|
48
|
+
</el-collapse>
|
45
49
|
</div>
|
46
|
-
<div v-if="activeTab.value ===
|
50
|
+
<div v-if="activeTab.value === 'table' && config.table" class="configItem">
|
47
51
|
<el-form
|
48
52
|
:model="config"
|
49
53
|
label-position="left"
|
@@ -174,9 +178,7 @@
|
|
174
178
|
></el-input>
|
175
179
|
</el-form-item>
|
176
180
|
<el-form-item label="对齐方式">
|
177
|
-
<el-radio-group
|
178
|
-
v-model="config.table.pageInfo.style.align"
|
179
|
-
>
|
181
|
+
<el-radio-group v-model="config.table.pageInfo.style.align">
|
180
182
|
<el-radio-button
|
181
183
|
v-for="item in pageInfoAlign"
|
182
184
|
:key="item.value"
|
@@ -247,6 +249,19 @@
|
|
247
249
|
<i class="el-icon-set-up" @click="handleActionConfig(item)"></i>
|
248
250
|
</div>
|
249
251
|
</el-collapse-item>
|
252
|
+
</el-collapse>
|
253
|
+
</el-form>
|
254
|
+
</div>
|
255
|
+
<div v-if="activeTab.value === 'css' && config.table" class="configItem">
|
256
|
+
<el-form
|
257
|
+
:model="config"
|
258
|
+
label-position="left"
|
259
|
+
label-width="80px"
|
260
|
+
size="small"
|
261
|
+
:rules="formRules"
|
262
|
+
ref="formRef"
|
263
|
+
>
|
264
|
+
<el-collapse v-model="collapseValue">
|
250
265
|
<el-collapse-item name="group-style_table">
|
251
266
|
<el-tooltip slot="title" effect="light" placement="top">
|
252
267
|
<div slot="content">
|
@@ -254,7 +269,7 @@
|
|
254
269
|
<span>高度: height</span><br />
|
255
270
|
<!-- <span>自定义: 可自定义填写css样式</span><br /> -->
|
256
271
|
</div>
|
257
|
-
<span style="color: #409EFF;">table
|
272
|
+
<span style="color: #409EFF;">table 样式(电脑端)</span>
|
258
273
|
</el-tooltip>
|
259
274
|
<el-form-item label="显示边框">
|
260
275
|
<el-switch v-model="config.table.style.table.border"> </el-switch>
|
@@ -275,6 +290,26 @@
|
|
275
290
|
></el-input>
|
276
291
|
</el-form-item>
|
277
292
|
</el-collapse-item>
|
293
|
+
<el-collapse-item name="group-style_pageInfo">
|
294
|
+
<el-tooltip slot="title" effect="light" placement="top">
|
295
|
+
<div slot="content">
|
296
|
+
<span>外边框: margin</span><br />
|
297
|
+
<span>内边框: padding</span><br />
|
298
|
+
<span>自定义: 可自定义填写css样式</span><br />
|
299
|
+
</div>
|
300
|
+
<span style="color: #409EFF;">分页控件 样式(电脑端)</span>
|
301
|
+
</el-tooltip>
|
302
|
+
</el-collapse-item>
|
303
|
+
<el-collapse-item name="group-style_list">
|
304
|
+
<el-tooltip slot="title" effect="light" placement="top">
|
305
|
+
<div slot="content">
|
306
|
+
<span>外边框: margin</span><br />
|
307
|
+
<span>内边框: padding</span><br />
|
308
|
+
<span>自定义: 可自定义填写css样式</span><br />
|
309
|
+
</div>
|
310
|
+
<span style="color: #409EFF;">list 样式(移动端)</span>
|
311
|
+
</el-tooltip>
|
312
|
+
</el-collapse-item>
|
278
313
|
<el-collapse-item name="group-style_cell">
|
279
314
|
<el-tooltip slot="title" effect="light" placement="top">
|
280
315
|
<div slot="content">
|
@@ -283,7 +318,7 @@
|
|
283
318
|
<span>分割线: border-bottom</span><br />
|
284
319
|
<span>自定义: 可自定义填写css样式</span><br />
|
285
320
|
</div>
|
286
|
-
<span style="color: #409EFF;">cell
|
321
|
+
<span style="color: #409EFF;">cell 样式(移动端)</span>
|
287
322
|
</el-tooltip>
|
288
323
|
<el-form-item label="外边距">
|
289
324
|
<el-input
|
@@ -326,7 +361,7 @@
|
|
326
361
|
<span>颜色: color</span><br />
|
327
362
|
<span>自定义: 可自定义填写css样式</span><br />
|
328
363
|
</div>
|
329
|
-
<span style="color: #409EFF;">title
|
364
|
+
<span style="color: #409EFF;">title 样式(移动端)</span>
|
330
365
|
</el-tooltip>
|
331
366
|
<el-form-item label="外边距">
|
332
367
|
<el-input
|
@@ -383,7 +418,7 @@
|
|
383
418
|
<span>颜色: color</span><br />
|
384
419
|
<span>自定义: 可自定义填写css样式</span><br />
|
385
420
|
</div>
|
386
|
-
<span style="color: #409EFF;">value
|
421
|
+
<span style="color: #409EFF;">value 样式(移动端)</span>
|
387
422
|
</el-tooltip>
|
388
423
|
<el-form-item label="外边距">
|
389
424
|
<el-input
|
@@ -576,11 +611,11 @@ export default {
|
|
576
611
|
data() {
|
577
612
|
return {
|
578
613
|
tabsMenus: [
|
579
|
-
{ title: "
|
580
|
-
{ title: "
|
581
|
-
{ title: "
|
614
|
+
{ title: "字段配置", value: "field" },
|
615
|
+
{ title: "列表属性", value: "table" },
|
616
|
+
{ title: "样式设置", value: "css" }
|
582
617
|
],
|
583
|
-
activeTab: { title: "列表属性", value:
|
618
|
+
activeTab: { title: "列表属性", value: "table" },
|
584
619
|
fields: [],
|
585
620
|
searchField: {
|
586
621
|
isCheckAll: false,
|
@@ -674,9 +709,6 @@ export default {
|
|
674
709
|
this.tableActiveFields.length !== this.fields.length
|
675
710
|
};
|
676
711
|
},
|
677
|
-
handleTabsSelect(val) {
|
678
|
-
this.activeTab = val;
|
679
|
-
},
|
680
712
|
handleCheckAllChange(bool, action) {
|
681
713
|
if (action === "searchField") {
|
682
714
|
this.fields.forEach(item => {
|
@@ -769,7 +801,7 @@ export default {
|
|
769
801
|
</script>
|
770
802
|
|
771
803
|
<style lang="scss" scoped>
|
772
|
-
.
|
804
|
+
.tableWidgetConfig {
|
773
805
|
background-color: white;
|
774
806
|
.tabs {
|
775
807
|
position: sticky;
|
@@ -793,25 +825,14 @@ export default {
|
|
793
825
|
}
|
794
826
|
}
|
795
827
|
|
796
|
-
.
|
797
|
-
height: calc(100% - 45px);
|
798
|
-
.fields-item {
|
799
|
-
padding: 0 10px;
|
800
|
-
height: 30px;
|
801
|
-
margin-right: 0;
|
802
|
-
line-height: 30px;
|
803
|
-
}
|
804
|
-
|
828
|
+
.fieldsView {
|
805
829
|
.el-checkbox {
|
806
|
-
padding: 0 10px;
|
807
|
-
margin-right: 0;
|
808
830
|
width: 100%;
|
809
831
|
height: 30px;
|
810
832
|
line-height: 30px;
|
811
833
|
}
|
812
834
|
}
|
813
|
-
|
814
|
-
.tableConfig {
|
835
|
+
.configItem {
|
815
836
|
height: calc(100% - 45px);
|
816
837
|
|
817
838
|
.collapse-title {
|
@@ -848,7 +869,7 @@ export default {
|
|
848
869
|
</style>
|
849
870
|
|
850
871
|
<style lang="scss">
|
851
|
-
.
|
872
|
+
.tableWidgetConfig {
|
852
873
|
.el-collapse-item__header {
|
853
874
|
padding: 0 10px;
|
854
875
|
height: 40px;
|