@fmdevui/fm-dev 1.0.41 → 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 +6 -0
- package/es/core/api/index.d.ts +0 -1
- package/es/{version.css → defaults.css} +1 -2
- package/es/index.mjs +1 -3
- package/es/packages/core/api/base/index.mjs +36 -1
- package/es/packages/core/api/index.mjs +1 -3
- package/es/packages/core/index.mjs +1 -3
- package/index.js +37 -7
- package/index.min.js +25 -25
- package/index.min.mjs +25 -25
- package/index.mjs +37 -7
- package/lib/core/api/base/index.d.ts +6 -0
- package/lib/core/api/index.d.ts +0 -1
- package/lib/index.js +1 -1
- package/lib/packages/core/api/base/index.js +36 -0
- package/lib/packages/core/api/index.js +1 -1
- package/lib/packages/core/index.js +1 -1
- package/package.json +1 -1
|
@@ -19,3 +19,9 @@ export declare const useBaseApi: (module: string, options?: AxiosRequestConfig)
|
|
|
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/es/core/api/index.d.ts
CHANGED
|
@@ -1,2 +1 @@
|
|
|
1
|
-
|
|
2
|
-
.drag_verify[data-v-9e8c9ed2]{background-color:#e8e8e8;overflow:hidden;position:relative;text-align:center}.drag_verify .dv_handler[data-v-9e8c9ed2]{cursor:move;left:0;position:absolute;top:0}.drag_verify .dv_handler i[data-v-9e8c9ed2]{color:#666;font-size:16px;padding-left:0}.drag_verify .dv_handler .el-icon-circle-check[data-v-9e8c9ed2]{color:#6c6;margin-top:9px}.drag_verify .dv_progress_bar[data-v-9e8c9ed2]{height:34px;position:absolute;width:0}.drag_verify .dv_text[data-v-9e8c9ed2]{background:-webkit-gradient(linear,left top,right top,color-stop(0,var(--textColor)),color-stop(.4,var(--textColor)),color-stop(.5,#fff),color-stop(.6,var(--textColor)),color-stop(1,var(--textColor)));-webkit-background-clip:text;color:transparent;position:absolute;top:0;-moz-user-select:none;-webkit-user-select:none;user-select:none;-o-user-select:none;-ms-user-select:none;-webkit-text-fill-color:transparent;-webkit-text-size-adjust:none;animation:slidetounlock 3s infinite}.drag_verify .dv_text[data-v-9e8c9ed2] *{-webkit-text-fill-color:var(--textColor)}.goFirst[data-v-9e8c9ed2]{left:0!important;transition:left .5s}.goOrigin[data-v-9e8c9ed2]{transition:transform .5s}.goKeep[data-v-9e8c9ed2]{transition:left .2s}.goFirst2[data-v-9e8c9ed2]{transition:width .5s;width:0!important}.drag-verify-container[data-v-9e8c9ed2]{border-radius:50%;line-height:0;position:relative}.move-bar[data-v-9e8c9ed2]{position:absolute;z-index:100}.clip-bar[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.8);position:absolute}.refresh[data-v-9e8c9ed2]{cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px;z-index:200}.tips[data-v-9e8c9ed2]{bottom:25px;font-size:12px;height:20px;line-height:20px;position:absolute;text-align:center;width:100%;z-index:200}.tips.success[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.6);color:green}.tips.danger[data-v-9e8c9ed2]{background:rgba(0,0,0,.6);color:#ff0}.check-img[data-v-9e8c9ed2]{border-radius:50%;width:100%}
|
|
1
|
+
.drag_verify[data-v-9e8c9ed2]{background-color:#e8e8e8;overflow:hidden;position:relative;text-align:center}.drag_verify .dv_handler[data-v-9e8c9ed2]{cursor:move;left:0;position:absolute;top:0}.drag_verify .dv_handler i[data-v-9e8c9ed2]{color:#666;font-size:16px;padding-left:0}.drag_verify .dv_handler .el-icon-circle-check[data-v-9e8c9ed2]{color:#6c6;margin-top:9px}.drag_verify .dv_progress_bar[data-v-9e8c9ed2]{height:34px;position:absolute;width:0}.drag_verify .dv_text[data-v-9e8c9ed2]{background:-webkit-gradient(linear,left top,right top,color-stop(0,var(--textColor)),color-stop(.4,var(--textColor)),color-stop(.5,#fff),color-stop(.6,var(--textColor)),color-stop(1,var(--textColor)));-webkit-background-clip:text;color:transparent;position:absolute;top:0;-moz-user-select:none;-webkit-user-select:none;user-select:none;-o-user-select:none;-ms-user-select:none;-webkit-text-fill-color:transparent;-webkit-text-size-adjust:none;animation:slidetounlock 3s infinite}.drag_verify .dv_text[data-v-9e8c9ed2] *{-webkit-text-fill-color:var(--textColor)}.goFirst[data-v-9e8c9ed2]{left:0!important;transition:left .5s}.goOrigin[data-v-9e8c9ed2]{transition:transform .5s}.goKeep[data-v-9e8c9ed2]{transition:left .2s}.goFirst2[data-v-9e8c9ed2]{transition:width .5s;width:0!important}.drag-verify-container[data-v-9e8c9ed2]{border-radius:50%;line-height:0;position:relative}.move-bar[data-v-9e8c9ed2]{position:absolute;z-index:100}.clip-bar[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.8);position:absolute}.refresh[data-v-9e8c9ed2]{cursor:pointer;font-size:20px;position:absolute;right:5px;top:5px;z-index:200}.tips[data-v-9e8c9ed2]{bottom:25px;font-size:12px;height:20px;line-height:20px;position:absolute;text-align:center;width:100%;z-index:200}.tips.success[data-v-9e8c9ed2]{background:hsla(0,0%,100%,.6);color:green}.tips.danger[data-v-9e8c9ed2]{background:rgba(0,0,0,.6);color:#ff0}.check-img[data-v-9e8c9ed2]{border-radius:50%;width:100%}
|
package/es/index.mjs
CHANGED
|
@@ -7,9 +7,7 @@ export { FmDragImg, FmNoticeBar, FmTransfer } from './packages/core/ui/component
|
|
|
7
7
|
export { elSvg } from './packages/core/ui/components/svgIcon/index.mjs';
|
|
8
8
|
export { FmLogin } from './packages/core/ui/login/index.mjs';
|
|
9
9
|
export { NextLoading } from './packages/core/ui/loading/index.mjs';
|
|
10
|
-
|
|
11
|
-
export { index as getApi };
|
|
12
|
-
export { useBaseApi } from './packages/core/api/base/index.mjs';
|
|
10
|
+
export { useApi, useBaseApi } from './packages/core/api/base/index.mjs';
|
|
13
11
|
export { feature, useSysApi } from './packages/core/api/sys/index.mjs';
|
|
14
12
|
export { useLoginApi } from './packages/core/api/login/index.mjs';
|
|
15
13
|
export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getJWTDate, getToken, refreshAccessTokenKey, request2, service, tansParams } from './packages/core/api/utils/request.mjs';
|
|
@@ -196,5 +196,40 @@ const useBaseApi = (module, options = {}) => {
|
|
|
196
196
|
}
|
|
197
197
|
};
|
|
198
198
|
};
|
|
199
|
+
const useApi = (url, options = {}) => {
|
|
200
|
+
const baseUrl = url || "";
|
|
201
|
+
const request = (config, cancel = false) => {
|
|
202
|
+
if (cancel) {
|
|
203
|
+
cancelRequest(config.url || "");
|
|
204
|
+
return Promise.resolve({});
|
|
205
|
+
}
|
|
206
|
+
config = { ...config, ...options };
|
|
207
|
+
return service(config);
|
|
208
|
+
};
|
|
209
|
+
return {
|
|
210
|
+
baseUrl,
|
|
211
|
+
request,
|
|
212
|
+
post: function(data, action, cancel = false) {
|
|
213
|
+
return request(
|
|
214
|
+
{
|
|
215
|
+
url: baseUrl + action,
|
|
216
|
+
method: "post",
|
|
217
|
+
data
|
|
218
|
+
},
|
|
219
|
+
cancel
|
|
220
|
+
);
|
|
221
|
+
},
|
|
222
|
+
get: function(params, action, cancel = false) {
|
|
223
|
+
return request(
|
|
224
|
+
{
|
|
225
|
+
url: baseUrl + action,
|
|
226
|
+
method: "get",
|
|
227
|
+
params
|
|
228
|
+
},
|
|
229
|
+
cancel
|
|
230
|
+
);
|
|
231
|
+
}
|
|
232
|
+
};
|
|
233
|
+
};
|
|
199
234
|
|
|
200
|
-
export { useBaseApi };
|
|
235
|
+
export { useApi, useBaseApi };
|
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
export { index as getApi };
|
|
3
|
-
export { useBaseApi } from './base/index.mjs';
|
|
1
|
+
export { useApi, useBaseApi } from './base/index.mjs';
|
|
4
2
|
export { feature, useSysApi } from './sys/index.mjs';
|
|
5
3
|
export { useLoginApi } from './login/index.mjs';
|
|
6
4
|
export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getJWTDate, getToken, refreshAccessTokenKey, request2, service, tansParams } from './utils/request.mjs';
|
|
@@ -11,9 +11,7 @@ export { useDateTimeShortCust } from './hook/dateTimeShortCust.mjs';
|
|
|
11
11
|
export { useVxeTable } from './hook/useVxeTableOptionsHook.mjs';
|
|
12
12
|
import './types/index.mjs';
|
|
13
13
|
export { elSvg } from './ui/components/svgIcon/index.mjs';
|
|
14
|
-
|
|
15
|
-
export { index as getApi };
|
|
16
|
-
export { useBaseApi } from './api/base/index.mjs';
|
|
14
|
+
export { useApi, useBaseApi } from './api/base/index.mjs';
|
|
17
15
|
export { feature, useSysApi } from './api/sys/index.mjs';
|
|
18
16
|
export { useLoginApi } from './api/login/index.mjs';
|
|
19
17
|
export { accessTokenKey, axiosInstance, cancelAllRequest, cancelRequest, clearAccessTokens, clearTokens, decryptJWT, getJWTDate, getToken, refreshAccessTokenKey, request2, service, tansParams } from './api/utils/request.mjs';
|
package/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
1
|
+
/*! fm-dev v1.0.42 */
|
|
2
2
|
(function (global, factory) {
|
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? factory(exports, require('vue'), require('crypto'), require('url'), require('http'), require('https'), require('util'), require('stream'), require('assert'), require('zlib'), require('element-plus')) :
|
|
4
4
|
typeof define === 'function' && define.amd ? define(['exports', 'vue', 'crypto', 'url', 'http', 'https', 'util', 'stream', 'assert', 'zlib', 'element-plus'], factory) :
|
|
@@ -29860,11 +29860,41 @@
|
|
|
29860
29860
|
}
|
|
29861
29861
|
};
|
|
29862
29862
|
};
|
|
29863
|
-
|
|
29864
|
-
|
|
29865
|
-
|
|
29866
|
-
|
|
29867
|
-
|
|
29863
|
+
const useApi = (url, options = {}) => {
|
|
29864
|
+
const baseUrl = url || "";
|
|
29865
|
+
const request = (config, cancel = false) => {
|
|
29866
|
+
if (cancel) {
|
|
29867
|
+
cancelRequest(config.url || "");
|
|
29868
|
+
return Promise.resolve({});
|
|
29869
|
+
}
|
|
29870
|
+
config = { ...config, ...options };
|
|
29871
|
+
return service(config);
|
|
29872
|
+
};
|
|
29873
|
+
return {
|
|
29874
|
+
baseUrl,
|
|
29875
|
+
request,
|
|
29876
|
+
post: function(data, action, cancel = false) {
|
|
29877
|
+
return request(
|
|
29878
|
+
{
|
|
29879
|
+
url: baseUrl + action,
|
|
29880
|
+
method: "post",
|
|
29881
|
+
data
|
|
29882
|
+
},
|
|
29883
|
+
cancel
|
|
29884
|
+
);
|
|
29885
|
+
},
|
|
29886
|
+
get: function(params, action, cancel = false) {
|
|
29887
|
+
return request(
|
|
29888
|
+
{
|
|
29889
|
+
url: baseUrl + action,
|
|
29890
|
+
method: "get",
|
|
29891
|
+
params
|
|
29892
|
+
},
|
|
29893
|
+
cancel
|
|
29894
|
+
);
|
|
29895
|
+
}
|
|
29896
|
+
};
|
|
29897
|
+
};
|
|
29868
29898
|
|
|
29869
29899
|
function useSysApi() {
|
|
29870
29900
|
return {
|
|
@@ -52316,7 +52346,6 @@
|
|
|
52316
52346
|
exports.formatAxis = formatAxis;
|
|
52317
52347
|
exports.formatDate = formatDate;
|
|
52318
52348
|
exports.formatPast = formatPast;
|
|
52319
|
-
exports.getApi = index;
|
|
52320
52349
|
exports.getCountryCode = getCountryCode;
|
|
52321
52350
|
exports.getFileName = getFileName;
|
|
52322
52351
|
exports.getFileUrl = getFileUrl;
|
|
@@ -52345,6 +52374,7 @@
|
|
|
52345
52374
|
exports.signatureByKSort = signatureByKSort;
|
|
52346
52375
|
exports.tansParams = tansParams;
|
|
52347
52376
|
exports.urlToBase64 = urlToBase64;
|
|
52377
|
+
exports.useApi = useApi;
|
|
52348
52378
|
exports.useBaseApi = useBaseApi;
|
|
52349
52379
|
exports.useChangeColor = useChangeColor;
|
|
52350
52380
|
exports.useDateTimeShortCust = useDateTimeShortCust;
|