@fmdevui/fm-dev 1.0.39 → 1.0.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/index.mjs CHANGED
@@ -1,4 +1,4 @@
1
- /*! fm-dev v1.0.39 */
1
+ /*! fm-dev v1.0.41 */
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 {
@@ -30114,6 +30115,18 @@ var JobCreateTypeEnum = /* @__PURE__ */ ((JobCreateTypeEnum2) => {
30114
30115
  JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_2"] = 2] = "NUMBER_2";
30115
30116
  return JobCreateTypeEnum2;
30116
30117
  })(JobCreateTypeEnum || {});
30118
+ var HttpMethodEnum = /* @__PURE__ */ ((HttpMethodEnum2) => {
30119
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_0"] = 0] = "NUMBER_0";
30120
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_1"] = 1] = "NUMBER_1";
30121
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_2"] = 2] = "NUMBER_2";
30122
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_3"] = 3] = "NUMBER_3";
30123
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_4"] = 4] = "NUMBER_4";
30124
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_5"] = 5] = "NUMBER_5";
30125
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_6"] = 6] = "NUMBER_6";
30126
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_7"] = 7] = "NUMBER_7";
30127
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_8"] = 8] = "NUMBER_8";
30128
+ return HttpMethodEnum2;
30129
+ })(HttpMethodEnum || {});
30117
30130
 
30118
30131
  var __create$1 = Object.create;
30119
30132
  var __defProp$1 = Object.defineProperty;
@@ -52266,4 +52279,4 @@ const version = "1.0.0";
52266
52279
 
52267
52280
  const install = installer.install;
52268
52281
 
52269
- export { AccountTypeEnum, FmDragImg, FmLogin, FmNoticeBar, FmTransfer, 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, index as getApi, 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, 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 };
52282
+ 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, index as getApi, 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, 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>>;
@@ -20,3 +20,19 @@ export declare enum JobCreateTypeEnum {
20
20
  NUMBER_1 = 1,
21
21
  NUMBER_2 = 2
22
22
  }
23
+ /**
24
+ * HTTP请求方法枚举<br />&nbsp;HTTP \"GET\" method. Get = 0<br />&nbsp;HTTP \"POST\" method. Post = 1<br />&nbsp; HTTP \"PUT\" method. Put = 2<br />&nbsp;HTTP \"DELETE\" method. Delete = 3<br />&nbsp;HTTP \"PATCH\" method. Patch = 4<br />&nbsp;HTTP \"HEAD\" method. Head = 5<br />&nbsp;HTTP \"OPTIONS\" method. Options = 6<br />&nbsp; HTTP \"TRACE\" method. Trace = 7<br />&nbsp;HTTP \"CONNECT\" method. Connect = 8<br />
25
+ * @export
26
+ * @enum {string}
27
+ */
28
+ export declare enum HttpMethodEnum {
29
+ NUMBER_0 = 0,
30
+ NUMBER_1 = 1,
31
+ NUMBER_2 = 2,
32
+ NUMBER_3 = 3,
33
+ NUMBER_4 = 4,
34
+ NUMBER_5 = 5,
35
+ NUMBER_6 = 6,
36
+ NUMBER_7 = 7,
37
+ NUMBER_8 = 8
38
+ }
package/lib/index.js CHANGED
@@ -73,6 +73,7 @@ exports.request2 = request.request2;
73
73
  exports.service = request.service;
74
74
  exports.tansParams = request.tansParams;
75
75
  exports.AccountTypeEnum = index$5.AccountTypeEnum;
76
+ exports.HttpMethodEnum = index$5.HttpMethodEnum;
76
77
  exports.JobCreateTypeEnum = index$5.JobCreateTypeEnum;
77
78
  exports.directive = index$9.directive;
78
79
  exports.getCountryCode = index$a.getCountryCode;
@@ -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 {
@@ -19,6 +19,18 @@ var JobCreateTypeEnum = /* @__PURE__ */ ((JobCreateTypeEnum2) => {
19
19
  JobCreateTypeEnum2[JobCreateTypeEnum2["NUMBER_2"] = 2] = "NUMBER_2";
20
20
  return JobCreateTypeEnum2;
21
21
  })(JobCreateTypeEnum || {});
22
+ var HttpMethodEnum = /* @__PURE__ */ ((HttpMethodEnum2) => {
23
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_0"] = 0] = "NUMBER_0";
24
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_1"] = 1] = "NUMBER_1";
25
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_2"] = 2] = "NUMBER_2";
26
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_3"] = 3] = "NUMBER_3";
27
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_4"] = 4] = "NUMBER_4";
28
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_5"] = 5] = "NUMBER_5";
29
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_6"] = 6] = "NUMBER_6";
30
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_7"] = 7] = "NUMBER_7";
31
+ HttpMethodEnum2[HttpMethodEnum2["NUMBER_8"] = 8] = "NUMBER_8";
32
+ return HttpMethodEnum2;
33
+ })(HttpMethodEnum || {});
22
34
 
23
35
  exports.getApi = index;
24
36
  exports.useBaseApi = index.useBaseApi;
@@ -39,4 +51,5 @@ exports.request2 = request.request2;
39
51
  exports.service = request.service;
40
52
  exports.tansParams = request.tansParams;
41
53
  exports.AccountTypeEnum = AccountTypeEnum;
54
+ exports.HttpMethodEnum = HttpMethodEnum;
42
55
  exports.JobCreateTypeEnum = JobCreateTypeEnum;
@@ -46,6 +46,7 @@ exports.FmTransfer = index.FmTransfer;
46
46
  exports.FmLogin = index$2.FmLogin;
47
47
  exports.NextLoading = index$3.NextLoading;
48
48
  exports.AccountTypeEnum = index$4.AccountTypeEnum;
49
+ exports.HttpMethodEnum = index$4.HttpMethodEnum;
49
50
  exports.JobCreateTypeEnum = index$4.JobCreateTypeEnum;
50
51
  exports.directive = index$8.directive;
51
52
  exports.getCountryCode = index$9.getCountryCode;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fmdevui/fm-dev",
3
- "version": "1.0.39",
3
+ "version": "1.0.41",
4
4
  "description": "Page level components developed based on Element Plus.",
5
5
  "author": "fmdevui",
6
6
  "keywords": [