meixioacomponent 2.0.47 → 2.0.48
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 +110 -110
- package/lib/components/index.js +242 -242
- 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/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 +44 -44
- 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 +22818 -22808
- package/lib/meixioacomponent.umd.js +22821 -22811
- package/lib/meixioacomponent.umd.min.js +3 -3
- 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 +95 -95
- 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 +239 -239
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/proPageTable/oa_pro_colum_config.vue +1 -1
- package/packages/components/proPageTable/oa_pro_table.vue +25 -14
- 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/componentConfig.js +68 -68
- package/packages/config/use/UseGuide.js +43 -43
- package/packages/config/use/UseImg.js +44 -44
- 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/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -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;
|
|
@@ -1,19 +1,19 @@
|
|
|
1
|
-
import {TypeByNotifyOptions, TypeByTheme} from "../../../typings/type";
|
|
2
|
-
import componentConfig from "../../componentConfig";
|
|
3
|
-
|
|
4
|
-
class UseNotify {
|
|
5
|
-
constructor() {
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
toMountedConfirm = (type: TypeByTheme, options: TypeByNotifyOptions) => {
|
|
10
|
-
componentConfig.Vue.prototype.$notify(type,{
|
|
11
|
-
title: options.title,
|
|
12
|
-
content: options.content,
|
|
13
|
-
duration: options.duration
|
|
14
|
-
})
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import {TypeByNotifyOptions, TypeByTheme} from "../../../typings/type";
|
|
2
|
+
import componentConfig from "../../componentConfig";
|
|
3
|
+
|
|
4
|
+
class UseNotify {
|
|
5
|
+
constructor() {
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
toMountedConfirm = (type: TypeByTheme, options: TypeByNotifyOptions) => {
|
|
10
|
+
componentConfig.Vue.prototype.$notify(type,{
|
|
11
|
+
title: options.title,
|
|
12
|
+
content: options.content,
|
|
13
|
+
duration: options.duration
|
|
14
|
+
})
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
|
|
19
19
|
export default UseNotify;
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
exports.executeConfirm = void 0;
|
|
4
|
-
var UseConfirm_1 = require("./UseConfirm");
|
|
5
|
-
var executeConfirm = function (body, title, options) {
|
|
6
|
-
return new UseConfirm_1["default"]().toMountedConfirm(body, title, options);
|
|
7
|
-
};
|
|
8
|
-
exports.executeConfirm = executeConfirm;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
exports.executeConfirm = void 0;
|
|
4
|
+
var UseConfirm_1 = require("./UseConfirm");
|
|
5
|
+
var executeConfirm = function (body, title, options) {
|
|
6
|
+
return new UseConfirm_1["default"]().toMountedConfirm(body, title, options);
|
|
7
|
+
};
|
|
8
|
+
exports.executeConfirm = executeConfirm;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import {TypeByConfirmOptions} from "../../../typings/type";
|
|
2
|
-
import UseConfirm from "./UseConfirm";
|
|
3
|
-
|
|
4
|
-
export const executeConfirm = (body: string, title: string, options: TypeByConfirmOptions) => {
|
|
5
|
-
return new UseConfirm().toMountedConfirm(body, title, options)
|
|
6
|
-
}
|
|
1
|
+
import {TypeByConfirmOptions} from "../../../typings/type";
|
|
2
|
+
import UseConfirm from "./UseConfirm";
|
|
3
|
+
|
|
4
|
+
export const executeConfirm = (body: string, title: string, options: TypeByConfirmOptions) => {
|
|
5
|
+
return new UseConfirm().toMountedConfirm(body, title, options)
|
|
6
|
+
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var executeConfirm_1 = require("./executeConfirm");
|
|
4
|
-
exports["default"] = {
|
|
5
|
-
install: function (Vue) {
|
|
6
|
-
Vue.prototype.$confirm = executeConfirm_1.executeConfirm;
|
|
7
|
-
}
|
|
8
|
-
};
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var executeConfirm_1 = require("./executeConfirm");
|
|
4
|
+
exports["default"] = {
|
|
5
|
+
install: function (Vue) {
|
|
6
|
+
Vue.prototype.$confirm = executeConfirm_1.executeConfirm;
|
|
7
|
+
}
|
|
8
|
+
};
|
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
|
|
2
|
-
import {executeConfirm} from "./executeConfirm";
|
|
3
|
-
|
|
4
|
-
export default {
|
|
5
|
-
install(Vue) {
|
|
6
|
-
Vue.prototype.$confirm = executeConfirm;
|
|
7
|
-
}
|
|
1
|
+
|
|
2
|
+
import {executeConfirm} from "./executeConfirm";
|
|
3
|
+
|
|
4
|
+
export default {
|
|
5
|
+
install(Vue) {
|
|
6
|
+
Vue.prototype.$confirm = executeConfirm;
|
|
7
|
+
}
|
|
8
8
|
}
|
package/packages/typings/type.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|