@jetlinks-web/components 3.1.12 → 3.1.13

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.
@@ -55,7 +55,7 @@ const _hoisted_1 = { style: { "color": "#1d2129" } };
55
55
  const _hoisted_2 = ["id"];
56
56
  import { onBeforeUnmount, computed, reactive, watch, provide } from "vue";
57
57
  import { get, isArray } from 'lodash-es';
58
- import { useProvideFormItemContext } from 'ant-design-vue/es/form/FormItemContext';
58
+ import { useProvideFormItemContext } from 'ant-design-vue/lib/form/FormItemContext';
59
59
  import { useInjectError, useInjectForm } from "./hooks";
60
60
  import { TABLE_FORM_ITEM_ERROR } from "./consts";
61
61
  import genEditTableStyle from './style';
@@ -129,7 +129,10 @@ const __sfc_main__ = Object.assign({
129
129
  index = props.name[0];
130
130
  }
131
131
  const promise = context.validateItem({ [filedName.value]: get(context.dataSource.value, props.name) }, index);
132
- promise.catch(res => {
132
+ promise.then(() => {
133
+ hideErrorTip();
134
+ context.removeFieldError(eventKey.value);
135
+ }).catch(res => {
133
136
  const error = _optionalChain([res, 'optionalAccess', _2 => _2.filter, 'call', _3 => _3(item => item.field === filedName.value)]) || [];
134
137
  if (error.length === 0) {
135
138
  hideErrorTip();
@@ -149,6 +152,7 @@ const __sfc_main__ = Object.assign({
149
152
  // validateRules()
150
153
  };
151
154
  const onFieldChange = () => {
155
+ debugger;
152
156
  validateRules();
153
157
  emit('change');
154
158
  };
@@ -164,7 +168,10 @@ const __sfc_main__ = Object.assign({
164
168
  id: filedId,
165
169
  onFieldChange,
166
170
  onFieldBlur,
167
- }, computed(() => get(context.dataSource.value, props.name)));
171
+ }, computed(() => {
172
+ console.log(context.dataSource.value, props.name);
173
+ return get(context.dataSource.value, props.name);
174
+ }));
168
175
  onBeforeUnmount(() => {
169
176
  hideErrorTip();
170
177
  });
@@ -137,11 +137,7 @@ export var proTableProps = _objectSpread(_objectSpread(_objectSpread({}, _conten
137
137
  pagination: {
138
138
  type: Object,
139
139
  default: function _default() {
140
- return {
141
- showSizeChanger: true,
142
- size: 'size',
143
- pageSizeOptions: ['12', '24', '48', '96']
144
- };
140
+ return {};
145
141
  }
146
142
  }
147
143
  });
@@ -368,7 +368,7 @@ const __sfc_main__ = Object.assign({
368
368
  rowSelection: _rowSelection.value
369
369
  }, {
370
370
  bodyCell: _withCtx(({ text, record, index, column }) => [
371
- (column.dataIndex === firstColumn.value.dataIndex || column.key === firstColumn.value.key)
371
+ ((firstColumn.value.dataIndex && column.dataIndex === firstColumn.value.dataIndex) || (firstColumn.value.key && column.key === firstColumn.value.key))
372
372
  ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [
373
373
  _createElementVNode("span", {
374
374
  class: "ant-table-row-indent indent-level-3",
@@ -55,7 +55,7 @@ const _hoisted_1 = { style: { "color": "#1d2129" } };
55
55
  const _hoisted_2 = ["id"];
56
56
  import { onBeforeUnmount, computed, reactive, watch, provide } from "vue";
57
57
  import { get, isArray } from 'lodash-es';
58
- import { useProvideFormItemContext } from 'ant-design-vue/es/form/FormItemContext';
58
+ import { useProvideFormItemContext } from 'ant-design-vue/lib/form/FormItemContext';
59
59
  import { useInjectError, useInjectForm } from "./hooks";
60
60
  import { TABLE_FORM_ITEM_ERROR } from "./consts";
61
61
  import genEditTableStyle from './style';
@@ -129,7 +129,10 @@ const __sfc_main__ = Object.assign({
129
129
  index = props.name[0];
130
130
  }
131
131
  const promise = context.validateItem({ [filedName.value]: get(context.dataSource.value, props.name) }, index);
132
- promise.catch(res => {
132
+ promise.then(() => {
133
+ hideErrorTip();
134
+ context.removeFieldError(eventKey.value);
135
+ }).catch(res => {
133
136
  const error = _optionalChain([res, 'optionalAccess', _2 => _2.filter, 'call', _3 => _3(item => item.field === filedName.value)]) || [];
134
137
  if (error.length === 0) {
135
138
  hideErrorTip();
@@ -149,6 +152,7 @@ const __sfc_main__ = Object.assign({
149
152
  // validateRules()
150
153
  };
151
154
  const onFieldChange = () => {
155
+ debugger;
152
156
  validateRules();
153
157
  emit('change');
154
158
  };
@@ -164,7 +168,10 @@ const __sfc_main__ = Object.assign({
164
168
  id: filedId,
165
169
  onFieldChange,
166
170
  onFieldBlur,
167
- }, computed(() => get(context.dataSource.value, props.name)));
171
+ }, computed(() => {
172
+ console.log(context.dataSource.value, props.name);
173
+ return get(context.dataSource.value, props.name);
174
+ }));
168
175
  onBeforeUnmount(() => {
169
176
  hideErrorTip();
170
177
  });
@@ -144,11 +144,7 @@ var proTableProps = exports.proTableProps = (0, _objectSpread2.default)((0, _obj
144
144
  pagination: {
145
145
  type: Object,
146
146
  default: function _default() {
147
- return {
148
- showSizeChanger: true,
149
- size: 'size',
150
- pageSizeOptions: ['12', '24', '48', '96']
151
- };
147
+ return {};
152
148
  }
153
149
  }
154
150
  });
@@ -368,7 +368,7 @@ const __sfc_main__ = Object.assign({
368
368
  rowSelection: _rowSelection.value
369
369
  }, {
370
370
  bodyCell: _withCtx(({ text, record, index, column }) => [
371
- (column.dataIndex === firstColumn.value.dataIndex || column.key === firstColumn.value.key)
371
+ ((firstColumn.value.dataIndex && column.dataIndex === firstColumn.value.dataIndex) || (firstColumn.value.key && column.key === firstColumn.value.key))
372
372
  ? (_openBlock(), _createElementBlock(_Fragment, { key: 0 }, [
373
373
  _createElementVNode("span", {
374
374
  class: "ant-table-row-indent indent-level-3",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "3.1.12",
3
+ "version": "3.1.13",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -155,8 +155,8 @@
155
155
  "webpack-merge": "^5.0.0",
156
156
  "webpackbar": "^5.0.2",
157
157
  "@jetlinks-web/constants": "^1.0.9",
158
- "@jetlinks-web/hooks": "^1.1.1",
159
- "@jetlinks-web/utils": "^1.2.12"
158
+ "@jetlinks-web/utils": "^1.2.12",
159
+ "@jetlinks-web/hooks": "^1.1.1"
160
160
  },
161
161
  "publishConfig": {
162
162
  "registry": "https://registry.npmjs.org/",