meixioacomponent 2.0.45 → 2.0.47

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.
Files changed (101) hide show
  1. package/lib/components/base/baseGuide/GuideControl.d.ts +44 -44
  2. package/lib/components/base/baseGuide/GuideControl.js +238 -238
  3. package/lib/components/dynamicmount/DynamicMountClass.d.ts +15 -15
  4. package/lib/components/dynamicmount/DynamicMountClass.js +65 -65
  5. package/lib/components/dynamicmount/index.d.ts +4 -4
  6. package/lib/components/dynamicmount/index.js +71 -71
  7. package/lib/components/index.d.ts +110 -110
  8. package/lib/components/index.d.ts.map +1 -1
  9. package/lib/components/index.js +242 -242
  10. package/lib/config/LinkViewClass.d.ts +56 -56
  11. package/lib/config/LinkViewClass.js +154 -154
  12. package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.d.ts +12 -12
  13. package/lib/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +68 -68
  14. package/lib/config/componentConfig.d.ts +3 -3
  15. package/lib/config/componentConfig.js +71 -71
  16. package/lib/config/uploadRequest.d.ts +2 -2
  17. package/lib/config/uploadRequest.js +87 -87
  18. package/lib/config/use/UseGuide.d.ts +8 -8
  19. package/lib/config/use/UseGuide.js +33 -33
  20. package/lib/config/use/UseImg.d.ts +9 -9
  21. package/lib/config/use/UseImg.js +44 -44
  22. package/lib/config/use/UseUpload.d.ts +12 -12
  23. package/lib/config/use/UseUpload.js +79 -79
  24. package/lib/config/use/UseViewVideo.d.ts +11 -11
  25. package/lib/config/use/UseViewVideo.js +41 -41
  26. package/lib/config/use/UseWait.d.ts +4 -4
  27. package/lib/config/use/UseWait.js +21 -21
  28. package/lib/config/use/WaitPlugin.d.ts +25 -25
  29. package/lib/config/use/WaitPlugin.js +106 -106
  30. package/lib/config/use/useConfirm/UseConfirm.d.ts +6 -6
  31. package/lib/config/use/useConfirm/UseConfirm.js +33 -33
  32. package/lib/config/use/useConfirm/UseNotify.d.ts +6 -6
  33. package/lib/config/use/useConfirm/UseNotify.js +18 -18
  34. package/lib/config/use/useConfirm/executeConfirm.d.ts +2 -2
  35. package/lib/config/use/useConfirm/executeConfirm.js +11 -11
  36. package/lib/config/use/useConfirm/registerConfirm.d.ts +4 -4
  37. package/lib/config/use/useConfirm/registerConfirm.js +8 -8
  38. package/lib/meixioacomponent.common.js +23005 -22961
  39. package/lib/meixioacomponent.umd.js +23123 -23079
  40. package/lib/meixioacomponent.umd.min.js +3 -3
  41. package/lib/style/tableStyle.less +5 -5
  42. package/lib/style/tdesignStyle.less +21 -21
  43. package/lib/typings/type.d.ts +405 -405
  44. package/lib/typings/type.js +2 -2
  45. package/lib/useType/useType.d.ts +27 -27
  46. package/lib/useType/useType.js +89 -89
  47. package/package.json +1 -1
  48. package/packages/components/base/baseAnchor/baseAnchor.vue +168 -168
  49. package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
  50. package/packages/components/base/baseArea/api.js +6 -6
  51. package/packages/components/base/baseArea/area.js +14979 -14979
  52. package/packages/components/base/baseArea/areaConfig.js +7 -7
  53. package/packages/components/base/baseArea/baseArea.vue +590 -590
  54. package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
  55. package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
  56. package/packages/components/base/baseArea/index.js +6 -6
  57. package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
  58. package/packages/components/base/baseAreaByMultiple/index.js +7 -7
  59. package/packages/components/base/baseButton/baseButton.vue +85 -85
  60. package/packages/components/base/baseButton/index.js +6 -6
  61. package/packages/components/base/baseInput/baseInput.vue +98 -98
  62. package/packages/components/base/baseSelect/baseSelect.vue +102 -102
  63. package/packages/components/base/baseSelect/index.js +6 -6
  64. package/packages/components/base/baseText/index.vue +4 -4
  65. package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
  66. package/packages/components/base/baseTimeRangePicker/index.js +7 -7
  67. package/packages/components/base/baseToggle/toggle.vue +59 -13
  68. package/packages/components/base/tDateRangePicker/index.js +5 -5
  69. package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +95 -95
  70. package/packages/components/dynamicmount/DynamicMountClass.js +64 -64
  71. package/packages/components/dynamicmount/index.js +69 -69
  72. package/packages/components/hooks/useHookByBaseArea.js +49 -49
  73. package/packages/components/hooks/useHookByGuide.js +46 -46
  74. package/packages/components/hooks/useHookByUpload.js +130 -130
  75. package/packages/components/index.js +239 -239
  76. package/packages/components/index.ts +0 -2
  77. package/packages/components/mixins/mixinsByBaseArea.js +53 -53
  78. package/packages/components/proPageTable/oa_pro_table.vue +13 -13
  79. package/packages/components/searchHeader/searchHeader.vue +2 -2
  80. package/packages/components/style/tableStyle.less +5 -5
  81. package/packages/components/style/tdesignStyle.less +21 -21
  82. package/packages/config/LinkViewClass.js +152 -152
  83. package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.js +75 -75
  84. package/packages/config/ProTableLocalConfigManage/ProTableLocalConfigManage.ts +99 -99
  85. package/packages/config/componentConfig.js +68 -68
  86. package/packages/config/use/UseGuide.js +43 -43
  87. package/packages/config/use/UseImg.js +44 -44
  88. package/packages/config/use/UseUpload.js +79 -79
  89. package/packages/config/use/UseViewVideo.js +40 -40
  90. package/packages/config/use/UseWait.js +18 -18
  91. package/packages/config/use/WaitPlugin.js +106 -106
  92. package/packages/config/use/useConfirm/UseConfirm.js +31 -31
  93. package/packages/config/use/useConfirm/UseConfirm.ts +34 -34
  94. package/packages/config/use/useConfirm/UseNotify.js +16 -16
  95. package/packages/config/use/useConfirm/UseNotify.ts +18 -18
  96. package/packages/config/use/useConfirm/executeConfirm.js +8 -8
  97. package/packages/config/use/useConfirm/executeConfirm.ts +6 -6
  98. package/packages/config/use/useConfirm/registerConfirm.js +8 -8
  99. package/packages/config/use/useConfirm/registerConfirm.ts +7 -7
  100. package/packages/typings/type.js +2 -2
  101. package/packages/useType/useType.js +90 -90
