@hw-component/form 1.9.15 → 1.9.17

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.
package/es/Form/Label.js CHANGED
@@ -29,6 +29,7 @@ var Index = function Index(_ref2) {
29
29
  var className = useClassName([].concat(array, ["hw-form-label-item"]));
30
30
  var requiredClass = useClassName("hw-form-item-required");
31
31
  var noRequiredClass = useClassName("hw-form-item-no-required");
32
+ var tooltipClassName = useClassName("hw-form-label-item-tooltip");
32
33
  return jsxs("div", {
33
34
  style: {
34
35
  width: labelWidth
@@ -37,9 +38,7 @@ var Index = function Index(_ref2) {
37
38
  children: [jsx("span", {
38
39
  className: required ? requiredClass : noRequiredClass
39
40
  }), children, text && jsx("span", {
40
- style: {
41
- marginLeft: 4
42
- },
41
+ className: tooltipClassName,
43
42
  children: jsx(Tooltip, {
44
43
  placement: "top",
45
44
  title: text,
@@ -1,62 +1,36 @@
1
1
  // welcome to hoo hoo hoo
2
- import _typeof from '@babel/runtime-corejs3/helpers/typeof';
3
2
  import _defineProperty from '@babel/runtime-corejs3/helpers/defineProperty';
4
- import _inherits from '@babel/runtime-corejs3/helpers/inherits';
5
- import _setPrototypeOf from '@babel/runtime-corejs3/helpers/setPrototypeOf';
6
3
  import _objectWithoutProperties from '@babel/runtime-corejs3/helpers/objectWithoutProperties';
7
4
  import { jsx } from 'react/jsx-runtime';
8
5
  import { Input, Popover } from 'antd';
9
6
  import Picker from './Picker.js';
10
- import { useMemo } from 'react';
11
7
  import { useClassName } from '../../hooks/index.js';
12
8
 
13
9
  var _excluded = ["value", "onChange", "defaultColor"];
14
10
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15
11
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16
- function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
17
12
  var ColorInput = (function (_ref) {
18
13
  var value = _ref.value,
19
- onChange = _ref.onChange,
14
+ _onChange = _ref.onChange,
20
15
  _ref$defaultColor = _ref.defaultColor,
21
16
  defaultColor = _ref$defaultColor === void 0 ? "rgba(0,0,0,1)" : _ref$defaultColor,
22
17
  props = _objectWithoutProperties(_ref, _excluded);
23
18
  var classname = useClassName("hw-color-box");
24
19
  var inputVal = value === null || value === void 0 ? void 0 : value.trim();
25
- var pickerValue = useMemo(function () {
26
- var matchVal = inputVal || defaultColor;
27
- if (typeof matchVal === "string") {
28
- var _result$groups;
29
- if (matchVal.startsWith("#")) {
30
- return matchVal;
31
- }
32
- var rgbaRegular = /*#__PURE__*/_wrapRegExp(/((rgba\())(.*?)(?=(\)))/, {
33
- rgba: 3
34
- });
35
- var result = matchVal.match(rgbaRegular);
36
- if (result !== null && result !== void 0 && (_result$groups = result.groups) !== null && _result$groups !== void 0 && _result$groups.rgba) {
37
- var rgbas = result.groups.rgba.split(",");
38
- return {
39
- r: Number(rgbas[0]),
40
- g: Number(rgbas[1]),
41
- b: Number(rgbas[2]),
42
- a: Number(rgbas[3])
43
- };
44
- }
45
- }
46
- return "";
47
- }, [inputVal]);
48
20
  var colorChange = function colorChange(val) {
49
21
  var rgb = val.rgb;
50
22
  var text = "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(rgb.a, ")");
51
- onChange === null || onChange === void 0 || onChange(text);
23
+ _onChange === null || _onChange === void 0 || _onChange(text);
52
24
  };
53
25
  return jsx(Input, _objectSpread(_objectSpread({}, props), {}, {
54
26
  value: value,
55
- onChange: onChange,
27
+ onChange: function onChange(e) {
28
+ _onChange === null || _onChange === void 0 || _onChange(e.target.value);
29
+ },
56
30
  suffix: jsx(Popover, {
57
31
  trigger: "click",
58
32
  content: jsx(Picker, {
59
- value: pickerValue,
33
+ value: value,
60
34
  onChange: colorChange
61
35
  }),
62
36
  placement: "topLeft",
package/es/index.css CHANGED
@@ -13,6 +13,13 @@
13
13
  margin: 0 0 0 2px;
14
14
  content: ":";
15
15
  }
16
+ .ant-hw-form-label-item-tooltip {
17
+ margin-left: 4px;
18
+ display: -webkit-inline-box;
19
+ display: -webkit-inline-flex;
20
+ display: -ms-inline-flexbox;
21
+ display: inline-flex;
22
+ }
16
23
  .ant-hw-form-base-item {
17
24
  display: -webkit-box;
18
25
  display: -webkit-flex;
@@ -37,6 +44,14 @@
37
44
  }
38
45
  .ant-hw-form-base-item-top-left .ant-hw-form-label-item {
39
46
  position: relative;
47
+ display: -webkit-box;
48
+ display: -webkit-flex;
49
+ display: -ms-flexbox;
50
+ display: flex;
51
+ -webkit-box-align: center;
52
+ -webkit-align-items: center;
53
+ -ms-flex-align: center;
54
+ align-items: center;
40
55
  }
41
56
  .ant-hw-form-base-item-top-right .ant-form-item-label > label {
42
57
  height: auto;
@@ -49,12 +64,28 @@
49
64
  }
50
65
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-hw-form-label-item {
51
66
  text-align: right;
67
+ display: -webkit-box;
68
+ display: -webkit-flex;
69
+ display: -ms-flexbox;
70
+ display: flex;
71
+ -webkit-box-align: center;
72
+ -webkit-align-items: center;
73
+ -ms-flex-align: center;
74
+ align-items: center;
52
75
  }
53
76
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-form-item-label > label {
54
77
  height: 32px;
55
78
  }
56
79
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-label-item {
57
80
  text-align: left;
81
+ display: -webkit-box;
82
+ display: -webkit-flex;
83
+ display: -ms-flexbox;
84
+ display: flex;
85
+ -webkit-box-align: center;
86
+ -webkit-align-items: center;
87
+ -ms-flex-align: center;
88
+ align-items: center;
58
89
  }
59
90
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-item-required {
60
91
  position: absolute;
@@ -63,6 +94,14 @@
63
94
  }
64
95
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-label-item {
65
96
  position: relative;
97
+ display: -webkit-box;
98
+ display: -webkit-flex;
99
+ display: -ms-flexbox;
100
+ display: flex;
101
+ -webkit-box-align: center;
102
+ -webkit-align-items: center;
103
+ -ms-flex-align: center;
104
+ align-items: center;
66
105
  }
67
106
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-form-item-label > label {
68
107
  height: 32px;
package/lib/Form/Label.js CHANGED
@@ -32,6 +32,7 @@ var Index = function Index(_ref2) {
32
32
  var className = index.useClassName([].concat(array, ["hw-form-label-item"]));
33
33
  var requiredClass = index.useClassName("hw-form-item-required");
34
34
  var noRequiredClass = index.useClassName("hw-form-item-no-required");
35
+ var tooltipClassName = index.useClassName("hw-form-label-item-tooltip");
35
36
  return jsxRuntime.jsxs("div", {
36
37
  style: {
37
38
  width: labelWidth
@@ -40,9 +41,7 @@ var Index = function Index(_ref2) {
40
41
  children: [jsxRuntime.jsx("span", {
41
42
  className: required ? requiredClass : noRequiredClass
42
43
  }), children, text && jsxRuntime.jsx("span", {
43
- style: {
44
- marginLeft: 4
45
- },
44
+ className: tooltipClassName,
46
45
  children: jsxRuntime.jsx(antd.Tooltip, {
47
46
  placement: "top",
48
47
  title: text,
@@ -2,64 +2,38 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var _typeof = require('@babel/runtime-corejs3/helpers/typeof');
6
5
  var _defineProperty = require('@babel/runtime-corejs3/helpers/defineProperty');
7
- var _inherits = require('@babel/runtime-corejs3/helpers/inherits');
8
- var _setPrototypeOf = require('@babel/runtime-corejs3/helpers/setPrototypeOf');
9
6
  var _objectWithoutProperties = require('@babel/runtime-corejs3/helpers/objectWithoutProperties');
10
7
  var jsxRuntime = require('react/jsx-runtime');
11
8
  var antd = require('antd');
12
9
  var Picker = require('./Picker.js');
13
- var React = require('react');
14
10
  var index = require('../../hooks/index.js');
15
11
 
16
12
  var _excluded = ["value", "onChange", "defaultColor"];
17
13
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18
14
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19
- function _wrapRegExp() { _wrapRegExp = function _wrapRegExp(e, r) { return new BabelRegExp(e, void 0, r); }; var e = RegExp.prototype, r = new WeakMap(); function BabelRegExp(e, t, p) { var o = RegExp(e, t); return r.set(o, p || r.get(e)), _setPrototypeOf(o, BabelRegExp.prototype); } function buildGroups(e, t) { var p = r.get(t); return Object.keys(p).reduce(function (r, t) { var o = p[t]; if ("number" == typeof o) r[t] = e[o];else { for (var i = 0; void 0 === e[o[i]] && i + 1 < o.length;) i++; r[t] = e[o[i]]; } return r; }, Object.create(null)); } return _inherits(BabelRegExp, RegExp), BabelRegExp.prototype.exec = function (r) { var t = e.exec.call(this, r); if (t) { t.groups = buildGroups(t, this); var p = t.indices; p && (p.groups = buildGroups(p, this)); } return t; }, BabelRegExp.prototype[Symbol.replace] = function (t, p) { if ("string" == typeof p) { var o = r.get(this); return e[Symbol.replace].call(this, t, p.replace(/\$<([^>]+)>/g, function (e, r) { var t = o[r]; return "$" + (Array.isArray(t) ? t.join("$") : t); })); } if ("function" == typeof p) { var i = this; return e[Symbol.replace].call(this, t, function () { var e = arguments; return "object" != _typeof(e[e.length - 1]) && (e = [].slice.call(e)).push(buildGroups(e, i)), p.apply(this, e); }); } return e[Symbol.replace].call(this, t, p); }, _wrapRegExp.apply(this, arguments); }
20
15
  var ColorInput = (function (_ref) {
21
16
  var value = _ref.value,
22
- onChange = _ref.onChange,
17
+ _onChange = _ref.onChange,
23
18
  _ref$defaultColor = _ref.defaultColor,
24
19
  defaultColor = _ref$defaultColor === void 0 ? "rgba(0,0,0,1)" : _ref$defaultColor,
25
20
  props = _objectWithoutProperties(_ref, _excluded);
26
21
  var classname = index.useClassName("hw-color-box");
27
22
  var inputVal = value === null || value === void 0 ? void 0 : value.trim();
28
- var pickerValue = React.useMemo(function () {
29
- var matchVal = inputVal || defaultColor;
30
- if (typeof matchVal === "string") {
31
- var _result$groups;
32
- if (matchVal.startsWith("#")) {
33
- return matchVal;
34
- }
35
- var rgbaRegular = /*#__PURE__*/_wrapRegExp(/((rgba\())(.*?)(?=(\)))/, {
36
- rgba: 3
37
- });
38
- var result = matchVal.match(rgbaRegular);
39
- if (result !== null && result !== void 0 && (_result$groups = result.groups) !== null && _result$groups !== void 0 && _result$groups.rgba) {
40
- var rgbas = result.groups.rgba.split(",");
41
- return {
42
- r: Number(rgbas[0]),
43
- g: Number(rgbas[1]),
44
- b: Number(rgbas[2]),
45
- a: Number(rgbas[3])
46
- };
47
- }
48
- }
49
- return "";
50
- }, [inputVal]);
51
23
  var colorChange = function colorChange(val) {
52
24
  var rgb = val.rgb;
53
25
  var text = "rgba(".concat(rgb.r, ",").concat(rgb.g, ",").concat(rgb.b, ",").concat(rgb.a, ")");
54
- onChange === null || onChange === void 0 || onChange(text);
26
+ _onChange === null || _onChange === void 0 || _onChange(text);
55
27
  };
56
28
  return jsxRuntime.jsx(antd.Input, _objectSpread(_objectSpread({}, props), {}, {
57
29
  value: value,
58
- onChange: onChange,
30
+ onChange: function onChange(e) {
31
+ _onChange === null || _onChange === void 0 || _onChange(e.target.value);
32
+ },
59
33
  suffix: jsxRuntime.jsx(antd.Popover, {
60
34
  trigger: "click",
61
35
  content: jsxRuntime.jsx(Picker.default, {
62
- value: pickerValue,
36
+ value: value,
63
37
  onChange: colorChange
64
38
  }),
65
39
  placement: "topLeft",
package/lib/index.css CHANGED
@@ -13,6 +13,13 @@
13
13
  margin: 0 0 0 2px;
14
14
  content: ":";
15
15
  }
16
+ .ant-hw-form-label-item-tooltip {
17
+ margin-left: 4px;
18
+ display: -webkit-inline-box;
19
+ display: -webkit-inline-flex;
20
+ display: -ms-inline-flexbox;
21
+ display: inline-flex;
22
+ }
16
23
  .ant-hw-form-base-item {
17
24
  display: -webkit-box;
18
25
  display: -webkit-flex;
@@ -37,6 +44,14 @@
37
44
  }
38
45
  .ant-hw-form-base-item-top-left .ant-hw-form-label-item {
39
46
  position: relative;
47
+ display: -webkit-box;
48
+ display: -webkit-flex;
49
+ display: -ms-flexbox;
50
+ display: flex;
51
+ -webkit-box-align: center;
52
+ -webkit-align-items: center;
53
+ -ms-flex-align: center;
54
+ align-items: center;
40
55
  }
41
56
  .ant-hw-form-base-item-top-right .ant-form-item-label > label {
42
57
  height: auto;
@@ -49,12 +64,28 @@
49
64
  }
50
65
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-hw-form-label-item {
51
66
  text-align: right;
67
+ display: -webkit-box;
68
+ display: -webkit-flex;
69
+ display: -ms-flexbox;
70
+ display: flex;
71
+ -webkit-box-align: center;
72
+ -webkit-align-items: center;
73
+ -ms-flex-align: center;
74
+ align-items: center;
52
75
  }
53
76
  .ant-hw-form-base-item-right > .ant-form-item-label .ant-form-item-label > label {
54
77
  height: 32px;
55
78
  }
56
79
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-label-item {
57
80
  text-align: left;
81
+ display: -webkit-box;
82
+ display: -webkit-flex;
83
+ display: -ms-flexbox;
84
+ display: flex;
85
+ -webkit-box-align: center;
86
+ -webkit-align-items: center;
87
+ -ms-flex-align: center;
88
+ align-items: center;
58
89
  }
59
90
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-item-required {
60
91
  position: absolute;
@@ -63,6 +94,14 @@
63
94
  }
64
95
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-hw-form-label-item {
65
96
  position: relative;
97
+ display: -webkit-box;
98
+ display: -webkit-flex;
99
+ display: -ms-flexbox;
100
+ display: flex;
101
+ -webkit-box-align: center;
102
+ -webkit-align-items: center;
103
+ -ms-flex-align: center;
104
+ align-items: center;
66
105
  }
67
106
  .ant-hw-form-base-item-left > .ant-form-item-label .ant-form-item-label > label {
68
107
  height: 32px;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.9.15",
3
+ "version": "1.9.17",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -32,12 +32,13 @@ const Index: React.FC<IProps> = ({
32
32
  const className = useClassName([...array, "hw-form-label-item"]);
33
33
  const requiredClass = useClassName("hw-form-item-required");
34
34
  const noRequiredClass = useClassName("hw-form-item-no-required");
35
+ const tooltipClassName=useClassName("hw-form-label-item-tooltip")
35
36
  return (
36
37
  <div style={{ width: labelWidth }} className={className}>
37
38
  <span className={required ? requiredClass : noRequiredClass} />
38
39
  {children}
39
40
  {text && (
40
- <span style={{ marginLeft: 4 }}>
41
+ <span className={tooltipClassName}>
41
42
  <Tooltip placement="top" title={text}>
42
43
  {icon}
43
44
  </Tooltip>
@@ -5,6 +5,10 @@
5
5
  margin: 0 0 0 2px;
6
6
  content: ":";
7
7
  }
8
+ .@{ant-prefix}-hw-form-label-item-tooltip {
9
+ margin-left: 4px;
10
+ display: inline-flex;
11
+ }
8
12
  .@{ant-prefix}-hw-form-base-item {
9
13
  display: flex;
10
14
  align-items: center;
@@ -24,6 +28,8 @@
24
28
  }
25
29
  .@{ant-prefix}-hw-form-label-item {
26
30
  position: relative;
31
+ display: flex;
32
+ align-items: center;
27
33
  }
28
34
  }
29
35
  .@{ant-prefix}-hw-form-base-item-top-right {
@@ -42,6 +48,8 @@
42
48
  .@{ant-prefix}-hw-form-base-item-right > .@{ant-prefix}-form-item-label {
43
49
  .@{ant-prefix}-hw-form-label-item {
44
50
  text-align: right;
51
+ display: flex;
52
+ align-items: center;
45
53
  }
46
54
  .@{ant-prefix}-form-item-label > label {
47
55
  height: 32px;
@@ -51,6 +59,8 @@
51
59
  .@{ant-prefix}-hw-form-base-item-left > .@{ant-prefix}-form-item-label {
52
60
  .@{ant-prefix}-hw-form-label-item {
53
61
  text-align: left;
62
+ display: flex;
63
+ align-items: center;
54
64
  }
55
65
  .@{ant-prefix}-hw-form-item-required {
56
66
  position: absolute;
@@ -59,6 +69,8 @@
59
69
  }
60
70
  .@{ant-prefix}-hw-form-label-item {
61
71
  position: relative;
72
+ display: flex;
73
+ align-items: center;
62
74
  }
63
75
  .@{ant-prefix}-form-item-label > label {
64
76
  height: 32px;
@@ -1,7 +1,6 @@
1
1
  import type { HInputProps } from "@/components/Input/modal";
2
2
  import { Input, Popover } from "antd";
3
3
  import Picker from "./Picker";
4
- import { useMemo } from "react";
5
4
  import { useClassName } from "../../hooks";
6
5
  export default ({
7
6
  value,
@@ -11,26 +10,6 @@ export default ({
11
10
  }: HInputProps) => {
12
11
  const classname = useClassName("hw-color-box");
13
12
  const inputVal = value?.trim();
14
- const pickerValue = useMemo(() => {
15
- const matchVal = inputVal || defaultColor;
16
- if (typeof matchVal === "string") {
17
- if (matchVal.startsWith("#")) {
18
- return matchVal;
19
- }
20
- const rgbaRegular = /((rgba\())(?<rgba>.*?)(?=(\)))/;
21
- const result = matchVal.match(rgbaRegular);
22
- if (result?.groups?.rgba) {
23
- const rgbas = result.groups.rgba.split(",");
24
- return {
25
- r: Number(rgbas[0]),
26
- g: Number(rgbas[1]),
27
- b: Number(rgbas[2]),
28
- a: Number(rgbas[3]),
29
- };
30
- }
31
- }
32
- return "";
33
- }, [inputVal]);
34
13
  const colorChange = (val) => {
35
14
  const { rgb } = val;
36
15
  const text = `rgba(${rgb.r},${rgb.g},${rgb.b},${rgb.a})`;
@@ -40,11 +19,13 @@ export default ({
40
19
  <Input
41
20
  {...props}
42
21
  value={value}
43
- onChange={onChange}
22
+ onChange={(e)=>{
23
+ onChange?.(e.target.value)
24
+ }}
44
25
  suffix={
45
26
  <Popover
46
27
  trigger="click"
47
- content={<Picker value={pickerValue} onChange={colorChange} />}
28
+ content={<Picker value={value} onChange={colorChange} />}
48
29
  placement="topLeft"
49
30
  >
50
31
  <div
@@ -69,21 +69,29 @@ const formData = (options) => {
69
69
  {
70
70
  name: "name",
71
71
  label: "输入框",
72
- hidden: (form) => {
73
- const { check } = form.getFieldsValue();
74
- console.log(check, "name");
75
- return !check?.vv;
76
- },
72
+ itemProps: {
73
+
74
+ }
77
75
  },
78
76
  {
79
77
  name: "url",
80
78
  type: "urlUpload",
81
79
  label: "文本",
80
+ itemProps: {
81
+ initValueProvider:(props,val)=>{
82
+ console.log(props,val,"fff")
83
+ return {
84
+ ...val,
85
+ name:"ffffsfsadasda"
86
+ }
87
+ }
88
+ }
82
89
  },
83
90
  {
84
91
  label: "输入框",
85
92
  type: "checkboxGroup",
86
93
  name: "check",
94
+ hover:"你好",
87
95
  itemProps: {
88
96
  options: [
89
97
  {
@@ -8,7 +8,9 @@ import {
8
8
  HInputNumberGroup,
9
9
  } from "../../components";
10
10
  import { Space } from "antd";
11
+ import {useState} from "react";
11
12
  export default () => {
13
+ const [colorVal,setColorVal]=useState();
12
14
  return (
13
15
  <Space size={"large"} direction={"vertical"} style={{ width: "100%" }}>
14
16
  <HInput placeholder="基础输入框" copy value="11111" />
@@ -20,7 +22,7 @@ export default () => {
20
22
  />
21
23
  <HButtonInput>点我</HButtonInput>
22
24
  <HInputNumber />
23
- <HColorInput />
25
+ <HColorInput value={colorVal} onChange={setColorVal}/>
24
26
  <HVerificationCodeInput
25
27
  request={() => {
26
28
  return Promise.resolve({ code: 200 });