12345678910111213141516171819202122 |
- // 页面
- let pageStoreMap = new Map<string, string>();
- // webviewContext
- let webviewContextStoreMap = new Map<string, WebviewContext>();
- // 临时存储
- let tempStoreMap = new Map<string, string>();
- function uuid(length : number) : string {
- let uuid : string = "";
- let chars : string[] = '0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.split('');
- for (let i = 0; i < length; i++) { uuid += chars[Math.floor(Math.random() * chars.length)]; };
- return uuid;
- };
- function getCurrentPagesRoute() : string {
- const _pages = getCurrentPages();
- return _pages[_pages.length - 1].route;
- }
- export {
- pageStoreMap, tempStoreMap, webviewContextStoreMap, uuid, getCurrentPagesRoute
- }
|