@steedos-widgets/sortable 6.3.11-beta.6 → 6.3.11-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 +39 -15
- package/dist/sortable.cjs.js.map +1 -1
- package/dist/sortable.esm.js +39 -15
- package/dist/sortable.esm.js.map +1 -1
- package/dist/sortable.umd.js +39 -15
- package/package.json +3 -3
package/dist/sortable.umd.js
CHANGED
|
@@ -20286,18 +20286,24 @@
|
|
|
20286
20286
|
/*
|
|
20287
20287
|
* @Author: baozhoutao@steedos.com
|
|
20288
20288
|
* @Date: 2022-07-20 16:29:22
|
|
20289
|
-
* @LastEditors:
|
|
20290
|
-
* @LastEditTime: 2024-
|
|
20289
|
+
* @LastEditors: baozhoutao@steedos.com
|
|
20290
|
+
* @LastEditTime: 2024-10-14 13:33:27
|
|
20291
20291
|
* @Description:
|
|
20292
20292
|
*/
|
|
20293
20293
|
|
|
20294
|
-
function getImageFieldUrl(url) {
|
|
20295
|
-
if (window.Meteor
|
|
20296
|
-
|
|
20297
|
-
|
|
20298
|
-
|
|
20299
|
-
|
|
20300
|
-
|
|
20294
|
+
function getImageFieldUrl(url, readonly) {
|
|
20295
|
+
if (window.Meteor) {
|
|
20296
|
+
if(window.Meteor.isCordova != true){
|
|
20297
|
+
// '//'的位置
|
|
20298
|
+
const doubleSlashIndex = url.indexOf('//');
|
|
20299
|
+
const urlIndex = url.indexOf('/', doubleSlashIndex + 2);
|
|
20300
|
+
const rootUrl = url.substring(urlIndex);
|
|
20301
|
+
return rootUrl;
|
|
20302
|
+
}else {
|
|
20303
|
+
if(readonly || url.startsWith('http')){
|
|
20304
|
+
return `${url}?token=${window.btoa(JSON.stringify({ authToken : Builder.settings.context.authToken }))}`
|
|
20305
|
+
}
|
|
20306
|
+
}
|
|
20301
20307
|
}
|
|
20302
20308
|
return url;
|
|
20303
20309
|
}
|
|
@@ -20835,7 +20841,7 @@
|
|
|
20835
20841
|
* @Author: baozhoutao@steedos.com
|
|
20836
20842
|
* @Date: 2022-10-28 14:15:09
|
|
20837
20843
|
* @LastEditors: baozhoutao@steedos.com
|
|
20838
|
-
* @LastEditTime: 2024-
|
|
20844
|
+
* @LastEditTime: 2024-10-14 14:01:15
|
|
20839
20845
|
* @Description:
|
|
20840
20846
|
*/
|
|
20841
20847
|
|
|
@@ -20933,13 +20939,13 @@
|
|
|
20933
20939
|
if(type === 'file'){
|
|
20934
20940
|
return window.Meteor?.isCordova ? {
|
|
20935
20941
|
"type": "control",
|
|
20936
|
-
"body": {
|
|
20942
|
+
"body": steedosField.multiple ? {
|
|
20937
20943
|
"type": "each",
|
|
20938
20944
|
"name": "_display." + steedosField.name,
|
|
20939
20945
|
"items": {
|
|
20940
20946
|
"type": "tpl",
|
|
20941
20947
|
"tpl": "${name}",
|
|
20942
|
-
"className": "antd-Button--link inline-block",
|
|
20948
|
+
"className": "antd-Button--link inline-block mr-2",
|
|
20943
20949
|
"onEvent": {
|
|
20944
20950
|
"click": {
|
|
20945
20951
|
"actions": [
|
|
@@ -20954,6 +20960,24 @@
|
|
|
20954
20960
|
}
|
|
20955
20961
|
}
|
|
20956
20962
|
}
|
|
20963
|
+
} : {
|
|
20964
|
+
"type": "tpl",
|
|
20965
|
+
"tpl": "${_display." + steedosField.name + ".name}",
|
|
20966
|
+
"className": "antd-Button--link inline-block",
|
|
20967
|
+
"onEvent": {
|
|
20968
|
+
"click": {
|
|
20969
|
+
"actions": [
|
|
20970
|
+
{
|
|
20971
|
+
"script": `
|
|
20972
|
+
const data = event.data._display.${steedosField.name};
|
|
20973
|
+
Steedos.cordovaDownload(encodeURI(data.url), data.name);
|
|
20974
|
+
`,
|
|
20975
|
+
"actionType": "custom"
|
|
20976
|
+
}
|
|
20977
|
+
],
|
|
20978
|
+
"weight": 0
|
|
20979
|
+
}
|
|
20980
|
+
}
|
|
20957
20981
|
}
|
|
20958
20982
|
} : {
|
|
20959
20983
|
// type: amisFieldType,
|
|
@@ -22621,7 +22645,7 @@
|
|
|
22621
22645
|
/*
|
|
22622
22646
|
img/avatar字段值添加URL前缀使其在amis中正常显示图片。
|
|
22623
22647
|
*/
|
|
22624
|
-
function getScriptForAddUrlPrefixForImgFields(fields){
|
|
22648
|
+
function getScriptForAddUrlPrefixForImgFields(fields, readonly){
|
|
22625
22649
|
let imgFieldsKeys = [];
|
|
22626
22650
|
let imgFields = {};
|
|
22627
22651
|
fields.forEach((item)=>{
|
|
@@ -22649,12 +22673,12 @@
|
|
|
22649
22673
|
if(fieldProps.multiple){
|
|
22650
22674
|
if(imgFieldDisplayValue instanceof Array){
|
|
22651
22675
|
data[item] = imgFieldDisplayValue.map((i)=>{
|
|
22652
|
-
const url = window.getImageFieldUrl(i.url);
|
|
22676
|
+
const url = window.getImageFieldUrl(i.url, ${readonly});
|
|
22653
22677
|
return url;
|
|
22654
22678
|
});
|
|
22655
22679
|
}
|
|
22656
22680
|
}else{
|
|
22657
|
-
const url = imgFieldDisplayValue && window.getImageFieldUrl(imgFieldDisplayValue.url);
|
|
22681
|
+
const url = imgFieldDisplayValue && window.getImageFieldUrl(imgFieldDisplayValue.url, ${readonly});
|
|
22658
22682
|
data[item] = url;
|
|
22659
22683
|
}
|
|
22660
22684
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos-widgets/sortable",
|
|
3
|
-
"version": "6.3.11-beta.
|
|
3
|
+
"version": "6.3.11-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.11-beta.
|
|
48
|
+
"@steedos-widgets/amis-lib": "6.3.11-beta.8"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "87bdc3388701c995cfa52874fd7523500e4be6d3"
|
|
51
51
|
}
|