@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/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@6.3.0-beta.
|
|
7
|
-
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
6
|
+
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.8/dist/sortable.umd.js",
|
|
7
|
+
"https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.8/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@6.3.0-beta.
|
|
18
|
+
"url": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.8/dist/meta.js",
|
|
19
19
|
"urls": {
|
|
20
|
-
"default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
21
|
-
"design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.
|
|
20
|
+
"default": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.8/dist/meta.js",
|
|
21
|
+
"design": "https://unpkg.com/@steedos-widgets/sortable@6.3.0-beta.8/dist/meta.js"
|
|
22
22
|
}
|
|
23
23
|
}
|
|
24
24
|
]
|
package/dist/sortable.cjs.js
CHANGED
|
@@ -54145,10 +54145,23 @@ function getNameTpl(field, ctx){
|
|
|
54145
54145
|
if(ctx && ctx.isLookup){
|
|
54146
54146
|
linkTarget = "target='_blank'";
|
|
54147
54147
|
}
|
|
54148
|
+
let nameLabel = field.name;
|
|
54149
|
+
//若字段类型是lookup,则按照相关表tpl的label规则显示;若是其它类型,则显示_display或字段本身的值
|
|
54150
|
+
if (field.type == "lookup") {
|
|
54151
|
+
if(!field.reference_to && (field.optionsFunction || field._optionsFunction || field.options)){
|
|
54152
|
+
if(!field.isTableField){
|
|
54153
|
+
nameLabel = `\${${field.name}__label}`;
|
|
54154
|
+
}
|
|
54155
|
+
} else {
|
|
54156
|
+
nameLabel = `\${_display.${field.name}.label}`;
|
|
54157
|
+
}
|
|
54158
|
+
} else {
|
|
54159
|
+
nameLabel = `\${_display.${field.name} || ${field.name}}`;
|
|
54160
|
+
}
|
|
54148
54161
|
if(ctx.isRelated && window.innerWidth >= 768){
|
|
54149
|
-
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${
|
|
54162
|
+
return `<a href="${href}" ${linkTarget} onclick="return false;">\${${nameLabel} | raw}</a>`
|
|
54150
54163
|
}else {
|
|
54151
|
-
return `<a href="${href}" ${linkTarget}>\${${
|
|
54164
|
+
return `<a href="${href}" ${linkTarget}>\${${nameLabel} | raw}</a>`
|
|
54152
54165
|
}
|
|
54153
54166
|
}
|
|
54154
54167
|
|
|
@@ -54273,7 +54286,7 @@ function getLocationTpl(field){
|
|
|
54273
54286
|
}
|
|
54274
54287
|
|
|
54275
54288
|
async function getFieldTpl (field, options){
|
|
54276
|
-
if((field.is_name || field.name === options.labelFieldName) && !options.onlyDisplayLookLabel){
|
|
54289
|
+
if((field.is_name || field.name === options.labelFieldName) && !options.onlyDisplayLookLabel && field.multiple !== true){
|
|
54277
54290
|
return getNameTpl(field, options)
|
|
54278
54291
|
}
|
|
54279
54292
|
switch (field.type) {
|
|
@@ -55514,7 +55527,7 @@ async function getTableColumns(object, fields, options){
|
|
|
55514
55527
|
var file_id = data.versions && data.versions[0] && data.versions[0]._id;
|
|
55515
55528
|
window.previewFile && window.previewFile({file_name, file_id});
|
|
55516
55529
|
`;
|
|
55517
|
-
columnItem = {
|
|
55530
|
+
columnItem = Object.assign({}, {
|
|
55518
55531
|
"type": "button",
|
|
55519
55532
|
"label": `<%=data.versions ? data.name : "${field.label}"%>`,
|
|
55520
55533
|
className,
|
|
@@ -55546,7 +55559,7 @@ async function getTableColumns(object, fields, options){
|
|
|
55546
55559
|
]
|
|
55547
55560
|
}
|
|
55548
55561
|
}
|
|
55549
|
-
};
|
|
55562
|
+
}, fieldAmis);
|
|
55550
55563
|
}else if(field.type === 'toggle'){
|
|
55551
55564
|
columnItem = Object.assign({}, {
|
|
55552
55565
|
type: "switch",
|
|
@@ -60182,7 +60195,7 @@ async function lookupToAmisSelect(field, readonly, ctx){
|
|
|
60182
60195
|
var optionsFilters = [["${valueFieldKey}", optionsFiltersOp, []]];
|
|
60183
60196
|
if (defaultValue && !api.data.$term) {
|
|
60184
60197
|
const defaultValueOptionsQueryData = ${JSON.stringify(defaultValueOptionsQueryData)};
|
|
60185
|
-
const defaultValueOptionsQuery = defaultValueOptionsQueryData
|
|
60198
|
+
const defaultValueOptionsQuery = defaultValueOptionsQueryData && defaultValueOptionsQueryData.query && defaultValueOptionsQueryData.query.replace(/^{/,"").replace(/}$/,"");
|
|
60186
60199
|
// 字段值单独请求,没值的时候在请求中返回空
|
|
60187
60200
|
optionsFilters = [["${valueFieldKey}", optionsFiltersOp, defaultValue]];
|
|
60188
60201
|
if(filters.length > 0){
|