mirror of
https://github.com/continew-org/continew-admin-ui.git
synced 2025-09-18 08:57:08 +08:00
refactor: eslint src --fix
This commit is contained in:
@@ -61,7 +61,7 @@ http.interceptors.response.use(
|
||||
(response: AxiosResponse) => {
|
||||
const { data } = response
|
||||
const { success, code, msg } = data
|
||||
if(response.request.responseType==='blob'){
|
||||
if (response.request.responseType === 'blob') {
|
||||
NProgress.done()
|
||||
return response
|
||||
}
|
||||
@@ -186,4 +186,4 @@ const download = <T = any>(url: string, params?: object, config?: AxiosRequestCo
|
||||
...config
|
||||
})
|
||||
}
|
||||
export default { get, post, put, patch, del, request, requestNative,download }
|
||||
export default { get, post, put, patch, del, request, requestNative, download }
|
||||
|
@@ -1,7 +1,7 @@
|
||||
import { isExternal } from "@/utils/validate";
|
||||
import { browse, mapTree } from "xe-utils";
|
||||
import _ from "lodash";
|
||||
import { Message } from "@arco-design/web-vue";
|
||||
import { isExternal } from '@/utils/validate'
|
||||
import { browse, mapTree } from 'xe-utils'
|
||||
import _ from 'lodash'
|
||||
import { Message } from '@arco-design/web-vue'
|
||||
|
||||
export function getProperty<T, K extends keyof T>(obj: T, key: K): T[K] {
|
||||
return obj[key]
|
||||
@@ -76,7 +76,7 @@ export function isEmpty(data: unknown) {
|
||||
if (data === '' || data === 'undefined' || data === undefined || data === null || data === 'null') {
|
||||
return true
|
||||
}
|
||||
return JSON.stringify(data) == '{}' || JSON.stringify(data) == '[]' || JSON.stringify(data) == '[{}]';
|
||||
return JSON.stringify(data) == '{}' || JSON.stringify(data) == '[]' || JSON.stringify(data) == '[{}]'
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -243,12 +243,12 @@ export const formatFileSize = (fileSize: number) => {
|
||||
const size = srcSize / 1024 ** index
|
||||
return `${size.toFixed(2)} ${unitArr[index]}`
|
||||
}
|
||||
export const copyText =(text:any) =>{
|
||||
const textarea = document.createElement('textarea');
|
||||
textarea.value = text;
|
||||
document.body.appendChild(textarea);
|
||||
textarea.select();
|
||||
document.execCommand('copy');
|
||||
document.body.removeChild(textarea);
|
||||
export const copyText = (text: any) => {
|
||||
const textarea = document.createElement('textarea')
|
||||
textarea.value = text
|
||||
document.body.appendChild(textarea)
|
||||
textarea.select()
|
||||
document.execCommand('copy')
|
||||
document.body.removeChild(textarea)
|
||||
Message.success('复制成功')
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user