Pārlūkot izejas kodu

excel 导出优化

yuliang 3 gadi atpakaļ
vecāks
revīzija
639486b9e4
1 mainītis faili ar 4 papildinājumiem un 1 dzēšanām
  1. 4 1
      src/controls/grid.js

+ 4 - 1
src/controls/grid.js

@@ -364,6 +364,8 @@ export default function () {
             const scope = lookupScope(me)
             const {dataSource} = config
 
+            scope.setLoading(true)
+
             let excelFileName = config.excelFileName || scope.vjson.title || _.uniqueId("excel-")
 
             gridInvokeBuild(scope, me, config, dataSource, excelExportParams, true, (responseData) => {
@@ -386,6 +388,7 @@ export default function () {
                 if (page < total / size) {
                     page++
                 }
+                scope.setLoading(false)
             })
         },
 
@@ -666,7 +669,7 @@ export default function () {
                                     v = defaultGrid.exportExcelPageSize
                                     sender.setValue(v);
                                 }
-                                if (v >= 10000) {
+                                if (v > 10000) {
                                     window['system'].msg("导出页大小不能大于10000")
                                     v = 10000
                                     sender.setValue(v);