04e2d41d by 任超

style:自定义loading加载文字

1 parent 76d21f42
1 // import { Loading } from 'element-ui'
2 import Loading from '@/components/loading/index.js'; 1 import Loading from '@/components/loading/index.js';
3 // 定义 loading 2 // 定义 loading
4 let loading 3 let loading
5 4
6 // loading开始 方法 5 // loading开始 方法
7 function startLoading (target = "body") { 6 function startLoading (target = "body", loadingText = '正在加载中...') {
8 loading = Loading.service({ 7 loading = Loading.service({
9 text: '正在加载中...', 8 text: loadingText,
10 spinner: 'el-icon-loading', 9 spinner: 'el-icon-loading',
11 background: 'rgba(255, 255, 255, 0.5)', 10 background: 'rgba(255, 255, 255, 0.5)',
12 target: '#' + target 11 target: '#' + target
......