@steedos-widgets/sortable 6.3.0-beta.6 → 6.3.0-beta.8
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/assets.json +5 -5
- package/dist/sortable.cjs.js +19 -6
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +19 -6
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +19 -6
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20446,10 +20446,23 @@
|
|
|
20446
20446
|
if(ctx && ctx.isLookup){
|
|
20447
20447
|
linkTarget = "target='_blank'";
|
|
20448
20448
|
}
|
|
20449
|
+
let nameLabel = field.name;
|
|
20450
|
+
//若字段类型是lookup,则按照相关表tpl的label规则显示;若是其它类型,则显示_display或字段本身的值
|
|
20451
|
+
if (field.type == "lookup") {
|
|
20452
|
+
if(!field.reference_to && (field.optionsFunction || field._optionsFunction || field.options)){
|
|
20453
|
+
if(!field.isTableField){
|
|
20454
|
+
nameLabel = `\${${field.name}__label}`;
|
|
20455
|
+
}
|
|
20456
|
+
} else {
|
|
20457
|
+
nameLabel = `\${_display.${field.name}.label}`;
|
|
20458
|
+
}
|
|
20459
|
+
} else {
|
|
20460
|
+
nameLabel = `\${_display.${field.name} || ${field.name}}`;
|
|
20461
|
+
}
|
|
20449
20462
|
if(ctx.isRelated && window.innerWidth >= 768){
|
|
20450
|
-
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${
|
|
20463
|
+
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${nameLabel} | raw}</a>`
|
|
20451
20464
|
}else {
|
|
20452
|
-
return `<a href="${href}" ${linkTarget}>\${${
|
|
20465
|
+
return `<a href="${href}" ${linkTarget}>\${${nameLabel} | raw}</a>`
|
|
20453
20466
|
}
|
|
20454
20467
|
}
|
|
20455
20468
|
|
|
@@ -20574,7 +20587,7 @@
|
|
|
20574
20587
|
}
|
|
20575
20588
|
|
|
20576
20589
|
async function getFieldTpl (field, options){
|
|
20577
|
-
if((field.is_name || field.name === options.labelFieldName) && !options.onlyDisplayLookLabel){
|
|
20590
|
+
if((field.is_name || field.name === options.labelFieldName) && !options.onlyDisplayLookLabel && field.multiple !== true){
|
|
20578
20591
|
return getNameTpl(field, options)
|
|
20579
20592
|
}
|
|
20580
20593
|
switch (field.type) {
|
|
@@ -21815,7 +21828,7 @@
|
|
|
21815
21828
|
var file_id = data.versions && data.versions[0] && data.versions[0]._id;
|
|
21816
21829
|
window.previewFile && window.previewFile({file_name, file_id});
|
|
21817
21830
|
`;
|
|
21818
|
-
columnItem = {
|
|
21831
|
+
columnItem = Object.assign({}, {
|
|
21819
21832
|
"type": "button",
|
|
21820
21833
|
"label": `<%=data.versions ? data.name : "${field.label}"%>`,
|
|
21821
21834
|
className,
|
|
@@ -21847,7 +21860,7 @@
|
|
|
21847
21860
|
]
|
|
21848
21861
|
}
|
|
21849
21862
|
}
|
|
21850
|
-
};
|
|
21863
|
+
}, fieldAmis);
|
|
21851
21864
|
}else if(field.type === 'toggle'){
|
|
21852
21865
|
columnItem = Object.assign({}, {
|
|
21853
21866
|
type: "switch",
|
|
@@ -26483,7 +26496,7 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
26483
26496
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
26484
26497
|
if (defaultValue && !api.data.$term) {
|
|
26485
26498
|
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
26486
|
-
const defaultValueOptionsQuery = defaultValueOptionsQueryData
|
|
26499
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
26487
26500
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
26488
26501
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
26489
26502
|
if(filters.length > 0){
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "6.3.0-beta.
|
|
3
|
+
"version": "6.3.0-beta.8",
|
|
4
4
|
"main": "dist/sortable.cjs.js",
|
|
5
5
|
"module": "dist/sortable.esm.js",
|
|
6
6
|
"unpkg": "dist/sortable.umd.js",
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"dependencies": {
|
|
46
46
|
"@dnd-kit/core": "^6.0.5",
|
|
47
47
|
"@dnd-kit/sortable": "^7.0.1",
|
|
48
|
-
"@steedos-widgets/amis-lib": "6.3.0-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "6.3.0-beta.8"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "2ef1caa53480e051319b26e5be85f78aa5852ff3"
|
|
51
51
|
}
|