fast-vue-multi-pages 1.0.14 → 1.0.16
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/http/FastVueMultiHttp.d.ts +3 -3
- package/dist/cjs/http/FastVueMultiHttp.js +3 -0
- package/dist/cjs/other/FastVueMultiElement.d.ts +7 -7
- package/dist/esm/FastVueMultiTool.d.ts +5 -1
- package/dist/esm/FastVueMultiTool.js +5 -1
- package/dist/esm/http/FastVueMultiHttp.d.ts +3 -3
- package/dist/esm/http/FastVueMultiHttp.js +3 -0
- package/dist/esm/other/FastVueMultiElement.d.ts +7 -7
- package/layout/fast-layout-fullscreen.vue +32 -0
- package/layout/fast-layout-header-body-footer.vue +100 -0
- package/package.json +5 -3
- package/vue/FastVueMultiPages.d.ts +1 -1
- package/vue/FastVueMultiPages.js +1 -1
@@ -13,7 +13,7 @@ import { FastVueMultiFile } from "./other/FastVueMultiFile";
|
|
13
13
|
import { FastVueMultiBase64 } from "./other/FastVueMultiBase64";
|
14
14
|
import { FastVueMultiWatcher } from "./other/FastVueMultiWatcher";
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* FastVueMultiTool 手机APP功能工具类
|
17
17
|
*/
|
18
18
|
export declare class FastVueMultiTool {
|
19
19
|
/**
|
@@ -44,6 +44,10 @@ export declare class FastVueMultiTool {
|
|
44
44
|
* Lodash工具类 https://lodash.com/docs/
|
45
45
|
*/
|
46
46
|
static Lodash: _.LoDashStatic;
|
47
|
+
/**
|
48
|
+
* crypto-js工具类 https://cryptojs.gitbook.io/docs/
|
49
|
+
*/
|
50
|
+
static Crypto: any;
|
47
51
|
/**
|
48
52
|
* 日期类操作
|
49
53
|
*/
|
@@ -17,7 +17,7 @@ const FastVueMultiFile_1 = require("./other/FastVueMultiFile");
|
|
17
17
|
const FastVueMultiBase64_1 = require("./other/FastVueMultiBase64");
|
18
18
|
const FastVueMultiWatcher_1 = require("./other/FastVueMultiWatcher");
|
19
19
|
/**
|
20
|
-
*
|
20
|
+
* FastVueMultiTool 手机APP功能工具类
|
21
21
|
*/
|
22
22
|
class FastVueMultiTool {
|
23
23
|
/**
|
@@ -48,6 +48,10 @@ class FastVueMultiTool {
|
|
48
48
|
* Lodash工具类 https://lodash.com/docs/
|
49
49
|
*/
|
50
50
|
static Lodash = lodash_1.default;
|
51
|
+
/**
|
52
|
+
* crypto-js工具类 https://cryptojs.gitbook.io/docs/
|
53
|
+
*/
|
54
|
+
static Crypto = require("crypto-js");
|
51
55
|
/**
|
52
56
|
* 日期类操作
|
53
57
|
*/
|
@@ -119,7 +119,7 @@ export declare namespace FastVueMultiHttp {
|
|
119
119
|
* @param config 请求配置
|
120
120
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
121
121
|
*/
|
122
|
-
static request(method: string, url: string, params
|
122
|
+
static request(method: string, url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
123
123
|
/**
|
124
124
|
* post请求接口
|
125
125
|
* @param url 接口地址 完整的地址,例如:http://loalhost:8080/user/login
|
@@ -127,7 +127,7 @@ export declare namespace FastVueMultiHttp {
|
|
127
127
|
* @param config 请求配置
|
128
128
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
129
129
|
*/
|
130
|
-
static post(url: string, params
|
130
|
+
static post(url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
131
131
|
/**
|
132
132
|
* get请求接口
|
133
133
|
* @param url 接口地址 完整的地址,例如:http://loalhost:8080/user/login
|
@@ -135,6 +135,6 @@ export declare namespace FastVueMultiHttp {
|
|
135
135
|
* @param config 请求配置
|
136
136
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
137
137
|
*/
|
138
|
-
static get(url: string, params
|
138
|
+
static get(url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
139
139
|
}
|
140
140
|
}
|
@@ -340,6 +340,9 @@ var FastVueMultiHttp;
|
|
340
340
|
finalParams: true
|
341
341
|
};
|
342
342
|
}
|
343
|
+
if (!params) {
|
344
|
+
params = {};
|
345
|
+
}
|
343
346
|
params = FastVueMultiHttp.Base.convertToFormData(params);
|
344
347
|
if (config.finalParams) {
|
345
348
|
let justFinalParams = FastVueMultiHttp.Base.getFinalParams();
|
@@ -5,30 +5,30 @@ export declare class FastVueMultiElement {
|
|
5
5
|
* @param attrs 需要监听的属性集合
|
6
6
|
* @param callBack 回调
|
7
7
|
*/
|
8
|
-
static onAttributesChange(source:
|
8
|
+
static onAttributesChange(source: HTMLElement, attrs: any[], callBack?: (event: MutationRecord) => void): MutationObserver | null;
|
9
9
|
/**
|
10
10
|
* 绑定当前节点子节点的变动的监听
|
11
11
|
* @param source 节点对象
|
12
12
|
* @param callBack 回调
|
13
13
|
*/
|
14
|
-
static onChildrenChange(source:
|
14
|
+
static onChildrenChange(source: HTMLElement, callBack?: (event: MutationRecord) => void): MutationObserver | null;
|
15
15
|
/**
|
16
16
|
* 在目标节点后追加新的节点
|
17
17
|
* @param targetEl 目标节点
|
18
18
|
* @param newEl 新的节点
|
19
19
|
*/
|
20
|
-
static insertAfter(targetEl:
|
20
|
+
static insertAfter(targetEl: HTMLElement, newEl: HTMLElement): void;
|
21
21
|
/**
|
22
22
|
* 在目标节点前追加新的节点
|
23
23
|
* @param targetEl 目标节点
|
24
24
|
* @param newEl 新的节点
|
25
25
|
*/
|
26
|
-
static insertBefore(targetEl:
|
26
|
+
static insertBefore(targetEl: HTMLElement, newEl: HTMLElement): void;
|
27
27
|
/**
|
28
28
|
* 获取目标节点的实际占位空间,包含的内外边距
|
29
29
|
* @param targetEl
|
30
30
|
*/
|
31
|
-
static getRealSize(targetEl:
|
31
|
+
static getRealSize(targetEl: HTMLElement): {
|
32
32
|
width: number;
|
33
33
|
height: number;
|
34
34
|
};
|
@@ -36,11 +36,11 @@ export declare class FastVueMultiElement {
|
|
36
36
|
* 获取目标节点的selector
|
37
37
|
* @param targetEl
|
38
38
|
*/
|
39
|
-
static getPath(targetEl:
|
39
|
+
static getPath(targetEl: HTMLElement): string;
|
40
40
|
/**
|
41
41
|
* 判断目标元素的滚动条 是否已滚动到底部
|
42
42
|
* @param targetEl
|
43
43
|
* @param scrollNimble 检测的灵敏度,越大越灵敏
|
44
44
|
*/
|
45
|
-
static isScrollBottom(targetEl:
|
45
|
+
static isScrollBottom(targetEl: HTMLElement, scrollNimble: number): boolean;
|
46
46
|
}
|
@@ -13,7 +13,7 @@ import { FastVueMultiFile } from "./other/FastVueMultiFile";
|
|
13
13
|
import { FastVueMultiBase64 } from "./other/FastVueMultiBase64";
|
14
14
|
import { FastVueMultiWatcher } from "./other/FastVueMultiWatcher";
|
15
15
|
/**
|
16
|
-
*
|
16
|
+
* FastVueMultiTool 手机APP功能工具类
|
17
17
|
*/
|
18
18
|
export declare class FastVueMultiTool {
|
19
19
|
/**
|
@@ -44,6 +44,10 @@ export declare class FastVueMultiTool {
|
|
44
44
|
* Lodash工具类 https://lodash.com/docs/
|
45
45
|
*/
|
46
46
|
static Lodash: _.LoDashStatic;
|
47
|
+
/**
|
48
|
+
* crypto-js工具类 https://cryptojs.gitbook.io/docs/
|
49
|
+
*/
|
50
|
+
static Crypto: any;
|
47
51
|
/**
|
48
52
|
* 日期类操作
|
49
53
|
*/
|
@@ -4,7 +4,7 @@ define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./o
|
|
4
4
|
exports.FastVueMultiTool = void 0;
|
5
5
|
lodash_1 = tslib_1.__importDefault(lodash_1);
|
6
6
|
/**
|
7
|
-
*
|
7
|
+
* FastVueMultiTool 手机APP功能工具类
|
8
8
|
*/
|
9
9
|
var FastVueMultiTool = /** @class */ (function () {
|
10
10
|
function FastVueMultiTool() {
|
@@ -37,6 +37,10 @@ define(["require", "exports", "tslib", "lodash", "./http/FastVueMultiHttp", "./o
|
|
37
37
|
* Lodash工具类 https://lodash.com/docs/
|
38
38
|
*/
|
39
39
|
FastVueMultiTool.Lodash = lodash_1.default;
|
40
|
+
/**
|
41
|
+
* crypto-js工具类 https://cryptojs.gitbook.io/docs/
|
42
|
+
*/
|
43
|
+
FastVueMultiTool.Crypto = require("crypto-js");
|
40
44
|
/**
|
41
45
|
* 日期类操作
|
42
46
|
*/
|
@@ -119,7 +119,7 @@ export declare namespace FastVueMultiHttp {
|
|
119
119
|
* @param config 请求配置
|
120
120
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
121
121
|
*/
|
122
|
-
static request(method: string, url: string, params
|
122
|
+
static request(method: string, url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
123
123
|
/**
|
124
124
|
* post请求接口
|
125
125
|
* @param url 接口地址 完整的地址,例如:http://loalhost:8080/user/login
|
@@ -127,7 +127,7 @@ export declare namespace FastVueMultiHttp {
|
|
127
127
|
* @param config 请求配置
|
128
128
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
129
129
|
*/
|
130
|
-
static post(url: string, params
|
130
|
+
static post(url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
131
131
|
/**
|
132
132
|
* get请求接口
|
133
133
|
* @param url 接口地址 完整的地址,例如:http://loalhost:8080/user/login
|
@@ -135,6 +135,6 @@ export declare namespace FastVueMultiHttp {
|
|
135
135
|
* @param config 请求配置
|
136
136
|
* @param callBack 请求接口回调函数,在使用alwaysCache和alwaysBackRequest参数为true时,必须使用回调函数接收
|
137
137
|
*/
|
138
|
-
static get(url: string, params
|
138
|
+
static get(url: string, params?: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
|
139
139
|
}
|
140
140
|
}
|
@@ -356,6 +356,9 @@ define(["require", "exports", "tslib", "axios", "lodash", "../vue/FastVueMultiCo
|
|
356
356
|
finalParams: true
|
357
357
|
};
|
358
358
|
}
|
359
|
+
if (!params) {
|
360
|
+
params = {};
|
361
|
+
}
|
359
362
|
params = FastVueMultiHttp.Base.convertToFormData(params);
|
360
363
|
if (config.finalParams) {
|
361
364
|
justFinalParams = FastVueMultiHttp.Base.getFinalParams();
|
@@ -5,30 +5,30 @@ export declare class FastVueMultiElement {
|
|
5
5
|
* @param attrs 需要监听的属性集合
|
6
6
|
* @param callBack 回调
|
7
7
|
*/
|
8
|
-
static onAttributesChange(source:
|
8
|
+
static onAttributesChange(source: HTMLElement, attrs: any[], callBack?: (event: MutationRecord) => void): MutationObserver | null;
|
9
9
|
/**
|
10
10
|
* 绑定当前节点子节点的变动的监听
|
11
11
|
* @param source 节点对象
|
12
12
|
* @param callBack 回调
|
13
13
|
*/
|
14
|
-
static onChildrenChange(source:
|
14
|
+
static onChildrenChange(source: HTMLElement, callBack?: (event: MutationRecord) => void): MutationObserver | null;
|
15
15
|
/**
|
16
16
|
* 在目标节点后追加新的节点
|
17
17
|
* @param targetEl 目标节点
|
18
18
|
* @param newEl 新的节点
|
19
19
|
*/
|
20
|
-
static insertAfter(targetEl:
|
20
|
+
static insertAfter(targetEl: HTMLElement, newEl: HTMLElement): void;
|
21
21
|
/**
|
22
22
|
* 在目标节点前追加新的节点
|
23
23
|
* @param targetEl 目标节点
|
24
24
|
* @param newEl 新的节点
|
25
25
|
*/
|
26
|
-
static insertBefore(targetEl:
|
26
|
+
static insertBefore(targetEl: HTMLElement, newEl: HTMLElement): void;
|
27
27
|
/**
|
28
28
|
* 获取目标节点的实际占位空间,包含的内外边距
|
29
29
|
* @param targetEl
|
30
30
|
*/
|
31
|
-
static getRealSize(targetEl:
|
31
|
+
static getRealSize(targetEl: HTMLElement): {
|
32
32
|
width: number;
|
33
33
|
height: number;
|
34
34
|
};
|
@@ -36,11 +36,11 @@ export declare class FastVueMultiElement {
|
|
36
36
|
* 获取目标节点的selector
|
37
37
|
* @param targetEl
|
38
38
|
*/
|
39
|
-
static getPath(targetEl:
|
39
|
+
static getPath(targetEl: HTMLElement): string;
|
40
40
|
/**
|
41
41
|
* 判断目标元素的滚动条 是否已滚动到底部
|
42
42
|
* @param targetEl
|
43
43
|
* @param scrollNimble 检测的灵敏度,越大越灵敏
|
44
44
|
*/
|
45
|
-
static isScrollBottom(targetEl:
|
45
|
+
static isScrollBottom(targetEl: HTMLElement, scrollNimble: number): boolean;
|
46
46
|
}
|
@@ -0,0 +1,32 @@
|
|
1
|
+
<script>
|
2
|
+
import {defineComponent} from 'vue'
|
3
|
+
|
4
|
+
export default defineComponent({
|
5
|
+
name: "fast-layout-fullscreen",
|
6
|
+
props: {
|
7
|
+
scrollable: {
|
8
|
+
type: Boolean,
|
9
|
+
default: false,
|
10
|
+
}
|
11
|
+
}
|
12
|
+
})
|
13
|
+
</script>
|
14
|
+
|
15
|
+
<template>
|
16
|
+
<!--suppress HtmlUnknownAttribute -->
|
17
|
+
<div fast-layout-fullscreen class="fast-layout-container-fullscreen" :style="{overflow:scrollable?'auto':'hidden'}">
|
18
|
+
<slot/>
|
19
|
+
</div>
|
20
|
+
</template>
|
21
|
+
|
22
|
+
<style scoped>
|
23
|
+
.fast-layout-container-fullscreen {
|
24
|
+
top: 0;
|
25
|
+
left: 0;
|
26
|
+
right: 0;
|
27
|
+
bottom: 0;
|
28
|
+
width: 100vw !important;
|
29
|
+
height: 100vh !important;
|
30
|
+
position: fixed;
|
31
|
+
}
|
32
|
+
</style>
|
@@ -0,0 +1,100 @@
|
|
1
|
+
<script>
|
2
|
+
import {defineComponent} from 'vue'
|
3
|
+
import {FastVueMultiTool} from "fast-vue-multi-pages";
|
4
|
+
|
5
|
+
/**
|
6
|
+
* 浮动垂直 header-body-footer 布局,其中:header 与 footer 布局将悬浮在body中
|
7
|
+
*/
|
8
|
+
export default defineComponent({
|
9
|
+
name: "fast-layout-header-body-footer",
|
10
|
+
props: {
|
11
|
+
/**
|
12
|
+
* header默认高度
|
13
|
+
*/
|
14
|
+
headerDefaultHeight: {
|
15
|
+
type: String,
|
16
|
+
default: "0px",
|
17
|
+
},
|
18
|
+
/**
|
19
|
+
* footer默认高度
|
20
|
+
*/
|
21
|
+
footerDefaultHeight: {
|
22
|
+
type: String,
|
23
|
+
default: "0px",
|
24
|
+
},
|
25
|
+
},
|
26
|
+
data() {
|
27
|
+
return {
|
28
|
+
footerHeight: this.footerDefaultHeight,
|
29
|
+
headerHeight: this.headerDefaultHeight,
|
30
|
+
}
|
31
|
+
},
|
32
|
+
created() {
|
33
|
+
this.$nextTick(() => {
|
34
|
+
this.headerHeight = FastVueMultiTool.Element.getRealSize(this.$refs.header).height + "px";
|
35
|
+
this.footerHeight = FastVueMultiTool.Element.getRealSize(this.$refs.footer).height + "px";
|
36
|
+
});
|
37
|
+
}
|
38
|
+
});
|
39
|
+
|
40
|
+
</script>
|
41
|
+
|
42
|
+
<template>
|
43
|
+
|
44
|
+
<!--suppress HtmlUnknownAttribute -->
|
45
|
+
<div fast-layout-float-v-header-body-footer class="fast-layout-float-layout-container">
|
46
|
+
<div ref="header" class="fast-layout-float-layout-header">
|
47
|
+
<slot name="header"></slot>
|
48
|
+
</div>
|
49
|
+
|
50
|
+
<div class="fast-layout-float-layout-body">
|
51
|
+
<div :style="{height:headerHeight}"></div>
|
52
|
+
|
53
|
+
<slot name="body"></slot>
|
54
|
+
|
55
|
+
<div :style="{height:footerHeight}"></div>
|
56
|
+
</div>
|
57
|
+
|
58
|
+
<div ref="footer" class="fast-layout-float-layout-footer">
|
59
|
+
<slot name="footer"></slot>
|
60
|
+
</div>
|
61
|
+
|
62
|
+
</div>
|
63
|
+
|
64
|
+
</template>
|
65
|
+
|
66
|
+
<style scoped>
|
67
|
+
|
68
|
+
.fast-layout-float-layout-container {
|
69
|
+
position: relative;
|
70
|
+
height: 100vh;
|
71
|
+
width: 100vw;
|
72
|
+
overflow: hidden;
|
73
|
+
}
|
74
|
+
|
75
|
+
.fast-layout-float-layout-body {
|
76
|
+
height: 100%;
|
77
|
+
width: 100%;
|
78
|
+
overflow: auto;
|
79
|
+
}
|
80
|
+
|
81
|
+
.fast-layout-float-layout-header {
|
82
|
+
position: absolute;
|
83
|
+
top: 0;
|
84
|
+
left: 0;
|
85
|
+
right: 0;
|
86
|
+
width: 100%;
|
87
|
+
z-index: 1;
|
88
|
+
}
|
89
|
+
|
90
|
+
|
91
|
+
.fast-layout-float-layout-footer {
|
92
|
+
position: absolute;
|
93
|
+
bottom: 0;
|
94
|
+
left: 0;
|
95
|
+
right: 0;
|
96
|
+
width: 100%;
|
97
|
+
z-index: 1;
|
98
|
+
}
|
99
|
+
|
100
|
+
</style>
|
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.16",
|
4
4
|
"author": "janesen",
|
5
5
|
"description": "快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html",
|
6
6
|
"main": "./dist/cjs/index.js",
|
@@ -32,7 +32,8 @@
|
|
32
32
|
"@types/lodash": "^4.17.6",
|
33
33
|
"copy-to-clipboard": "^3.3.3",
|
34
34
|
"ip": "^2.0.1",
|
35
|
-
"file64": "^1.0.3"
|
35
|
+
"file64": "^1.0.3",
|
36
|
+
"crypto-js": "^4.2.0"
|
36
37
|
},
|
37
38
|
"devDependencies": {
|
38
39
|
"@typescript-eslint/eslint-plugin": "^7.16.0",
|
@@ -46,7 +47,8 @@
|
|
46
47
|
"dist/cjs",
|
47
48
|
"dist/esm",
|
48
49
|
"vue",
|
49
|
-
"loader"
|
50
|
+
"loader",
|
51
|
+
"layout"
|
50
52
|
],
|
51
53
|
"eslintConfig": {
|
52
54
|
"root": true,
|
package/vue/FastVueMultiPages.js
CHANGED