meixioacomponent 1.1.38 → 1.1.40
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 +104 -104
- package/lib/components/index.js +221 -221
- package/lib/config/LinkViewClass.d.ts +56 -56
- package/lib/config/LinkViewClass.js +154 -154
- 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 +41 -41
- 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/WaitPlugin.d.ts +25 -25
- package/lib/config/use/WaitPlugin.js +106 -106
- package/lib/config/use/useWait.d.ts +4 -4
- package/lib/config/use/useWait.js +21 -21
- package/lib/meixioacomponent.common.js +41937 -41938
- package/lib/meixioacomponent.umd.js +41971 -41972
- package/lib/meixioacomponent.umd.min.js +28 -28
- package/lib/typings/type.d.ts +394 -394
- 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/baseNumberInput/index.vue +9 -13
- package/packages/components/base/baseText/index.vue +2 -1
- package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
- package/packages/components/dynamicmount/index.js +69 -69
- package/packages/components/index.js +218 -218
- package/packages/config/LinkViewClass.js +152 -152
- package/packages/config/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +41 -41
- package/packages/config/use/UseUpload.js +80 -80
- package/packages/config/use/UseViewVideo.js +40 -40
- package/packages/config/use/WaitPlugin.js +106 -106
- package/packages/config/use/useWait.js +18 -18
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -1,33 +1,33 @@
|
|
|
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/base/baseGuide/index.vue"));
|
|
8
|
-
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
-
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
-
class UseGuide {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.guideComponent = null;
|
|
13
|
-
}
|
|
14
|
-
startGuide(params) {
|
|
15
|
-
if (!this.guideComponent) {
|
|
16
|
-
this.guideComponent = new DynamicMountClass_1.default({
|
|
17
|
-
vueComponent: index_vue_1.default,
|
|
18
|
-
componentProps: Object.assign({}, params),
|
|
19
|
-
});
|
|
20
|
-
this.guideComponent.on('mounted', (component) => {
|
|
21
|
-
componentConfig_1.default.Vue.nextTick(() => {
|
|
22
|
-
component.guideControl.onStartGuide();
|
|
23
|
-
});
|
|
24
|
-
});
|
|
25
|
-
this.guideComponent.on('destroyed', () => {
|
|
26
|
-
this.guideComponent = null;
|
|
27
|
-
});
|
|
28
|
-
this.guideComponent.init();
|
|
29
|
-
}
|
|
30
|
-
}
|
|
31
|
-
}
|
|
32
|
-
const useGuide = new UseGuide();
|
|
33
|
-
exports.default = useGuide;
|
|
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/base/baseGuide/index.vue"));
|
|
8
|
+
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
+
class UseGuide {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.guideComponent = null;
|
|
13
|
+
}
|
|
14
|
+
startGuide(params) {
|
|
15
|
+
if (!this.guideComponent) {
|
|
16
|
+
this.guideComponent = new DynamicMountClass_1.default({
|
|
17
|
+
vueComponent: index_vue_1.default,
|
|
18
|
+
componentProps: Object.assign({}, params),
|
|
19
|
+
});
|
|
20
|
+
this.guideComponent.on('mounted', (component) => {
|
|
21
|
+
componentConfig_1.default.Vue.nextTick(() => {
|
|
22
|
+
component.guideControl.onStartGuide();
|
|
23
|
+
});
|
|
24
|
+
});
|
|
25
|
+
this.guideComponent.on('destroyed', () => {
|
|
26
|
+
this.guideComponent = null;
|
|
27
|
+
});
|
|
28
|
+
this.guideComponent.init();
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
const useGuide = new UseGuide();
|
|
33
|
+
exports.default = useGuide;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { DynamicMountInterface, UserImgInterface } from "../../typings/type";
|
|
2
|
-
declare class UseImg implements UserImgInterface {
|
|
3
|
-
dynamicMount: DynamicMountInterface | null;
|
|
4
|
-
constructor();
|
|
5
|
-
toView(list: any[]): void;
|
|
6
|
-
destroy: () => void;
|
|
7
|
-
}
|
|
8
|
-
declare let useImg: UseImg;
|
|
9
|
-
export default useImg;
|
|
1
|
+
import { DynamicMountInterface, UserImgInterface } from "../../typings/type";
|
|
2
|
+
declare class UseImg implements UserImgInterface {
|
|
3
|
+
dynamicMount: DynamicMountInterface | null;
|
|
4
|
+
constructor();
|
|
5
|
+
toView(list: any[]): void;
|
|
6
|
+
destroy: () => void;
|
|
7
|
+
}
|
|
8
|
+
declare let useImg: UseImg;
|
|
9
|
+
export default useImg;
|
|
10
10
|
//# sourceMappingURL=UseImg.d.ts.map
|
package/lib/config/use/UseImg.js
CHANGED
|
@@ -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 image_viewer_vue_1 = __importDefault(require("../../components/base/baseImageViewer/image-viewer.vue"));
|
|
8
|
-
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
-
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
-
class UseImg {
|
|
11
|
-
constructor() {
|
|
12
|
-
this.destroy = () => {
|
|
13
|
-
if (this.dynamicMount) {
|
|
14
|
-
let referComponent = this.dynamicMount.getComponent();
|
|
15
|
-
referComponent.$destroy();
|
|
16
|
-
this.dynamicMount = null;
|
|
17
|
-
}
|
|
18
|
-
};
|
|
19
|
-
this.dynamicMount = null;
|
|
20
|
-
}
|
|
21
|
-
toView(list) {
|
|
22
|
-
if (this.dynamicMount) {
|
|
23
|
-
this.destroy();
|
|
24
|
-
}
|
|
25
|
-
componentConfig_1.default.Vue.nextTick(() => {
|
|
26
|
-
this.dynamicMount = new DynamicMountClass_1.default({
|
|
27
|
-
componentProps: {
|
|
28
|
-
urlList: list,
|
|
29
|
-
onClose: () => {
|
|
30
|
-
this.destroy();
|
|
31
|
-
},
|
|
32
|
-
},
|
|
33
|
-
vueComponent: image_viewer_vue_1.default,
|
|
34
|
-
});
|
|
35
|
-
// 挂载事件
|
|
36
|
-
this.dynamicMount.init();
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
let useImg = new UseImg();
|
|
41
|
-
exports.default = useImg;
|
|
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 image_viewer_vue_1 = __importDefault(require("../../components/base/baseImageViewer/image-viewer.vue"));
|
|
8
|
+
const DynamicMountClass_1 = __importDefault(require("../../components/dynamicmount/DynamicMountClass"));
|
|
9
|
+
const componentConfig_1 = __importDefault(require("../componentConfig"));
|
|
10
|
+
class UseImg {
|
|
11
|
+
constructor() {
|
|
12
|
+
this.destroy = () => {
|
|
13
|
+
if (this.dynamicMount) {
|
|
14
|
+
let referComponent = this.dynamicMount.getComponent();
|
|
15
|
+
referComponent.$destroy();
|
|
16
|
+
this.dynamicMount = null;
|
|
17
|
+
}
|
|
18
|
+
};
|
|
19
|
+
this.dynamicMount = null;
|
|
20
|
+
}
|
|
21
|
+
toView(list) {
|
|
22
|
+
if (this.dynamicMount) {
|
|
23
|
+
this.destroy();
|
|
24
|
+
}
|
|
25
|
+
componentConfig_1.default.Vue.nextTick(() => {
|
|
26
|
+
this.dynamicMount = new DynamicMountClass_1.default({
|
|
27
|
+
componentProps: {
|
|
28
|
+
urlList: list,
|
|
29
|
+
onClose: () => {
|
|
30
|
+
this.destroy();
|
|
31
|
+
},
|
|
32
|
+
},
|
|
33
|
+
vueComponent: image_viewer_vue_1.default,
|
|
34
|
+
});
|
|
35
|
+
// 挂载事件
|
|
36
|
+
this.dynamicMount.init();
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
let useImg = new UseImg();
|
|
41
|
+
exports.default = useImg;
|
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
import { DynamicMountInterface, UseUploadInterFace } from "../../typings/type";
|
|
2
|
-
declare class UseUpload implements UseUploadInterFace {
|
|
3
|
-
cbList: any[];
|
|
4
|
-
dynamicMount: DynamicMountInterface | null;
|
|
5
|
-
lock: Boolean;
|
|
6
|
-
constructor();
|
|
7
|
-
toUpload(uploadList: any, cb: any, isOss: any): boolean;
|
|
8
|
-
uploadEd(evt?: null): void;
|
|
9
|
-
appendUploadItem(list: any): void;
|
|
10
|
-
}
|
|
11
|
-
declare let useUpload: UseUpload;
|
|
12
|
-
export default useUpload;
|
|
1
|
+
import { DynamicMountInterface, UseUploadInterFace } from "../../typings/type";
|
|
2
|
+
declare class UseUpload implements UseUploadInterFace {
|
|
3
|
+
cbList: any[];
|
|
4
|
+
dynamicMount: DynamicMountInterface | null;
|
|
5
|
+
lock: Boolean;
|
|
6
|
+
constructor();
|
|
7
|
+
toUpload(uploadList: any, cb: any, isOss: any): boolean;
|
|
8
|
+
uploadEd(evt?: null): void;
|
|
9
|
+
appendUploadItem(list: any): void;
|
|
10
|
+
}
|
|
11
|
+
declare let useUpload: UseUpload;
|
|
12
|
+
export default useUpload;
|
|
13
13
|
//# sourceMappingURL=UseUpload.d.ts.map
|
|
@@ -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
|
-
this.uploadEd(evt);
|
|
42
|
-
},
|
|
43
|
-
isOss: isOss,
|
|
44
|
-
toUploadList: uploadList,
|
|
45
|
-
},
|
|
46
|
-
vueComponent: upload_vue_1.default,
|
|
47
|
-
});
|
|
48
|
-
this.dynamicMount.init();
|
|
49
|
-
}
|
|
50
|
-
return true;
|
|
51
|
-
}
|
|
52
|
-
uploadEd(evt = null) {
|
|
53
|
-
this.lock = true;
|
|
54
|
-
setTimeout(() => {
|
|
55
|
-
this.cbList.forEach((item) => {
|
|
56
|
-
item.cb(evt ? evt : item.uploadList);
|
|
57
|
-
});
|
|
58
|
-
if (this.dynamicMount) {
|
|
59
|
-
let component = this.dynamicMount.getComponent();
|
|
60
|
-
// @ts-ignore
|
|
61
|
-
component.$destroy();
|
|
62
|
-
this.dynamicMount = null;
|
|
63
|
-
this.cbList = [];
|
|
64
|
-
this.lock = false;
|
|
65
|
-
}
|
|
66
|
-
}, 500);
|
|
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
|
+
this.uploadEd(evt);
|
|
42
|
+
},
|
|
43
|
+
isOss: isOss,
|
|
44
|
+
toUploadList: uploadList,
|
|
45
|
+
},
|
|
46
|
+
vueComponent: upload_vue_1.default,
|
|
47
|
+
});
|
|
48
|
+
this.dynamicMount.init();
|
|
49
|
+
}
|
|
50
|
+
return true;
|
|
51
|
+
}
|
|
52
|
+
uploadEd(evt = null) {
|
|
53
|
+
this.lock = true;
|
|
54
|
+
setTimeout(() => {
|
|
55
|
+
this.cbList.forEach((item) => {
|
|
56
|
+
item.cb(evt ? evt : item.uploadList);
|
|
57
|
+
});
|
|
58
|
+
if (this.dynamicMount) {
|
|
59
|
+
let component = this.dynamicMount.getComponent();
|
|
60
|
+
// @ts-ignore
|
|
61
|
+
component.$destroy();
|
|
62
|
+
this.dynamicMount = null;
|
|
63
|
+
this.cbList = [];
|
|
64
|
+
this.lock = false;
|
|
65
|
+
}
|
|
66
|
+
}, 500);
|
|
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,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
|