meixioacomponent 2.0.59 → 2.0.60

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