mirror of
https://github.com/m-xlsea/ruoyi-plus-soybean.git
synced 2025-09-24 07:49:47 +08:00
build(projects): 更换eslint依赖为eslint-config-soybeanjs-vue
This commit is contained in:
@ -82,7 +82,7 @@ function formatNumber(num: number | string) {
|
||||
}
|
||||
const { decimals, decimal, separator, suffix, prefix } = props;
|
||||
let number = Number(num).toFixed(decimals);
|
||||
number += '';
|
||||
number = String(number);
|
||||
|
||||
const x = number.split('.');
|
||||
let x1 = x[0];
|
||||
|
@ -33,13 +33,13 @@ export function createRequest(axiosConfig: AxiosRequestConfig, backendConfig?: S
|
||||
const { url } = param;
|
||||
const method = param.method || 'get';
|
||||
const { instance } = customInstance;
|
||||
const res = (await getRequestResponse(
|
||||
const res = (await getRequestResponse({
|
||||
instance,
|
||||
method,
|
||||
url,
|
||||
param.data,
|
||||
param.axiosConfig
|
||||
)) as Service.RequestResult<T>;
|
||||
data: param.data,
|
||||
config: param.axiosConfig
|
||||
})) as Service.RequestResult<T>;
|
||||
|
||||
return res;
|
||||
}
|
||||
@ -132,7 +132,9 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig
|
||||
const method = param.method || 'get';
|
||||
const { instance } = customInstance;
|
||||
|
||||
getRequestResponse(instance, method, url, param.data, param.axiosConfig).then(handleRequestResult);
|
||||
getRequestResponse({ instance, method, url, data: param.data, config: param.axiosConfig }).then(
|
||||
handleRequestResult
|
||||
);
|
||||
|
||||
return {
|
||||
data,
|
||||
@ -187,13 +189,15 @@ export function createHookRequest(axiosConfig: AxiosRequestConfig, backendConfig
|
||||
};
|
||||
}
|
||||
|
||||
async function getRequestResponse(
|
||||
instance: AxiosInstance,
|
||||
method: RequestMethod,
|
||||
url: string,
|
||||
data?: any,
|
||||
config?: AxiosRequestConfig
|
||||
) {
|
||||
async function getRequestResponse(params: {
|
||||
instance: AxiosInstance;
|
||||
method: RequestMethod;
|
||||
url: string;
|
||||
data?: any;
|
||||
config?: AxiosRequestConfig;
|
||||
}) {
|
||||
const { instance, method, url, data, config } = params;
|
||||
|
||||
let res: any;
|
||||
if (method === 'get' || method === 'delete') {
|
||||
res = await instance[method](url, config);
|
||||
|
@ -287,7 +287,7 @@ function renderScatterChart() {
|
||||
chart.axis('GDP', {
|
||||
label: {
|
||||
formatter(value) {
|
||||
return `${(+value / 1000).toFixed(0)}k`;
|
||||
return `${(Number(value) / 1000).toFixed(0)}k`;
|
||||
} // 格式化坐标轴的显示
|
||||
}
|
||||
});
|
||||
|
@ -294,7 +294,7 @@ const pictorialBarOption = ref<ECOption>(getPictorialBarOption());
|
||||
const { domRef: pictorialBarRef } = useEcharts(pictorialBarOption);
|
||||
function getPictorialBarOption(): ECOption {
|
||||
const category: string[] = [];
|
||||
let dottedBase = +new Date();
|
||||
let dottedBase = Number(new Date());
|
||||
const lineData: number[] = [];
|
||||
const barData: number[] = [];
|
||||
|
||||
|
Reference in New Issue
Block a user