fast-vue-multi-pages 1.0.15 → 1.0.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -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>
@@ -0,0 +1,6 @@
1
+ import FastLayoutFullscreen from './fast-layout-fullscreen.vue';
2
+ import FastLayoutHeaderBodyFooter from "./fast-layout-header-body-footer.vue";
3
+ export {
4
+ FastLayoutFullscreen,
5
+ FastLayoutHeaderBodyFooter
6
+ }
@@ -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
- * FastBaseApp 手机APP功能工具类
16
+ * FastVueMultiTool 手机APP功能工具类
17
17
  */
18
18
  export declare class FastVueMultiTool {
19
19
  /**
@@ -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
- * FastBaseApp 手机APP功能工具类
20
+ * FastVueMultiTool 手机APP功能工具类
21
21
  */
22
22
  class FastVueMultiTool {
23
23
  /**
@@ -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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: Element, attrs: any[], callBack?: (event: MutationRecord) => void): MutationObserver | null;
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: Element, callBack?: (event: MutationRecord) => void): MutationObserver | null;
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: Element, newEl: Element): void;
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: Element, newEl: Element): void;
26
+ static insertBefore(targetEl: HTMLElement, newEl: HTMLElement): void;
27
27
  /**
28
28
  * 获取目标节点的实际占位空间,包含的内外边距
29
29
  * @param targetEl
30
30
  */
31
- static getRealSize(targetEl: Element): {
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: Element): string;
39
+ static getPath(targetEl: HTMLElement): string;
40
40
  /**
41
41
  * 判断目标元素的滚动条 是否已滚动到底部
42
42
  * @param targetEl
43
43
  * @param scrollNimble 检测的灵敏度,越大越灵敏
44
44
  */
45
- static isScrollBottom(targetEl: Element, scrollNimble: number): boolean;
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
- * FastBaseApp 手机APP功能工具类
16
+ * FastVueMultiTool 手机APP功能工具类
17
17
  */
18
18
  export declare class FastVueMultiTool {
19
19
  /**
@@ -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
- * FastBaseApp 手机APP功能工具类
7
+ * FastVueMultiTool 手机APP功能工具类
8
8
  */
9
9
  var FastVueMultiTool = /** @class */ (function () {
10
10
  function FastVueMultiTool() {
@@ -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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: any, config?: FastVueMultiSimpleRequestConfig, callBack?: (result: FastVueMultiSimpleJsonResponse) => void): Promise<FastVueMultiSimpleJsonResponse>;
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: Element, attrs: any[], callBack?: (event: MutationRecord) => void): MutationObserver | null;
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: Element, callBack?: (event: MutationRecord) => void): MutationObserver | null;
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: Element, newEl: Element): void;
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: Element, newEl: Element): void;
26
+ static insertBefore(targetEl: HTMLElement, newEl: HTMLElement): void;
27
27
  /**
28
28
  * 获取目标节点的实际占位空间,包含的内外边距
29
29
  * @param targetEl
30
30
  */
31
- static getRealSize(targetEl: Element): {
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: Element): string;
39
+ static getPath(targetEl: HTMLElement): string;
40
40
  /**
41
41
  * 判断目标元素的滚动条 是否已滚动到底部
42
42
  * @param targetEl
43
43
  * @param scrollNimble 检测的灵敏度,越大越灵敏
44
44
  */
45
- static isScrollBottom(targetEl: Element, scrollNimble: number): boolean;
45
+ static isScrollBottom(targetEl: HTMLElement, scrollNimble: number): boolean;
46
46
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fast-vue-multi-pages",
3
- "version": "1.0.15",
3
+ "version": "1.0.17",
4
4
  "author": "janesen",
5
5
  "description": "快速搭建VUE项目工具类的基本库,主要用于每个功能页面独立生成html",
6
6
  "main": "./dist/cjs/index.js",
@@ -47,7 +47,8 @@
47
47
  "dist/cjs",
48
48
  "dist/esm",
49
49
  "vue",
50
- "loader"
50
+ "loader",
51
+ "component"
51
52
  ],
52
53
  "eslintConfig": {
53
54
  "root": true,
@@ -1,6 +1,6 @@
1
1
  import { FastBuildOption } from "./FastBuildOption";
2
2
  /**
3
- * 项目相关操作
3
+ * VUE项目快速配置
4
4
  * @author Janesen
5
5
  */
6
6
  export declare class FastVueMultiPages {
@@ -5,7 +5,7 @@ const FastBuildOption_1 = require("./FastBuildOption");
5
5
  const FastPages_1 = require("./FastPages");
6
6
  const FastInjectJsPlugin_1 = require("./FastInjectJsPlugin");
7
7
  /**
8
- * 项目相关操作
8
+ * VUE项目快速配置
9
9
  * @author Janesen
10
10
  */
11
11
  class FastVueMultiPages {
package/vue/index.d.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  import { FastVueMultiPages } from "./FastVueMultiPages";
2
- export { FastVueMultiPages, };
2
+ export { FastVueMultiPages };