@@ -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
@@ -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
- const componentConfig_1 = __importDefault(require("../../componentConfig"));
7
- class UseConfirm {
8
- constructor() {
9
- this.toMountedConfirm = (body, title, options) => {
10
- return new Promise((resolve, reject) => {
11
- var _a, _b, _c;
12
- componentConfig_1.default.dynamicId += 1;
13
- let dialogInstance = componentConfig_1.default.Vue.prototype.$dialog.confirm({
14
- header: title,
15
- body: body,
16
- confirmBtn: (_a = options.confirmButtonText) !== null && _a !== void 0 ? _a : '确定',
17
- cancelBtn: (_b = options.cancelButtonText) !== null && _b !== void 0 ? _b : '取消',
18
- theme: (_c = options.type) !== null && _c !== void 0 ? _c : 'default',
19
- zIndex: componentConfig_1.default.dynamicId,
20
- onConfirm: (context) => {
21
- resolve(context);
22
- dialogInstance === null || dialogInstance === void 0 ? void 0 : dialogInstance.destroy();
23
- },
24
- onCancel: (context) => {
25
- reject(context);
26
- dialogInstance === null || dialogInstance === void 0 ? void 0 : dialogInstance.destroy();
27
- },
28
- });
29
- });
30
- };
31
- }
32
- }
33
- exports.default = UseConfirm;
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 componentConfig_1 = __importDefault(require("../../componentConfig"));
7
+ class UseConfirm {
8
+ constructor() {
9
+ this.toMountedConfirm = (body, title, options) => {
10
+ return new Promise((resolve, reject) => {
11
+ var _a, _b, _c;
12
+ componentConfig_1.default.dynamicId += 1;
13
+ let dialogInstance = componentConfig_1.default.Vue.prototype.$dialog.confirm({
14
+ header: title,
15
+ body: body,
16
+ confirmBtn: (_a = options.confirmButtonText) !== null && _a !== void 0 ? _a : '确定',
17
+ cancelBtn: (_b = options.cancelButtonText) !== null && _b !== void 0 ? _b : '取消',
18
+ theme: (_c = options.type) !== null && _c !== void 0 ? _c : 'default',
19
+ zIndex: componentConfig_1.default.dynamicId,
20
+ onConfirm: (context) => {
21
+ resolve(context);
22
+ dialogInstance === null || dialogInstance === void 0 ? void 0 : dialogInstance.destroy();
23
+ },
24
+ onCancel: (context) => {
25
+ reject(context);
26
+ dialogInstance === null || dialogInstance === void 0 ? void 0 : dialogInstance.destroy();
27
+ },
28
+ });
29
+ });
30
+ };
31
+ }
32
+ }
33
+ exports.default = UseConfirm;
@@ -1,7 +1,7 @@
1
- import { TypeByNotifyOptions, TypeByTheme } from "../../../typings/type";
2
- declare class UseNotify {
3
- constructor();
4
- toMountedConfirm: (type: TypeByTheme, options: TypeByNotifyOptions) => void;
5
- }
6
- export default UseNotify;
1
+ import { TypeByNotifyOptions, TypeByTheme } from "../../../typings/type";
2
+ declare class UseNotify {
3
+ constructor();
4
+ toMountedConfirm: (type: TypeByTheme, options: TypeByNotifyOptions) => void;
5
+ }
6
+ export default UseNotify;
7
7
  //# sourceMappingURL=UseNotify.d.ts.map
