@steedos-widgets/sortable 3.6.2-beta.1 → 3.6.2-beta.2
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 +33 -8
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +33 -8
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +33 -8
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -21809,6 +21809,18 @@
|
|
|
21809
21809
|
if(field.type === 'datetime'){
|
|
21810
21810
|
className += 'datetime-min-w';
|
|
21811
21811
|
}
|
|
21812
|
+
|
|
21813
|
+
//field上的amis属性里的clssname需要单独判断类型合并
|
|
21814
|
+
if (typeof field.amis?.className == "object") {
|
|
21815
|
+
className = {
|
|
21816
|
+
[className]: "true",
|
|
21817
|
+
...field.amis.className
|
|
21818
|
+
};
|
|
21819
|
+
} else if (typeof field.amis?.className == "string") {
|
|
21820
|
+
className = `${className} ${field.amis.className} `;
|
|
21821
|
+
}
|
|
21822
|
+
delete field.amis?.className;
|
|
21823
|
+
|
|
21812
21824
|
if(!field.hidden && !field.extra){
|
|
21813
21825
|
columnItem = Object.assign({}, {
|
|
21814
21826
|
name: field.name,
|
|
@@ -21905,12 +21917,24 @@
|
|
|
21905
21917
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
21906
21918
|
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
21907
21919
|
}
|
|
21920
|
+
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
21921
|
+
var className;
|
|
21922
|
+
if (typeof item.field.amis?.className == "object") {
|
|
21923
|
+
className = {
|
|
21924
|
+
[lineChildrenClassName]: "true",
|
|
21925
|
+
...item.field.amis.className
|
|
21926
|
+
};
|
|
21927
|
+
} else if (typeof item.field.amis?.className == "string") {
|
|
21928
|
+
className = `${lineChildrenClassName} ${item.field.amis.className} `;
|
|
21929
|
+
} else {
|
|
21930
|
+
className = lineChildrenClassName;
|
|
21931
|
+
}
|
|
21908
21932
|
lineChildren.push({
|
|
21909
21933
|
"type": "tpl",
|
|
21910
21934
|
"tpl": item.tpl,
|
|
21911
|
-
|
|
21935
|
+
className
|
|
21912
21936
|
});
|
|
21913
|
-
|
|
21937
|
+
|
|
21914
21938
|
if(item.field.is_wide){
|
|
21915
21939
|
// 宽字段占整行
|
|
21916
21940
|
isLeft = true;
|
|
@@ -21960,8 +21984,7 @@
|
|
|
21960
21984
|
tpl = await getFieldTpl(field, options);
|
|
21961
21985
|
}
|
|
21962
21986
|
if(!tpl){
|
|
21963
|
-
|
|
21964
|
-
tpl = `\${${field.name} | raw}`;
|
|
21987
|
+
tpl = `\${${field.name}}`;
|
|
21965
21988
|
}
|
|
21966
21989
|
if(!field.hidden && !field.extra){
|
|
21967
21990
|
tpls.push({ field, tpl });
|
|
@@ -21974,7 +21997,7 @@
|
|
|
21974
21997
|
|
|
21975
21998
|
let column = {
|
|
21976
21999
|
name: nameField.name,
|
|
21977
|
-
label: nameField.label,
|
|
22000
|
+
label: options.displayAs == 'split' ? '' : nameField.label,
|
|
21978
22001
|
sortable: nameField.sortable,
|
|
21979
22002
|
type: "button",
|
|
21980
22003
|
level: "link",
|
|
@@ -25658,9 +25681,11 @@ crudService && crudService.setData({showFieldsFilter: toShowFieldsFilter});
|
|
|
25658
25681
|
*/
|
|
25659
25682
|
if(enable_tree){
|
|
25660
25683
|
const rows = _.map(payload.data.rows, (item)=>{
|
|
25661
|
-
|
|
25662
|
-
|
|
25663
|
-
|
|
25684
|
+
if (!item.children) {
|
|
25685
|
+
return { ...item, children: [] };
|
|
25686
|
+
} else {
|
|
25687
|
+
return item;
|
|
25688
|
+
}
|
|
25664
25689
|
})
|
|
25665
25690
|
payload.data.rows = rows;
|
|
25666
25691
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "3.6.2-beta.
|
|
3
|
+
"version": "3.6.2-beta.2",
|
|
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": "3.6.2-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "3.6.2-beta.2"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "fb8c956f049ba98f7b6ae36f4a4e7760ca088eed"
|
|
51
51
|
}
|