fast-vue-multi-pages 1.0.2 → 1.0.4
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/cjs/FastVueMultiTool.d.ts +5 -1
- package/dist/cjs/FastVueMultiTool.js +5 -1
- package/dist/cjs/other/FastVueMultiWindow.d.ts +9 -0
- package/dist/cjs/other/FastVueMultiWindow.js +14 -0
- package/dist/esm/FastVueMultiTool.d.ts +5 -1
- package/dist/esm/FastVueMultiTool.js +5 -1
- package/dist/esm/other/FastVueMultiWindow.d.ts +9 -0
- package/dist/esm/other/FastVueMultiWindow.js +14 -1
- package/package.json +2 -2
- package/vue/FastVueMultiPages.js +2 -1
@@ -17,10 +17,14 @@ export declare class FastVueMultiTool {
|
|
17
17
|
* 页面配置工具类
|
18
18
|
*/
|
19
19
|
static Config: typeof FastVueMultiConfig;
|
20
|
+
/**
|
21
|
+
* 常规的网络接口请求类,返回格式要求为JSON:{success:true,message:"消息",data:{}}
|
22
|
+
*/
|
23
|
+
static SimpleHttp: typeof FastVueMultiHttp.Simple;
|
20
24
|
/**
|
21
25
|
* 网络请求工具类
|
22
26
|
*/
|
23
|
-
static Http: typeof FastVueMultiHttp.
|
27
|
+
static Http: typeof FastVueMultiHttp.Base;
|
24
28
|
/**
|
25
29
|
* 页面数据缓存工具类
|
26
30
|
*/
|
@@ -21,10 +21,14 @@ class FastVueMultiTool {
|
|
21
21
|
* 页面配置工具类
|
22
22
|
*/
|
23
23
|
static Config = FastVueMultiConfig_1.FastVueMultiConfig;
|
24
|
+
/**
|
25
|
+
* 常规的网络接口请求类,返回格式要求为JSON:{success:true,message:"消息",data:{}}
|
26
|
+
*/
|
27
|
+
static SimpleHttp = FastVueMultiHttp_1.FastVueMultiHttp.Simple;
|
24
28
|
/**
|
25
29
|
* 网络请求工具类
|
26
30
|
*/
|
27
|
-
static Http = FastVueMultiHttp_1.FastVueMultiHttp.
|
31
|
+
static Http = FastVueMultiHttp_1.FastVueMultiHttp.Base;
|
28
32
|
/**
|
29
33
|
* 页面数据缓存工具类
|
30
34
|
*/
|
@@ -18,4 +18,13 @@ export declare class FastVueMultiWindow {
|
|
18
18
|
* 安全的获取窗口高度,有的手机渲染后document.body.clientHeight 莫明会返回0
|
19
19
|
*/
|
20
20
|
static safeGetClientHeight(): number;
|
21
|
+
/**
|
22
|
+
* 获取地址栏携带的参数
|
23
|
+
* @param paramName 参数名
|
24
|
+
*/
|
25
|
+
static getWindowUrlParam(paramName: string): string | null;
|
26
|
+
/**
|
27
|
+
* 获取地址栏携带的参数对象信息
|
28
|
+
*/
|
29
|
+
static getWindowUrlInfo(): any;
|
21
30
|
}
|
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.FastVueMultiWindow = void 0;
|
4
4
|
const tslib_1 = require("tslib");
|
5
5
|
const lodash_1 = tslib_1.__importDefault(require("lodash"));
|
6
|
+
const FastVueMultiHttp_1 = require("../http/FastVueMultiHttp");
|
6
7
|
class FastVueMultiWindow {
|
7
8
|
/**
|
8
9
|
* 添加window的onLoad事件,如果存在onLoad函数名则进行合并
|
@@ -49,5 +50,18 @@ class FastVueMultiWindow {
|
|
49
50
|
static safeGetClientHeight() {
|
50
51
|
return Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
51
52
|
}
|
53
|
+
/**
|
54
|
+
* 获取地址栏携带的参数
|
55
|
+
* @param paramName 参数名
|
56
|
+
*/
|
57
|
+
static getWindowUrlParam(paramName) {
|
58
|
+
return FastVueMultiHttp_1.FastVueMultiHttp.Base.getUrlParam(window.location.href, paramName);
|
59
|
+
}
|
60
|
+
/**
|
61
|
+
* 获取地址栏携带的参数对象信息
|
62
|
+
*/
|
63
|
+
static getWindowUrlInfo() {
|
64
|
+
return FastVueMultiHttp_1.FastVueMultiHttp.Base.getUrlParamInfo(window.location.href);
|
65
|
+
}
|
52
66
|
}
|
53
67
|
exports.FastVueMultiWindow = FastVueMultiWindow;
|
@@ -17,10 +17,14 @@ export declare class FastVueMultiTool {
|
|
17
17
|
* 页面配置工具类
|
18
18
|
*/
|
19
19
|
static Config: typeof FastVueMultiConfig;
|
20
|
+
/**
|
21
|
+
* 常规的网络接口请求类,返回格式要求为JSON:{success:true,message:"消息",data:{}}
|
22
|
+
*/
|
23
|
+
static SimpleHttp: typeof FastVueMultiHttp.Simple;
|
20
24
|
/**
|
21
25
|
* 网络请求工具类
|
22
26
|
*/
|
23
|
-
static Http: typeof FastVueMultiHttp.
|
27
|
+
static Http: typeof FastVueMultiHttp.Base;
|
24
28
|
/**
|
25
29
|
* 页面数据缓存工具类
|
26
30
|
*/
|
@@ -13,10 +13,14 @@ define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./o
|
|
13
13
|
* 页面配置工具类
|
14
14
|
*/
|
15
15
|
FastVueMultiTool.Config = FastVueMultiConfig_1.FastVueMultiConfig;
|
16
|
+
/**
|
17
|
+
* 常规的网络接口请求类,返回格式要求为JSON:{success:true,message:"消息",data:{}}
|
18
|
+
*/
|
19
|
+
FastVueMultiTool.SimpleHttp = FastVueMultiHttp_1.FastVueMultiHttp.Simple;
|
16
20
|
/**
|
17
21
|
* 网络请求工具类
|
18
22
|
*/
|
19
|
-
FastVueMultiTool.Http = FastVueMultiHttp_1.FastVueMultiHttp.
|
23
|
+
FastVueMultiTool.Http = FastVueMultiHttp_1.FastVueMultiHttp.Base;
|
20
24
|
/**
|
21
25
|
* 页面数据缓存工具类
|
22
26
|
*/
|
@@ -18,4 +18,13 @@ export declare class FastVueMultiWindow {
|
|
18
18
|
* 安全的获取窗口高度,有的手机渲染后document.body.clientHeight 莫明会返回0
|
19
19
|
*/
|
20
20
|
static safeGetClientHeight(): number;
|
21
|
+
/**
|
22
|
+
* 获取地址栏携带的参数
|
23
|
+
* @param paramName 参数名
|
24
|
+
*/
|
25
|
+
static getWindowUrlParam(paramName: string): string | null;
|
26
|
+
/**
|
27
|
+
* 获取地址栏携带的参数对象信息
|
28
|
+
*/
|
29
|
+
static getWindowUrlInfo(): any;
|
21
30
|
}
|
@@ -1,4 +1,4 @@
|
|
1
|
-
define(["require", "exports", "tslib", "lodash"], function (require, exports, tslib_1, lodash_1) {
|
1
|
+
define(["require", "exports", "tslib", "lodash", "../http/FastVueMultiHttp"], function (require, exports, tslib_1, lodash_1, FastVueMultiHttp_1) {
|
2
2
|
"use strict";
|
3
3
|
Object.defineProperty(exports, "__esModule", { value: true });
|
4
4
|
exports.FastVueMultiWindow = void 0;
|
@@ -51,6 +51,19 @@ define(["require", "exports", "tslib", "lodash"], function (require, exports, ts
|
|
51
51
|
FastVueMultiWindow.safeGetClientHeight = function () {
|
52
52
|
return Math.max(document.documentElement.clientHeight, document.body.clientHeight);
|
53
53
|
};
|
54
|
+
/**
|
55
|
+
* 获取地址栏携带的参数
|
56
|
+
* @param paramName 参数名
|
57
|
+
*/
|
58
|
+
FastVueMultiWindow.getWindowUrlParam = function (paramName) {
|
59
|
+
return FastVueMultiHttp_1.FastVueMultiHttp.Base.getUrlParam(window.location.href, paramName);
|
60
|
+
};
|
61
|
+
/**
|
62
|
+
* 获取地址栏携带的参数对象信息
|
63
|
+
*/
|
64
|
+
FastVueMultiWindow.getWindowUrlInfo = function () {
|
65
|
+
return FastVueMultiHttp_1.FastVueMultiHttp.Base.getUrlParamInfo(window.location.href);
|
66
|
+
};
|
54
67
|
return FastVueMultiWindow;
|
55
68
|
}());
|
56
69
|
exports.FastVueMultiWindow = FastVueMultiWindow;
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "fast-vue-multi-pages",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.4",
|
4
4
|
"author": "janesen",
|
5
5
|
"description": "快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html",
|
6
6
|
"main": "./dist/cjs/index.js",
|
@@ -9,7 +9,7 @@
|
|
9
9
|
"tsc": "tsc -p tsconfig.json && tsc -p tsconfig-cjs.json && tsc -p ./src/vue/tsconfig-cjs.json && tsc -p ./src/loader/tsconfig-cjs.json",
|
10
10
|
"login": "npm login",
|
11
11
|
"buildLocal": "npm run tsc",
|
12
|
-
"push-
|
12
|
+
"push-to-npm": "npm run buildLocal && npm publish"
|
13
13
|
},
|
14
14
|
"keywords": [
|
15
15
|
"vue",
|
package/vue/FastVueMultiPages.js
CHANGED
@@ -42,7 +42,8 @@ class FastVueMultiPages {
|
|
42
42
|
if (options.globalConfig) {
|
43
43
|
for (let globalConfigKey in options.globalConfig) {
|
44
44
|
// @ts-ignore
|
45
|
-
|
45
|
+
let value = options.globalConfig[globalConfigKey];
|
46
|
+
this.setGlobalConfig(globalConfigKey, value);
|
46
47
|
}
|
47
48
|
}
|
48
49
|
const defineValue = {
|