@steedos/standard-ui 2.5.13-beta.5 → 2.5.13-beta.7
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.
|
@@ -2,19 +2,30 @@
|
|
|
2
2
|
* @Author: 殷亮辉 yinlianghui@hotoa.com
|
|
3
3
|
* @Date: 2023-05-16 17:00:38
|
|
4
4
|
* @LastEditors: 殷亮辉 yinlianghui@hotoa.com
|
|
5
|
-
* @LastEditTime: 2023-
|
|
5
|
+
* @LastEditTime: 2023-09-07 13:23:57
|
|
6
6
|
*/
|
|
7
7
|
var buttonTriggerHistoryPathsChange;
|
|
8
8
|
|
|
9
9
|
let historyPathsStoreKey = "history_paths";
|
|
10
10
|
|
|
11
11
|
// 切换应用、对象、列表视图时清除本地存储中的过滤条件
|
|
12
|
-
function clearHistoryFilters(context, lastPath) {
|
|
12
|
+
function clearHistoryFilters(context, lastPath, paths) {
|
|
13
13
|
const path = context.path;
|
|
14
14
|
const params = context.params || {};
|
|
15
15
|
if (!lastPath || lastPath.params.app_id != params.app_id || lastPath.params.object_name != params.object_name || lastPath.params.list_view_id != params.list_view_id) {
|
|
16
16
|
let listViewPropsStoreKey;
|
|
17
17
|
if (lastPath) {
|
|
18
|
+
if(lastPath.params.record_id){
|
|
19
|
+
// 是从记录详细界面直接切换到其他对象列表或其他应用时,进一步往上找,找到对象列表的path作为lastPath来清除对应的本地存储
|
|
20
|
+
for(let i = paths.length - 1;i >= 0;i--){
|
|
21
|
+
let tempPath = paths[i];
|
|
22
|
+
if(!tempPath.params.record_id && tempPath.params.list_view_id){
|
|
23
|
+
// record_id不存在,list_view_id存在表示对象列表页面
|
|
24
|
+
lastPath = tempPath;
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
18
29
|
listViewPropsStoreKey = lastPath.path + "/crud";
|
|
19
30
|
}
|
|
20
31
|
else {
|
|
@@ -229,7 +240,7 @@ FlowRouter.triggers.enter(debounce(function (context, redirect, stop) {
|
|
|
229
240
|
}
|
|
230
241
|
}
|
|
231
242
|
else {
|
|
232
|
-
clearHistoryFilters(context, lastPath);
|
|
243
|
+
clearHistoryFilters(context, lastPath, paths);
|
|
233
244
|
// 触发广播事件前重置amis变量historyPaths值为空数组,并把当前path和params存入amis变量historyPaths中
|
|
234
245
|
resetHistoryPath(path, params);
|
|
235
246
|
}
|
|
@@ -11,6 +11,20 @@ const fs = require('fs');
|
|
|
11
11
|
const _ = require('lodash');
|
|
12
12
|
const path = require('path');
|
|
13
13
|
|
|
14
|
+
|
|
15
|
+
const getConfig = (key, platform)=>{
|
|
16
|
+
if(platform === 'cordova'){
|
|
17
|
+
let value = process.env[key];
|
|
18
|
+
//如果不是以http开头的,就是相对路径, 则加上ROOT_URL
|
|
19
|
+
if(_.startsWith(value, '/')){
|
|
20
|
+
return Meteor.absoluteUrl(value) ;
|
|
21
|
+
}
|
|
22
|
+
return value;
|
|
23
|
+
}else{
|
|
24
|
+
return process.env[key]
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
|
|
14
28
|
/**
|
|
15
29
|
* 虽然script 标签的 async = false; 可以解决js之间的依赖顺序问题, 但是它无法做到比 HTML 中其他非动态加载的 script 脚本更早执行
|
|
16
30
|
* 所以调整了meteor 内核加载 bundledJs、staticJs的方式 (creator/packages/boilerplate-generator)
|
|
@@ -25,11 +39,11 @@ router.get('/main_head.js', async function (req, res) {
|
|
|
25
39
|
STEEDOS_SENTRY_ENABLED: process.env.STEEDOS_SENTRY_ENABLED,
|
|
26
40
|
NODE_ENV: process.env.NODE_ENV,
|
|
27
41
|
STEEDOS_SENTRY_DSN: process.env.STEEDOS_SENTRY_DSN,
|
|
28
|
-
STEEDOS_UNPKG_URL:
|
|
29
|
-
STEEDOS_AMIS_URL:
|
|
30
|
-
STEEDOS_PUBLIC_SCRIPT_VCONSOLE:
|
|
31
|
-
STEEDOS_PUBLIC_SCRIPT_PLUGINS:
|
|
32
|
-
STEEDOS_PUBLIC_STYLE_PLUGINS:
|
|
42
|
+
STEEDOS_UNPKG_URL: getConfig('STEEDOS_UNPKG_URL', platform),
|
|
43
|
+
STEEDOS_AMIS_URL: getConfig('STEEDOS_AMIS_URL', platform),
|
|
44
|
+
STEEDOS_PUBLIC_SCRIPT_VCONSOLE: getConfig('STEEDOS_PUBLIC_SCRIPT_VCONSOLE', platform),
|
|
45
|
+
STEEDOS_PUBLIC_SCRIPT_PLUGINS: getConfig('STEEDOS_PUBLIC_SCRIPT_PLUGINS', platform),
|
|
46
|
+
STEEDOS_PUBLIC_STYLE_PLUGINS: getConfig('STEEDOS_PUBLIC_STYLE_PLUGINS', platform),
|
|
33
47
|
STEEDOS_VERSION: process.env.STEEDOS_VERSION,
|
|
34
48
|
STEEDOS_LOCALE: "",
|
|
35
49
|
STEEDOS_PUBLIC_PAGE_ASSETURLS: process.env.STEEDOS_PUBLIC_PAGE_ASSETURLS,
|
|
@@ -50,4 +64,27 @@ router.get('/main_head.js', async function (req, res) {
|
|
|
50
64
|
}
|
|
51
65
|
|
|
52
66
|
});
|
|
67
|
+
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
router.get('/main_head.css', async function(req, res){
|
|
71
|
+
const { platform } = req.query;
|
|
72
|
+
|
|
73
|
+
res.set('Content-Type', 'text/css; charset=UTF-8');
|
|
74
|
+
|
|
75
|
+
const STEEDOS_UNPKG_URL = getConfig('STEEDOS_UNPKG_URL', platform);
|
|
76
|
+
const STEEDOS_AMIS_URL = getConfig('STEEDOS_AMIS_URL', platform);
|
|
77
|
+
const ROOT_URL = platform === 'cordova' ? __meteor_runtime_config__.ROOT_URL : '';
|
|
78
|
+
|
|
79
|
+
res.send(`
|
|
80
|
+
@import url("${STEEDOS_UNPKG_URL}/@salesforce-ux/design-system@2.19.0/assets/styles/salesforce-lightning-design-system.min.css");
|
|
81
|
+
@import url("${STEEDOS_AMIS_URL}/lib/themes/antd.css");
|
|
82
|
+
@import url("${STEEDOS_AMIS_URL}/lib/helper.css");
|
|
83
|
+
@import url("${STEEDOS_AMIS_URL}/sdk/iconfont.css");
|
|
84
|
+
@import url("${STEEDOS_UNPKG_URL}/@fortawesome/fontawesome-free@6.2.0/css/all.min.css");
|
|
85
|
+
@import url("${ROOT_URL}/tailwind/tailwind-steedos.css");
|
|
86
|
+
@import url("${ROOT_URL}/amis/amis.css");
|
|
87
|
+
`);
|
|
88
|
+
})
|
|
89
|
+
|
|
53
90
|
exports.default = router;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@steedos/standard-ui",
|
|
3
|
-
"version": "2.5.13-beta.
|
|
3
|
+
"version": "2.5.13-beta.7",
|
|
4
4
|
"main": "package.service.js",
|
|
5
5
|
"private": false,
|
|
6
6
|
"publishConfig": {
|
|
@@ -12,5 +12,5 @@
|
|
|
12
12
|
"description": "steedos package",
|
|
13
13
|
"repository": {},
|
|
14
14
|
"license": "MIT",
|
|
15
|
-
"gitHead": "
|
|
15
|
+
"gitHead": "2d7ccee79d32e927142ae7c0f18ba3f6505987d1"
|
|
16
16
|
}
|