瀏覽代碼

Merge remote-tracking branch 'origin/master'

luoyifan 3 年之前
父節點
當前提交
ef0fbbee6d
共有 2 個文件被更改,包括 7 次插入5 次删除
  1. 5 1
      src/controls/grid.js
  2. 2 4
      src/controls/input/combo.js

+ 5 - 1
src/controls/grid.js

@@ -366,6 +366,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) => {
@@ -387,7 +389,9 @@ export default function () {
 
                 if (page < total / size) {
                     page++
+                    me.exportExcelCurrentPage = page
                 }
+                scope.setLoading(false)
             })
         },
 
@@ -668,7 +672,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);

+ 2 - 4
src/controls/input/combo.js

@@ -81,9 +81,7 @@ export default function () {
         initComponent() {
             const that = this
             const toggle = function (e) {
-                // @ts-ignore
-                const config = this.config
-                const {readOnly, disabled} = config
+                const {readOnly, disabled} = that
                 if (readOnly || disabled) {
                     return
                 }
@@ -150,4 +148,4 @@ export default function () {
         })
     )
 
-}
+}