@fmdevui/fm-dev 1.0.40 → 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/es/core/api/base/index.d.ts +1 -1
- package/es/packages/core/api/base/index.mjs +2 -1
- package/es/{component.css → version.css} +2 -1
- package/index.js +3 -2
- package/index.min.js +2 -2
- package/index.min.mjs +2 -2
- package/index.mjs +3 -2
- package/lib/core/api/base/index.d.ts +1 -1
- package/lib/packages/core/api/base/index.js +2 -1
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/*! fm-dev v1.0.
|
|
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 {
|
|
@@ -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>>;
|
|
@@ -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 {
|