@teamias/rex-pro 0.0.14 → 0.0.15

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.
@@ -19,7 +19,7 @@ function _objectWithoutProperties(source, excluded) { if (source == null) return
19
19
  function _objectWithoutPropertiesLoose(source, excluded) { if (source == null) return {}; var target = {}; var sourceKeys = Object.keys(source); var key, i; for (i = 0; i < sourceKeys.length; i++) { key = sourceKeys[i]; if (excluded.indexOf(key) >= 0) continue; target[key] = source[key]; } return target; }
20
20
  /* eslint-disable no-param-reassign */
21
21
  import { ProForm } from '@ant-design/pro-components';
22
- import { BaseForm, getFieldsDefaultValues, useRequestFields, useRequestFieldsConfig, useRexProConfigProvider, useStateData } from '@teamias/rex-design';
22
+ import { BaseForm, getFieldsDefaultValues, resetFormTouched, useRequestFields, useRequestFieldsConfig, useRexProConfigProvider, useStateData } from '@teamias/rex-design';
23
23
  import { Button, Checkbox, Dropdown, Skeleton, Space } from 'antd';
24
24
  import { cloneDeep } from 'lodash';
25
25
  import { useEffect, useImperativeHandle, useRef } from 'react';
@@ -319,6 +319,9 @@ export var FilterForm = function FilterForm(_ref) {
319
319
  htmlType: "submit",
320
320
  type: "primary",
321
321
  loading: otherProps.loading || state.fetchLoading,
322
+ onClick: function onClick() {
323
+ return resetFormTouched(form.getFieldsValue(true), form);
324
+ },
322
325
  children: formatMessage({
323
326
  id: 'pro.components.filter-form.search',
324
327
  defaultMessage: '查询'
@@ -433,6 +433,45 @@ export default (function () {
433
433
  // formFieldUrl: '/filterFormProps',
434
434
  // formFieldParams?: Record<string, unknown>;
435
435
  formFieldConfig: [{
436
+ valueType: 'select',
437
+ field: 'org_id',
438
+ label: '部门',
439
+ options: [{
440
+ label: '1',
441
+ value: '1'
442
+ }, {
443
+ label: '2',
444
+ value: '2'
445
+ }, {
446
+ label: '3',
447
+ value: '3'
448
+ }]
449
+ }, {
450
+ valueType: 'select',
451
+ field: 'job_id',
452
+ label: '岗位',
453
+ options: [{
454
+ label: '1',
455
+ value: '1'
456
+ }, {
457
+ label: '2',
458
+ value: '2'
459
+ }, {
460
+ label: '3',
461
+ value: '3'
462
+ }],
463
+ dependenciesV2: [{
464
+ field: 'org_id',
465
+ action: 'show',
466
+ op: 'notEmpty'
467
+ }, {
468
+ field: 'org_id',
469
+ action: 'updateData'
470
+ }, {
471
+ field: 'org_id',
472
+ action: 'clear'
473
+ }]
474
+ }, {
436
475
  valueType: 'multipleComponents',
437
476
  label: 'multipleComponents',
438
477
  compact: true,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teamias/rex-pro",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "A react library developed with dumi",
5
5
  "license": "MIT",
6
6
  "module": "dist/index.js",
@@ -51,7 +51,7 @@
51
51
  "dependencies": {
52
52
  "@ant-design/icons": "^6.0.0",
53
53
  "@ant-design/pro-components": "^2.8.10",
54
- "@teamias/rex-design": "^0.0.24",
54
+ "@teamias/rex-design": "^0.0.37",
55
55
  "ahooks": "^3.9.0",
56
56
  "antd": "^5.26.7",
57
57
  "classnames": "^2.5.1",