File tree Expand file tree Collapse file tree 1 file changed +14
-3
lines changed
admin/src/views/api_excel Expand file tree Collapse file tree 1 file changed +14
-3
lines changed Original file line number Diff line number Diff line change 44 <el-button type =" primary" size =" medium" >
55 <router-link to =" /api_excel/add" >上传测试</router-link >
66 </el-button >
7+ <el-button :loading =" reload" type =" primary" class =" reload" plain @click =" fetchData" >{{ reload_name }}</el-button >
78 </el-row >
89 <el-table
910 v-loading =" listLoading"
@@ -141,6 +142,8 @@ export default {
141142 },
142143 data () {
143144 return {
145+ reload: false ,
146+ reload_name: ' 点击刷新' ,
144147 list: null ,
145148 listLoading: true ,
146149 perpage: 10 ,
@@ -260,15 +263,19 @@ export default {
260263 })
261264 },
262265 fetchData () {
263- this .listLoading = true
266+ this .listLoading = this .reload = true
267+ this .reload_name = ' 加载中'
264268 const params = Object .assign ({ ' page' : this .listQuery .page }, { ' perPage' : this .perpage })
265269 getList (params).then (response => {
266270 this .list = response .data .data
267271 this .listLoading = false
268272 this .total = response .data .total
269273 this .url = response .data .appUrl
270- console .log (' type' , Object .prototype .toString .call (this .list ))
271-
274+ // console.log('type', Object.prototype.toString.call(this.list))
275+ setTimeout (() => {
276+ this .reload = false
277+ this .reload_name = ' 刷新'
278+ }, 800 )
272279 this .initWebSocket (8 )
273280 })
274281 },
@@ -354,4 +361,8 @@ export default {
354361 .pagination {
355362 margin : 20px auto ;
356363 }
364+ .reload {
365+ margin-right : 300px ;
366+ float : right ;
367+ }
357368 </style >
You can’t perform that action at this time.
0 commit comments