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.
- 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 -111
- package/lib/components/index.d.ts.map +1 -1
- package/lib/components/index.js +244 -250
- 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 +45 -45
- 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 +23649 -24907
- package/lib/meixioacomponent.umd.js +23678 -24936
- 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 +2 -2
- 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/baseDrawer/index.vue +1 -1
- 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/baseStoreSelect/index.vue +1 -1
- package/packages/components/base/baseTimeRangePicker/baseTimeRangePicker.vue +59 -59
- package/packages/components/base/baseTimeRangePicker/index.js +7 -7
- package/packages/components/base/baseToggle/toggle.vue +9 -8
- package/packages/components/base/tDateRangePicker/index.js +5 -5
- package/packages/components/base/tDateRangePicker/tDateRangePicker.vue +102 -111
- 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 -247
- package/packages/components/index.ts +5 -13
- package/packages/components/mixins/mixinsByBaseArea.js +53 -53
- package/packages/components/mixins/tableSectionMixins.js +0 -1
- package/packages/components/proPageTable/oa_pro_table.vue +1 -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 +46 -46
- 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 +11 -11
- package/packages/typings/type.js +2 -2
- package/packages/useType/useType.js +90 -90
- package/packages/utils/utils.js +14 -1
- package/tsconfig.json +3 -3
- package/lib/config/TransferTDComponent.d.ts +0 -2
- package/lib/config/TransferTDComponent.d.ts.map +0 -1
- package/lib/config/TransferTDComponent.js +0 -31
- package/packages/components/base/tInput/index.js +0 -6
- package/packages/components/base/tInput/tInput.vue +0 -149
- package/packages/components/base/tInputNumber/index.js +0 -6
- package/packages/components/base/tInputNumber/tInputNumber.vue +0 -104
- package/packages/components/base/tSelect/index.js +0 -0
- package/packages/components/base/tSelect/tSelect.vue +0 -176
- package/packages/config/TransferTDComponent.js +0 -31
- package/packages/config/TransferTDComponent.ts +0 -23
|
@@ -1,131 +1,131 @@
|
|
|
1
|
-
import {computed, ref} from "vue";
|
|
2
|
-
import {MessagePlugin} from "tdesign-vue";
|
|
3
|
-
import componentConfig from "../../config/componentConfig";
|
|
4
|
-
import useUpload from "../../config/use/UseUpload";
|
|
5
|
-
|
|
6
|
-
const useHookByUpload = (key, options = {
|
|
7
|
-
props: {
|
|
8
|
-
max: {}
|
|
9
|
-
},
|
|
10
|
-
uploadEd: () => {
|
|
11
|
-
},
|
|
12
|
-
|
|
13
|
-
}) => {
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
const dynamicmount = ref();
|
|
17
|
-
const uploadLoading = ref(false);
|
|
18
|
-
const _module = ref([]);
|
|
19
|
-
|
|
20
|
-
let uploadPath = null;
|
|
21
|
-
const callBackIsLaunch = ref(false);
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
const setUploadPath = (value) => {
|
|
25
|
-
uploadPath = value;
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
const isMax = computed(() => {
|
|
30
|
-
return _module.value.length >= options.props.max
|
|
31
|
-
})
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
const inputChange = (list) => {
|
|
35
|
-
callBackIsLaunch.value = false;
|
|
36
|
-
for (let i = 0; i < list.length; i++) {
|
|
37
|
-
if (_module.value) {
|
|
38
|
-
if (isMax.value) {
|
|
39
|
-
MessagePlugin.error("超出文件上传限制");
|
|
40
|
-
break;
|
|
41
|
-
}
|
|
42
|
-
_module.value.push(list[i]);
|
|
43
|
-
}
|
|
44
|
-
list[i].cb = uploadEd;
|
|
45
|
-
list[i].key = key;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
let isOss = true;
|
|
49
|
-
if (uploadPath instanceof Array) {
|
|
50
|
-
componentConfig.setUploadUrl(uploadPath[0], uploadPath[1]);
|
|
51
|
-
} else {
|
|
52
|
-
componentConfig.setUploadCustomUrl(uploadPath);
|
|
53
|
-
isOss = false;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
if (!uploadLoading.value) {
|
|
57
|
-
uploadLoading.value = useUpload.toUpload(
|
|
58
|
-
_module.value ? _module.value : list,
|
|
59
|
-
uploadEd,
|
|
60
|
-
isOss
|
|
61
|
-
);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
const uploadEd = async (evt) => {
|
|
67
|
-
let filterList = [];
|
|
68
|
-
let callBackParams = null;
|
|
69
|
-
try {
|
|
70
|
-
if (evt instanceof Array) {
|
|
71
|
-
filterList = evt
|
|
72
|
-
.filter((item) => {
|
|
73
|
-
return item.key === key;
|
|
74
|
-
})
|
|
75
|
-
.filter((item) => {
|
|
76
|
-
if (!item.upload || item.upload.state === 1) {
|
|
77
|
-
return item;
|
|
78
|
-
} else {
|
|
79
|
-
Notification.error("存在某些文件取消上传或上传失败!");
|
|
80
|
-
}
|
|
81
|
-
});
|
|
82
|
-
|
|
83
|
-
callBackParams = filterList;
|
|
84
|
-
} else {
|
|
85
|
-
if (_module.value instanceof Array) {
|
|
86
|
-
_module.value = _module.value.filter((item) => {
|
|
87
|
-
return item.url !== "cancel";
|
|
88
|
-
});
|
|
89
|
-
} else {
|
|
90
|
-
_module.value = null;
|
|
91
|
-
}
|
|
92
|
-
callBackParams = evt;
|
|
93
|
-
Notification.error(`${evt}`);
|
|
94
|
-
}
|
|
95
|
-
} catch (error) {
|
|
96
|
-
} finally {
|
|
97
|
-
if (!callBackIsLaunch.value) {
|
|
98
|
-
options.uploadEd && options.uploadEd(callBackParams);
|
|
99
|
-
callBackIsLaunch.value = true;
|
|
100
|
-
if (callBackParams instanceof Array) {
|
|
101
|
-
// 只要考虑oss
|
|
102
|
-
if (componentConfig.ossUploadEdAuthCallback instanceof Function) {
|
|
103
|
-
if (callBackParams.length > 0) {
|
|
104
|
-
await componentConfig.ossUploadEdAuthCallback(callBackParams);
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
|
|
110
|
-
uploadLoading.value = false;
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
return {
|
|
116
|
-
isMax,
|
|
117
|
-
_module,
|
|
118
|
-
dynamicmount,
|
|
119
|
-
uploadLoading,
|
|
120
|
-
uploadPath,
|
|
121
|
-
callBackIsLaunch,
|
|
122
|
-
setUploadPath,
|
|
123
|
-
inputChange,
|
|
124
|
-
uploadEd,
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
1
|
+
import {computed, ref} from "vue";
|
|
2
|
+
import {MessagePlugin} from "tdesign-vue";
|
|
3
|
+
import componentConfig from "../../config/componentConfig";
|
|
4
|
+
import useUpload from "../../config/use/UseUpload";
|
|
5
|
+
|
|
6
|
+
const useHookByUpload = (key, options = {
|
|
7
|
+
props: {
|
|
8
|
+
max: {}
|
|
9
|
+
},
|
|
10
|
+
uploadEd: () => {
|
|
11
|
+
},
|
|
12
|
+
|
|
13
|
+
}) => {
|
|
14
|
+
|
|
15
|
+
|
|
16
|
+
const dynamicmount = ref();
|
|
17
|
+
const uploadLoading = ref(false);
|
|
18
|
+
const _module = ref([]);
|
|
19
|
+
|
|
20
|
+
let uploadPath = null;
|
|
21
|
+
const callBackIsLaunch = ref(false);
|
|
22
|
+
|
|
23
|
+
|
|
24
|
+
const setUploadPath = (value) => {
|
|
25
|
+
uploadPath = value;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
const isMax = computed(() => {
|
|
30
|
+
return _module.value.length >= options.props.max
|
|
31
|
+
})
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
const inputChange = (list) => {
|
|
35
|
+
callBackIsLaunch.value = false;
|
|
36
|
+
for (let i = 0; i < list.length; i++) {
|
|
37
|
+
if (_module.value) {
|
|
38
|
+
if (isMax.value) {
|
|
39
|
+
MessagePlugin.error("超出文件上传限制");
|
|
40
|
+
break;
|
|
41
|
+
}
|
|
42
|
+
_module.value.push(list[i]);
|
|
43
|
+
}
|
|
44
|
+
list[i].cb = uploadEd;
|
|
45
|
+
list[i].key = key;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
let isOss = true;
|
|
49
|
+
if (uploadPath instanceof Array) {
|
|
50
|
+
componentConfig.setUploadUrl(uploadPath[0], uploadPath[1]);
|
|
51
|
+
} else {
|
|
52
|
+
componentConfig.setUploadCustomUrl(uploadPath);
|
|
53
|
+
isOss = false;
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
if (!uploadLoading.value) {
|
|
57
|
+
uploadLoading.value = useUpload.toUpload(
|
|
58
|
+
_module.value ? _module.value : list,
|
|
59
|
+
uploadEd,
|
|
60
|
+
isOss
|
|
61
|
+
);
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
|
|
66
|
+
const uploadEd = async (evt) => {
|
|
67
|
+
let filterList = [];
|
|
68
|
+
let callBackParams = null;
|
|
69
|
+
try {
|
|
70
|
+
if (evt instanceof Array) {
|
|
71
|
+
filterList = evt
|
|
72
|
+
.filter((item) => {
|
|
73
|
+
return item.key === key;
|
|
74
|
+
})
|
|
75
|
+
.filter((item) => {
|
|
76
|
+
if (!item.upload || item.upload.state === 1) {
|
|
77
|
+
return item;
|
|
78
|
+
} else {
|
|
79
|
+
Notification.error("存在某些文件取消上传或上传失败!");
|
|
80
|
+
}
|
|
81
|
+
});
|
|
82
|
+
|
|
83
|
+
callBackParams = filterList;
|
|
84
|
+
} else {
|
|
85
|
+
if (_module.value instanceof Array) {
|
|
86
|
+
_module.value = _module.value.filter((item) => {
|
|
87
|
+
return item.url !== "cancel";
|
|
88
|
+
});
|
|
89
|
+
} else {
|
|
90
|
+
_module.value = null;
|
|
91
|
+
}
|
|
92
|
+
callBackParams = evt;
|
|
93
|
+
Notification.error(`${evt}`);
|
|
94
|
+
}
|
|
95
|
+
} catch (error) {
|
|
96
|
+
} finally {
|
|
97
|
+
if (!callBackIsLaunch.value) {
|
|
98
|
+
options.uploadEd && options.uploadEd(callBackParams);
|
|
99
|
+
callBackIsLaunch.value = true;
|
|
100
|
+
if (callBackParams instanceof Array) {
|
|
101
|
+
// 只要考虑oss
|
|
102
|
+
if (componentConfig.ossUploadEdAuthCallback instanceof Function) {
|
|
103
|
+
if (callBackParams.length > 0) {
|
|
104
|
+
await componentConfig.ossUploadEdAuthCallback(callBackParams);
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
uploadLoading.value = false;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
|
|
115
|
+
return {
|
|
116
|
+
isMax,
|
|
117
|
+
_module,
|
|
118
|
+
dynamicmount,
|
|
119
|
+
uploadLoading,
|
|
120
|
+
uploadPath,
|
|
121
|
+
callBackIsLaunch,
|
|
122
|
+
setUploadPath,
|
|
123
|
+
inputChange,
|
|
124
|
+
uploadEd,
|
|
125
|
+
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
|
|
131
131
|
export default useHookByUpload;
|