@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/assets.json
CHANGED
|
@@ -3,8 +3,8 @@
|
|
|
3
3
|
{
|
|
4
4
|
"package": "@steedos-widgets/sortable",
|
|
5
5
|
"urls": [
|
|
6
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.2/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.2/dist/sortable.umd.css"
|
|
8
8
|
],
|
|
9
9
|
"library": "BuilderSortable"
|
|
10
10
|
}
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
"npm": {
|
|
16
16
|
"package": "@steedos-widgets/sortable"
|
|
17
17
|
},
|
|
18
|
-
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.2/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.2/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@3.6.2-beta.2/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -55508,6 +55508,18 @@ async function getTableColumns(fields, options){
|
|
|
55508
55508
|
if(field.type === 'datetime'){
|
|
55509
55509
|
className += 'datetime-min-w';
|
|
55510
55510
|
}
|
|
55511
|
+
|
|
55512
|
+
//field上的amis属性里的clssname需要单独判断类型合并
|
|
55513
|
+
if (typeof field.amis?.className == "object") {
|
|
55514
|
+
className = {
|
|
55515
|
+
[className]: "true",
|
|
55516
|
+
...field.amis.className
|
|
55517
|
+
};
|
|
55518
|
+
} else if (typeof field.amis?.className == "string") {
|
|
55519
|
+
className = `${className} ${field.amis.className} `;
|
|
55520
|
+
}
|
|
55521
|
+
delete field.amis?.className;
|
|
55522
|
+
|
|
55511
55523
|
if(!field.hidden && !field.extra){
|
|
55512
55524
|
columnItem = Object.assign({}, {
|
|
55513
55525
|
name: field.name,
|
|
@@ -55604,12 +55616,24 @@ function getMobileLines(tpls){
|
|
|
55604
55616
|
// 右侧半行,这里加样式类 flex flex-shrink-0,是为了省略号只显示在左半行,右半行文字一般比较短,如果也加省略号效果的话,左侧文字多的话,右侧没几个字就显示省略号了
|
|
55605
55617
|
lineChildrenClassName = "steedos-listview-item-right truncate ml-2 flex flex-shrink-0";
|
|
55606
55618
|
}
|
|
55619
|
+
//支持字段amis属性配置classname,识别classname的类型,与原样式合并
|
|
55620
|
+
var className;
|
|
55621
|
+
if (typeof item.field.amis?.className == "object") {
|
|
55622
|
+
className = {
|
|
55623
|
+
[lineChildrenClassName]: "true",
|
|
55624
|
+
...item.field.amis.className
|
|
55625
|
+
};
|
|
55626
|
+
} else if (typeof item.field.amis?.className == "string") {
|
|
55627
|
+
className = `${lineChildrenClassName} ${item.field.amis.className} `;
|
|
55628
|
+
} else {
|
|
55629
|
+
className = lineChildrenClassName;
|
|
55630
|
+
}
|
|
55607
55631
|
lineChildren.push({
|
|
55608
55632
|
"type": "tpl",
|
|
55609
55633
|
"tpl": item.tpl,
|
|
55610
|
-
|
|
55634
|
+
className
|
|
55611
55635
|
});
|
|
55612
|
-
|
|
55636
|
+
|
|
55613
55637
|
if(item.field.is_wide){
|
|
55614
55638
|
// 宽字段占整行
|
|
55615
55639
|
isLeft = true;
|
|
@@ -55659,8 +55683,7 @@ async function getMobileTableColumns(fields, options){
|
|
|
55659
55683
|
tpl = await getFieldTpl(field, options);
|
|
55660
55684
|
}
|
|
55661
55685
|
if(!tpl){
|
|
55662
|
-
|
|
55663
|
-
tpl = `\${${field.name} | raw}`;
|
|
55686
|
+
tpl = `\${${field.name}}`;
|
|
55664
55687
|
}
|
|
55665
55688
|
if(!field.hidden && !field.extra){
|
|
55666
55689
|
tpls.push({ field, tpl });
|
|
@@ -55673,7 +55696,7 @@ async function getMobileTableColumns(fields, options){
|
|
|
55673
55696
|
|
|
55674
55697
|
let column = {
|
|
55675
55698
|
name: nameField.name,
|
|
55676
|
-
label: nameField.label,
|
|
55699
|
+
label: options.displayAs == 'split' ? '' : nameField.label,
|
|
55677
55700
|
sortable: nameField.sortable,
|
|
55678
55701
|
type: "button",
|
|
55679
55702
|
level: "link",
|
|
@@ -59357,9 +59380,11 @@ async function lookupToAmisPicker(field, readonly, ctx){
|
|
|
59357
59380
|
*/
|
|
59358
59381
|
if(enable_tree){
|
|
59359
59382
|
const rows = _.map(payload.data.rows, (item)=>{
|
|
59360
|
-
|
|
59361
|
-
|
|
59362
|
-
|
|
59383
|
+
if (!item.children) {
|
|
59384
|
+
return { ...item, children: [] };
|
|
59385
|
+
} else {
|
|
59386
|
+
return item;
|
|
59387
|
+
}
|
|
59363
59388
|
})
|
|
59364
59389
|
payload.data.rows = rows;
|
|
59365
59390
|
}
|