@hw-component/form 0.0.4-beta-v4 → 0.0.4-beta-v5

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.
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { DialogFormProps, HDialogFormInstance, ModifyPropsModal } from "./modal";
3
- export declare const useModifyProps: ({ visible, configData, initialValues, dialogForm, afterClose, params, title }: ModifyPropsModal) => {
3
+ export declare const useModifyProps: ({ visible, configData, initialValues, dialogForm, afterClose, params, title, }: ModifyPropsModal) => {
4
4
  modalFormData: import("../Form/modal").HItemProps[];
5
5
  modalVisible: boolean | undefined;
6
6
  setModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
@@ -5,5 +5,5 @@ export declare enum SelectInputType {
5
5
  select = 1
6
6
  }
7
7
  export declare const Index: ({ selectProps, value, onChange, valueName, addFormat, addDispatchListener, ...props }: HSelectInputProps) => JSX.Element;
8
- declare const _default: import("react").ForwardRefExoticComponent<import("@/components/Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
8
+ declare const _default: import("react").ForwardRefExoticComponent<import("../Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
9
9
  export default _default;
@@ -5,6 +5,7 @@ import _regeneratorRuntime from '@babel/runtime-corejs3/regenerator';
5
5
  import _Promise from '@babel/runtime-corejs3/core-js/promise';
6
6
  import { useState, useEffect } from 'react';
7
7
  import { useRequest } from 'ahooks';
8
+ import { useFormContext } from '../../Form/Context/index.js';
8
9
 
9
10
  var useOptionReq = function useOptionReq(_ref) {
10
11
  var manual = _ref.manual,
@@ -13,6 +14,8 @@ var useOptionReq = function useOptionReq(_ref) {
13
14
  serviceSearch = _ref.serviceSearch,
14
15
  showSearch = _ref.showSearch,
15
16
  propsOnSearch = _ref.onSearch;
17
+ var _useFormContext = useFormContext(),
18
+ form = _useFormContext.form;
16
19
  var _useState = useState(),
17
20
  _useState2 = _slicedToArray(_useState, 2),
18
21
  data = _useState2[0],
@@ -20,23 +23,25 @@ var useOptionReq = function useOptionReq(_ref) {
20
23
  var _useRequest = useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
21
24
  var params,
22
25
  type,
26
+ formData,
23
27
  _args = arguments;
24
28
  return _regeneratorRuntime.wrap(function _callee$(_context) {
25
29
  while (1) switch (_context.prev = _context.next) {
26
30
  case 0:
27
31
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
28
32
  type = _args.length > 1 && _args[1] !== undefined ? _args[1] : "init";
33
+ formData = form === null || form === void 0 ? void 0 : form.getFieldsValue();
29
34
  if (type === "init") {
30
35
  setData(undefined);
31
36
  }
32
37
  if (!request) {
33
- _context.next = 5;
38
+ _context.next = 6;
34
39
  break;
35
40
  }
36
- return _context.abrupt("return", request(params));
37
- case 5:
38
- return _context.abrupt("return", _Promise.resolve(options));
41
+ return _context.abrupt("return", request(params, formData));
39
42
  case 6:
43
+ return _context.abrupt("return", _Promise.resolve(options));
44
+ case 7:
40
45
  case "end":
41
46
  return _context.stop();
42
47
  }
@@ -20,7 +20,7 @@ import Index$2 from './components/AllSelect.js';
20
20
  import { useMatchConfigProps, useChangeOptions } from '../hooks/index.js';
21
21
  import HFormConnect from '../Form/HFormConnect.js';
22
22
 
23
- var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener"];
23
+ var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat"];
24
24
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
25
25
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
26
26
  var Option = Select.Option;
@@ -51,8 +51,9 @@ var Index = function Index(_ref) {
51
51
  _ref$noMatchItemRende = _ref.noMatchItemRender,
52
52
  noMatchItemRender = _ref$noMatchItemRende === void 0 ? defaultSelectConfig.noMatchItemRender : _ref$noMatchItemRende,
53
53
  allSelect = _ref.allSelect,
54
- addDispatchListener = _ref.addDispatchListener,
55
- props = _objectWithoutProperties(_ref, _excluded);
54
+ addDispatchListener = _ref.addDispatchListener;
55
+ _ref.addFormat;
56
+ var props = _objectWithoutProperties(_ref, _excluded);
56
57
  var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
57
58
  icon = _ref2.icon,
58
59
  render = _ref2.render;
@@ -2,6 +2,7 @@ import type { SelectProps } from "antd";
2
2
  import type React from "react";
3
3
  import type { PromiseFnResult } from "../modal";
4
4
  import type { argsFn } from "@/components/Form/modal";
5
+ import type { addFormatItemModal } from "@/components/Form/modal";
5
6
  export type OptionType = Record<string, any>;
6
7
  export type PartialHSelectProps = Partial<HSelectProps>;
7
8
  export type RenderFn = (data: OptionType) => React.ReactNode;
@@ -13,7 +14,7 @@ export interface ModeConfig {
13
14
  multiple?: ModeConfigItem;
14
15
  tags?: ModeConfigItem;
15
16
  }
16
- export interface HSelectProps extends Omit<SelectProps, "options"> {
17
+ export interface HSelectProps extends Omit<SelectProps, "options" | "placeholder"> {
17
18
  style?: React.CSSProperties;
18
19
  request?: PromiseFnResult<any, OptionType[]>;
19
20
  manual?: boolean;
@@ -24,6 +25,8 @@ export interface HSelectProps extends Omit<SelectProps, "options"> {
24
25
  noMatchItemRender?: RenderFn;
25
26
  allSelect?: boolean;
26
27
  addDispatchListener?: (key: string, fn: argsFn) => void;
28
+ addFormat?: (format: Record<string, addFormatItemModal>) => void;
29
+ placeholder?: string;
27
30
  }
28
31
  export interface FilterDataModal {
29
32
  value: any;
package/es/modal.d.ts CHANGED
@@ -2,7 +2,7 @@ export interface ValueCheckMapModal {
2
2
  checked?: any;
3
3
  noChecked?: any;
4
4
  }
5
- export type PromiseFnResult<T = any, R = any> = (params: T) => Promise<R>;
5
+ export type PromiseFnResult<T = any, R = any> = (params: T, formDataValues?: any) => Promise<R>;
6
6
  export interface ValueSwitchMapModal {
7
7
  open?: any;
8
8
  close?: any;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="react" />
2
2
  import type { DialogFormProps, HDialogFormInstance, ModifyPropsModal } from "./modal";
3
- export declare const useModifyProps: ({ visible, configData, initialValues, dialogForm, afterClose, params, title }: ModifyPropsModal) => {
3
+ export declare const useModifyProps: ({ visible, configData, initialValues, dialogForm, afterClose, params, title, }: ModifyPropsModal) => {
4
4
  modalFormData: import("../Form/modal").HItemProps[];
5
5
  modalVisible: boolean | undefined;
6
6
  setModalVisible: import("react").Dispatch<import("react").SetStateAction<boolean | undefined>>;
@@ -5,5 +5,5 @@ export declare enum SelectInputType {
5
5
  select = 1
6
6
  }
7
7
  export declare const Index: ({ selectProps, value, onChange, valueName, addFormat, addDispatchListener, ...props }: HSelectInputProps) => JSX.Element;
8
- declare const _default: import("react").ForwardRefExoticComponent<import("@/components/Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
8
+ declare const _default: import("react").ForwardRefExoticComponent<import("../Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
9
9
  export default _default;
@@ -6,6 +6,7 @@ var _regeneratorRuntime = require('@babel/runtime-corejs3/regenerator');
6
6
  var _Promise = require('@babel/runtime-corejs3/core-js/promise');
7
7
  var React = require('react');
8
8
  var ahooks = require('ahooks');
9
+ var index = require('../../Form/Context/index.js');
9
10
 
10
11
  var useOptionReq = function useOptionReq(_ref) {
11
12
  var manual = _ref.manual,
@@ -14,6 +15,8 @@ var useOptionReq = function useOptionReq(_ref) {
14
15
  serviceSearch = _ref.serviceSearch,
15
16
  showSearch = _ref.showSearch,
16
17
  propsOnSearch = _ref.onSearch;
18
+ var _useFormContext = index.useFormContext(),
19
+ form = _useFormContext.form;
17
20
  var _useState = React.useState(),
18
21
  _useState2 = _slicedToArray(_useState, 2),
19
22
  data = _useState2[0],
@@ -21,23 +24,25 @@ var useOptionReq = function useOptionReq(_ref) {
21
24
  var _useRequest = ahooks.useRequest( /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
22
25
  var params,
23
26
  type,
27
+ formData,
24
28
  _args = arguments;
25
29
  return _regeneratorRuntime.wrap(function _callee$(_context) {
26
30
  while (1) switch (_context.prev = _context.next) {
27
31
  case 0:
28
32
  params = _args.length > 0 && _args[0] !== undefined ? _args[0] : {};
29
33
  type = _args.length > 1 && _args[1] !== undefined ? _args[1] : "init";
34
+ formData = form === null || form === void 0 ? void 0 : form.getFieldsValue();
30
35
  if (type === "init") {
31
36
  setData(undefined);
32
37
  }
33
38
  if (!request) {
34
- _context.next = 5;
39
+ _context.next = 6;
35
40
  break;
36
41
  }
37
- return _context.abrupt("return", request(params));
38
- case 5:
39
- return _context.abrupt("return", _Promise.resolve(options));
42
+ return _context.abrupt("return", request(params, formData));
40
43
  case 6:
44
+ return _context.abrupt("return", _Promise.resolve(options));
45
+ case 7:
41
46
  case "end":
42
47
  return _context.stop();
43
48
  }
@@ -23,7 +23,7 @@ var AllSelect = require('./components/AllSelect.js');
23
23
  var index = require('../hooks/index.js');
24
24
  var HFormConnect = require('../Form/HFormConnect.js');
25
25
 
26
- var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener"];
26
+ var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat"];
27
27
  function ownKeys(object, enumerableOnly) { var keys = _Object$keys(object); if (_Object$getOwnPropertySymbols) { var symbols = _Object$getOwnPropertySymbols(object); enumerableOnly && (symbols = _filterInstanceProperty(symbols).call(symbols, function (sym) { return _Object$getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
28
28
  function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var _context, _context2; var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? _forEachInstanceProperty(_context = ownKeys(Object(source), !0)).call(_context, function (key) { _defineProperty(target, key, source[key]); }) : _Object$getOwnPropertyDescriptors ? _Object$defineProperties(target, _Object$getOwnPropertyDescriptors(source)) : _forEachInstanceProperty(_context2 = ownKeys(Object(source))).call(_context2, function (key) { _Object$defineProperty(target, key, _Object$getOwnPropertyDescriptor(source, key)); }); } return target; }
29
29
  var Option = antd.Select.Option;
@@ -54,8 +54,9 @@ var Index = function Index(_ref) {
54
54
  _ref$noMatchItemRende = _ref.noMatchItemRender,
55
55
  noMatchItemRender = _ref$noMatchItemRende === void 0 ? defaultConfig.defaultSelectConfig.noMatchItemRender : _ref$noMatchItemRende,
56
56
  allSelect = _ref.allSelect,
57
- addDispatchListener = _ref.addDispatchListener,
58
- props = _objectWithoutProperties(_ref, _excluded);
57
+ addDispatchListener = _ref.addDispatchListener;
58
+ _ref.addFormat;
59
+ var props = _objectWithoutProperties(_ref, _excluded);
59
60
  var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
60
61
  icon = _ref2.icon,
61
62
  render = _ref2.render;
@@ -2,6 +2,7 @@ import type { SelectProps } from "antd";
2
2
  import type React from "react";
3
3
  import type { PromiseFnResult } from "../modal";
4
4
  import type { argsFn } from "@/components/Form/modal";
5
+ import type { addFormatItemModal } from "@/components/Form/modal";
5
6
  export type OptionType = Record<string, any>;
6
7
  export type PartialHSelectProps = Partial<HSelectProps>;
7
8
  export type RenderFn = (data: OptionType) => React.ReactNode;
@@ -13,7 +14,7 @@ export interface ModeConfig {
13
14
  multiple?: ModeConfigItem;
14
15
  tags?: ModeConfigItem;
15
16
  }
16
- export interface HSelectProps extends Omit<SelectProps, "options"> {
17
+ export interface HSelectProps extends Omit<SelectProps, "options" | "placeholder"> {
17
18
  style?: React.CSSProperties;
18
19
  request?: PromiseFnResult<any, OptionType[]>;
19
20
  manual?: boolean;
@@ -24,6 +25,8 @@ export interface HSelectProps extends Omit<SelectProps, "options"> {
24
25
  noMatchItemRender?: RenderFn;
25
26
  allSelect?: boolean;
26
27
  addDispatchListener?: (key: string, fn: argsFn) => void;
28
+ addFormat?: (format: Record<string, addFormatItemModal>) => void;
29
+ placeholder?: string;
27
30
  }
28
31
  export interface FilterDataModal {
29
32
  value: any;
package/lib/modal.d.ts CHANGED
@@ -2,7 +2,7 @@ export interface ValueCheckMapModal {
2
2
  checked?: any;
3
3
  noChecked?: any;
4
4
  }
5
- export type PromiseFnResult<T = any, R = any> = (params: T) => Promise<R>;
5
+ export type PromiseFnResult<T = any, R = any> = (params: T, formDataValues?: any) => Promise<R>;
6
6
  export interface ValueSwitchMapModal {
7
7
  open?: any;
8
8
  close?: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "0.0.4-beta-v4",
3
+ "version": "0.0.4-beta-v5",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -25,14 +25,14 @@ export default ({
25
25
  setModalVisible,
26
26
  initValue,
27
27
  formParams,
28
- title:modalTitle
28
+ title: modalTitle,
29
29
  } = useModifyProps({
30
30
  configData,
31
31
  visible,
32
32
  initialValues,
33
33
  dialogForm: currentForm,
34
34
  params,
35
- title
35
+ title,
36
36
  });
37
37
  const cancel = () => {
38
38
  if (onCancel) {
@@ -14,13 +14,13 @@ export const useModifyProps = ({
14
14
  dialogForm,
15
15
  afterClose,
16
16
  params,
17
- title
17
+ title,
18
18
  }: ModifyPropsModal) => {
19
19
  const [modalVisible, setModalVisible] = useState(visible);
20
20
  const [modalFormData, setModalFormData] = useState(configData);
21
21
  const [initValue, setInitValue] = useState(initialValues);
22
22
  const [formParams, setFormParams] = useState(params);
23
- const [modalTitle,setModalTitle]=useState(title)
23
+ const [modalTitle, setModalTitle] = useState(title);
24
24
  const onAfterClose = () => {
25
25
  setTimeout(() => {
26
26
  dialogForm.resetFields();
@@ -47,7 +47,7 @@ export const useModifyProps = ({
47
47
  configData: changeConfigData,
48
48
  initialValues: changeInitialValues,
49
49
  params: changeParams,
50
- title:changeTitle
50
+ title: changeTitle,
51
51
  } = showParams;
52
52
  if (!!changeConfigData) {
53
53
  setModalFormData(changeConfigData);
@@ -55,7 +55,7 @@ export const useModifyProps = ({
55
55
  if (!!changeParams) {
56
56
  setFormParams(changeParams);
57
57
  }
58
- if (!!changeTitle){
58
+ if (!!changeTitle) {
59
59
  setModalTitle(changeTitle);
60
60
  }
61
61
  setInitValue(changeInitialValues);
@@ -75,7 +75,7 @@ export const useModifyProps = ({
75
75
  setInitValue,
76
76
  onAfterClose,
77
77
  formParams,
78
- title:modalTitle
78
+ title: modalTitle,
79
79
  };
80
80
  };
81
81
  export const useHDialogForm = () => {
@@ -11,7 +11,7 @@ export interface ModifyPropsModal<P = any> {
11
11
  dialogForm: HDialogFormInstance;
12
12
  afterClose?: VoidFunction;
13
13
  params?: P;
14
- title?:DialogFormProps["title"];
14
+ title?: DialogFormProps["title"];
15
15
  }
16
16
  export interface ShowParamsModal<P = any, T = any> {
17
17
  configData?: HItemProps[];
@@ -19,7 +19,7 @@ export interface ShowParamsModal<P = any, T = any> {
19
19
  initialValues?: Record<string, any>;
20
20
  infoRequest?: PromiseFnResult<P, T>;
21
21
  params?: P;
22
- title?:DialogFormProps["title"];
22
+ title?: DialogFormProps["title"];
23
23
  }
24
24
 
25
25
  export interface HDialogFormInstance<P = any, T = any> extends HFormInstance {
@@ -3,7 +3,6 @@ import type { HSelectInputProps } from "./modal";
3
3
  import HSelect from "../Select";
4
4
  import { defaultSelectStyle, defaultValueName } from "./defaultConfig";
5
5
  import HFormConnect from "../Form/HFormConnect";
6
- import { ConnectResultProps } from "@/components/Form/modal";
7
6
  export enum SelectInputType {
8
7
  input,
9
8
  select,
@@ -4,6 +4,7 @@ import type {
4
4
  PartialHSelectProps,
5
5
  } from "@/components/Select/modal";
6
6
  import { useRequest } from "ahooks";
7
+ import { useFormContext } from "../../Form/Context";
7
8
 
8
9
  interface ParamsModal {
9
10
  options?: OptionType[];
@@ -17,14 +18,16 @@ export const useOptionReq = ({
17
18
  showSearch,
18
19
  onSearch: propsOnSearch,
19
20
  }: PartialHSelectProps) => {
21
+ const { form } = useFormContext();
20
22
  const [data, setData] = useState<OptionType[] | undefined>();
21
23
  const { run, loading, error } = useRequest(
22
24
  async (params = {}, type = "init") => {
25
+ const formData = form?.getFieldsValue();
23
26
  if (type === "init") {
24
27
  setData(undefined);
25
28
  }
26
29
  if (request) {
27
- return request(params);
30
+ return request(params, formData);
28
31
  }
29
32
  return Promise.resolve(options);
30
33
  },
@@ -31,6 +31,7 @@ const Index: React.FC<HSelectProps> = ({
31
31
  noMatchItemRender = defaultSelectConfig.noMatchItemRender,
32
32
  allSelect,
33
33
  addDispatchListener,
34
+ addFormat,
34
35
  ...props
35
36
  }) => {
36
37
  const { icon, render } = modeConfig?.[mode || ""] || {};
@@ -2,6 +2,7 @@ import type { SelectProps } from "antd";
2
2
  import type React from "react";
3
3
  import type { PromiseFnResult } from "../modal";
4
4
  import type { argsFn } from "@/components/Form/modal";
5
+ import type { addFormatItemModal } from "@/components/Form/modal";
5
6
  export type OptionType = Record<string, any>;
6
7
  export type PartialHSelectProps = Partial<HSelectProps>;
7
8
  export type RenderFn = (data: OptionType) => React.ReactNode;
@@ -14,7 +15,8 @@ export interface ModeConfig {
14
15
  multiple?: ModeConfigItem;
15
16
  tags?: ModeConfigItem;
16
17
  }
17
- export interface HSelectProps extends Omit<SelectProps, "options"> {
18
+ export interface HSelectProps
19
+ extends Omit<SelectProps, "options" | "placeholder"> {
18
20
  style?: React.CSSProperties;
19
21
  request?: PromiseFnResult<any, OptionType[]>;
20
22
  manual?: boolean;
@@ -25,6 +27,8 @@ export interface HSelectProps extends Omit<SelectProps, "options"> {
25
27
  noMatchItemRender?: RenderFn; //没有数据
26
28
  allSelect?: boolean; //显示全选
27
29
  addDispatchListener?: (key: string, fn: argsFn) => void;
30
+ addFormat?: (format: Record<string, addFormatItemModal>) => void;
31
+ placeholder?: string;
28
32
  }
29
33
  export interface FilterDataModal {
30
34
  value: any;
@@ -2,7 +2,10 @@ export interface ValueCheckMapModal {
2
2
  checked?: any;
3
3
  noChecked?: any;
4
4
  }
5
- export type PromiseFnResult<T = any, R = any> = (params: T) => Promise<R>;
5
+ export type PromiseFnResult<T = any, R = any> = (
6
+ params: T,
7
+ formDataValues?: any
8
+ ) => Promise<R>;
6
9
  export interface ValueSwitchMapModal {
7
10
  open?: any;
8
11
  close?: any;
@@ -25,10 +25,11 @@ const formData = (options) => {
25
25
  name: "select",
26
26
  type: "select",
27
27
  itemProps: {
28
- request: (params = {}) => {
28
+ request: (params = {}, values) => {
29
29
  const { label = "123", value = 1 } = params;
30
30
  return Promise.resolve([{ label, value }]);
31
31
  },
32
+ showSearch: true,
32
33
  },
33
34
  rules: [{ required: true }],
34
35
  },
@@ -15,7 +15,6 @@ export default () => {
15
15
  { name: "测试2", value: 20, userId: 112321 },
16
16
  ]}
17
17
  placeholder="多选"
18
- mode={"multiple"}
19
18
  onChange={(val, option) => {
20
19
  console.log(val, option);
21
20
  }}