14 lines
325 B
JavaScript
14 lines
325 B
JavaScript
import { ElLoading } from 'element-plus'
|
|
export const loading = {
|
|
loadingInstance: null,
|
|
open: function (text) {
|
|
this.loadingInstance = ElLoading.service({
|
|
lock: true,
|
|
text: text,
|
|
background: 'rgba(0, 0, 0, 0.7)'
|
|
})
|
|
},
|
|
close: function () {
|
|
this.loadingInstance.close()
|
|
}
|
|
} |