@fmdevui/fm-dev 1.0.40 → 1.0.42
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/es/core/api/base/index.d.ts +7 -1
- package/es/core/api/index.d.ts +0 -1
- package/es/index.mjs +1 -3
- package/es/packages/core/api/base/index.mjs +38 -2
- package/es/packages/core/api/index.mjs +1 -3
- package/es/packages/core/index.mjs +1 -3
- package/index.js +39 -8
- package/index.min.js +25 -25
- package/index.min.mjs +25 -25
- package/index.mjs +39 -8
- package/lib/core/api/base/index.d.ts +7 -1
- package/lib/core/api/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/packages/core/api/base/index.js +38 -1
- package/lib/packages/core/api/index.js +1 -1
- package/lib/packages/core/index.js +1 -1
- package/package.json +1 -1
- /package/es/{component.css → defaults.css} +0 -0
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.42 */
|
|
2
2
|
import { defineComponent, reactive, computed, watch, resolveComponent, createBlock, openBlock, withCtx, createVNode, createElementVNode, createTextVNode, toDisplayString as toDisplayString$1, withDirectives, createElementBlock, Fragment, renderList, vShow, ref, onMounted, nextTick, normalizeStyle, createCommentVNode, normalizeClass, withModifiers, resolveDynamicComponent, effectScope, getCurrentInstance, shallowRef, isRef as isRef$1, inject, onUnmounted, h, Text, markRaw, toRaw as toRaw$1, hasInjectionContext, unref, isReactive as isReactive$1, toRef, getCurrentScope, onScopeDispose, toRefs, resolveDirective } from 'vue';
|
|
3
3
|
import crypto from 'crypto';
|
|
4
4
|
import require$$0 from 'url';
|
|
@@ -29669,13 +29669,14 @@ function request2(config) {
|
|
|
29669
29669
|
});
|
|
29670
29670
|
}
|
|
29671
29671
|
|
|
29672
|
-
const useBaseApi = (module) => {
|
|
29672
|
+
const useBaseApi = (module, options = {}) => {
|
|
29673
29673
|
const baseUrl = `/api/${module}/`;
|
|
29674
29674
|
const request = (config, cancel = false) => {
|
|
29675
29675
|
if (cancel) {
|
|
29676
29676
|
cancelRequest(config.url || "");
|
|
29677
29677
|
return Promise.resolve({});
|
|
29678
29678
|
}
|
|
29679
|
+
config = { ...config, ...options };
|
|
29679
29680
|
return service(config);
|
|
29680
29681
|
};
|
|
29681
29682
|
return {
|
|
@@ -29864,11 +29865,41 @@ const useBaseApi = (module) => {
|
|
|
29864
29865
|
}
|
|
29865
29866
|
};
|
|
29866
29867
|
};
|
|
29867
|
-
|
|
29868
|
-
|
|
29869
|
-
|
|
29870
|
-
|
|
29871
|
-
|
|
29868
|
+
const useApi = (url, options = {}) => {
|
|
29869
|
+
const baseUrl = url || "";
|
|
29870
|
+
const request = (config, cancel = false) => {
|
|
29871
|
+
if (cancel) {
|
|
29872
|
+
cancelRequest(config.url || "");
|
|
29873
|
+
return Promise.resolve({});
|
|
29874
|
+
}
|
|
29875
|
+
config = { ...config, ...options };
|
|
29876
|
+
return service(config);
|
|
29877
|
+
};
|
|
29878
|
+
return {
|
|
29879
|
+
baseUrl,
|
|
29880
|
+
request,
|
|
29881
|
+
post: function(data, action, cancel = false) {
|
|
29882
|
+
return request(
|
|
29883
|
+
{
|
|
29884
|
+
url: baseUrl + action,
|
|
29885
|
+
method: "post",
|
|
29886
|
+
data
|
|
29887
|
+
},
|
|
29888
|
+
cancel
|
|
29889
|
+
);
|
|
29890
|
+
},
|
|
29891
|
+
get: function(params, action, cancel = false) {
|
|
29892
|
+
return request(
|
|
29893
|
+
{
|
|
29894
|
+
url: baseUrl + action,
|
|
29895
|
+
method: "get",
|
|
29896
|
+
params
|
|
29897
|
+
},
|
|
29898
|
+
cancel
|
|
29899
|
+
);
|
|
29900
|
+
}
|
|
29901
|
+
};
|
|
29902
|
+
};
|
|
29872
29903
|
|
|
29873
29904
|
function useSysApi() {
|
|
29874
29905
|
return {
|
|
@@ -52278,4 +52309,4 @@ const version = "1.0.0";
|
|
|
52278
52309
|
|
|
52279
52310
|
const install = installer.install;
|
|
52280
52311
|
|
|
52281
|
-
export { AccountTypeEnum, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast,
|
|
52312
|
+
export { AccountTypeEnum, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, HttpMethodEnum, JobCreateTypeEnum, Local, NextLoading, PUB, Session, Watermark, accessTokenKey, auth, authAll, auths, axiosInstance, base64ToFile, blobToFile, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, clone, commonFunction, commonFunctionObj, dataURLtoBlob, decryptJWT, installer as default, directive, downloadByBase64, downloadByData, downloadByOnlineUrl, downloadByUrl, downloadStreamFile, elSvg, emitter, feature, fileToBase64, formatAxis, formatDate, formatPast, getCountryCode, getFileName, getFileUrl, getJWTDate, getToken, getWeek, hAuth, hAuthAll, hAuths, i18n, install, isObjectValueEqual, iso_3166_1_CountryList, judgementIdCard, judgementSameArr, languageList, mergMessage, openWindow, pinia, refreshAccessTokenKey, removeDuplicate, request2, service, setIntroduction, setupI18n, signatureByKSort, tansParams, urlToBase64, useApi, useBaseApi, useChangeColor, useDateTimeShortCust, useKeepALiveNames, useLoginApi, useRequestOldRoutes, useRoutesList, useSysApi, useTagsViewRoutes, useThemeConfig, useUserInfo, useVxeTable, verifiyNumberInteger, verifyAccount, verifyAndSpace, verifyCarNum, verifyCnAndSpace, verifyEmail, verifyEnAndSpace, verifyFullName, verifyIPAddress, verifyIdCard, verifyNumberCnUppercase, verifyNumberComma, verifyNumberIntegerAndFloat, verifyNumberPercentage, verifyNumberPercentageFloat, verifyPassword, verifyPasswordPowerful, verifyPasswordStrength, verifyPhone, verifyPostalCode, verifyTelPhone, verifyTextColor, verifyUrl, version };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { AxiosRequestConfig, AxiosResponse } from 'axios';
|
|
2
|
-
export declare const useBaseApi: (module: string) => {
|
|
2
|
+
export declare const useBaseApi: (module: string, options?: AxiosRequestConfig) => {
|
|
3
3
|
baseUrl: string;
|
|
4
4
|
request: <T>(config: AxiosRequestConfig<T>, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
5
5
|
pcomm: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
@@ -19,3 +19,9 @@ export declare const useBaseApi: (module: string) => {
|
|
|
19
19
|
importData: (file: any, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
20
20
|
uploadFile: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
21
21
|
};
|
|
22
|
+
export declare const useApi: (url: string, options?: AxiosRequestConfig) => {
|
|
23
|
+
baseUrl: string;
|
|
24
|
+
request: <T>(config: AxiosRequestConfig<T>, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
25
|
+
post: (data: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
26
|
+
get: (params: any, action: string, cancel?: boolean) => Promise<AxiosResponse<any, any>>;
|
|
27
|
+
};
|
package/lib/core/api/index.d.ts
CHANGED
package/lib/index.js
CHANGED
|
@@ -54,7 +54,7 @@ exports.FmTransfer = index$1.FmTransfer;
|
|
|
54
54
|
exports.elSvg = index$2.elSvg;
|
|
55
55
|
exports.FmLogin = index$3.FmLogin;
|
|
56
56
|
exports.NextLoading = index$4.NextLoading;
|
|
57
|
-
exports.
|
|
57
|
+
exports.useApi = index$6.useApi;
|
|
58
58
|
exports.useBaseApi = index$6.useBaseApi;
|
|
59
59
|
exports.feature = index$7.feature;
|
|
60
60
|
exports.useSysApi = index$7.useSysApi;
|
|
@@ -2,13 +2,14 @@
|
|
|
2
2
|
|
|
3
3
|
var request = require('../utils/request.js');
|
|
4
4
|
|
|
5
|
-
const useBaseApi = (module) => {
|
|
5
|
+
const useBaseApi = (module, options = {}) => {
|
|
6
6
|
const baseUrl = `/api/${module}/`;
|
|
7
7
|
const request$1 = (config, cancel = false) => {
|
|
8
8
|
if (cancel) {
|
|
9
9
|
request.cancelRequest(config.url || "");
|
|
10
10
|
return Promise.resolve({});
|
|
11
11
|
}
|
|
12
|
+
config = { ...config, ...options };
|
|
12
13
|
return request.service(config);
|
|
13
14
|
};
|
|
14
15
|
return {
|
|
@@ -197,5 +198,41 @@ const useBaseApi = (module) => {
|
|
|
197
198
|
}
|
|
198
199
|
};
|
|
199
200
|
};
|
|
201
|
+
const useApi = (url, options = {}) => {
|
|
202
|
+
const baseUrl = url || "";
|
|
203
|
+
const request$1 = (config, cancel = false) => {
|
|
204
|
+
if (cancel) {
|
|
205
|
+
request.cancelRequest(config.url || "");
|
|
206
|
+
return Promise.resolve({});
|
|
207
|
+
}
|
|
208
|
+
config = { ...config, ...options };
|
|
209
|
+
return request.service(config);
|
|
210
|
+
};
|
|
211
|
+
return {
|
|
212
|
+
baseUrl,
|
|
213
|
+
request: request$1,
|
|
214
|
+
post: function(data, action, cancel = false) {
|
|
215
|
+
return request$1(
|
|
216
|
+
{
|
|
217
|
+
url: baseUrl + action,
|
|
218
|
+
method: "post",
|
|
219
|
+
data
|
|
220
|
+
},
|
|
221
|
+
cancel
|
|
222
|
+
);
|
|
223
|
+
},
|
|
224
|
+
get: function(params, action, cancel = false) {
|
|
225
|
+
return request$1(
|
|
226
|
+
{
|
|
227
|
+
url: baseUrl + action,
|
|
228
|
+
method: "get",
|
|
229
|
+
params
|
|
230
|
+
},
|
|
231
|
+
cancel
|
|
232
|
+
);
|
|
233
|
+
}
|
|
234
|
+
};
|
|
235
|
+
};
|
|
200
236
|
|
|
237
|
+
exports.useApi = useApi;
|
|
201
238
|
exports.useBaseApi = useBaseApi;
|
|
@@ -32,7 +32,7 @@ var HttpMethodEnum = /* @__PURE__ */ ((HttpMethodEnum2) => {
|
|
|
32
32
|
return HttpMethodEnum2;
|
|
33
33
|
})(HttpMethodEnum || {});
|
|
34
34
|
|
|
35
|
-
exports.
|
|
35
|
+
exports.useApi = index.useApi;
|
|
36
36
|
exports.useBaseApi = index.useBaseApi;
|
|
37
37
|
exports.feature = index$1.feature;
|
|
38
38
|
exports.useSysApi = index$1.useSysApi;
|
|
@@ -64,7 +64,7 @@ exports.hAuths = index$g.hAuths;
|
|
|
64
64
|
exports.useDateTimeShortCust = dateTimeShortCust.useDateTimeShortCust;
|
|
65
65
|
exports.useVxeTable = useVxeTableOptionsHook.useVxeTable;
|
|
66
66
|
exports.elSvg = index$1.elSvg;
|
|
67
|
-
exports.
|
|
67
|
+
exports.useApi = index$5.useApi;
|
|
68
68
|
exports.useBaseApi = index$5.useBaseApi;
|
|
69
69
|
exports.feature = index$6.feature;
|
|
70
70
|
exports.useSysApi = index$6.useSysApi;
|
package/package.json
CHANGED
|
File without changes
|