@steedos-widgets/amis-object 1.2.35 → 1.2.37
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/dist/amis-object.cjs.js +78 -50
- package/dist/amis-object.cjs.js.map +1 -1
- package/dist/amis-object.esm.js +79 -51
- package/dist/amis-object.esm.js.map +1 -1
- package/dist/amis-object.umd.js +78 -50
- package/dist/amis-object.umd.js.map +1 -1
- package/dist/assets.json +16 -16
- package/package.json +3 -3
package/dist/amis-object.umd.js
CHANGED
|
@@ -3566,8 +3566,8 @@
|
|
|
3566
3566
|
/*
|
|
3567
3567
|
* @Author: baozhoutao@steedos.com
|
|
3568
3568
|
* @Date: 2022-05-23 09:53:08
|
|
3569
|
-
* @LastEditors:
|
|
3570
|
-
* @LastEditTime: 2023-
|
|
3569
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
3570
|
+
* @LastEditTime: 2023-08-03 18:07:54
|
|
3571
3571
|
* @Description:
|
|
3572
3572
|
*/
|
|
3573
3573
|
|
|
@@ -3649,7 +3649,11 @@
|
|
|
3649
3649
|
|
|
3650
3650
|
function getNameTpl(field, ctx){
|
|
3651
3651
|
const href = getNameTplUrl(field, ctx);
|
|
3652
|
-
|
|
3652
|
+
let linkTarget = "";
|
|
3653
|
+
if(ctx && ctx.isLookup){
|
|
3654
|
+
linkTarget = "target='_blank'";
|
|
3655
|
+
}
|
|
3656
|
+
return `<a href="${href}" ${linkTarget}>\${${field.name}}</a>`
|
|
3653
3657
|
}
|
|
3654
3658
|
|
|
3655
3659
|
function getRelatedFieldTpl(field, ctx){
|
|
@@ -3662,6 +3666,11 @@
|
|
|
3662
3666
|
}
|
|
3663
3667
|
}
|
|
3664
3668
|
|
|
3669
|
+
let linkTarget = "";
|
|
3670
|
+
if(ctx && ctx.isLookup){
|
|
3671
|
+
linkTarget = "target='_blank'";
|
|
3672
|
+
}
|
|
3673
|
+
|
|
3665
3674
|
const onlyDisplayLabel = ctx.onlyDisplayLabel;
|
|
3666
3675
|
|
|
3667
3676
|
let fieldDataStrTpl = `data._display.${field.name}`;
|
|
@@ -3677,7 +3686,7 @@
|
|
|
3677
3686
|
const href = Router$1.getObjectDetailPath({
|
|
3678
3687
|
formFactor: ctx.formFactor, appId: "<%=data.appId%>", objectName: `<%=item.objectName%>`, recordId: `<%=item.value%>`, _templateType: "JavaScript"
|
|
3679
3688
|
});
|
|
3680
|
-
labelTpl = `<a href="${href}"><%=item.label%></a>`;
|
|
3689
|
+
labelTpl = `<a href="${href}" ${linkTarget}><%=item.label%></a>`;
|
|
3681
3690
|
}
|
|
3682
3691
|
tpl = `
|
|
3683
3692
|
<% if (${fieldDataStrTpl} && ${fieldDataStrTpl}.length) { %><% ${fieldDataStrTpl}.forEach(function(item,index) { %> <% if(index>0 && index<${fieldDataStrTpl}.length){ %> , <% } %> ${labelTpl} <% }); %><% } %>
|
|
@@ -3695,7 +3704,7 @@
|
|
|
3695
3704
|
const href = Router$1.getObjectDetailPath({
|
|
3696
3705
|
formFactor: ctx.formFactor, appId: "${appId}", objectName: `${objectNameTpl}`, recordId: `${recordIdTpl}`
|
|
3697
3706
|
});
|
|
3698
|
-
labelTpl = `<a href="${href}">${labelTpl}</a>`;
|
|
3707
|
+
labelTpl = `<a href="${href}" ${linkTarget}>${labelTpl}</a>`;
|
|
3699
3708
|
}
|
|
3700
3709
|
tpl = labelTpl;
|
|
3701
3710
|
}
|
|
@@ -3707,7 +3716,7 @@
|
|
|
3707
3716
|
const href = Router$1.getObjectDetailPath({
|
|
3708
3717
|
formFactor: ctx.formFactor, appId: "<%=data.appId%>", objectName: `<%=item.objectName%>`, recordId: `<%=item.value%>`, _templateType: "JavaScript"
|
|
3709
3718
|
});
|
|
3710
|
-
labelTpl = `<a href="${href}"><%=item.label%></a>`;
|
|
3719
|
+
labelTpl = `<a href="${href}" ${linkTarget}><%=item.label%></a>`;
|
|
3711
3720
|
}
|
|
3712
3721
|
tpl = `
|
|
3713
3722
|
<% if (${fieldDataStrTpl} && ${fieldDataStrTpl}.length) { %><% ${fieldDataStrTpl}.forEach(function(item) { %> ${labelTpl} <% }); %><% } %>
|
|
@@ -3843,7 +3852,7 @@
|
|
|
3843
3852
|
if(displayFields.length > 0){
|
|
3844
3853
|
return `${fieldsName.join(',')},${expandFieldsQuery},_display:_ui{${displayFields.join(',')}}`;
|
|
3845
3854
|
}
|
|
3846
|
-
return `${fieldsName.join(' ')},${expandFieldsQuery}
|
|
3855
|
+
return ___default.trimEnd(`${fieldsName.join(' ')},${expandFieldsQuery}`, ",")
|
|
3847
3856
|
}
|
|
3848
3857
|
|
|
3849
3858
|
function getRecordPermissionsTemplate(){
|
|
@@ -6418,12 +6427,6 @@
|
|
|
6418
6427
|
if (
|
|
6419
6428
|
field && window.isFieldTypeSearchable(field.type)
|
|
6420
6429
|
) {
|
|
6421
|
-
delete field.defaultValue;
|
|
6422
|
-
delete field.required;
|
|
6423
|
-
delete field.is_wide;
|
|
6424
|
-
delete field.readonly;
|
|
6425
|
-
delete field.hidden;
|
|
6426
|
-
delete field.omit;
|
|
6427
6430
|
var ctx = ${JSON.stringify(ctx)};
|
|
6428
6431
|
const amisField = window.getFieldSearchable(field, fields, ctx);
|
|
6429
6432
|
return amisField;
|
|
@@ -6518,8 +6521,8 @@
|
|
|
6518
6521
|
}
|
|
6519
6522
|
if(!event.data.isLookup){
|
|
6520
6523
|
// 刷新浏览器后,filterFormValues值是空的,只能从本地存储中取出并重置为空值
|
|
6521
|
-
const
|
|
6522
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
6524
|
+
const listName = event.data.listName;
|
|
6525
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6523
6526
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6524
6527
|
if(localListViewProps){
|
|
6525
6528
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -6545,13 +6548,13 @@
|
|
|
6545
6548
|
const dataProviderInited = `
|
|
6546
6549
|
const objectName = data.objectName;
|
|
6547
6550
|
const isLookup = data.isLookup;
|
|
6548
|
-
const
|
|
6551
|
+
const listName = data.listName;
|
|
6549
6552
|
let searchableFieldsStoreKey = location.pathname + "/searchable_fields/";
|
|
6550
6553
|
if(isLookup){
|
|
6551
6554
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
6552
6555
|
}
|
|
6553
6556
|
else{
|
|
6554
|
-
searchableFieldsStoreKey += (
|
|
6557
|
+
searchableFieldsStoreKey += (listName || "");
|
|
6555
6558
|
}
|
|
6556
6559
|
let defaultSearchableFields = sessionStorage.getItem(searchableFieldsStoreKey);
|
|
6557
6560
|
if(defaultSearchableFields){
|
|
@@ -6578,9 +6581,7 @@
|
|
|
6578
6581
|
setData({ showFieldsFilter: false });
|
|
6579
6582
|
}
|
|
6580
6583
|
else{
|
|
6581
|
-
|
|
6582
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (data.listViewId || "");
|
|
6583
|
-
console.log("===listViewPropsStoreKey=122==", listViewPropsStoreKey);
|
|
6584
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6584
6585
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6585
6586
|
if(localListViewProps){
|
|
6586
6587
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -6610,7 +6611,6 @@
|
|
|
6610
6611
|
const listName = data.listName;
|
|
6611
6612
|
const objectName = data.objectName;
|
|
6612
6613
|
const isLookup = data.isLookup;
|
|
6613
|
-
const listViewId = data.listViewId;
|
|
6614
6614
|
const value = data.fields;
|
|
6615
6615
|
const scope = event.context.scoped;
|
|
6616
6616
|
// 这里的filterForm不是name为"listview-filter-form"的内部form,而是crud自带的filter form
|
|
@@ -6626,7 +6626,7 @@
|
|
|
6626
6626
|
searchableFieldsStoreKey += "lookup/" + objectName;
|
|
6627
6627
|
}
|
|
6628
6628
|
else{
|
|
6629
|
-
searchableFieldsStoreKey += (
|
|
6629
|
+
searchableFieldsStoreKey += (listName || "");
|
|
6630
6630
|
}
|
|
6631
6631
|
sessionStorage.setItem(searchableFieldsStoreKey, value);
|
|
6632
6632
|
|
|
@@ -6684,7 +6684,7 @@
|
|
|
6684
6684
|
}
|
|
6685
6685
|
|
|
6686
6686
|
// 列表视图crud支持本地缓存,所以需要进一步清除浏览器本地缓存里面用户在可搜索项中移除的字段值
|
|
6687
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
6687
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
6688
6688
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
6689
6689
|
if(localListViewProps){
|
|
6690
6690
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -8903,6 +8903,10 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
8903
8903
|
return ;
|
|
8904
8904
|
}
|
|
8905
8905
|
const refObjectConfig = await getUISchema(referenceTo.objectName);
|
|
8906
|
+
|
|
8907
|
+
ctx.idFieldName = refObjectConfig.idFieldName;
|
|
8908
|
+
ctx.objectName = refObjectConfig.name;
|
|
8909
|
+
|
|
8906
8910
|
const tableFields = [];
|
|
8907
8911
|
let i = 0;
|
|
8908
8912
|
const searchableFields = [];
|
|
@@ -9270,7 +9274,6 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
9270
9274
|
if(readonly){
|
|
9271
9275
|
data.tpl = await getLookupTpl(field, ctx);
|
|
9272
9276
|
}
|
|
9273
|
-
|
|
9274
9277
|
return data;
|
|
9275
9278
|
}
|
|
9276
9279
|
|
|
@@ -10600,6 +10603,24 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10600
10603
|
_field.multiple = true;
|
|
10601
10604
|
_field.is_wide = false;
|
|
10602
10605
|
_field.defaultValue = undefined;
|
|
10606
|
+
_field.required = false;
|
|
10607
|
+
_field.hidden = false;
|
|
10608
|
+
_field.omit = false;
|
|
10609
|
+
|
|
10610
|
+
if(_field.amis){
|
|
10611
|
+
delete _field.amis.static;
|
|
10612
|
+
delete _field.amis.staticOn;
|
|
10613
|
+
delete _field.amis.disabled;
|
|
10614
|
+
delete _field.amis.disabledOn;
|
|
10615
|
+
delete _field.amis.required;
|
|
10616
|
+
delete _field.amis.requiredOn;
|
|
10617
|
+
delete _field.amis.visible;
|
|
10618
|
+
delete _field.amis.visibleOn;
|
|
10619
|
+
delete _field.amis.hidden;
|
|
10620
|
+
delete _field.amis.hiddenOn;
|
|
10621
|
+
delete _field.amis.autoFill;
|
|
10622
|
+
}
|
|
10623
|
+
|
|
10603
10624
|
const amisField = await convertSFieldToAmisField(_field, false, Object.assign({}, ctx, {fieldNamePrefix: fieldNamePrefix, required: false, showSystemFields: true, inFilterForm: true}));
|
|
10604
10625
|
if(amisField){
|
|
10605
10626
|
return amisField;
|
|
@@ -10877,6 +10898,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10877
10898
|
if(field.wrap != true){
|
|
10878
10899
|
className += " whitespace-nowrap";
|
|
10879
10900
|
}
|
|
10901
|
+
let columnItem;
|
|
10880
10902
|
if((field.is_name || field.name === options.labelFieldName) && options.objectName === 'cms_files'){
|
|
10881
10903
|
const previewFileScript = `
|
|
10882
10904
|
var data = event.data;
|
|
@@ -10884,12 +10906,11 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10884
10906
|
var file_id = data._id;
|
|
10885
10907
|
SteedosUI.previewFile && SteedosUI.previewFile({file_name, file_id});
|
|
10886
10908
|
`;
|
|
10887
|
-
|
|
10909
|
+
columnItem = {
|
|
10888
10910
|
"type": "button",
|
|
10889
10911
|
"label": `<%=data.versions ? data.name : "${field.label}"%>`,
|
|
10890
10912
|
className,
|
|
10891
10913
|
"level": "link",
|
|
10892
|
-
"quickEdit": quickEditSchema,
|
|
10893
10914
|
"onEvent": {
|
|
10894
10915
|
"click": {
|
|
10895
10916
|
"actions": [
|
|
@@ -10915,9 +10936,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10915
10936
|
]
|
|
10916
10937
|
}
|
|
10917
10938
|
}
|
|
10918
|
-
}
|
|
10939
|
+
};
|
|
10919
10940
|
}else if(field.type === 'toggle'){
|
|
10920
|
-
|
|
10941
|
+
columnItem = Object.assign({}, {
|
|
10921
10942
|
type: "switch",
|
|
10922
10943
|
name: field.name,
|
|
10923
10944
|
label: field.label,
|
|
@@ -10925,24 +10946,22 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10925
10946
|
toggled: field.toggled,
|
|
10926
10947
|
static: true,
|
|
10927
10948
|
className,
|
|
10928
|
-
|
|
10929
|
-
}, field.amis, {name: field.name}));
|
|
10949
|
+
}, field.amis, {name: field.name});
|
|
10930
10950
|
}else if(field.type === 'avatar' || field.type === 'image' || field.type === 'file'){
|
|
10931
|
-
|
|
10951
|
+
columnItem = Object.assign({}, {
|
|
10932
10952
|
type: "switch",
|
|
10933
10953
|
name: field.name,
|
|
10934
10954
|
label: field.label,
|
|
10935
10955
|
width: getFieldWidth(field.width),
|
|
10936
10956
|
toggled: field.toggled,
|
|
10937
|
-
quickEdit: quickEditSchema,
|
|
10938
10957
|
static: true,
|
|
10939
10958
|
className,
|
|
10940
10959
|
...getAmisFileReadonlySchema(field)
|
|
10941
|
-
}, field.amis, {name: field.name})
|
|
10960
|
+
}, field.amis, {name: field.name});
|
|
10942
10961
|
}
|
|
10943
10962
|
else if(field.type === 'select'){
|
|
10944
10963
|
const map = getSelectMap(field.options);
|
|
10945
|
-
|
|
10964
|
+
columnItem = Object.assign({}, {
|
|
10946
10965
|
type: "mapping",
|
|
10947
10966
|
name: field.name,
|
|
10948
10967
|
label: field.label,
|
|
@@ -10952,8 +10971,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10952
10971
|
toggled: field.toggled,
|
|
10953
10972
|
className,
|
|
10954
10973
|
static: true,
|
|
10955
|
-
|
|
10956
|
-
}, field.amis, {name: field.name}));
|
|
10974
|
+
}, field.amis, {name: field.name});
|
|
10957
10975
|
}
|
|
10958
10976
|
else {
|
|
10959
10977
|
const tpl = await getFieldTpl(field, options);
|
|
@@ -10973,7 +10991,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10973
10991
|
className += 'min-w-56';
|
|
10974
10992
|
}
|
|
10975
10993
|
if(!field.hidden && !field.extra){
|
|
10976
|
-
|
|
10994
|
+
columnItem = Object.assign({}, {
|
|
10977
10995
|
name: field.name,
|
|
10978
10996
|
label: field.label,
|
|
10979
10997
|
sortable: field.sortable,
|
|
@@ -10984,13 +11002,18 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
10984
11002
|
toggled: field.toggled,
|
|
10985
11003
|
className,
|
|
10986
11004
|
static: true,
|
|
10987
|
-
quickEdit: quickEditSchema,
|
|
10988
11005
|
options: field.type === 'html' ? {html: true} : null
|
|
10989
11006
|
// toggled: true
|
|
10990
|
-
}, field.amis, {name: field.name})
|
|
11007
|
+
}, field.amis, {name: field.name});
|
|
10991
11008
|
}
|
|
10992
11009
|
}
|
|
10993
|
-
|
|
11010
|
+
if(columnItem){
|
|
11011
|
+
if(quickEditSchema){
|
|
11012
|
+
columnItem.quickEdit = quickEditSchema;
|
|
11013
|
+
columnItem.quickEditEnabledOn = "${is_system !== true}";
|
|
11014
|
+
}
|
|
11015
|
+
columns.push(columnItem);
|
|
11016
|
+
}
|
|
10994
11017
|
}
|
|
10995
11018
|
// columns.push(getOperation(fields));
|
|
10996
11019
|
if(!___default__namespace.some(columns, { name: options.labelFieldName })){
|
|
@@ -11296,6 +11319,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
11296
11319
|
}
|
|
11297
11320
|
|
|
11298
11321
|
async function getTableSchema$1(fields, options){
|
|
11322
|
+
let isLookup = options && options.isLookup;
|
|
11299
11323
|
if(!options){
|
|
11300
11324
|
options = {};
|
|
11301
11325
|
}
|
|
@@ -11305,7 +11329,9 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
11305
11329
|
}
|
|
11306
11330
|
else {
|
|
11307
11331
|
columns = await getTableColumns$1(fields, options);
|
|
11308
|
-
|
|
11332
|
+
if(!isLookup){
|
|
11333
|
+
columns.push(await getTableOperation(options));
|
|
11334
|
+
}
|
|
11309
11335
|
}
|
|
11310
11336
|
return {
|
|
11311
11337
|
mode: "table",
|
|
@@ -11400,8 +11426,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
11400
11426
|
const data = _.cloneDeep(api.data);
|
|
11401
11427
|
try{
|
|
11402
11428
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
11403
|
-
const
|
|
11404
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
11429
|
+
const listName = api.data.listName;
|
|
11430
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
11405
11431
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
11406
11432
|
if(localListViewProps){
|
|
11407
11433
|
localListViewProps = JSON.parse(localListViewProps);
|
|
@@ -11601,8 +11627,8 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
11601
11627
|
|
|
11602
11628
|
try{
|
|
11603
11629
|
// TODO: 不应该直接在这里取localStorage,应该从外面传入
|
|
11604
|
-
const
|
|
11605
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
11630
|
+
const listName = api.body.listName;
|
|
11631
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listName || "");
|
|
11606
11632
|
/**
|
|
11607
11633
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
11608
11634
|
* 比如:{"perPage":20,"page":1,"__searchable__name":"7","__searchable__between__n1__c":[null,null],"filter":[["name","contains","a"]]}
|
|
@@ -13571,7 +13597,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
13571
13597
|
* @Author: baozhoutao@steedos.com
|
|
13572
13598
|
* @Date: 2022-07-05 15:55:39
|
|
13573
13599
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
13574
|
-
* @LastEditTime: 2023-08-
|
|
13600
|
+
* @LastEditTime: 2023-08-04 12:27:48
|
|
13575
13601
|
* @Description:
|
|
13576
13602
|
*/
|
|
13577
13603
|
|
|
@@ -13836,7 +13862,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
13836
13862
|
* 本次存储代码段
|
|
13837
13863
|
*/
|
|
13838
13864
|
try {
|
|
13839
|
-
const listViewPropsStoreKey = location.pathname + "/crud/" + (
|
|
13865
|
+
const listViewPropsStoreKey = location.pathname + "/crud/" + (listViewName || "");
|
|
13840
13866
|
let localListViewProps = sessionStorage.getItem(listViewPropsStoreKey);
|
|
13841
13867
|
/**
|
|
13842
13868
|
* localListViewProps规范来自crud请求api中api.data.$self参数值的。
|
|
@@ -19277,14 +19303,16 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
19277
19303
|
/*
|
|
19278
19304
|
* @Author: baozhoutao@steedos.com
|
|
19279
19305
|
* @Date: 2023-01-14 16:41:24
|
|
19280
|
-
* @LastEditors:
|
|
19281
|
-
* @LastEditTime: 2023-
|
|
19306
|
+
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
19307
|
+
* @LastEditTime: 2023-08-03 13:32:08
|
|
19282
19308
|
* @Description:
|
|
19283
19309
|
*/
|
|
19284
19310
|
var getSelectFlowSchema = function (id, props) {
|
|
19285
19311
|
var label = props.label, data = props.data, name = props.name, required = props.required, _a = props.action, action = _a === void 0 ? "query" : _a, _b = props.distributeInstanceId, distributeInstanceId = _b === void 0 ? "" : _b, _c = props.distributeStepId, distributeStepId = _c === void 0 ? "" : _c, _d = props.mode, mode = _d === void 0 ? "input-tree" : _d, className = props.className, onEvent = props.onEvent, _e = props.multiple, multiple = _e === void 0 ? false : _e, delimiter = props.delimiter, joinValues = props.joinValues, extractValue = props.extractValue, searchable = props.searchable, _f = props.showIcon, showIcon = _f === void 0 ? true : _f, _g = props.showRadio, showRadio = _g === void 0 ? false : _g, showOutline = props.showOutline, initiallyOpen = props.initiallyOpen, unfoldedLevel = props.unfoldedLevel, treeContainerClassName = props.treeContainerClassName, _h = props.amis, amis = _h === void 0 ? {} : _h;
|
|
19286
19312
|
// console.log(`=====onEvent`, onEvent)
|
|
19287
|
-
return __assign$2({ type: mode, id: id, label: label, name: name, options: [], multiple: multiple, delimiter: delimiter, joinValues: joinValues, extractValue: extractValue, searchable: searchable, showOutline: showOutline, initiallyOpen: initiallyOpen, unfoldedLevel: unfoldedLevel,
|
|
19313
|
+
return __assign$2({ type: mode, id: id, label: label, name: name, options: [], multiple: multiple, delimiter: delimiter, joinValues: joinValues, extractValue: extractValue, searchable: searchable, showOutline: showOutline, initiallyOpen: initiallyOpen, unfoldedLevel: unfoldedLevel,
|
|
19314
|
+
// className: `overflow-y-auto ` + className,
|
|
19315
|
+
className: className, required: required, treeContainerClassName: treeContainerClassName, heightAuto: true, menuTpl: mode === 'input-tree' ? {
|
|
19288
19316
|
type: "tpl",
|
|
19289
19317
|
tpl: "<div class='flex'><span>${label}</span><span class='rounded p-1 text-xs text-center w-14 ${value == 'startFlows' ? '' : 'hidden'}'><button class='antd-Button antd-Button--link m-none p-none'>设置</button></span></div>",
|
|
19290
19318
|
onEvent: {
|