Commit 863259c4 authored by 毛线's avatar 毛线

loading优化

parent e4d991b3
...@@ -13,7 +13,11 @@ ...@@ -13,7 +13,11 @@
<div class="end">结束金额</div> <div class="end">结束金额</div>
<div class="remark">备注</div> <div class="remark">备注</div>
</div> </div>
<div class="table"> <div
v-loading="loading"
element-loading-background="#00293785"
element-loading-spinner="el-icon-loading"
class="table">
<ScoreRow v-for="(item, index) in list" :key="index" :data="item" :index="index"/> <ScoreRow v-for="(item, index) in list" :key="index" :data="item" :index="index"/>
</div> </div>
</div> </div>
...@@ -31,6 +35,7 @@ export default { ...@@ -31,6 +35,7 @@ export default {
return { return {
index: 0, index: 0,
list: [], // 消息列表 list: [], // 消息列表
loading: false,
} }
}, },
watch: { watch: {
...@@ -50,13 +55,16 @@ export default { ...@@ -50,13 +55,16 @@ export default {
params.filterType = type params.filterType = type
} }
this.list = [] this.list = []
this.loading = true
this.$request({ this.$request({
url: '/api/player/user/creditTransferLog', url: '/api/player/user/creditTransferLog',
method: 'get', method: 'get',
params, params,
}).then(({ rows }) => { }).then(({ rows }) => {
console.log('creditTransferLog data', { ...rows[0] })
this.list = rows this.list = rows
this.loading = false
}).catch(() => {
this.loading = false
}) })
}, },
} }
......
...@@ -8,9 +8,13 @@ Vue.use(VueClipboard) // 复制组件 ...@@ -8,9 +8,13 @@ Vue.use(VueClipboard) // 复制组件
import { import {
Message, Message,
Loading,
} from 'element-ui' } from 'element-ui'
Vue.use(Loading.directive)
Vue.prototype.$message = Message Vue.prototype.$message = Message
Vue.prototype.$loading = Loading.service
Vue.filter('img', function(value) { Vue.filter('img', function(value) {
return `${process.env.img_domain}${value}` return `${process.env.img_domain}${value}`
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment