iv-npm 1.1.38 → 1.1.41
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/package.json +1 -1
- package/packages/shared/dist/utils/index.d.ts +14 -1
- package/packages/shared/dist/utils/index.mjs +64 -2
- package/packages/ui/dist/api/api.config.d.ts +8 -0
- package/packages/ui/dist/business-ui/component/IVMrpVendorSelector.d.ts +20 -0
- package/packages/ui/dist/business-ui/index.d.ts +2 -1
- package/packages/ui/dist/index.cjs.js +811 -142
- package/packages/ui/dist/index.d.ts +2 -2
- package/packages/ui/dist/index.esm.js +802 -134
- package/packages/ui/dist/index.umd.js +811 -142
- package/packages/ui/dist/index.umd.js.map +1 -1
package/package.json
CHANGED
|
@@ -46,4 +46,17 @@ declare function filterOptionHeadle(input: string, option: any): any;
|
|
|
46
46
|
|
|
47
47
|
declare function buildURL(url: string, params: any): string;
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
declare type formatType = {
|
|
50
|
+
date: string;
|
|
51
|
+
time: string;
|
|
52
|
+
week: string;
|
|
53
|
+
};
|
|
54
|
+
/**
|
|
55
|
+
* 函数重载,根据不同参数返回不同类型
|
|
56
|
+
*/
|
|
57
|
+
declare function dateFormat(): formatType;
|
|
58
|
+
declare function dateFormat(data: Date | string, format: string): string;
|
|
59
|
+
declare function yearMonthFormat(data?: Date): string | formatType;
|
|
60
|
+
declare function yearMonthDayFormat(data?: Date): string | formatType;
|
|
61
|
+
|
|
62
|
+
export { arrToTree, assign, buildURL as buildUrl, dateFormat, filterOptionHeadle, findTree, formatType, isDate, isObject, isPlainObject, isURLSearchParams, tranListToTreeData, yearMonthDayFormat, yearMonthFormat };
|
|
@@ -74,7 +74,7 @@ function filterOptionHeadle(input, option) {
|
|
|
74
74
|
return option.label && option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
|
|
75
75
|
}
|
|
76
76
|
|
|
77
|
-
// utils/buildUrl.ts
|
|
77
|
+
// utils/format/buildUrl.ts
|
|
78
78
|
function encode(val) {
|
|
79
79
|
return encodeURIComponent(val).replace(/%40/g, "@").replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
80
80
|
}
|
|
@@ -114,15 +114,77 @@ function buildURL(url, params) {
|
|
|
114
114
|
url += (url.includes("?") ? "&" : "?") + parts.join("&");
|
|
115
115
|
return url;
|
|
116
116
|
}
|
|
117
|
+
|
|
118
|
+
// utils/format/dateFormat.ts
|
|
119
|
+
function dateFormat(data, format) {
|
|
120
|
+
const weekList = [
|
|
121
|
+
"\u661F\u671F\u65E5",
|
|
122
|
+
"\u661F\u671F\u4E00",
|
|
123
|
+
"\u661F\u671F\u4E8C",
|
|
124
|
+
"\u661F\u671F\u4E09",
|
|
125
|
+
"\u661F\u671F\u56DB",
|
|
126
|
+
"\u661F\u671F\u4E94",
|
|
127
|
+
"\u661F\u671F\u516D"
|
|
128
|
+
];
|
|
129
|
+
const now = data ? new Date(data) : new Date();
|
|
130
|
+
let year = now.getFullYear();
|
|
131
|
+
let month = now.getMonth() + 1;
|
|
132
|
+
month = month < 10 ? "0" + month : month;
|
|
133
|
+
let day = now.getDate();
|
|
134
|
+
day = day < 10 ? "0" + day : day;
|
|
135
|
+
let hours = now.getHours();
|
|
136
|
+
hours = hours < 10 ? "0" + hours : hours;
|
|
137
|
+
let minutes = now.getMinutes();
|
|
138
|
+
minutes = minutes < 10 ? "0" + minutes : minutes;
|
|
139
|
+
let seconds = now.getSeconds();
|
|
140
|
+
seconds = seconds < 10 ? "0" + seconds : seconds;
|
|
141
|
+
let week = weekList[now.getDay()];
|
|
142
|
+
if (format) {
|
|
143
|
+
format = format.replace(/YYYY/, String(year)).replace(/MM/, String(month)).replace(/DD/, String(day)).replace(/hh/, String(hours)).replace(/mm/, String(minutes)).replace(/ss/, String(seconds));
|
|
144
|
+
return format;
|
|
145
|
+
} else {
|
|
146
|
+
return {
|
|
147
|
+
date: `${year}\u5E74${month}\u6708${day}`,
|
|
148
|
+
time: `${hours}:${minutes}:${seconds}`,
|
|
149
|
+
week
|
|
150
|
+
};
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function yearMonthFormat(data) {
|
|
154
|
+
if (data) {
|
|
155
|
+
const now = data ? new Date(data) : new Date();
|
|
156
|
+
let year = now.getFullYear();
|
|
157
|
+
let month = now.getMonth() + 1;
|
|
158
|
+
month = month;
|
|
159
|
+
return `${year}\u5E74${month}\u6708`;
|
|
160
|
+
} else {
|
|
161
|
+
return "";
|
|
162
|
+
}
|
|
163
|
+
}
|
|
164
|
+
function yearMonthDayFormat(data) {
|
|
165
|
+
if (data) {
|
|
166
|
+
const now = data ? new Date(data) : new Date();
|
|
167
|
+
let year = now.getFullYear();
|
|
168
|
+
let month = now.getMonth() + 1;
|
|
169
|
+
let day = now.getDate();
|
|
170
|
+
month = month;
|
|
171
|
+
return `${year}\u5E74${month}\u6708${day}\u65E5`;
|
|
172
|
+
} else {
|
|
173
|
+
return "";
|
|
174
|
+
}
|
|
175
|
+
}
|
|
117
176
|
export {
|
|
118
177
|
arrToTree,
|
|
119
178
|
assign,
|
|
120
179
|
buildURL as buildUrl,
|
|
180
|
+
dateFormat,
|
|
121
181
|
filterOptionHeadle,
|
|
122
182
|
findTree,
|
|
123
183
|
isDate,
|
|
124
184
|
isObject,
|
|
125
185
|
isPlainObject,
|
|
126
186
|
isURLSearchParams,
|
|
127
|
-
tranListToTreeData
|
|
187
|
+
tranListToTreeData,
|
|
188
|
+
yearMonthDayFormat,
|
|
189
|
+
yearMonthFormat
|
|
128
190
|
};
|
|
@@ -24,6 +24,14 @@ declare const API_OPTION: {
|
|
|
24
24
|
url: string;
|
|
25
25
|
option: any;
|
|
26
26
|
};
|
|
27
|
+
getIVMrpVendorSelector: {
|
|
28
|
+
url: string;
|
|
29
|
+
option: any;
|
|
30
|
+
};
|
|
31
|
+
getIVMrpVendorSelector_VendorType: {
|
|
32
|
+
url: string;
|
|
33
|
+
option: any;
|
|
34
|
+
};
|
|
27
35
|
};
|
|
28
36
|
export declare const formatHTTP: (fetch: any) => Promise<any>;
|
|
29
37
|
export declare const formatUrl: (base: string, api: string, params?: object) => string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* 组件定义-------------------------------------
|
|
3
|
+
* */
|
|
4
|
+
declare const _default: import("vue").DefineComponent<{
|
|
5
|
+
show: {
|
|
6
|
+
type: BooleanConstructor;
|
|
7
|
+
required: true;
|
|
8
|
+
};
|
|
9
|
+
}, (_ctx: any, _cache: any) => import("vue").VNode<import("vue").RendererNode, import("vue").RendererElement, {
|
|
10
|
+
[key: string]: any;
|
|
11
|
+
}>, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:show" | "getItem")[], "update:show" | "getItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
|
12
|
+
show: {
|
|
13
|
+
type: BooleanConstructor;
|
|
14
|
+
required: true;
|
|
15
|
+
};
|
|
16
|
+
}>> & {
|
|
17
|
+
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
|
18
|
+
onGetItem?: ((...args: any[]) => any) | undefined;
|
|
19
|
+
}, {}>;
|
|
20
|
+
export default _default;
|
|
@@ -4,4 +4,5 @@ import IVMrpLineDropdown from "./component/IVMrpLineDropdown.vue";
|
|
|
4
4
|
import IVMrpSetofbookDropdown from "./component/IVMrpSetofbookDropdown.vue";
|
|
5
5
|
import IVMrpPostDropdown from "./component/IVMrpPostDropdown.vue";
|
|
6
6
|
import IVMrpUserSelector from "./component/IVMrpUserSelector.vue";
|
|
7
|
-
|
|
7
|
+
import IVMrpVendorSelector from "./component/IVMrpVendorSelector.vue";
|
|
8
|
+
export { IVMrpOrgDropdown, IVMrpProdBaseDropdown, IVMrpLineDropdown, IVMrpSetofbookDropdown, IVMrpPostDropdown, IVMrpUserSelector, IVMrpVendorSelector, };
|