@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 +2 -1
- package/es/Select/index.js +4 -3
- package/es/Select/modal.d.ts +1 -0
- package/lib/Form/index.js +2 -1
- package/lib/Select/index.js +4 -3
- package/lib/Select/modal.d.ts +1 -0
- package/package.json +1 -1
- package/src/components/Form/index.tsx +1 -1
- package/src/components/Select/index.tsx +3 -2
- package/src/components/Select/modal.ts +1 -0
- package/src/pages/DrawerForm/index.tsx +1 -0
- package/src/pages/Form/index.tsx +3 -3
- package/src/pages/ModalForm/index.tsx +1 -6
- package/src/pages/Upload/index.tsx +3 -2
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
|
-
|
|
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,
|
package/es/Select/index.js
CHANGED
|
@@ -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
|
|
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,
|
package/es/Select/modal.d.ts
CHANGED
|
@@ -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
|
-
|
|
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,
|
package/lib/Select/index.js
CHANGED
|
@@ -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
|
|
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,
|
package/lib/Select/modal.d.ts
CHANGED
|
@@ -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
|
@@ -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) => {
|
package/src/pages/Form/index.tsx
CHANGED
|
@@ -161,8 +161,9 @@ export default () => {
|
|
|
161
161
|
// },
|
|
162
162
|
{
|
|
163
163
|
name: "num",
|
|
164
|
-
label: "
|
|
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: "
|
|
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.
|
|
43
|
-
value={
|
|
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>
|