meixioacomponent 2.0.51 → 2.0.53
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 +244 -244
- 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 +23088 -23080
- package/lib/meixioacomponent.umd.js +23086 -23078
- package/lib/meixioacomponent.umd.min.js +3 -3
- package/lib/plugin/PluginByReferenceByOss.d.ts +1 -1
- package/lib/plugin/PluginByReferenceByOss.js +16 -16
- package/lib/style/tdesignStyle.less +21 -21
- package/lib/typings/type.d.ts +405 -405
- package/lib/typings/type.js +2 -2
- package/lib/useType/useType.d.ts +27 -27
- package/lib/useType/useType.js +89 -89
- package/package.json +1 -1
- package/packages/components/base/baseAnchor/baseAnchor.vue +168 -168
- package/packages/components/base/baseAnchor/baseAnchorV2.vue +165 -165
- package/packages/components/base/baseArea/api.js +6 -6
- package/packages/components/base/baseArea/area.js +14979 -14979
- package/packages/components/base/baseArea/areaConfig.js +7 -7
- package/packages/components/base/baseArea/baseArea.vue +590 -590
- package/packages/components/base/baseArea/baseAreaV2.vue +144 -144
- package/packages/components/base/baseArea/baseAreaV21.vue +156 -156
- package/packages/components/base/baseArea/index.js +6 -6
- package/packages/components/base/baseAreaByMultiple/baseAreaByMultiple.vue +70 -70
- package/packages/components/base/baseAreaByMultiple/index.js +7 -7
- package/packages/components/base/baseButton/baseButton.vue +85 -85
- package/packages/components/base/baseButton/index.js +6 -6
- package/packages/components/base/baseInput/baseInput.vue +98 -98
- package/packages/components/base/baseSelect/baseSelect.vue +102 -102
- package/packages/components/base/baseSelect/index.js +6 -6
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +102 -102
- 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 +241 -241
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/proPageTable/oa_pro_table.vue +12 -1
- 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/plugin/PluginByReferenceByOss.js +16 -16
- package/packages/plugin/PluginByReferenceByOss.ts +12 -12
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
|
@@ -1,99 +1,99 @@
|
|
|
1
|
-
class ProTableLocalConfigManage {
|
|
2
|
-
|
|
3
|
-
public localConfig: Record<string, any>;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
constructor() {
|
|
7
|
-
|
|
8
|
-
this.localConfig = {};
|
|
9
|
-
}
|
|
10
|
-
|
|
11
|
-
public initByProTableLocalConfigManage() {
|
|
12
|
-
const _localConfig = window.localStorage.getItem('proTableLocalConfig');
|
|
13
|
-
if (_localConfig) {
|
|
14
|
-
this.localConfig = JSON.parse(_localConfig);
|
|
15
|
-
} else {
|
|
16
|
-
this.setProTableLocalConfigByLocalStorage();
|
|
17
|
-
}
|
|
18
|
-
}
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
public setProTableLocalConfigByTableKey = (tableKey: string, value: any) => {
|
|
22
|
-
|
|
23
|
-
this.localConfig[`${tableKey}`] = value;
|
|
24
|
-
console.log(this.localConfig);
|
|
25
|
-
this.setProTableLocalConfigByLocalStorage();
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
public checkRenderTableConfigAccordLocal = (tableKey: string, renderTable: Array<any>) => {
|
|
31
|
-
const _value = this.hasConfigByTableKey(tableKey);
|
|
32
|
-
let checkFlag = true;
|
|
33
|
-
if (_value) {
|
|
34
|
-
console.log(renderTable);
|
|
35
|
-
console.log(_value);
|
|
36
|
-
if (_value.length !== renderTable.length) {
|
|
37
|
-
checkFlag = false;
|
|
38
|
-
this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
39
|
-
return checkFlag;
|
|
40
|
-
}
|
|
41
|
-
|
|
42
|
-
for (let i = 0; i < renderTable.length; i++) {
|
|
43
|
-
|
|
44
|
-
const item = renderTable[i];
|
|
45
|
-
|
|
46
|
-
const index = _value.findIndex(cItem => {
|
|
47
|
-
return item.key === cItem.key;
|
|
48
|
-
})
|
|
49
|
-
if (index < 0) {
|
|
50
|
-
checkFlag = false;
|
|
51
|
-
this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
52
|
-
break;
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
return checkFlag;
|
|
57
|
-
}
|
|
58
|
-
return false
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
public deleteProTableLocalConfigByTableKey = (tableKey: string) => {
|
|
65
|
-
|
|
66
|
-
console.log('deleteProTableLocalConfigByTableKey');
|
|
67
|
-
const _value = this.hasConfigByTableKey(tableKey);
|
|
68
|
-
|
|
69
|
-
if (_value) {
|
|
70
|
-
delete this.localConfig[`${tableKey}`];
|
|
71
|
-
this.setProTableLocalConfigByLocalStorage();
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
public hasConfigByTableKey = (tableKey: string) => {
|
|
78
|
-
|
|
79
|
-
const value = this.localConfig[`${tableKey}`];
|
|
80
|
-
|
|
81
|
-
if (value) {
|
|
82
|
-
return value;
|
|
83
|
-
}
|
|
84
|
-
return false;
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
private setProTableLocalConfigByLocalStorage = () => {
|
|
90
|
-
window.localStorage.setItem('proTableLocalConfig', JSON.stringify(this.localConfig));
|
|
91
|
-
console.log('setProTableLocalConfigByLocalStorage')
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
const proTableLocalConfigManage = new ProTableLocalConfigManage();
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
export default proTableLocalConfigManage;
|
|
1
|
+
class ProTableLocalConfigManage {
|
|
2
|
+
|
|
3
|
+
public localConfig: Record<string, any>;
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
constructor() {
|
|
7
|
+
|
|
8
|
+
this.localConfig = {};
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
public initByProTableLocalConfigManage() {
|
|
12
|
+
const _localConfig = window.localStorage.getItem('proTableLocalConfig');
|
|
13
|
+
if (_localConfig) {
|
|
14
|
+
this.localConfig = JSON.parse(_localConfig);
|
|
15
|
+
} else {
|
|
16
|
+
this.setProTableLocalConfigByLocalStorage();
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
public setProTableLocalConfigByTableKey = (tableKey: string, value: any) => {
|
|
22
|
+
|
|
23
|
+
this.localConfig[`${tableKey}`] = value;
|
|
24
|
+
console.log(this.localConfig);
|
|
25
|
+
this.setProTableLocalConfigByLocalStorage();
|
|
26
|
+
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
public checkRenderTableConfigAccordLocal = (tableKey: string, renderTable: Array<any>) => {
|
|
31
|
+
const _value = this.hasConfigByTableKey(tableKey);
|
|
32
|
+
let checkFlag = true;
|
|
33
|
+
if (_value) {
|
|
34
|
+
console.log(renderTable);
|
|
35
|
+
console.log(_value);
|
|
36
|
+
if (_value.length !== renderTable.length) {
|
|
37
|
+
checkFlag = false;
|
|
38
|
+
this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
39
|
+
return checkFlag;
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
for (let i = 0; i < renderTable.length; i++) {
|
|
43
|
+
|
|
44
|
+
const item = renderTable[i];
|
|
45
|
+
|
|
46
|
+
const index = _value.findIndex(cItem => {
|
|
47
|
+
return item.key === cItem.key;
|
|
48
|
+
})
|
|
49
|
+
if (index < 0) {
|
|
50
|
+
checkFlag = false;
|
|
51
|
+
this.deleteProTableLocalConfigByTableKey(tableKey);
|
|
52
|
+
break;
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
return checkFlag;
|
|
57
|
+
}
|
|
58
|
+
return false
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
public deleteProTableLocalConfigByTableKey = (tableKey: string) => {
|
|
65
|
+
|
|
66
|
+
console.log('deleteProTableLocalConfigByTableKey');
|
|
67
|
+
const _value = this.hasConfigByTableKey(tableKey);
|
|
68
|
+
|
|
69
|
+
if (_value) {
|
|
70
|
+
delete this.localConfig[`${tableKey}`];
|
|
71
|
+
this.setProTableLocalConfigByLocalStorage();
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
|
|
77
|
+
public hasConfigByTableKey = (tableKey: string) => {
|
|
78
|
+
|
|
79
|
+
const value = this.localConfig[`${tableKey}`];
|
|
80
|
+
|
|
81
|
+
if (value) {
|
|
82
|
+
return value;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
private setProTableLocalConfigByLocalStorage = () => {
|
|
90
|
+
window.localStorage.setItem('proTableLocalConfig', JSON.stringify(this.localConfig));
|
|
91
|
+
console.log('setProTableLocalConfigByLocalStorage')
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
const proTableLocalConfigManage = new ProTableLocalConfigManage();
|
|
97
|
+
|
|
98
|
+
|
|
99
|
+
export default proTableLocalConfigManage;
|
|
@@ -1,68 +1,68 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
var selectStore_1 = require("./storeModule/selectStore");
|
|
4
|
-
var dialogCacheStore_1 = require("./storeModule/dialogCacheStore");
|
|
5
|
-
// @ts-ignore
|
|
6
|
-
var index_vue_1 = require("../components/dialogCache/index.vue");
|
|
7
|
-
var LinkViewClass_1 = require("./LinkViewClass");
|
|
8
|
-
var componentConfig = {
|
|
9
|
-
store: {},
|
|
10
|
-
router: {},
|
|
11
|
-
dynamicId: 3000,
|
|
12
|
-
uploadUrl: "",
|
|
13
|
-
uploadPrefix: "",
|
|
14
|
-
eventBus: null,
|
|
15
|
-
selectStore: null,
|
|
16
|
-
Vue: null,
|
|
17
|
-
LinkViewClass: LinkViewClass_1["default"],
|
|
18
|
-
dialogCacheComponent: {},
|
|
19
|
-
uploadStoreList: ["meixidev"],
|
|
20
|
-
ossUploadEdAuthCallback: null,
|
|
21
|
-
setDynamicId: function () {
|
|
22
|
-
componentConfig.dynamicId += 1;
|
|
23
|
-
},
|
|
24
|
-
setUploadPrefix: function (url) {
|
|
25
|
-
componentConfig.uploadPrefix = url;
|
|
26
|
-
},
|
|
27
|
-
setUploadUrl: function (storeType, uploadType) {
|
|
28
|
-
// componentConfig.uploadUrl = `${componentConfig.uploadPrefix}/${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload`
|
|
29
|
-
componentConfig.uploadUrl = "".concat(componentConfig.uploadPrefix);
|
|
30
|
-
},
|
|
31
|
-
setUploadCustomUrl: function (url) {
|
|
32
|
-
componentConfig.uploadUrl = url;
|
|
33
|
-
},
|
|
34
|
-
setOssUploadEdAuthCallBack: function (callback) {
|
|
35
|
-
componentConfig.ossUploadEdAuthCallback = callback;
|
|
36
|
-
},
|
|
37
|
-
initConfig: function (_store, _router) {
|
|
38
|
-
// 动态注册vuex modules
|
|
39
|
-
_store["registerModule"]("selectStore", selectStore_1["default"]);
|
|
40
|
-
// 注册vuex里面selectStore管理类
|
|
41
|
-
_store["commit"]("selectStore/CREATE_SELECTSTORE");
|
|
42
|
-
componentConfig.store = _store;
|
|
43
|
-
componentConfig.router = _router;
|
|
44
|
-
componentConfig.selectStore =
|
|
45
|
-
componentConfig.store["getters"]["selectStore/getSelectStore"];
|
|
46
|
-
componentConfig.registerModuleOfCacheDialog(_store);
|
|
47
|
-
window["dayjs"] = require("dayjs");
|
|
48
|
-
},
|
|
49
|
-
registerModuleOfCacheDialog: function (_store) {
|
|
50
|
-
_store["registerModule"]("dialogCacheStore", dialogCacheStore_1["default"]);
|
|
51
|
-
},
|
|
52
|
-
// 生成隐藏dialog的容器
|
|
53
|
-
createDialogCacheWrap: function () {
|
|
54
|
-
var component = componentConfig.Vue.extend(index_vue_1["default"]);
|
|
55
|
-
componentConfig.dialogCacheComponent = new component({
|
|
56
|
-
// @ts-ignore
|
|
57
|
-
store: componentConfig.store,
|
|
58
|
-
router: componentConfig.router
|
|
59
|
-
});
|
|
60
|
-
componentConfig.Vue.nextTick(function () {
|
|
61
|
-
var cacheWrap = document.createElement("div");
|
|
62
|
-
cacheWrap.setAttribute("class", "cacheWrap");
|
|
63
|
-
document.body.appendChild(cacheWrap);
|
|
64
|
-
componentConfig.dialogCacheComponent["$mount"](cacheWrap);
|
|
65
|
-
});
|
|
66
|
-
}
|
|
67
|
-
};
|
|
68
|
-
exports["default"] = componentConfig;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
var selectStore_1 = require("./storeModule/selectStore");
|
|
4
|
+
var dialogCacheStore_1 = require("./storeModule/dialogCacheStore");
|
|
5
|
+
// @ts-ignore
|
|
6
|
+
var index_vue_1 = require("../components/dialogCache/index.vue");
|
|
7
|
+
var LinkViewClass_1 = require("./LinkViewClass");
|
|
8
|
+
var componentConfig = {
|
|
9
|
+
store: {},
|
|
10
|
+
router: {},
|
|
11
|
+
dynamicId: 3000,
|
|
12
|
+
uploadUrl: "",
|
|
13
|
+
uploadPrefix: "",
|
|
14
|
+
eventBus: null,
|
|
15
|
+
selectStore: null,
|
|
16
|
+
Vue: null,
|
|
17
|
+
LinkViewClass: LinkViewClass_1["default"],
|
|
18
|
+
dialogCacheComponent: {},
|
|
19
|
+
uploadStoreList: ["meixidev"],
|
|
20
|
+
ossUploadEdAuthCallback: null,
|
|
21
|
+
setDynamicId: function () {
|
|
22
|
+
componentConfig.dynamicId += 1;
|
|
23
|
+
},
|
|
24
|
+
setUploadPrefix: function (url) {
|
|
25
|
+
componentConfig.uploadPrefix = url;
|
|
26
|
+
},
|
|
27
|
+
setUploadUrl: function (storeType, uploadType) {
|
|
28
|
+
// componentConfig.uploadUrl = `${componentConfig.uploadPrefix}/${componentConfig.uploadStoreList[storeType]}/${uploadType}/upload`
|
|
29
|
+
componentConfig.uploadUrl = "".concat(componentConfig.uploadPrefix);
|
|
30
|
+
},
|
|
31
|
+
setUploadCustomUrl: function (url) {
|
|
32
|
+
componentConfig.uploadUrl = url;
|
|
33
|
+
},
|
|
34
|
+
setOssUploadEdAuthCallBack: function (callback) {
|
|
35
|
+
componentConfig.ossUploadEdAuthCallback = callback;
|
|
36
|
+
},
|
|
37
|
+
initConfig: function (_store, _router) {
|
|
38
|
+
// 动态注册vuex modules
|
|
39
|
+
_store["registerModule"]("selectStore", selectStore_1["default"]);
|
|
40
|
+
// 注册vuex里面selectStore管理类
|
|
41
|
+
_store["commit"]("selectStore/CREATE_SELECTSTORE");
|
|
42
|
+
componentConfig.store = _store;
|
|
43
|
+
componentConfig.router = _router;
|
|
44
|
+
componentConfig.selectStore =
|
|
45
|
+
componentConfig.store["getters"]["selectStore/getSelectStore"];
|
|
46
|
+
componentConfig.registerModuleOfCacheDialog(_store);
|
|
47
|
+
window["dayjs"] = require("dayjs");
|
|
48
|
+
},
|
|
49
|
+
registerModuleOfCacheDialog: function (_store) {
|
|
50
|
+
_store["registerModule"]("dialogCacheStore", dialogCacheStore_1["default"]);
|
|
51
|
+
},
|
|
52
|
+
// 生成隐藏dialog的容器
|
|
53
|
+
createDialogCacheWrap: function () {
|
|
54
|
+
var component = componentConfig.Vue.extend(index_vue_1["default"]);
|
|
55
|
+
componentConfig.dialogCacheComponent = new component({
|
|
56
|
+
// @ts-ignore
|
|
57
|
+
store: componentConfig.store,
|
|
58
|
+
router: componentConfig.router
|
|
59
|
+
});
|
|
60
|
+
componentConfig.Vue.nextTick(function () {
|
|
61
|
+
var cacheWrap = document.createElement("div");
|
|
62
|
+
cacheWrap.setAttribute("class", "cacheWrap");
|
|
63
|
+
document.body.appendChild(cacheWrap);
|
|
64
|
+
componentConfig.dialogCacheComponent["$mount"](cacheWrap);
|
|
65
|
+
});
|
|
66
|
+
}
|
|
67
|
+
};
|
|
68
|
+
exports["default"] = componentConfig;
|
|
@@ -1,43 +1,43 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __assign = (this && this.__assign) || function () {
|
|
3
|
-
__assign = Object.assign || function(t) {
|
|
4
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
-
s = arguments[i];
|
|
6
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
-
t[p] = s[p];
|
|
8
|
-
}
|
|
9
|
-
return t;
|
|
10
|
-
};
|
|
11
|
-
return __assign.apply(this, arguments);
|
|
12
|
-
};
|
|
13
|
-
exports.__esModule = true;
|
|
14
|
-
// @ts-ignore
|
|
15
|
-
var index_vue_1 = require("../../components/base/baseGuide/index.vue");
|
|
16
|
-
var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
|
|
17
|
-
var componentConfig_1 = require("../componentConfig");
|
|
18
|
-
var UseGuide = /** @class */ (function () {
|
|
19
|
-
function UseGuide() {
|
|
20
|
-
this.guideComponent = null;
|
|
21
|
-
}
|
|
22
|
-
UseGuide.prototype.startGuide = function (params) {
|
|
23
|
-
var _this = this;
|
|
24
|
-
if (!this.guideComponent) {
|
|
25
|
-
this.guideComponent = new DynamicMountClass_1["default"]({
|
|
26
|
-
vueComponent: index_vue_1["default"],
|
|
27
|
-
componentProps: __assign({}, params)
|
|
28
|
-
});
|
|
29
|
-
this.guideComponent.on('mounted', function (component) {
|
|
30
|
-
componentConfig_1["default"].Vue.nextTick(function () {
|
|
31
|
-
component.guideControl.onStartGuide();
|
|
32
|
-
});
|
|
33
|
-
});
|
|
34
|
-
this.guideComponent.on('destroyed', function () {
|
|
35
|
-
_this.guideComponent = null;
|
|
36
|
-
});
|
|
37
|
-
this.guideComponent.init();
|
|
38
|
-
}
|
|
39
|
-
};
|
|
40
|
-
return UseGuide;
|
|
41
|
-
}());
|
|
42
|
-
var useGuide = new UseGuide();
|
|
43
|
-
exports["default"] = useGuide;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __assign = (this && this.__assign) || function () {
|
|
3
|
+
__assign = Object.assign || function(t) {
|
|
4
|
+
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
5
|
+
s = arguments[i];
|
|
6
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
7
|
+
t[p] = s[p];
|
|
8
|
+
}
|
|
9
|
+
return t;
|
|
10
|
+
};
|
|
11
|
+
return __assign.apply(this, arguments);
|
|
12
|
+
};
|
|
13
|
+
exports.__esModule = true;
|
|
14
|
+
// @ts-ignore
|
|
15
|
+
var index_vue_1 = require("../../components/base/baseGuide/index.vue");
|
|
16
|
+
var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
|
|
17
|
+
var componentConfig_1 = require("../componentConfig");
|
|
18
|
+
var UseGuide = /** @class */ (function () {
|
|
19
|
+
function UseGuide() {
|
|
20
|
+
this.guideComponent = null;
|
|
21
|
+
}
|
|
22
|
+
UseGuide.prototype.startGuide = function (params) {
|
|
23
|
+
var _this = this;
|
|
24
|
+
if (!this.guideComponent) {
|
|
25
|
+
this.guideComponent = new DynamicMountClass_1["default"]({
|
|
26
|
+
vueComponent: index_vue_1["default"],
|
|
27
|
+
componentProps: __assign({}, params)
|
|
28
|
+
});
|
|
29
|
+
this.guideComponent.on('mounted', function (component) {
|
|
30
|
+
componentConfig_1["default"].Vue.nextTick(function () {
|
|
31
|
+
component.guideControl.onStartGuide();
|
|
32
|
+
});
|
|
33
|
+
});
|
|
34
|
+
this.guideComponent.on('destroyed', function () {
|
|
35
|
+
_this.guideComponent = null;
|
|
36
|
+
});
|
|
37
|
+
this.guideComponent.init();
|
|
38
|
+
}
|
|
39
|
+
};
|
|
40
|
+
return UseGuide;
|
|
41
|
+
}());
|
|
42
|
+
var useGuide = new UseGuide();
|
|
43
|
+
exports["default"] = useGuide;
|
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
exports.__esModule = true;
|
|
3
|
-
// @ts-ignore
|
|
4
|
-
var image_viewer_vue_1 = require("../../components/base/baseImageViewer/image-viewer.vue");
|
|
5
|
-
var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
|
|
6
|
-
var componentConfig_1 = require("../componentConfig");
|
|
7
|
-
var UseImg = /** @class */ (function () {
|
|
8
|
-
function UseImg() {
|
|
9
|
-
var _this = this;
|
|
10
|
-
this.destroy = function () {
|
|
11
|
-
if (_this.dynamicMount) {
|
|
12
|
-
var referComponent = _this.dynamicMount.getComponent();
|
|
13
|
-
referComponent.$destroy();
|
|
14
|
-
_this.dynamicMount = null;
|
|
15
|
-
}
|
|
16
|
-
};
|
|
17
|
-
this.dynamicMount = null;
|
|
18
|
-
}
|
|
19
|
-
UseImg.prototype.toView = function (list) {
|
|
20
|
-
var _this = this;
|
|
21
|
-
if (this.dynamicMount) {
|
|
22
|
-
this.destroy();
|
|
23
|
-
}
|
|
24
|
-
componentConfig_1["default"].Vue.nextTick(function () {
|
|
25
|
-
componentConfig_1["default"].dynamicId += 1;
|
|
26
|
-
_this.dynamicMount = new DynamicMountClass_1["default"]({
|
|
27
|
-
componentProps: {
|
|
28
|
-
value: true,
|
|
29
|
-
urlList: list,
|
|
30
|
-
onClose: function () {
|
|
31
|
-
_this.destroy();
|
|
32
|
-
},
|
|
33
|
-
zIndex: componentConfig_1["default"].dynamicId
|
|
34
|
-
},
|
|
35
|
-
vueComponent: image_viewer_vue_1["default"]
|
|
36
|
-
});
|
|
37
|
-
// 挂载事件
|
|
38
|
-
_this.dynamicMount.init();
|
|
39
|
-
});
|
|
40
|
-
};
|
|
41
|
-
return UseImg;
|
|
42
|
-
}());
|
|
43
|
-
var useImg = new UseImg();
|
|
44
|
-
exports["default"] = useImg;
|
|
1
|
+
"use strict";
|
|
2
|
+
exports.__esModule = true;
|
|
3
|
+
// @ts-ignore
|
|
4
|
+
var image_viewer_vue_1 = require("../../components/base/baseImageViewer/image-viewer.vue");
|
|
5
|
+
var DynamicMountClass_1 = require("../../components/dynamicmount/DynamicMountClass");
|
|
6
|
+
var componentConfig_1 = require("../componentConfig");
|
|
7
|
+
var UseImg = /** @class */ (function () {
|
|
8
|
+
function UseImg() {
|
|
9
|
+
var _this = this;
|
|
10
|
+
this.destroy = function () {
|
|
11
|
+
if (_this.dynamicMount) {
|
|
12
|
+
var referComponent = _this.dynamicMount.getComponent();
|
|
13
|
+
referComponent.$destroy();
|
|
14
|
+
_this.dynamicMount = null;
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
this.dynamicMount = null;
|
|
18
|
+
}
|
|
19
|
+
UseImg.prototype.toView = function (list) {
|
|
20
|
+
var _this = this;
|
|
21
|
+
if (this.dynamicMount) {
|
|
22
|
+
this.destroy();
|
|
23
|
+
}
|
|
24
|
+
componentConfig_1["default"].Vue.nextTick(function () {
|
|
25
|
+
componentConfig_1["default"].dynamicId += 1;
|
|
26
|
+
_this.dynamicMount = new DynamicMountClass_1["default"]({
|
|
27
|
+
componentProps: {
|
|
28
|
+
value: true,
|
|
29
|
+
urlList: list,
|
|
30
|
+
onClose: function () {
|
|
31
|
+
_this.destroy();
|
|
32
|
+
},
|
|
33
|
+
zIndex: componentConfig_1["default"].dynamicId
|
|
34
|
+
},
|
|
35
|
+
vueComponent: image_viewer_vue_1["default"]
|
|
36
|
+
});
|
|
37
|
+
// 挂载事件
|
|
38
|
+
_this.dynamicMount.init();
|
|
39
|
+
});
|
|
40
|
+
};
|
|
41
|
+
return UseImg;
|
|
42
|
+
}());
|
|
43
|
+
var useImg = new UseImg();
|
|
44
|
+
exports["default"] = useImg;
|
|
@@ -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;
|