ts-glitter 20.2.0 → 20.2.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/lowcode/Entry.js +1 -2
- package/lowcode/Entry.ts +1 -2
- package/lowcode/glitterBundle/Glitter.js +4 -0
- package/lowcode/glitterBundle/Glitter.ts +4 -2
- package/lowcode/glitterBundle/module/PageManager.js +4 -0
- package/lowcode/glitterBundle/module/PageManager.ts +5 -2
- package/package.json +1 -1
- package/src/app-project/ios/proshake.xcodeproj/project.xcworkspace/xcuserdata/jianzhi.wang.xcuserdatad/UserInterfaceState.xcuserstate +0 -0
package/lowcode/Entry.js
CHANGED
|
@@ -22,7 +22,6 @@ import { ApplicationConfig } from './application-config.js';
|
|
|
22
22
|
export class Entry {
|
|
23
23
|
static onCreate(glitter) {
|
|
24
24
|
const originalReplaceState = history.replaceState;
|
|
25
|
-
let count = 0;
|
|
26
25
|
let last_replace = '';
|
|
27
26
|
window.history.replaceState = function (data, unused, url) {
|
|
28
27
|
if (last_replace !== url) {
|
|
@@ -144,7 +143,7 @@ export class Entry {
|
|
|
144
143
|
}
|
|
145
144
|
window.renderClock = (_b = window.renderClock) !== null && _b !== void 0 ? _b : createClock();
|
|
146
145
|
console.log(`Entry-time:`, window.renderClock.stop());
|
|
147
|
-
glitter.share.editerVersion = 'V_20.2.
|
|
146
|
+
glitter.share.editerVersion = 'V_20.2.2';
|
|
148
147
|
glitter.share.start = new Date();
|
|
149
148
|
const vm = { appConfig: [] };
|
|
150
149
|
window.saasConfig = {
|
package/lowcode/Entry.ts
CHANGED
|
@@ -16,7 +16,6 @@ export class Entry {
|
|
|
16
16
|
// 建立初始函式
|
|
17
17
|
public static onCreate(glitter: Glitter) {
|
|
18
18
|
const originalReplaceState = history.replaceState
|
|
19
|
-
let count=0
|
|
20
19
|
let last_replace=''
|
|
21
20
|
window.history.replaceState = function(data: any, unused: string, url?: string | URL | null) {
|
|
22
21
|
if(last_replace!==url){
|
|
@@ -146,7 +145,7 @@ export class Entry {
|
|
|
146
145
|
}
|
|
147
146
|
(window as any).renderClock = (window as any).renderClock ?? createClock();
|
|
148
147
|
console.log(`Entry-time:`, (window as any).renderClock.stop());
|
|
149
|
-
glitter.share.editerVersion = 'V_20.2.
|
|
148
|
+
glitter.share.editerVersion = 'V_20.2.2';
|
|
150
149
|
|
|
151
150
|
glitter.share.start = new Date();
|
|
152
151
|
const vm = { appConfig: [] };
|
|
@@ -52,6 +52,7 @@ export class Glitter {
|
|
|
52
52
|
this.elementCallback = {};
|
|
53
53
|
this.html = String.raw;
|
|
54
54
|
this.promiseValueMap = {};
|
|
55
|
+
this.waiting_push_state = () => { };
|
|
55
56
|
this.hidePageView = PageManager.hidePageView;
|
|
56
57
|
this.showPageView = PageManager.showPageView;
|
|
57
58
|
this.setHome = PageManager.setHome;
|
|
@@ -565,6 +566,9 @@ export class Glitter {
|
|
|
565
566
|
if (this.getUrlParameter('appName')) {
|
|
566
567
|
link.searchParams.set('appName', this.getUrlParameter('appName'));
|
|
567
568
|
}
|
|
569
|
+
this.waiting_push_state = () => {
|
|
570
|
+
window.history.replaceState({}, document.title, link.href);
|
|
571
|
+
};
|
|
568
572
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
569
573
|
cl.changePage(link.searchParams.get('page') || link.pathname.substring(1), 'page', {});
|
|
570
574
|
});
|
|
@@ -66,7 +66,7 @@ export class Glitter {
|
|
|
66
66
|
} = {}
|
|
67
67
|
public html = String.raw
|
|
68
68
|
public promiseValueMap: any = {}
|
|
69
|
-
|
|
69
|
+
public waiting_push_state?:(()=>void) = ()=>{}
|
|
70
70
|
get href() {
|
|
71
71
|
return location.href
|
|
72
72
|
}
|
|
@@ -82,7 +82,9 @@ export class Glitter {
|
|
|
82
82
|
if(this.getUrlParameter('appName')){
|
|
83
83
|
link.searchParams.set('appName',this.getUrlParameter('appName'))
|
|
84
84
|
}
|
|
85
|
-
|
|
85
|
+
this.waiting_push_state=()=>{
|
|
86
|
+
window.history.replaceState({}, document.title, link.href);
|
|
87
|
+
}
|
|
86
88
|
this.getModule(new URL('../official_event/page/change-page.js', import.meta.url).href, (cl) => {
|
|
87
89
|
cl.changePage(link.searchParams.get('page') || link.pathname.substring(1), 'page', {})
|
|
88
90
|
})
|
|
@@ -243,6 +243,10 @@ export class PageManager {
|
|
|
243
243
|
})) {
|
|
244
244
|
window.history.pushState({}, glitter.document.title, search);
|
|
245
245
|
glitter.pageConfig[glitter.pageConfig.length - 1].search = search;
|
|
246
|
+
if (glitter.waiting_push_state) {
|
|
247
|
+
glitter.waiting_push_state();
|
|
248
|
+
glitter.waiting_push_state = undefined;
|
|
249
|
+
}
|
|
246
250
|
}
|
|
247
251
|
}
|
|
248
252
|
catch (e) {
|
|
@@ -318,14 +318,17 @@ export class PageManager {
|
|
|
318
318
|
const glitter = Glitter.glitter;
|
|
319
319
|
const search = glitter.root_path + Language.getLanguageLinkPrefix()+tag + glitter.window.location.search;
|
|
320
320
|
try {
|
|
321
|
-
|
|
322
321
|
if (['home', 'page'].find((dd) => {
|
|
323
322
|
return dd === type
|
|
324
323
|
})) {
|
|
325
324
|
window.history.pushState({}, glitter.document.title, search);
|
|
326
325
|
glitter.pageConfig[glitter.pageConfig.length - 1].search = search;
|
|
327
|
-
|
|
326
|
+
if(glitter.waiting_push_state){
|
|
327
|
+
glitter.waiting_push_state()
|
|
328
|
+
glitter.waiting_push_state=undefined
|
|
329
|
+
}
|
|
328
330
|
}
|
|
331
|
+
|
|
329
332
|
} catch (e) {
|
|
330
333
|
}
|
|
331
334
|
}
|
package/package.json
CHANGED