前端eslint调整

This commit is contained in:
piexlMax
2023-09-14 18:47:47 +08:00
parent 636204bbaf
commit a4f86354d3
64 changed files with 3302 additions and 1096 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
import { useRoute } from 'vue-router'
import { reactive } from 'vue'
export const useBtnAuth = () => {
const route = useRoute()
return route.meta.btns || reactive({})
const route = useRoute()
return route.meta.btns || reactive({})
}
+2 -2
View File
@@ -1,3 +1,3 @@
export const toDoc = (url)=>{
window.open(url, '_blank')
export const toDoc = (url) => {
window.open(url, '_blank')
}
+9 -10
View File
@@ -29,19 +29,19 @@ export const getDictFunc = async(type) => {
const path = import.meta.env.VITE_BASE_PATH + ':' + import.meta.env.VITE_SERVER_PORT + '/'
export const ReturnArrImg = (arr) => {
let imgArr = []
if (arr instanceof Array){ // 如果是数组类型
for (let arrKey in arr) {
if (arr[arrKey].slice(0, 4) !== 'http'){
const imgArr = []
if (arr instanceof Array) { // 如果是数组类型
for (const arrKey in arr) {
if (arr[arrKey].slice(0, 4) !== 'http') {
imgArr.push(path + arr[arrKey])
}else {
} else {
imgArr.push(arr[arrKey])
}
}
}else { // 如果不是数组类型
if (arr.slice(0, 4) !== 'http'){
} else { // 如果不是数组类型
if (arr.slice(0, 4) !== 'http') {
imgArr.push(path + arr)
}else {
} else {
imgArr.push(arr)
}
}
@@ -50,5 +50,4 @@ export const ReturnArrImg = (arr) => {
export const onDownloadFile = (url) => {
window.open(path + url)
}
}