tianheng-ui 0.1.63 → 0.1.65
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/index.scss +1 -1
- package/lib/theme-chalk/styles/feature.scss +1 -0
- package/lib/tianheng-ui.js +13 -13
- package/package.json +1 -1
- package/packages/CodeEditor/index.vue +41 -19
- package/packages/FormMaking/GenerateForm.vue +67 -71
- package/packages/FormMaking/WidgetConfig.vue +1 -1
- package/packages/FormMaking/WidgetForm.vue +11 -5
- package/packages/FormMaking/WidgetFormItem.vue +11 -4
- package/packages/FormMaking/WidgetGuide.vue +0 -0
- package/packages/FormMaking/WidgetTools.vue +2 -2
- package/packages/FormMaking/custom/config.js +320 -76
- package/packages/FormMaking/custom/configs/blank.vue +1 -1
- package/packages/FormMaking/custom/configs/button.vue +2 -2
- package/packages/FormMaking/custom/configs/cascader.vue +71 -34
- package/packages/FormMaking/custom/configs/cell.vue +1 -1
- package/packages/FormMaking/custom/configs/checkbox.vue +95 -64
- package/packages/FormMaking/custom/configs/color.vue +1 -1
- package/packages/FormMaking/custom/configs/date.vue +1 -1
- package/packages/FormMaking/custom/configs/descriptions.vue +314 -0
- package/packages/FormMaking/custom/configs/divider.vue +1 -1
- package/packages/FormMaking/custom/configs/editor.vue +1 -1
- package/packages/FormMaking/custom/configs/filler.vue +1 -1
- package/packages/FormMaking/custom/configs/grid.vue +33 -22
- package/packages/FormMaking/custom/configs/image.vue +1 -1
- package/packages/FormMaking/custom/configs/input.vue +1 -1
- package/packages/FormMaking/custom/configs/number.vue +1 -1
- package/packages/FormMaking/custom/configs/radio.vue +84 -53
- package/packages/FormMaking/custom/configs/rate.vue +1 -1
- package/packages/FormMaking/custom/configs/select.vue +157 -158
- package/packages/FormMaking/custom/configs/slider.vue +1 -1
- package/packages/FormMaking/custom/configs/switch.vue +1 -1
- package/packages/FormMaking/custom/configs/table.vue +1 -1
- package/packages/FormMaking/custom/configs/tableH5.vue +1 -1
- package/packages/FormMaking/custom/configs/tabs.vue +1 -1
- package/packages/FormMaking/custom/configs/text.vue +1 -1
- package/packages/FormMaking/custom/configs/textarea.vue +1 -1
- package/packages/FormMaking/custom/configs/time.vue +1 -1
- package/packages/FormMaking/custom/configs/upload.vue +1 -1
- package/packages/FormMaking/custom/configs/workflow.vue +494 -0
- package/packages/FormMaking/custom/index.js +4 -2
- package/packages/FormMaking/custom/items/cascader.vue +2 -2
- package/packages/FormMaking/custom/items/checkbox.vue +6 -10
- package/packages/FormMaking/custom/items/descriptions.vue +75 -0
- package/packages/FormMaking/custom/items/grid_dev.vue +2 -2
- package/packages/FormMaking/custom/items/list_dev.vue +10 -22
- package/packages/FormMaking/custom/items/radio.vue +5 -9
- package/packages/FormMaking/custom/items/select.vue +2 -4
- package/packages/FormMaking/custom/items/tableH5_dev.vue +9 -18
- package/packages/FormMaking/custom/items/table_dev.vue +13 -3
- package/packages/FormMaking/custom/items/tabs_dev.vue +3 -2
- package/packages/FormMaking/custom/items/workflow.vue +131 -0
- package/packages/FormMaking/custom/register.js +15 -1
- package/packages/FormMaking/index.vue +61 -27
- package/packages/FormMaking/styles/index.scss +156 -478
- package/packages/TableMaking/index.vue +4 -1
- package/packages/TableMaking/widgetGuide.vue +96 -0
- package/packages/TableMaking/widgetTable.vue +0 -7
- package/packages/Workflow/index.vue +0 -31
- package/packages/FormMaking/GenerateFormItemH5.vue +0 -825
@@ -109,31 +109,32 @@ export const basicComponents = [
|
|
109
109
|
labelWidth: 100,
|
110
110
|
isLabelWidth: false,
|
111
111
|
inline: false,
|
112
|
-
defaultValue: "",
|
113
112
|
showLabel: false,
|
113
|
+
required: false,
|
114
|
+
remote: {
|
115
|
+
open: false,
|
116
|
+
api: "",
|
117
|
+
props: {
|
118
|
+
value: "id",
|
119
|
+
label: "name",
|
120
|
+
children: "children"
|
121
|
+
}
|
122
|
+
},
|
114
123
|
options: [
|
115
124
|
{
|
116
|
-
|
117
|
-
|
125
|
+
label: "选项 1",
|
126
|
+
value: "选值 1"
|
118
127
|
},
|
119
128
|
{
|
120
|
-
|
121
|
-
|
129
|
+
label: "选项 2",
|
130
|
+
value: "选值 2"
|
122
131
|
},
|
123
132
|
{
|
124
|
-
|
125
|
-
|
133
|
+
label: "选项 3",
|
134
|
+
value: "选值 3"
|
126
135
|
}
|
127
136
|
],
|
128
|
-
|
129
|
-
props: {
|
130
|
-
value: "id",
|
131
|
-
label: "name",
|
132
|
-
children: "children"
|
133
|
-
},
|
134
|
-
remote: false,
|
135
|
-
remoteFunc: "",
|
136
|
-
remoteOptions: [],
|
137
|
+
defaultValue: "",
|
137
138
|
disabled: false,
|
138
139
|
border: false, //边框
|
139
140
|
buttonType: false //替换成按钮
|
@@ -152,31 +153,32 @@ export const basicComponents = [
|
|
152
153
|
labelWidth: 100,
|
153
154
|
isLabelWidth: false,
|
154
155
|
inline: false,
|
155
|
-
defaultValue: [],
|
156
156
|
showLabel: false,
|
157
|
+
required: false,
|
158
|
+
remote: {
|
159
|
+
open: false,
|
160
|
+
api: "",
|
161
|
+
props: {
|
162
|
+
value: "id",
|
163
|
+
label: "name",
|
164
|
+
children: "children"
|
165
|
+
}
|
166
|
+
},
|
157
167
|
options: [
|
158
168
|
{
|
159
|
-
|
160
|
-
|
169
|
+
label: "选项 1",
|
170
|
+
value: "选值 1"
|
161
171
|
},
|
162
172
|
{
|
163
|
-
|
164
|
-
|
173
|
+
label: "选项 2",
|
174
|
+
value: "选值 2"
|
165
175
|
},
|
166
176
|
{
|
167
|
-
|
168
|
-
|
177
|
+
label: "选项 3",
|
178
|
+
value: "选值 3"
|
169
179
|
}
|
170
180
|
],
|
171
|
-
|
172
|
-
props: {
|
173
|
-
value: "id",
|
174
|
-
label: "name",
|
175
|
-
children: "children"
|
176
|
-
},
|
177
|
-
remote: false,
|
178
|
-
remoteFunc: "",
|
179
|
-
remoteOptions: [],
|
181
|
+
defaultValue: [],
|
180
182
|
disabled: false,
|
181
183
|
border: false, //边框
|
182
184
|
buttonType: false, //替换成按钮
|
@@ -259,7 +261,6 @@ export const basicComponents = [
|
|
259
261
|
width: "100%",
|
260
262
|
labelWidth: 100,
|
261
263
|
isLabelWidth: false,
|
262
|
-
defaultValue: "",
|
263
264
|
multiple: false,
|
264
265
|
disabled: false,
|
265
266
|
clearable: false,
|
@@ -268,20 +269,18 @@ export const basicComponents = [
|
|
268
269
|
showLabel: false,
|
269
270
|
collapseTags: false,
|
270
271
|
allowCreate: false,
|
271
|
-
options: [
|
272
|
-
{ value: "选值 1", label: "选项 1" },
|
273
|
-
{ value: "选值 2", label: "选项 2" },
|
274
|
-
{ value: "选值 3", label: "选项 3" }
|
275
|
-
],
|
276
272
|
filterable: false,
|
277
|
-
|
278
|
-
|
279
|
-
|
280
|
-
|
273
|
+
remote: {
|
274
|
+
open: false,
|
275
|
+
api: "",
|
276
|
+
props: {
|
277
|
+
value: "id",
|
278
|
+
label: "name",
|
279
|
+
children: "children"
|
280
|
+
}
|
281
281
|
},
|
282
|
-
|
283
|
-
|
284
|
-
remoteOptions: [],
|
282
|
+
options: [{ label: "选项 1", value: "选值 1" }],
|
283
|
+
defaultValue: "",
|
285
284
|
hidden: false,
|
286
285
|
hideLabel: false
|
287
286
|
},
|
@@ -351,7 +350,6 @@ export const basicComponents = [
|
|
351
350
|
icon: "th-icon-aim",
|
352
351
|
options: {
|
353
352
|
customClass: "",
|
354
|
-
defaultValue: "Button",
|
355
353
|
width: "",
|
356
354
|
height: "",
|
357
355
|
labelWidth: 100,
|
@@ -365,7 +363,16 @@ export const basicComponents = [
|
|
365
363
|
buttonIcon: "",
|
366
364
|
textAlign: "center",
|
367
365
|
tableColumn: false,
|
368
|
-
remote:
|
366
|
+
remote: {
|
367
|
+
open: false,
|
368
|
+
api: "",
|
369
|
+
props: {
|
370
|
+
value: "id",
|
371
|
+
label: "name",
|
372
|
+
children: "children"
|
373
|
+
}
|
374
|
+
},
|
375
|
+
defaultValue: "Button",
|
369
376
|
disabled: false,
|
370
377
|
loading: false,
|
371
378
|
hidden: false,
|
@@ -494,7 +501,6 @@ export const basicComponents = [
|
|
494
501
|
width: "",
|
495
502
|
labelWidth: 100,
|
496
503
|
isLabelWidth: false,
|
497
|
-
defaultValue: [],
|
498
504
|
size: {
|
499
505
|
width: 100,
|
500
506
|
height: 100
|
@@ -509,8 +515,16 @@ export const basicComponents = [
|
|
509
515
|
//isDelete: false,
|
510
516
|
min: 0,
|
511
517
|
//isEdit: false,
|
512
|
-
remote:
|
513
|
-
|
518
|
+
remote: {
|
519
|
+
open: false,
|
520
|
+
api: "",
|
521
|
+
props: {
|
522
|
+
value: "id",
|
523
|
+
label: "name",
|
524
|
+
children: "children"
|
525
|
+
}
|
526
|
+
},
|
527
|
+
defaultValue: [],
|
514
528
|
action: "https://jsonplaceholder.typicode.com/posts/",
|
515
529
|
disabled: false,
|
516
530
|
required: false,
|
@@ -548,7 +562,6 @@ export const basicComponents = [
|
|
548
562
|
width: "",
|
549
563
|
labelWidth: 100,
|
550
564
|
isLabelWidth: false,
|
551
|
-
defaultValue: [],
|
552
565
|
placeholder: "",
|
553
566
|
disabled: false,
|
554
567
|
clearable: false,
|
@@ -556,19 +569,22 @@ export const basicComponents = [
|
|
556
569
|
showAllLevels: false, //只显示最后一级
|
557
570
|
collapseTags: false,
|
558
571
|
filterable: false, //搜索
|
572
|
+
multiple: false,
|
573
|
+
expandTrigger: "hover",
|
574
|
+
checkStrictly: false, //选择任意一级选项
|
559
575
|
prepend: "",
|
560
576
|
append: "",
|
561
|
-
|
562
|
-
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
|
567
|
-
|
577
|
+
remote: {
|
578
|
+
open: true,
|
579
|
+
api: "",
|
580
|
+
props: {
|
581
|
+
value: "id",
|
582
|
+
label: "name",
|
583
|
+
children: "children"
|
584
|
+
}
|
568
585
|
},
|
569
|
-
|
570
|
-
|
571
|
-
remoteOptions: [],
|
586
|
+
options: [],
|
587
|
+
defaultValue: "",
|
572
588
|
hidden: false,
|
573
589
|
hideLabel: false
|
574
590
|
},
|
@@ -675,7 +691,6 @@ export const advanceComponents = [
|
|
675
691
|
type: "tabs",
|
676
692
|
icon: "icon-tabs",
|
677
693
|
options: {
|
678
|
-
defaultValue: "tab1",
|
679
694
|
type: "",
|
680
695
|
tabPosition: "top",
|
681
696
|
customClass: "",
|
@@ -695,24 +710,20 @@ export const advanceComponents = [
|
|
695
710
|
labelWidth: 100,
|
696
711
|
isLabelWidth: false,
|
697
712
|
hideLabel: true,
|
698
|
-
remote:
|
699
|
-
|
700
|
-
|
713
|
+
remote: {
|
714
|
+
open: false,
|
715
|
+
api: "",
|
716
|
+
props: {
|
717
|
+
value: "id",
|
718
|
+
label: "name",
|
719
|
+
children: "children"
|
720
|
+
}
|
721
|
+
},
|
722
|
+
defaultValue: "tab1",
|
701
723
|
tableColumn: false
|
702
724
|
},
|
703
725
|
events: {},
|
704
726
|
rules: []
|
705
|
-
},
|
706
|
-
{
|
707
|
-
name: "自定义区域",
|
708
|
-
type: "blank",
|
709
|
-
icon: "th-icon-code",
|
710
|
-
options: {
|
711
|
-
defaultType: "String",
|
712
|
-
required: false
|
713
|
-
},
|
714
|
-
events: {},
|
715
|
-
rules: []
|
716
727
|
}
|
717
728
|
];
|
718
729
|
|
@@ -799,6 +810,239 @@ export const layoutComponents = [
|
|
799
810
|
}
|
800
811
|
];
|
801
812
|
|
813
|
+
export const businessComponents = [
|
814
|
+
{
|
815
|
+
name: "自定义区域",
|
816
|
+
type: "blank",
|
817
|
+
icon: "th-icon-code",
|
818
|
+
options: {
|
819
|
+
defaultType: "String",
|
820
|
+
required: false
|
821
|
+
},
|
822
|
+
events: {},
|
823
|
+
rules: []
|
824
|
+
},
|
825
|
+
{
|
826
|
+
name: "描述列表",
|
827
|
+
type: "descriptions",
|
828
|
+
icon: "th-icon-layout",
|
829
|
+
options: {
|
830
|
+
border: false,
|
831
|
+
column: 1,
|
832
|
+
direction: "horizontal",
|
833
|
+
size: "small",
|
834
|
+
colon: true,
|
835
|
+
remote: {
|
836
|
+
open: false,
|
837
|
+
api: "",
|
838
|
+
props: {
|
839
|
+
label: "label",
|
840
|
+
value: "value"
|
841
|
+
}
|
842
|
+
},
|
843
|
+
defaultValue: [
|
844
|
+
{
|
845
|
+
type: "text",
|
846
|
+
label: "审批类型",
|
847
|
+
value: "调休请假",
|
848
|
+
icon: "",
|
849
|
+
options: {
|
850
|
+
showTitle: true,
|
851
|
+
format: "",
|
852
|
+
style: {
|
853
|
+
label: {
|
854
|
+
width: "",
|
855
|
+
customStyle: ""
|
856
|
+
},
|
857
|
+
value: {
|
858
|
+
customStyle: ""
|
859
|
+
}
|
860
|
+
}
|
861
|
+
}
|
862
|
+
},
|
863
|
+
{
|
864
|
+
type: "text",
|
865
|
+
label: "请假时间",
|
866
|
+
value: "2023-05-08 至 2023-05-10",
|
867
|
+
icon: "",
|
868
|
+
options: {
|
869
|
+
showTitle: true,
|
870
|
+
format: "",
|
871
|
+
style: {
|
872
|
+
label: {
|
873
|
+
width: "",
|
874
|
+
customStyle: ""
|
875
|
+
},
|
876
|
+
value: {
|
877
|
+
customStyle: ""
|
878
|
+
}
|
879
|
+
}
|
880
|
+
}
|
881
|
+
},
|
882
|
+
{
|
883
|
+
type: "text",
|
884
|
+
label: "审批备注",
|
885
|
+
value:
|
886
|
+
"家里有急事需要处理,家里有急事需要处理,家里有急事需要处理,家里有急事需要处理家里有急事需要处理",
|
887
|
+
icon: "",
|
888
|
+
options: {
|
889
|
+
showTitle: true,
|
890
|
+
format: "",
|
891
|
+
style: {
|
892
|
+
label: {
|
893
|
+
width: "",
|
894
|
+
customStyle: ""
|
895
|
+
},
|
896
|
+
value: {
|
897
|
+
customStyle: ""
|
898
|
+
}
|
899
|
+
}
|
900
|
+
}
|
901
|
+
},
|
902
|
+
{
|
903
|
+
type: "text",
|
904
|
+
label: "发起人",
|
905
|
+
value: "张三",
|
906
|
+
icon: "",
|
907
|
+
options: {
|
908
|
+
showTitle: true,
|
909
|
+
format: "",
|
910
|
+
style: {
|
911
|
+
label: {
|
912
|
+
width: "",
|
913
|
+
customStyle: ""
|
914
|
+
},
|
915
|
+
value: {
|
916
|
+
customStyle: ""
|
917
|
+
}
|
918
|
+
}
|
919
|
+
}
|
920
|
+
}
|
921
|
+
],
|
922
|
+
textAlignLast: "justify",
|
923
|
+
labelWidth: "",
|
924
|
+
hideLabel: true
|
925
|
+
},
|
926
|
+
events: {},
|
927
|
+
rules: []
|
928
|
+
},
|
929
|
+
{
|
930
|
+
name: "流程节点",
|
931
|
+
type: "workflow",
|
932
|
+
icon: "th-icon-layout",
|
933
|
+
options: {
|
934
|
+
reverse: false,
|
935
|
+
placement: "right",
|
936
|
+
hideTimestamp: false,
|
937
|
+
remote: {
|
938
|
+
open: false,
|
939
|
+
api: "",
|
940
|
+
props: {
|
941
|
+
label: "label",
|
942
|
+
value: "value"
|
943
|
+
}
|
944
|
+
},
|
945
|
+
defaultValue: {
|
946
|
+
processInstTaskRsps: [
|
947
|
+
{
|
948
|
+
name: "发起审批", // 节点名称
|
949
|
+
icon: "", // 节点图标
|
950
|
+
color: "#409EFF", // 节点颜色
|
951
|
+
// 审批人列表
|
952
|
+
checkPersons: [
|
953
|
+
{
|
954
|
+
avatar:
|
955
|
+
"https://img2.baidu.com/it/u=3618236253,1028428296&fm=253&app=138&size=w931&n=0&f=JPEG&fmt=auto?sec=1683478800&t=4568586f1ac2448ad8fb6bb1b79e7201", // 头像
|
956
|
+
name: "张三", // 名称
|
957
|
+
status: "", // 审批人的审批状态
|
958
|
+
description: "", // 审批内容
|
959
|
+
endTime: "" // 审批提交时间
|
960
|
+
}
|
961
|
+
],
|
962
|
+
timestamp: "2023-05-04 18:00" // 节点时间
|
963
|
+
},
|
964
|
+
{
|
965
|
+
name: "指数领导审批",
|
966
|
+
icon: "",
|
967
|
+
color: "#409EFF",
|
968
|
+
checkPersons: [
|
969
|
+
{
|
970
|
+
avatar:
|
971
|
+
"https://img0.baidu.com/it/u=4060770951,4069855872&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
972
|
+
name: "李四",
|
973
|
+
status: "审批通过",
|
974
|
+
description: "请求合理,批准通过",
|
975
|
+
endTime: ""
|
976
|
+
}
|
977
|
+
],
|
978
|
+
timestamp: "2023-05-05 10:24"
|
979
|
+
},
|
980
|
+
{
|
981
|
+
name: "部门审批",
|
982
|
+
color: "#67C23A",
|
983
|
+
checkPersons: [
|
984
|
+
{
|
985
|
+
avatar:
|
986
|
+
"https://img1.baidu.com/it/u=1016138010,1907110459&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
987
|
+
name: "王五",
|
988
|
+
status: "待审批",
|
989
|
+
description: "",
|
990
|
+
endTime: ""
|
991
|
+
},
|
992
|
+
{
|
993
|
+
avatar:
|
994
|
+
"https://img2.baidu.com/it/u=4144002246,2068868174&fm=253&fmt=auto&app=138&f=JPEG?w=500&h=500",
|
995
|
+
name: "王大朗",
|
996
|
+
status: "审批通过",
|
997
|
+
description: "同意",
|
998
|
+
endTime: ""
|
999
|
+
}
|
1000
|
+
],
|
1001
|
+
timestamp: "2023-05-05 14:30"
|
1002
|
+
}
|
1003
|
+
],
|
1004
|
+
processInstButtons: [
|
1005
|
+
{
|
1006
|
+
name: "通过",
|
1007
|
+
options: {
|
1008
|
+
remote: {
|
1009
|
+
api: ""
|
1010
|
+
},
|
1011
|
+
type: "primary",
|
1012
|
+
icon: "",
|
1013
|
+
size: "small",
|
1014
|
+
plain: false,
|
1015
|
+
round: false,
|
1016
|
+
circle: false,
|
1017
|
+
disabled: false,
|
1018
|
+
loading: false,
|
1019
|
+
customStyle: ""
|
1020
|
+
}
|
1021
|
+
},
|
1022
|
+
{
|
1023
|
+
name: "驳回",
|
1024
|
+
options: {
|
1025
|
+
remote: {
|
1026
|
+
api: ""
|
1027
|
+
},
|
1028
|
+
type: "primary",
|
1029
|
+
icon: "",
|
1030
|
+
size: "small",
|
1031
|
+
plain: false,
|
1032
|
+
round: false,
|
1033
|
+
circle: false,
|
1034
|
+
disabled: false,
|
1035
|
+
loading: false,
|
1036
|
+
customStyle: ""
|
1037
|
+
}
|
1038
|
+
}
|
1039
|
+
]
|
1040
|
+
},
|
1041
|
+
hideLabel: true
|
1042
|
+
}
|
1043
|
+
}
|
1044
|
+
];
|
1045
|
+
|
802
1046
|
export const templateComponents = [];
|
803
1047
|
|
804
1048
|
export const baseConfig = {
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
2
|
+
<div class="component-config">
|
3
3
|
<el-collapse-item title="组件配置" name="group-element">
|
4
4
|
<el-form-item label="标题">
|
5
5
|
<el-input v-model="widget.name" clearable></el-input>
|
@@ -89,7 +89,7 @@
|
|
89
89
|
</el-radio-group> -->
|
90
90
|
<el-select
|
91
91
|
style="width:100%"
|
92
|
-
v-model="widget.options.
|
92
|
+
v-model="widget.options.remote.api"
|
93
93
|
placeholder="请选择"
|
94
94
|
no-data-text="暂无数据,请查阅相关文档说明"
|
95
95
|
clearable
|
@@ -1,5 +1,5 @@
|
|
1
1
|
<template>
|
2
|
-
<div class="
|
2
|
+
<div class="component-config">
|
3
3
|
<el-collapse-item title="组件配置" name="group-element">
|
4
4
|
<el-form-item label="标题">
|
5
5
|
<el-input v-model="widget.name"></el-input>
|
@@ -28,10 +28,6 @@
|
|
28
28
|
<el-input v-model="widget.options.placeholder"></el-input>
|
29
29
|
</el-form-item>
|
30
30
|
|
31
|
-
<!-- <el-form-item label="默认值">
|
32
|
-
<code-editor v-model="widget.options.defaultValue"></code-editor>
|
33
|
-
</el-form-item> -->
|
34
|
-
|
35
31
|
<el-form-item
|
36
32
|
label="组件插槽"
|
37
33
|
v-if="widget.type === 'input' || widget.type === 'cascader'"
|
@@ -56,46 +52,71 @@
|
|
56
52
|
</el-input>
|
57
53
|
</el-form-item>
|
58
54
|
|
59
|
-
<el-form-item label="
|
60
|
-
<el-
|
61
|
-
|
62
|
-
|
63
|
-
placeholder="请选择"
|
64
|
-
no-data-text="暂无数据,请查阅相关文档说明"
|
65
|
-
clearable
|
66
|
-
filterable
|
55
|
+
<el-form-item label="数据类型">
|
56
|
+
<el-radio-group
|
57
|
+
v-model="widget.options.remote.open"
|
58
|
+
@input="handleRadioGroupChange"
|
67
59
|
>
|
68
|
-
<el-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
60
|
+
<el-radio-button :label="false">静态数据</el-radio-button>
|
61
|
+
<el-radio-button :label="true">远端数据</el-radio-button>
|
62
|
+
</el-radio-group>
|
63
|
+
</el-form-item>
|
64
|
+
<el-form-item label-width="0">
|
65
|
+
<template v-if="widget.options.remote.open">
|
66
|
+
<el-select
|
67
|
+
style="width:100%;margin-bottom:5px;"
|
68
|
+
v-model="widget.options.remote.api"
|
69
|
+
placeholder="请选择"
|
70
|
+
no-data-text="暂无数据,请查阅相关文档说明"
|
71
|
+
clearable
|
72
|
+
filterable
|
73
73
|
>
|
74
|
-
|
75
|
-
|
74
|
+
<el-option
|
75
|
+
v-for="item in apiOptions"
|
76
|
+
:key="item.id"
|
77
|
+
:label="item.name"
|
78
|
+
:value="item.id"
|
79
|
+
>
|
80
|
+
</el-option>
|
81
|
+
</el-select>
|
76
82
|
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
83
|
+
<el-input
|
84
|
+
style="margin-bottom:5px;"
|
85
|
+
v-model="widget.options.remote.props.value"
|
86
|
+
>
|
87
|
+
<div slot="prepend" style="width:50px;">内容</div>
|
88
|
+
</el-input>
|
89
|
+
<el-input
|
90
|
+
style="margin-bottom:5px;"
|
91
|
+
v-model="widget.options.remote.props.label"
|
92
|
+
>
|
93
|
+
<div slot="prepend" style="width:50px;">标签</div>
|
94
|
+
</el-input>
|
95
|
+
<el-input v-model="widget.options.remote.props.children">
|
96
|
+
<div slot="prepend" style="width:50px">子选项</div>
|
97
|
+
</el-input>
|
98
|
+
</template>
|
99
|
+
|
100
|
+
<th-code-editor
|
101
|
+
v-else
|
102
|
+
ref="codeEditorRef"
|
103
|
+
@change="handleCodeEditorChange"
|
104
|
+
></th-code-editor>
|
105
|
+
</el-form-item>
|
106
|
+
|
107
|
+
<el-form-item label="默认值">
|
108
|
+
<el-input v-model="widget.options.defaultValue"></el-input>
|
86
109
|
</el-form-item>
|
87
110
|
|
88
111
|
<el-form-item label="操作属性">
|
89
112
|
<el-checkbox v-model="widget.options.disabled">禁用</el-checkbox>
|
90
113
|
<el-checkbox v-model="widget.options.hidden">隐藏组件</el-checkbox>
|
91
114
|
<el-checkbox v-model="widget.options.hideLabel">隐藏标签 </el-checkbox>
|
92
|
-
<el-checkbox v-model="widget.options.
|
93
|
-
>支持多选</el-checkbox
|
94
|
-
>
|
115
|
+
<el-checkbox v-model="widget.options.multiple">支持多选</el-checkbox>
|
95
116
|
<el-checkbox v-model="widget.options.showAllLevels"
|
96
117
|
>仅显示最后一级</el-checkbox
|
97
118
|
>
|
98
|
-
<el-checkbox v-model="widget.options.
|
119
|
+
<el-checkbox v-model="widget.options.checkStrictly"
|
99
120
|
>选择任意一级选项
|
100
121
|
</el-checkbox>
|
101
122
|
<el-checkbox v-model="widget.options.filterable"
|
@@ -128,7 +149,23 @@ export default {
|
|
128
149
|
props: {},
|
129
150
|
mixins: [configComponent],
|
130
151
|
mounted() {},
|
131
|
-
methods: {
|
152
|
+
methods: {
|
153
|
+
handleRadioGroupChange(val) {
|
154
|
+
if (!val) {
|
155
|
+
this.$nextTick(() => {
|
156
|
+
this.$refs.codeEditorRef.setValue(
|
157
|
+
JSON.stringify(this.widget.options.options, null, 2)
|
158
|
+
);
|
159
|
+
});
|
160
|
+
this.widget.options.remote.api = "";
|
161
|
+
}
|
162
|
+
},
|
163
|
+
handleCodeEditorChange(val) {
|
164
|
+
try {
|
165
|
+
this.widget.options.options = JSON.parse(val);
|
166
|
+
} catch (error) {}
|
167
|
+
}
|
168
|
+
}
|
132
169
|
};
|
133
170
|
</script>
|
134
171
|
|