@hw-component/form 1.7.2 → 1.7.4

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.
@@ -96,6 +96,7 @@ var Index = function Index(props) {
96
96
  if (hideItem) {
97
97
  return null;
98
98
  }
99
+ console.log(colon, align, "lllll", className);
99
100
  return jsx(Col, _objectSpread(_objectSpread({}, itemSpan), {}, {
100
101
  className: "".concat(colClassName, " ").concat(itemClassName),
101
102
  children: jsx(Form.Item, _objectSpread(_objectSpread({
@@ -16,6 +16,7 @@ var RegularFormItem = (function (props) {
16
16
  var type = props.type,
17
17
  colon = props.colon,
18
18
  itemSpan = props.itemSpan;
19
+ console.log(props, "....pppp");
19
20
  return jsx(Index, _objectSpread(_objectSpread({}, props), {}, {
20
21
  itemSpan: itemSpan,
21
22
  colon: type === "submit" ? false : colon
@@ -35,7 +35,7 @@ var Item = (function (props) {
35
35
  labelWidth: labelWidth,
36
36
  hideLabel: hideLabel,
37
37
  style: style,
38
- colon: typeof colon === "undefined" ? colon : formColon
38
+ colon: typeof colon !== "undefined" ? colon : formColon
39
39
  }));
40
40
  });
41
41
 
package/es/index.css CHANGED
@@ -47,13 +47,13 @@
47
47
  .ant-hw-form-base-item-top .ant-form-item-label > label {
48
48
  height: auto;
49
49
  }
50
- .ant-hw-form-base-item-right .ant-hw-form-item-colon {
50
+ .ant-hw-form-base-item-right .ant-hw-form-label-item {
51
51
  text-align: right;
52
52
  }
53
53
  .ant-hw-form-base-item-right .ant-form-item-label > label {
54
54
  height: 32px;
55
55
  }
56
- .ant-hw-form-base-item-left .ant-hw-form-item-colon {
56
+ .ant-hw-form-base-item-left .ant-hw-form-label-item {
57
57
  text-align: left;
58
58
  }
59
59
  .ant-hw-form-base-item-left .ant-hw-form-item-required {
@@ -99,6 +99,7 @@ var Index = function Index(props) {
99
99
  if (hideItem) {
100
100
  return null;
101
101
  }
102
+ console.log(colon, align, "lllll", className);
102
103
  return jsxRuntime.jsx(antd.Col, _objectSpread(_objectSpread({}, itemSpan), {}, {
103
104
  className: "".concat(colClassName, " ").concat(itemClassName),
104
105
  children: jsxRuntime.jsx(antd.Form.Item, _objectSpread(_objectSpread({
@@ -19,6 +19,7 @@ var RegularFormItem = (function (props) {
19
19
  var type = props.type,
20
20
  colon = props.colon,
21
21
  itemSpan = props.itemSpan;
22
+ console.log(props, "....pppp");
22
23
  return jsxRuntime.jsx(BasicItem.default, _objectSpread(_objectSpread({}, props), {}, {
23
24
  itemSpan: itemSpan,
24
25
  colon: type === "submit" ? false : colon
@@ -38,7 +38,7 @@ var Item = (function (props) {
38
38
  labelWidth: labelWidth,
39
39
  hideLabel: hideLabel,
40
40
  style: style,
41
- colon: typeof colon === "undefined" ? colon : formColon
41
+ colon: typeof colon !== "undefined" ? colon : formColon
42
42
  }));
43
43
  });
44
44
 
package/lib/index.css CHANGED
@@ -47,13 +47,13 @@
47
47
  .ant-hw-form-base-item-top .ant-form-item-label > label {
48
48
  height: auto;
49
49
  }
50
- .ant-hw-form-base-item-right .ant-hw-form-item-colon {
50
+ .ant-hw-form-base-item-right .ant-hw-form-label-item {
51
51
  text-align: right;
52
52
  }
53
53
  .ant-hw-form-base-item-right .ant-form-item-label > label {
54
54
  height: 32px;
55
55
  }
56
- .ant-hw-form-base-item-left .ant-hw-form-item-colon {
56
+ .ant-hw-form-base-item-left .ant-hw-form-label-item {
57
57
  text-align: left;
58
58
  }
59
59
  .ant-hw-form-base-item-left .ant-hw-form-item-required {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.7.2",
3
+ "version": "1.7.4",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -71,6 +71,7 @@ const Index: React.FC<HFormItemProps> = (props) => {
71
71
  if (hideItem) {
72
72
  return null;
73
73
  }
74
+ console.log(colon,align,"lllll",className)
74
75
  return (
75
76
  <Col {...itemSpan} className={`${colClassName} ${itemClassName}`}>
76
77
  <Form.Item
@@ -3,6 +3,7 @@ import type { HItemProps } from "../modal";
3
3
 
4
4
  export default (props: HItemProps) => {
5
5
  const { type, colon, itemSpan } = props;
6
+ console.log(props,"....pppp")
6
7
  return (
7
8
  <BasicItem
8
9
  {...props}
@@ -25,7 +25,7 @@ export default (props: HItemProps) => {
25
25
  labelWidth={labelWidth}
26
26
  hideLabel={hideLabel}
27
27
  style={style}
28
- colon={typeof colon === "undefined" ? colon : formColon}
28
+ colon={typeof colon !== "undefined" ? colon : formColon}
29
29
  />
30
30
  );
31
31
  };
@@ -40,7 +40,7 @@
40
40
  }
41
41
  }
42
42
  .@{ant-prefix}-hw-form-base-item-right {
43
- .@{ant-prefix}-hw-form-item-colon {
43
+ .@{ant-prefix}-hw-form-label-item {
44
44
  text-align: right;
45
45
  }
46
46
  .@{ant-prefix}-form-item-label > label {
@@ -49,7 +49,7 @@
49
49
  }
50
50
 
51
51
  .@{ant-prefix}-hw-form-base-item-left {
52
- .@{ant-prefix}-hw-form-item-colon {
52
+ .@{ant-prefix}-hw-form-label-item {
53
53
  text-align: left;
54
54
  }
55
55
  .@{ant-prefix}-hw-form-item-required {
@@ -27,22 +27,23 @@ const Test3 = ({ value, onChange }) => {
27
27
  const formData = (options) => {
28
28
  return [
29
29
  {
30
- label: '手机号',
31
- name: 'phone',
32
- },
33
- {
34
- label: '验证码',
35
- name: 'verifyCode',
36
- type: 'select',
37
- dispatch: {
38
- fnKey: 'reload',
39
- dependencies: ['phone'],
40
- },
30
+ label: "下拉123",
31
+ className: "xiala",
32
+ type: "select",
33
+ name: "name1",
34
+ rules:[{required:true}],
41
35
  itemProps: {
42
- request: ({ phone }) => {
43
- console.log("request")
44
- return Promise.resolve({});
45
- },
36
+ options: [
37
+ {
38
+ value: "选项1",
39
+ key: 1,
40
+ },
41
+ {
42
+ value: "选项2",
43
+ key: 2,
44
+ },
45
+ ],
46
+ showSearch: true,
46
47
  },
47
48
  },
48
49
  {
@@ -51,10 +52,12 @@ const formData = (options) => {
51
52
  return <HBasicForm configData={[
52
53
  {
53
54
  label: "下拉",
54
- className: "hdjddd",
55
+ className: "xiala",
55
56
  type: "select",
56
57
  name: "test321",
58
+ colon:false,
57
59
  rules:[{required:true}],
60
+ labelAlign:"left",
58
61
  itemProps: {
59
62
  options: [
60
63
  {
@@ -119,7 +122,6 @@ export default () => {
119
122
  labelWidth={300}
120
123
  form={form}
121
124
  labelAlign={"right"}
122
- colon={false}
123
125
  onFinish={(value) => {
124
126
  console.log(value, "onFinish");
125
127
  }}