Forráskód Böngészése

fix: s-table in IE keep loading

zkwolf 6 éve
szülő
commit
fd33711c57
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      src/components/table/index.js

+ 1 - 1
src/components/table/index.js

@@ -135,7 +135,7 @@ export default {
       const result = this.data(parameter)
       // 对接自己的通用数据接口需要修改下方代码中的 r.pageNo, r.totalCount, r.data
       // eslint-disable-next-line
-      if (result instanceof Promise || '[object Promise]' === result.toString()) {
+      if ((typeof result === 'object' || typeof result === 'function') && typeof result.then === 'function') {
         result.then(r => {
           this.localPagination = Object.assign({}, this.localPagination, {
             current: r.pageNo, // 返回结果中的当前分页数