@hw-component/form 1.10.69 → 1.10.71

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/index.js CHANGED
@@ -27,7 +27,8 @@ var HForm = (function (_ref) {
27
27
  formHideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel,
28
28
  gutter = _ref.gutter,
29
29
  submitLoading = _ref.submitLoading,
30
- formLabelAlign = _ref.labelAlign,
30
+ _ref$labelAlign = _ref.labelAlign,
31
+ formLabelAlign = _ref$labelAlign === void 0 ? "right" : _ref$labelAlign,
31
32
  formItemStyle = _ref.formItemStyle,
32
33
  _ref$itemProps = _ref.itemProps,
33
34
  formItemProps = _ref$itemProps === void 0 ? {} : _ref$itemProps,
@@ -12,7 +12,7 @@ import Index$2 from './components/AllSelect.js';
12
12
  import { useMatchConfigProps, useChangeOptions, useClassName } from '../hooks/index.js';
13
13
  import HFormConnect from '../Form/HFormConnect.js';
14
14
 
15
- var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat", "dispatch", "isList", "onPopupScroll", "addonBefore", "addonAfter", "className"],
15
+ var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat", "dispatch", "isList", "onPopupScroll", "addonBefore", "addonAfter", "className", "selfPopupContainer"],
16
16
  _excluded2 = ["value", "label"];
17
17
  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
18
  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; }
@@ -53,6 +53,7 @@ var Index = function Index(_ref) {
53
53
  addonAfter = _ref.addonAfter,
54
54
  _ref$className = _ref.className,
55
55
  className = _ref$className === void 0 ? "" : _ref$className,
56
+ selfPopupContainer = _ref.selfPopupContainer,
56
57
  props = _objectWithoutProperties(_ref, _excluded);
57
58
  var ref = useRef();
58
59
  var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
@@ -146,9 +147,9 @@ var Index = function Index(_ref) {
146
147
  showSearch: mathShowSearch,
147
148
  labelInValue: true,
148
149
  onPopupScroll: propsOnPopupScroll || onPopupScroll,
149
- getPopupContainer: function getPopupContainer() {
150
+ getPopupContainer: selfPopupContainer ? function () {
150
151
  return ref.current || document.body;
151
- }
152
+ } : undefined
152
153
  }, props), {}, {
153
154
  children: data === null || data === void 0 ? void 0 : data.map(function (item) {
154
155
  var optionValue = item.value,
@@ -39,6 +39,7 @@ export interface HSelectProps extends Omit<SelectProps, "options" | "placeholder
39
39
  addonBefore?: React.ReactNode;
40
40
  addonAfter?: React.ReactNode;
41
41
  onChange?: (value: any, opts?: OptionType[] | OptionType) => void;
42
+ selfPopupContainer?: boolean;
42
43
  }
43
44
  export interface FilterDataModal {
44
45
  value: any;
package/lib/Form/index.js CHANGED
@@ -30,7 +30,8 @@ var HForm = (function (_ref) {
30
30
  formHideLabel = _ref$hideLabel === void 0 ? false : _ref$hideLabel,
31
31
  gutter = _ref.gutter,
32
32
  submitLoading = _ref.submitLoading,
33
- formLabelAlign = _ref.labelAlign,
33
+ _ref$labelAlign = _ref.labelAlign,
34
+ formLabelAlign = _ref$labelAlign === void 0 ? "right" : _ref$labelAlign,
34
35
  formItemStyle = _ref.formItemStyle,
35
36
  _ref$itemProps = _ref.itemProps,
36
37
  formItemProps = _ref$itemProps === void 0 ? {} : _ref$itemProps,
@@ -15,7 +15,7 @@ var AllSelect = require('./components/AllSelect.js');
15
15
  var index = require('../hooks/index.js');
16
16
  var HFormConnect = require('../Form/HFormConnect.js');
17
17
 
18
- var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat", "dispatch", "isList", "onPopupScroll", "addonBefore", "addonAfter", "className"],
18
+ var _excluded = ["style", "mode", "options", "modeConfig", "value", "onChange", "fieldNames", "request", "manual", "optionLabelProp", "filterProvider", "optionFilterProp", "serviceSearch", "onSearch", "filterOption", "showSearch", "labelInValue", "noMatchItemRender", "allSelect", "addDispatchListener", "addFormat", "dispatch", "isList", "onPopupScroll", "addonBefore", "addonAfter", "className", "selfPopupContainer"],
19
19
  _excluded2 = ["value", "label"];
20
20
  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; }
21
21
  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; }
@@ -56,6 +56,7 @@ var Index = function Index(_ref) {
56
56
  addonAfter = _ref.addonAfter,
57
57
  _ref$className = _ref.className,
58
58
  className = _ref$className === void 0 ? "" : _ref$className,
59
+ selfPopupContainer = _ref.selfPopupContainer,
59
60
  props = _objectWithoutProperties(_ref, _excluded);
60
61
  var ref = React.useRef();
61
62
  var _ref2 = (modeConfig === null || modeConfig === void 0 ? void 0 : modeConfig[mode || ""]) || {},
@@ -149,9 +150,9 @@ var Index = function Index(_ref) {
149
150
  showSearch: mathShowSearch,
150
151
  labelInValue: true,
151
152
  onPopupScroll: propsOnPopupScroll || onPopupScroll,
152
- getPopupContainer: function getPopupContainer() {
153
+ getPopupContainer: selfPopupContainer ? function () {
153
154
  return ref.current || document.body;
154
- }
155
+ } : undefined
155
156
  }, props), {}, {
156
157
  children: data === null || data === void 0 ? void 0 : data.map(function (item) {
157
158
  var optionValue = item.value,
@@ -39,6 +39,7 @@ export interface HSelectProps extends Omit<SelectProps, "options" | "placeholder
39
39
  addonBefore?: React.ReactNode;
40
40
  addonAfter?: React.ReactNode;
41
41
  onChange?: (value: any, opts?: OptionType[] | OptionType) => void;
42
+ selfPopupContainer?: boolean;
42
43
  }
43
44
  export interface FilterDataModal {
44
45
  value: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.10.69",
3
+ "version": "1.10.71",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -17,7 +17,7 @@ export default ({
17
17
  hideLabel: formHideLabel = false,
18
18
  gutter,
19
19
  submitLoading,
20
- labelAlign: formLabelAlign,
20
+ labelAlign: formLabelAlign="right",
21
21
  formItemStyle,
22
22
  itemProps: formItemProps = {},
23
23
  colon = true,
@@ -39,6 +39,7 @@ const Index: React.FC<HSelectProps> = ({
39
39
  addonBefore,
40
40
  addonAfter,
41
41
  className = "",
42
+ selfPopupContainer,
42
43
  ...props
43
44
  }) => {
44
45
  const ref = useRef<HTMLDivElement | null>();
@@ -131,9 +132,9 @@ const Index: React.FC<HSelectProps> = ({
131
132
  showSearch={mathShowSearch}
132
133
  labelInValue={true}
133
134
  onPopupScroll={propsOnPopupScroll || onPopupScroll}
134
- getPopupContainer={() => {
135
+ getPopupContainer={selfPopupContainer?() => {
135
136
  return ref.current || document.body;
136
- }}
137
+ }:undefined}
137
138
  {...props}
138
139
  >
139
140
  {data?.map((item) => {
@@ -43,6 +43,7 @@ export interface HSelectProps
43
43
  addonBefore?: React.ReactNode;
44
44
  addonAfter?: React.ReactNode;
45
45
  onChange?: (value: any, opts?: OptionType[] | OptionType) => void;
46
+ selfPopupContainer?:boolean;
46
47
  }
47
48
  export interface FilterDataModal {
48
49
  value: any;
@@ -17,6 +17,7 @@ const data = [
17
17
  type: "select",
18
18
  label: "下啦",
19
19
  name: "select",
20
+ hover:"123123213",
20
21
  itemProps: {
21
22
  options: [
22
23
  {
@@ -161,8 +161,9 @@ export default () => {
161
161
  // },
162
162
  {
163
163
  name: "num",
164
- label: "num",
164
+ label: "你好啊",
165
165
  type: "rangePicker",
166
+ hover:"123123213",
166
167
  itemProps: {
167
168
  valueMap: {
168
169
  start: "start",
@@ -171,7 +172,7 @@ export default () => {
171
172
  },
172
173
  },
173
174
  {
174
- name: "time",
175
+ name: ["order","name"],
175
176
  label: "time",
176
177
  type: "select",
177
178
  itemProps: {
@@ -189,7 +190,6 @@ export default () => {
189
190
  },
190
191
  ]}
191
192
  dismissOnPressEnter={false}
192
- labelWidth={88}
193
193
  form={form}
194
194
  initialValues={{
195
195
  deviceType: 1,
@@ -6,7 +6,7 @@ import {
6
6
  } from "../../components";
7
7
 
8
8
  const data = [
9
- { label: "name", name: "name" },
9
+ { label: "name", name: "name" ,hover:"1312"},
10
10
 
11
11
  {
12
12
  label: "输入框",
@@ -61,11 +61,6 @@ export default () => {
61
61
  marginBottom: 100,
62
62
  }}
63
63
  labelAlign={"left"}
64
- labelWidth={100}
65
- contentRender={(node, form, params) => {
66
- console.log(params);
67
- return <div></div>;
68
- }}
69
64
  dialogForm={modalForm}
70
65
  title="你好"
71
66
  />
@@ -6,6 +6,7 @@ import { MediaTypeEnum } from "../../components/Upload/enums";
6
6
  export default () => {
7
7
  const [files, setFiles] = useState([{}]);
8
8
  const [files1, setFiles1] = useState([]);
9
+ console.log(files,"files")
9
10
  return (
10
11
  <Space size={"large"} direction={"vertical"} style={{ width: "100%" }}>
11
12
  <HUpload
@@ -39,8 +40,8 @@ export default () => {
39
40
  </HUpload>
40
41
  <HUrlUpload
41
42
  inputHelper="测试"
42
- mediaType={MediaTypeEnum.video}
43
- value={files}
43
+ mediaType={MediaTypeEnum.img}
44
+ value={["https://img1.baidu.com/it/u=2172818577,3783888802&fm=253&app=138&f=JPEG?w=800&h=1422"]}
44
45
  onChange={setFiles}
45
46
  />
46
47
  </Space>