meixioacomponent 2.0.68 → 2.0.69
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/lib/components/base/baseGuide/GuideControl.d.ts +44 -44
- package/lib/components/base/baseGuide/GuideControl.js +238 -238
- package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
- package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
- package/lib/components/dynamicmount/index.d.ts +4 -4
- package/lib/components/dynamicmount/index.js +71 -71
- package/lib/components/index.d.ts +111 -111
- package/lib/components/index.js +250 -250
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.d.ts +12 -12
- package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +68 -68
- package/lib/config/TransferTDComponent.d.ts +1 -1
- package/lib/config/TransferTDComponent.js +31 -31
- package/lib/config/componentConfig.d.ts +3 -3
- package/lib/config/componentConfig.js +71 -71
- package/lib/config/uploadRequest.d.ts +2 -2
- package/lib/config/uploadRequest.js +87 -87
- package/lib/config/use/UseGuide.d.ts +8 -8
- package/lib/config/use/UseGuide.js +33 -33
- package/lib/config/use/UseImg.d.ts +9 -9
- package/lib/config/use/UseImg.js +45 -45
- package/lib/config/use/UseUpload.d.ts +12 -12
- package/lib/config/use/UseUpload.js +79 -79
- package/lib/config/use/UseViewVideo.d.ts +11 -11
- package/lib/config/use/UseViewVideo.js +41 -41
- package/lib/config/use/UseWait.d.ts +4 -4
- package/lib/config/use/UseWait.js +21 -21
- package/lib/config/use/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useConfirm/UseConfirm.d.ts +6 -6
- package/lib/config/use/useConfirm/UseConfirm.js +33 -33
- package/lib/config/use/useConfirm/UseNotify.d.ts +6 -6
- package/lib/config/use/useConfirm/UseNotify.js +18 -18
- package/lib/config/use/useConfirm/executeConfirm.d.ts +2 -2
- package/lib/config/use/useConfirm/executeConfirm.js +11 -11
- package/lib/config/use/useConfirm/registerConfirm.d.ts +4 -4
- package/lib/config/use/useConfirm/registerConfirm.js +8 -8
- package/lib/meixioacomponent.common.js +23835 -23835
- package/lib/meixioacomponent.umd.js +23832 -23832
- package/lib/meixioacomponent.umd.min.js +3 -3
- package/lib/plugin/PluginByReferenceByOss.d.ts +1 -1
- package/lib/plugin/PluginByReferenceByOss.js +16 -16
- package/lib/style/tdesignStyle.less +21 -21
- package/lib/typings/type.d.ts +405 -405
- package/lib/typings/type.js +2 -2
- package/lib/useType/useType.d.ts +27 -27
- package/lib/useType/useType.js +89 -89
- package/package.json +1 -1
- package/packages/components/base/baseAnchor/baseAnchor.vue +168 -168
- package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
- package/packages/components/base/baseArea/api.js +6 -6
- package/packages/components/base/baseArea/area.js +14979 -14979
- package/packages/components/base/baseArea/areaConfig.js +7 -7
- package/packages/components/base/baseArea/baseArea.vue +590 -590
- package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
- package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
- package/packages/components/base/baseArea/index.js +6 -6
- package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
- package/packages/components/base/baseAreaByMultiple/index.js +7 -7
- package/packages/components/base/baseButton/baseButton.vue +85 -85
- package/packages/components/base/baseButton/index.js +6 -6
- package/packages/components/base/baseInput/baseInput.vue +98 -98
- package/packages/components/base/baseSelect/baseSelect.vue +102 -102
- package/packages/components/base/baseSelect/index.js +6 -6
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +152 -152
- package/packages/components/base/tInput/index.js +5 -5
- package/packages/components/base/tInput/tInput.vue +148 -148
- package/packages/components/base/tInputNumber/index.js +5 -5
- package/packages/components/base/tInputNumber/tInputNumber.vue +103 -103
- package/packages/components/base/tSelect/tSelect.vue +175 -175
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/hooks/useHookByBaseArea.js +49 -49
- package/packages/components/hooks/useHookByGuide.js +46 -46
- package/packages/components/hooks/useHookByUpload.js +130 -130
- package/packages/components/index.js +247 -247
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/style/tdesignStyle.less +21 -21
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +75 -75
- package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts +99 -99
- package/packages/config/TransferTDComponent.js +31 -31
- package/packages/config/TransferTDComponent.ts +22 -22
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +46 -46
- package/packages/config/use/UseUpload.js +79 -79
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/UseWait.js +18 -18
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useConfirm/UseConfirm.js +31 -31
- package/packages/config/use/useConfirm/UseConfirm.ts +34 -34
- package/packages/config/use/useConfirm/UseNotify.js +16 -16
- package/packages/config/use/useConfirm/UseNotify.ts +18 -18
- package/packages/config/use/useConfirm/executeConfirm.js +8 -8
- package/packages/config/use/useConfirm/executeConfirm.ts +6 -6
- package/packages/config/use/useConfirm/registerConfirm.js +8 -8
- package/packages/config/use/useConfirm/registerConfirm.ts +7 -7
- package/packages/plugin/PluginByReferenceByOss.js +16 -16
- package/packages/plugin/PluginByReferenceByOss.ts +11 -11
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -1,79 +1,79 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
const upload_vue_1 = __importDefault(require("../../components/base/upload/upload.vue"));
|
|
8
|
-
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
-
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
-
class UseUpload {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.cbList = [];
|
|
13
|
-
this.dynamicMount = null;
|
|
14
|
-
this.lock = false;
|
|
15
|
-
}
|
|
16
|
-
toUpload(uploadList, cb, isOss) {
|
|
17
|
-
if (this.lock) {
|
|
18
|
-
componentConfig_1.default.Vue.prototype.$message.error("请等待上传完成后,再上传");
|
|
19
|
-
return false;
|
|
20
|
-
}
|
|
21
|
-
if (cb) {
|
|
22
|
-
if (this.cbList.length === 0) {
|
|
23
|
-
this.cbList.push({ cb, uploadList });
|
|
24
|
-
}
|
|
25
|
-
else {
|
|
26
|
-
let index = this.cbList.findIndex((item) => {
|
|
27
|
-
return item === cb;
|
|
28
|
-
});
|
|
29
|
-
if (index < 0) {
|
|
30
|
-
this.cbList.push({ cb, uploadList });
|
|
31
|
-
}
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
if (this.dynamicMount) {
|
|
35
|
-
this.appendUploadItem(uploadList);
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
this.dynamicMount = new DynamicMountClass_1.default({
|
|
39
|
-
componentProps: {
|
|
40
|
-
uploadEdEvent: (evt) => {
|
|
41
|
-
console.log('evt', evt);
|
|
42
|
-
this.uploadEd(evt);
|
|
43
|
-
},
|
|
44
|
-
isOss: isOss,
|
|
45
|
-
toUploadList: uploadList,
|
|
46
|
-
},
|
|
47
|
-
vueComponent: upload_vue_1.default,
|
|
48
|
-
});
|
|
49
|
-
this.dynamicMount.init();
|
|
50
|
-
}
|
|
51
|
-
return true;
|
|
52
|
-
}
|
|
53
|
-
uploadEd(evt = null) {
|
|
54
|
-
console.log('useUpload', evt);
|
|
55
|
-
this.lock = true;
|
|
56
|
-
this.cbList.forEach((item) => {
|
|
57
|
-
item.cb(evt ? evt : item.uploadList);
|
|
58
|
-
});
|
|
59
|
-
if (this.dynamicMount) {
|
|
60
|
-
let component = this.dynamicMount.getComponent();
|
|
61
|
-
// @ts-ignore
|
|
62
|
-
component.$destroy();
|
|
63
|
-
this.dynamicMount = null;
|
|
64
|
-
this.cbList = [];
|
|
65
|
-
this.lock = false;
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
appendUploadItem(list) {
|
|
69
|
-
if (this.dynamicMount) {
|
|
70
|
-
let refComponent = this.dynamicMount.getComponent();
|
|
71
|
-
if (refComponent) {
|
|
72
|
-
// @ts-ignore
|
|
73
|
-
refComponent.appendUploadItem(list);
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
}
|
|
77
|
-
}
|
|
78
|
-
let useUpload = new UseUpload();
|
|
79
|
-
exports.default = useUpload;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
const upload_vue_1 = __importDefault(require("../../components/base/upload/upload.vue"));
|
|
8
|
+
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
+
class UseUpload {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.cbList = [];
|
|
13
|
+
this.dynamicMount = null;
|
|
14
|
+
this.lock = false;
|
|
15
|
+
}
|
|
16
|
+
toUpload(uploadList, cb, isOss) {
|
|
17
|
+
if (this.lock) {
|
|
18
|
+
componentConfig_1.default.Vue.prototype.$message.error("请等待上传完成后,再上传");
|
|
19
|
+
return false;
|
|
20
|
+
}
|
|
21
|
+
if (cb) {
|
|
22
|
+
if (this.cbList.length === 0) {
|
|
23
|
+
this.cbList.push({ cb, uploadList });
|
|
24
|
+
}
|
|
25
|
+
else {
|
|
26
|
+
let index = this.cbList.findIndex((item) => {
|
|
27
|
+
return item === cb;
|
|
28
|
+
});
|
|
29
|
+
if (index < 0) {
|
|
30
|
+
this.cbList.push({ cb, uploadList });
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if (this.dynamicMount) {
|
|
35
|
+
this.appendUploadItem(uploadList);
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
this.dynamicMount = new DynamicMountClass_1.default({
|
|
39
|
+
componentProps: {
|
|
40
|
+
uploadEdEvent: (evt) => {
|
|
41
|
+
console.log('evt', evt);
|
|
42
|
+
this.uploadEd(evt);
|
|
43
|
+
},
|
|
44
|
+
isOss: isOss,
|
|
45
|
+
toUploadList: uploadList,
|
|
46
|
+
},
|
|
47
|
+
vueComponent: upload_vue_1.default,
|
|
48
|
+
});
|
|
49
|
+
this.dynamicMount.init();
|
|
50
|
+
}
|
|
51
|
+
return true;
|
|
52
|
+
}
|
|
53
|
+
uploadEd(evt = null) {
|
|
54
|
+
console.log('useUpload', evt);
|
|
55
|
+
this.lock = true;
|
|
56
|
+
this.cbList.forEach((item) => {
|
|
57
|
+
item.cb(evt ? evt : item.uploadList);
|
|
58
|
+
});
|
|
59
|
+
if (this.dynamicMount) {
|
|
60
|
+
let component = this.dynamicMount.getComponent();
|
|
61
|
+
// @ts-ignore
|
|
62
|
+
component.$destroy();
|
|
63
|
+
this.dynamicMount = null;
|
|
64
|
+
this.cbList = [];
|
|
65
|
+
this.lock = false;
|
|
66
|
+
}
|
|
67
|
+
}
|
|
68
|
+
appendUploadItem(list) {
|
|
69
|
+
if (this.dynamicMount) {
|
|
70
|
+
let refComponent = this.dynamicMount.getComponent();
|
|
71
|
+
if (refComponent) {
|
|
72
|
+
// @ts-ignore
|
|
73
|
+
refComponent.appendUploadItem(list);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
let useUpload = new UseUpload();
|
|
79
|
+
exports.default = useUpload;
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { DynamicMountInterface, UseViewVideoInterface } from "../../typings/type";
|
|
2
|
-
declare class UseViewVideo implements UseViewVideoInterface {
|
|
3
|
-
component: null | DynamicMountInterface;
|
|
4
|
-
constructor();
|
|
5
|
-
playVideo(resource: string): void;
|
|
6
|
-
switchVideoResource(): void;
|
|
7
|
-
createVideoComponent(resource: any): void;
|
|
8
|
-
unMountedVideo(): void;
|
|
9
|
-
}
|
|
10
|
-
declare const useViewVideo: UseViewVideo;
|
|
11
|
-
export default useViewVideo;
|
|
1
|
+
import { DynamicMountInterface, UseViewVideoInterface } from "../../typings/type";
|
|
2
|
+
declare class UseViewVideo implements UseViewVideoInterface {
|
|
3
|
+
component: null | DynamicMountInterface;
|
|
4
|
+
constructor();
|
|
5
|
+
playVideo(resource: string): void;
|
|
6
|
+
switchVideoResource(): void;
|
|
7
|
+
createVideoComponent(resource: any): void;
|
|
8
|
+
unMountedVideo(): void;
|
|
9
|
+
}
|
|
10
|
+
declare const useViewVideo: UseViewVideo;
|
|
11
|
+
export default useViewVideo;
|
|
12
12
|
//# sourceMappingURL=UseViewVideo.d.ts.map
|
|
@@ -1,41 +1,41 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
// @ts-ignore
|
|
7
|
-
const index_vue_1 = __importDefault(require("../../components/dialogVideo/index.vue"));
|
|
8
|
-
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
-
class UseViewVideo {
|
|
10
|
-
constructor() {
|
|
11
|
-
this.component = null;
|
|
12
|
-
}
|
|
13
|
-
playVideo(resource) {
|
|
14
|
-
if (!this.component) {
|
|
15
|
-
this.createVideoComponent(resource);
|
|
16
|
-
}
|
|
17
|
-
else {
|
|
18
|
-
this.switchVideoResource();
|
|
19
|
-
}
|
|
20
|
-
}
|
|
21
|
-
switchVideoResource() {
|
|
22
|
-
}
|
|
23
|
-
createVideoComponent(resource) {
|
|
24
|
-
this.component = new DynamicMountClass_1.default({
|
|
25
|
-
vueComponent: index_vue_1.default,
|
|
26
|
-
componentProps: { resource: resource },
|
|
27
|
-
});
|
|
28
|
-
this.component.on('mounted', (component) => {
|
|
29
|
-
component.$refs.dialog.showDialog();
|
|
30
|
-
});
|
|
31
|
-
this.component.on('destroyed', () => {
|
|
32
|
-
this.unMountedVideo();
|
|
33
|
-
});
|
|
34
|
-
this.component.init();
|
|
35
|
-
}
|
|
36
|
-
unMountedVideo() {
|
|
37
|
-
this.component = null;
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
const useViewVideo = new UseViewVideo();
|
|
41
|
-
exports.default = useViewVideo;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
// @ts-ignore
|
|
7
|
+
const index_vue_1 = __importDefault(require("../../components/dialogVideo/index.vue"));
|
|
8
|
+
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
class UseViewVideo {
|
|
10
|
+
constructor() {
|
|
11
|
+
this.component = null;
|
|
12
|
+
}
|
|
13
|
+
playVideo(resource) {
|
|
14
|
+
if (!this.component) {
|
|
15
|
+
this.createVideoComponent(resource);
|
|
16
|
+
}
|
|
17
|
+
else {
|
|
18
|
+
this.switchVideoResource();
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
switchVideoResource() {
|
|
22
|
+
}
|
|
23
|
+
createVideoComponent(resource) {
|
|
24
|
+
this.component = new DynamicMountClass_1.default({
|
|
25
|
+
vueComponent: index_vue_1.default,
|
|
26
|
+
componentProps: { resource: resource },
|
|
27
|
+
});
|
|
28
|
+
this.component.on('mounted', (component) => {
|
|
29
|
+
component.$refs.dialog.showDialog();
|
|
30
|
+
});
|
|
31
|
+
this.component.on('destroyed', () => {
|
|
32
|
+
this.unMountedVideo();
|
|
33
|
+
});
|
|
34
|
+
this.component.init();
|
|
35
|
+
}
|
|
36
|
+
unMountedVideo() {
|
|
37
|
+
this.component = null;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
const useViewVideo = new UseViewVideo();
|
|
41
|
+
exports.default = useViewVideo;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import WaitPlugin from "./WaitPlugin";
|
|
2
|
-
import { useWaitParamsType } from "../../typings/type";
|
|
3
|
-
declare function useWait(params: useWaitParamsType): WaitPlugin;
|
|
4
|
-
export default useWait;
|
|
1
|
+
import WaitPlugin from "./WaitPlugin";
|
|
2
|
+
import { useWaitParamsType } from "../../typings/type";
|
|
3
|
+
declare function useWait(params: useWaitParamsType): WaitPlugin;
|
|
4
|
+
export default useWait;
|
|
5
5
|
//# sourceMappingURL=UseWait.d.ts.map
|
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const WaitPlugin_1 = __importDefault(require("./WaitPlugin"));
|
|
7
|
-
/*
|
|
8
|
-
* params {
|
|
9
|
-
* attach: 代表挂载到什么元素上面
|
|
10
|
-
* duration:时间 毫秒 0为永久
|
|
11
|
-
* showOverlay: true 默认为true 禁止穿透滚动
|
|
12
|
-
*
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* }
|
|
17
|
-
* */
|
|
18
|
-
function useWait(params) {
|
|
19
|
-
return new WaitPlugin_1.default(params);
|
|
20
|
-
}
|
|
21
|
-
exports.default = useWait;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const WaitPlugin_1 = __importDefault(require("./WaitPlugin"));
|
|
7
|
+
/*
|
|
8
|
+
* params {
|
|
9
|
+
* attach: 代表挂载到什么元素上面
|
|
10
|
+
* duration:时间 毫秒 0为永久
|
|
11
|
+
* showOverlay: true 默认为true 禁止穿透滚动
|
|
12
|
+
*
|
|
13
|
+
*
|
|
14
|
+
*
|
|
15
|
+
*
|
|
16
|
+
* }
|
|
17
|
+
* */
|
|
18
|
+
function useWait(params) {
|
|
19
|
+
return new WaitPlugin_1.default(params);
|
|
20
|
+
}
|
|
21
|
+
exports.default = useWait;
|
|
@@ -1,26 +1,26 @@
|
|
|
1
|
-
/// <reference types="node" />
|
|
2
|
-
import { DynamicMountInterface, WaitPluginInterface } from "../../typings/type";
|
|
3
|
-
declare class WaitPlugin implements WaitPluginInterface {
|
|
4
|
-
attach: null | HTMLElement | string;
|
|
5
|
-
duration: number;
|
|
6
|
-
showOverlay: boolean;
|
|
7
|
-
waitText: '正在加载中,请稍后。。。' | string;
|
|
8
|
-
componentInstance: null | DynamicMountInterface;
|
|
9
|
-
downTrigger: NodeJS.Timeout | null;
|
|
10
|
-
attachEl: HTMLElement | string | null;
|
|
11
|
-
attachScrollStatusStyle: string | null;
|
|
12
|
-
constructor({ attach, duration, showOverlay, waitText }: {
|
|
13
|
-
attach: any;
|
|
14
|
-
duration: any;
|
|
15
|
-
showOverlay: any;
|
|
16
|
-
waitText: any;
|
|
17
|
-
});
|
|
18
|
-
init(): void;
|
|
19
|
-
start(): void;
|
|
20
|
-
hide(): void;
|
|
21
|
-
onHide(): void;
|
|
22
|
-
onShowOverlay(): void;
|
|
23
|
-
unShowOverlay(): void;
|
|
24
|
-
}
|
|
25
|
-
export default WaitPlugin;
|
|
1
|
+
/// <reference types="node" />
|
|
2
|
+
import { DynamicMountInterface, WaitPluginInterface } from "../../typings/type";
|
|
3
|
+
declare class WaitPlugin implements WaitPluginInterface {
|
|
4
|
+
attach: null | HTMLElement | string;
|
|
5
|
+
duration: number;
|
|
6
|
+
showOverlay: boolean;
|
|
7
|
+
waitText: '正在加载中,请稍后。。。' | string;
|
|
8
|
+
componentInstance: null | DynamicMountInterface;
|
|
9
|
+
downTrigger: NodeJS.Timeout | null;
|
|
10
|
+
attachEl: HTMLElement | string | null;
|
|
11
|
+
attachScrollStatusStyle: string | null;
|
|
12
|
+
constructor({ attach, duration, showOverlay, waitText }: {
|
|
13
|
+
attach: any;
|
|
14
|
+
duration: any;
|
|
15
|
+
showOverlay: any;
|
|
16
|
+
waitText: any;
|
|
17
|
+
});
|
|
18
|
+
init(): void;
|
|
19
|
+
start(): void;
|
|
20
|
+
hide(): void;
|
|
21
|
+
onHide(): void;
|
|
22
|
+
onShowOverlay(): void;
|
|
23
|
+
unShowOverlay(): void;
|
|
24
|
+
}
|
|
25
|
+
export default WaitPlugin;
|
|
26
26
|
//# sourceMappingURL=WaitPlugin.d.ts.map
|
|
@@ -1,106 +1,106 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
-
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
-
};
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
7
|
-
const utils_1 = require("../../utils/utils");
|
|
8
|
-
// @ts-ignore
|
|
9
|
-
const waitWrap_1 = __importDefault(require("../../components/base/baseWait/waitWrap"));
|
|
10
|
-
class WaitPlugin {
|
|
11
|
-
constructor({ attach, duration, showOverlay, waitText }) {
|
|
12
|
-
this.attach = attach || null;
|
|
13
|
-
this.duration = duration || 0;
|
|
14
|
-
this.showOverlay = showOverlay;
|
|
15
|
-
this.waitText = waitText || '正在加载中,请稍后。。。';
|
|
16
|
-
//组件实例
|
|
17
|
-
this.componentInstance = null;
|
|
18
|
-
// 倒计时
|
|
19
|
-
this.downTrigger = null;
|
|
20
|
-
//记录被挂载的dom元素
|
|
21
|
-
this.attachEl = null;
|
|
22
|
-
// 用于记录挂载的元素的滚动情况
|
|
23
|
-
this.attachScrollStatusStyle = null;
|
|
24
|
-
this.init();
|
|
25
|
-
}
|
|
26
|
-
init() {
|
|
27
|
-
if (this.attach) {
|
|
28
|
-
if ((0, utils_1.isDOM)(this.attach)) {
|
|
29
|
-
this.attachEl = this.attach;
|
|
30
|
-
}
|
|
31
|
-
else {
|
|
32
|
-
this.attachEl = document.getElementById(typeof this.attach === "string" ? this.attach : '');
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
if (!this.componentInstance) {
|
|
36
|
-
// console.log(this.attach?false:true)
|
|
37
|
-
this.componentInstance = new DynamicMountClass_1.default({
|
|
38
|
-
mountedDom: this.attach ? this.attachEl : '',
|
|
39
|
-
componentProps: {
|
|
40
|
-
showOverlay: this.showOverlay,
|
|
41
|
-
waitText: this.waitText,
|
|
42
|
-
isFullScreen: !this.attach,
|
|
43
|
-
attachEl: this.attachEl
|
|
44
|
-
},
|
|
45
|
-
vueComponent: waitWrap_1.default
|
|
46
|
-
});
|
|
47
|
-
this.componentInstance.on('mounted', (component) => {
|
|
48
|
-
});
|
|
49
|
-
this.componentInstance.on('destroyed', (component) => {
|
|
50
|
-
this.componentInstance = null;
|
|
51
|
-
});
|
|
52
|
-
this.componentInstance.init();
|
|
53
|
-
//当存在时间时候
|
|
54
|
-
if (this.duration > 0) {
|
|
55
|
-
this.downTrigger = setTimeout(() => {
|
|
56
|
-
this.hide();
|
|
57
|
-
}, this.duration);
|
|
58
|
-
}
|
|
59
|
-
//设置是否能滚动
|
|
60
|
-
this.onShowOverlay();
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
start() {
|
|
64
|
-
this.init();
|
|
65
|
-
}
|
|
66
|
-
hide() {
|
|
67
|
-
if (this.downTrigger) {
|
|
68
|
-
clearTimeout(this.downTrigger);
|
|
69
|
-
}
|
|
70
|
-
this.onHide();
|
|
71
|
-
}
|
|
72
|
-
onHide() {
|
|
73
|
-
if (this.componentInstance) {
|
|
74
|
-
let _component = this.componentInstance.getComponent();
|
|
75
|
-
_component.destroy();
|
|
76
|
-
this.unShowOverlay();
|
|
77
|
-
}
|
|
78
|
-
}
|
|
79
|
-
onShowOverlay() {
|
|
80
|
-
if (!this.showOverlay)
|
|
81
|
-
return;
|
|
82
|
-
if (this.attach) {
|
|
83
|
-
if (this.attachEl instanceof HTMLHtmlElement) {
|
|
84
|
-
this.attachScrollStatusStyle = document.defaultView.getComputedStyle(this.attachEl).overflow;
|
|
85
|
-
this.attachEl.style.overflow = "hidden";
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
else {
|
|
89
|
-
this.attachScrollStatusStyle = document.defaultView.getComputedStyle(document.body).overflow;
|
|
90
|
-
document.body.style.overflow = "hidden";
|
|
91
|
-
}
|
|
92
|
-
}
|
|
93
|
-
unShowOverlay() {
|
|
94
|
-
if (!this.showOverlay)
|
|
95
|
-
return;
|
|
96
|
-
if (this.attach) {
|
|
97
|
-
if (this.attachEl instanceof HTMLHtmlElement) {
|
|
98
|
-
typeof this.attachScrollStatusStyle === "string" ? this.attachEl.style.overflow = this.attachScrollStatusStyle : '';
|
|
99
|
-
}
|
|
100
|
-
}
|
|
101
|
-
else {
|
|
102
|
-
typeof this.attachScrollStatusStyle === "string" ? document.body.style.overflow = this.attachScrollStatusStyle : '';
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
}
|
|
106
|
-
exports.default = WaitPlugin;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
7
|
+
const utils_1 = require("../../utils/utils");
|
|
8
|
+
// @ts-ignore
|
|
9
|
+
const waitWrap_1 = __importDefault(require("../../components/base/baseWait/waitWrap"));
|
|
10
|
+
class WaitPlugin {
|
|
11
|
+
constructor({ attach, duration, showOverlay, waitText }) {
|
|
12
|
+
this.attach = attach || null;
|
|
13
|
+
this.duration = duration || 0;
|
|
14
|
+
this.showOverlay = showOverlay;
|
|
15
|
+
this.waitText = waitText || '正在加载中,请稍后。。。';
|
|
16
|
+
//组件实例
|
|
17
|
+
this.componentInstance = null;
|
|
18
|
+
// 倒计时
|
|
19
|
+
this.downTrigger = null;
|
|
20
|
+
//记录被挂载的dom元素
|
|
21
|
+
this.attachEl = null;
|
|
22
|
+
// 用于记录挂载的元素的滚动情况
|
|
23
|
+
this.attachScrollStatusStyle = null;
|
|
24
|
+
this.init();
|
|
25
|
+
}
|
|
26
|
+
init() {
|
|
27
|
+
if (this.attach) {
|
|
28
|
+
if ((0, utils_1.isDOM)(this.attach)) {
|
|
29
|
+
this.attachEl = this.attach;
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
this.attachEl = document.getElementById(typeof this.attach === "string" ? this.attach : '');
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
if (!this.componentInstance) {
|
|
36
|
+
// console.log(this.attach?false:true)
|
|
37
|
+
this.componentInstance = new DynamicMountClass_1.default({
|
|
38
|
+
mountedDom: this.attach ? this.attachEl : '',
|
|
39
|
+
componentProps: {
|
|
40
|
+
showOverlay: this.showOverlay,
|
|
41
|
+
waitText: this.waitText,
|
|
42
|
+
isFullScreen: !this.attach,
|
|
43
|
+
attachEl: this.attachEl
|
|
44
|
+
},
|
|
45
|
+
vueComponent: waitWrap_1.default
|
|
46
|
+
});
|
|
47
|
+
this.componentInstance.on('mounted', (component) => {
|
|
48
|
+
});
|
|
49
|
+
this.componentInstance.on('destroyed', (component) => {
|
|
50
|
+
this.componentInstance = null;
|
|
51
|
+
});
|
|
52
|
+
this.componentInstance.init();
|
|
53
|
+
//当存在时间时候
|
|
54
|
+
if (this.duration > 0) {
|
|
55
|
+
this.downTrigger = setTimeout(() => {
|
|
56
|
+
this.hide();
|
|
57
|
+
}, this.duration);
|
|
58
|
+
}
|
|
59
|
+
//设置是否能滚动
|
|
60
|
+
this.onShowOverlay();
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
start() {
|
|
64
|
+
this.init();
|
|
65
|
+
}
|
|
66
|
+
hide() {
|
|
67
|
+
if (this.downTrigger) {
|
|
68
|
+
clearTimeout(this.downTrigger);
|
|
69
|
+
}
|
|
70
|
+
this.onHide();
|
|
71
|
+
}
|
|
72
|
+
onHide() {
|
|
73
|
+
if (this.componentInstance) {
|
|
74
|
+
let _component = this.componentInstance.getComponent();
|
|
75
|
+
_component.destroy();
|
|
76
|
+
this.unShowOverlay();
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
onShowOverlay() {
|
|
80
|
+
if (!this.showOverlay)
|
|
81
|
+
return;
|
|
82
|
+
if (this.attach) {
|
|
83
|
+
if (this.attachEl instanceof HTMLHtmlElement) {
|
|
84
|
+
this.attachScrollStatusStyle = document.defaultView.getComputedStyle(this.attachEl).overflow;
|
|
85
|
+
this.attachEl.style.overflow = "hidden";
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
else {
|
|
89
|
+
this.attachScrollStatusStyle = document.defaultView.getComputedStyle(document.body).overflow;
|
|
90
|
+
document.body.style.overflow = "hidden";
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
unShowOverlay() {
|
|
94
|
+
if (!this.showOverlay)
|
|
95
|
+
return;
|
|
96
|
+
if (this.attach) {
|
|
97
|
+
if (this.attachEl instanceof HTMLHtmlElement) {
|
|
98
|
+
typeof this.attachScrollStatusStyle === "string" ? this.attachEl.style.overflow = this.attachScrollStatusStyle : '';
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
else {
|
|
102
|
+
typeof this.attachScrollStatusStyle === "string" ? document.body.style.overflow = this.attachScrollStatusStyle : '';
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
}
|
|
106
|
+
exports.default = WaitPlugin;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { TypeByConfirmOptions } from "../../../typings/type";
|
|
2
|
-
declare class UseConfirm {
|
|
3
|
-
constructor();
|
|
4
|
-
toMountedConfirm: (body: string, title: string, options: TypeByConfirmOptions) => Promise<unknown>;
|
|
5
|
-
}
|
|
6
|
-
export default UseConfirm;
|
|
1
|
+
import { TypeByConfirmOptions } from "../../../typings/type";
|
|
2
|
+
declare class UseConfirm {
|
|
3
|
+
constructor();
|
|
4
|
+
toMountedConfirm: (body: string, title: string, options: TypeByConfirmOptions) => Promise<unknown>;
|
|
5
|
+
}
|
|
6
|
+
export default UseConfirm;
|
|
7
7
|
//# sourceMappingURL=UseConfirm.d.ts.map
|