first commit

This commit is contained in:
编码猿
2024-09-27 01:07:59 +08:00
commit 6cd216628a
162 changed files with 21879 additions and 0 deletions

View File

@@ -0,0 +1 @@
5ece4847-cc3c-47b0-ab09-a1dd2e1a2077

View File

@@ -0,0 +1,44 @@
import { Loading } from 'element-ui'
const loadings = []
const fbloading = {
open(el, text) {
if (!el) {
return
}
this.close(el)
const currentloading = Loading.service({
target: el,
fullscreen: false,
spinner: 'el-icon-loading',
text: text || '',
})
currentloading._el = el
loadings.push(currentloading)
},
close(el) {
if (!el) {
while (loadings.length !== 0) {
let currentloading = loadings.shift()
if (currentloading != null) {
currentloading.close()
currentloading = null
}
}
} else {
for (let index = 0; index < loadings.length; index++) {
if (loadings[index]._el === el) {
if (loadings[index] != null) {
loadings[index].close()
loadings[index] = null
loadings.splice(index, 1)
return
}
}
}
}
}
}
export default fbloading