forked from mengyxu/noob-components
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
352 B
18 lines
352 B
// composables/useLoading.js |
|
import { ElLoading } from 'element-plus' |
|
|
|
export function useLoading() { |
|
const showLoading = (options = {}) => { |
|
return ElLoading.service({ |
|
lock: true, |
|
text: 'Loading', |
|
spinner: 'el-icon-loading', |
|
background: 'rgba(0, 0, 0, 0.3)', |
|
...options |
|
}) |
|
} |
|
|
|
return { |
|
showLoading |
|
} |
|
}
|
|
|