@zat-design/sisyphus-react 3.11.9-beta.2 → 3.11.9-beta.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -57,6 +57,7 @@ export var useForm = function useForm(originForm, options) {
57
57
  _form$getInternalHook,
58
58
  getFields,
59
59
  fieldsList,
60
+ _document,
60
61
  tablePagination,
61
62
  _tablePagination$clic,
62
63
  _error$errorFields,
@@ -97,8 +98,9 @@ export var useForm = function useForm(originForm, options) {
97
98
  case 11:
98
99
  return _context.abrupt("return", _context.sent);
99
100
  case 12:
100
- if (nameList === null || nameList === void 0 ? void 0 : nameList.length) {
101
- tablePagination = document.querySelector("#pro-edit-table-pagination-".concat(nameList.join('-')));
101
+ // 解决,单个pro-edit-table的表单校验
102
+ if ((nameList === null || nameList === void 0 ? void 0 : nameList.length) && !nameList.join('-').includes(',')) {
103
+ tablePagination = document && ((_document = document) === null || _document === void 0 ? void 0 : _document.querySelector("#pro-edit-table-pagination-".concat(nameList.join('-'))));
102
104
  if (tablePagination) {
103
105
  tablePagination === null || tablePagination === void 0 ? void 0 : (_tablePagination$clic = tablePagination.click) === null || _tablePagination$clic === void 0 ? void 0 : _tablePagination$clic.call(tablePagination);
104
106
  }
@@ -63,6 +63,7 @@ var useForm = exports.useForm = function useForm(originForm, options) {
63
63
  _form$getInternalHook,
64
64
  getFields,
65
65
  fieldsList,
66
+ _document,
66
67
  tablePagination,
67
68
  _tablePagination$clic,
68
69
  _error$errorFields,
@@ -103,8 +104,9 @@ var useForm = exports.useForm = function useForm(originForm, options) {
103
104
  case 11:
104
105
  return _context.abrupt("return", _context.sent);
105
106
  case 12:
106
- if (nameList === null || nameList === void 0 ? void 0 : nameList.length) {
107
- tablePagination = document.querySelector("#pro-edit-table-pagination-".concat(nameList.join('-')));
107
+ // 解决,单个pro-edit-table的表单校验
108
+ if ((nameList === null || nameList === void 0 ? void 0 : nameList.length) && !nameList.join('-').includes(',')) {
109
+ tablePagination = document && ((_document = document) === null || _document === void 0 ? void 0 : _document.querySelector("#pro-edit-table-pagination-".concat(nameList.join('-'))));
108
110
  if (tablePagination) {
109
111
  tablePagination === null || tablePagination === void 0 ? void 0 : (_tablePagination$clic = tablePagination.click) === null || _tablePagination$clic === void 0 ? void 0 : _tablePagination$clic.call(tablePagination);
110
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zat-design/sisyphus-react",
3
- "version": "3.11.9-beta.2",
3
+ "version": "3.11.9-beta.3",
4
4
  "license": "MIT",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",