@@ -1,18 +1,18 @@
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 componentConfig_1 = __importDefault(require("../../componentConfig"));
7
- class UseNotify {
8
- constructor() {
9
- this.toMountedConfirm = (type, options) => {
10
- componentConfig_1.default.Vue.prototype.$notify(type, {
11
- title: options.title,
12
- content: options.content,
13
- duration: options.duration
14
- });
15
- };
16
- }
17
- }
18
- exports.default = UseNotify;
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 componentConfig_1 = __importDefault(require("../../componentConfig"));
7
+ class UseNotify {
8
+ constructor() {
9
+ this.toMountedConfirm = (type, options) => {
10
+ componentConfig_1.default.Vue.prototype.$notify(type, {
11
+ title: options.title,
12
+ content: options.content,
13
+ duration: options.duration
14
+ });
15
+ };
16
+ }
17
+ }
18
+ exports.default = UseNotify;
@@ -1,3 +1,3 @@
1
- import { TypeByConfirmOptions } from "../../../typings/type";
2
- export declare const executeConfirm: (body: string, title: string, options: TypeByConfirmOptions) => Promise<unknown>;
1
+ import { TypeByConfirmOptions } from "../../../typings/type";
2
+ export declare const executeConfirm: (body: string, title: string, options: TypeByConfirmOptions) => Promise<unknown>;
3
3
  //# sourceMappingURL=executeConfirm.d.ts.map
@@ -1,11 +1,11 @@
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
- exports.executeConfirm = void 0;
7
- const UseConfirm_1 = __importDefault(require("./UseConfirm"));
8
- const executeConfirm = (body, title, options) => {
9
- return new UseConfirm_1.default().toMountedConfirm(body, title, options);
10
- };
11
- exports.executeConfirm = executeConfirm;
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
+ exports.executeConfirm = void 0;
7
+ const UseConfirm_1 = __importDefault(require("./UseConfirm"));
8
+ const executeConfirm = (body, title, options) => {
9
+ return new UseConfirm_1.default().toMountedConfirm(body, title, options);
10
+ };
11
+ exports.executeConfirm = executeConfirm;
@@ -1,5 +1,5 @@
1
- declare const _default: {
2
- install(Vue: any): void;
3
- };
4
- export default _default;
1
+ declare const _default: {
2
+ install(Vue: any): void;
3
+ };
4
+ export default _default;
5
5
  //# sourceMappingURL=registerConfirm.d.ts.map
@@ -1,8 +1,8 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- const executeConfirm_1 = require("./executeConfirm");
4
- exports.default = {
5
- install(Vue) {
6
- Vue.prototype.$confirm = executeConfirm_1.executeConfirm;
7
- }
8
- };
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const executeConfirm_1 = require("./executeConfirm");
4
+ exports.default = {
5
+ install(Vue) {
6
+ Vue.prototype.$confirm = executeConfirm_1.executeConfirm;
7
+ }
8
+ };