@hw-component/form 1.9.0 → 1.9.1

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/config.js CHANGED
@@ -12,7 +12,7 @@ import HDatePicker from '../TDPicker/index.js';
12
12
  import HRangePicker from '../TDPicker/RangePicker.js';
13
13
  import HTimePicker from '../TDPicker/TimePicker.js';
14
14
  import HUpload from '../Upload/index.js';
15
- import Index$2 from '../Upload/UrlUpload/index.js';
15
+ import HUrlUpload from '../Upload/UrlUpload/index.js';
16
16
  import HSubmit from '../Submit/index.js';
17
17
  import TextArea from '../TextArea/index.js';
18
18
  import ColorInput from '../Input/ColorInput/index.js';
@@ -40,7 +40,7 @@ var componentConfig = {
40
40
  timePicker: HTimePicker,
41
41
  input: HInput,
42
42
  upload: HUpload,
43
- urlUpload: Index$2,
43
+ urlUpload: HUrlUpload,
44
44
  submit: HSubmit,
45
45
  textArea: TextArea,
46
46
  colorInput: ColorInput,
@@ -1,3 +1,7 @@
1
1
  import type { IUrlUploadProps } from "../modal";
2
- declare const Index: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: IUrlUploadProps) => JSX.Element;
3
- export default Index;
2
+ import { HItemProps } from "@/components/Form/modal";
3
+ declare const _default: {
4
+ Component: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: IUrlUploadProps) => JSX.Element;
5
+ placeholder: ({ label }: HItemProps) => string;
6
+ };
7
+ export default _default;
@@ -157,6 +157,13 @@ var Index = function Index(_ref) {
157
157
  })]
158
158
  });
159
159
  };
160
+ var HUrlUpload = {
161
+ Component: Index,
162
+ placeholder: function placeholder(_ref2) {
163
+ var label = _ref2.label;
164
+ return "\u8BF7\u8F93\u5165".concat(label, "\u6587\u4EF6\u5730\u5740");
165
+ }
166
+ };
160
167
 
161
- export { Index as default };
168
+ export { HUrlUpload as default };
162
169
  // powered by hdj
package/es/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const HSelect: import("react").ForwardRefExoticComponent<import("
10
10
  export declare const HInput: ({ copy, value, addonAfter, ...props }: import("./Input/modal").HInputProps<any>) => JSX.Element;
11
11
  export declare const HSelectInput: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
12
12
  export declare const HUpload: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
13
- export declare const HUrlUpload: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, ...props }: import("./Upload/modal").IUrlUploadProps) => JSX.Element;
13
+ export declare const HUrlUpload: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: import("./Upload/modal").IUrlUploadProps) => JSX.Element;
14
14
  export declare const HButtonInput: import("react").FC<import("./Input/modal").HButtonInputProps>;
15
15
  export declare const HCheckBox: import("react").FC<import("./CheckboxGroup/modal").HCheckboxProps>;
16
16
  export declare const HSwitch: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
package/es/index.js CHANGED
@@ -14,7 +14,7 @@ var HSelect = componentConfig.select;
14
14
  var HInput = componentConfig.input;
15
15
  var HSelectInput = componentConfig.selectInput;
16
16
  var HUpload = componentConfig.upload;
17
- var HUrlUpload = componentConfig.urlUpload;
17
+ var HUrlUpload = componentConfig.urlUpload.Component;
18
18
  var HButtonInput = componentConfig.buttonInput;
19
19
  var HCheckBox = componentConfig.checkBox;
20
20
  var HSwitch = componentConfig.switch;
@@ -1,3 +1,7 @@
1
1
  import type { IUrlUploadProps } from "../modal";
2
- declare const Index: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: IUrlUploadProps) => JSX.Element;
3
- export default Index;
2
+ import { HItemProps } from "@/components/Form/modal";
3
+ declare const _default: {
4
+ Component: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: IUrlUploadProps) => JSX.Element;
5
+ placeholder: ({ label }: HItemProps) => string;
6
+ };
7
+ export default _default;
@@ -160,6 +160,13 @@ var Index = function Index(_ref) {
160
160
  })]
161
161
  });
162
162
  };
163
+ var HUrlUpload = {
164
+ Component: Index,
165
+ placeholder: function placeholder(_ref2) {
166
+ var label = _ref2.label;
167
+ return "\u8BF7\u8F93\u5165".concat(label, "\u6587\u4EF6\u5730\u5740");
168
+ }
169
+ };
163
170
 
164
- exports.default = Index;
171
+ exports.default = HUrlUpload;
165
172
  // powered by h
package/lib/index.d.ts CHANGED
@@ -10,7 +10,7 @@ export declare const HSelect: import("react").ForwardRefExoticComponent<import("
10
10
  export declare const HInput: ({ copy, value, addonAfter, ...props }: import("./Input/modal").HInputProps<any>) => JSX.Element;
11
11
  export declare const HSelectInput: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
12
12
  export declare const HUpload: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
13
- export declare const HUrlUpload: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, ...props }: import("./Upload/modal").IUrlUploadProps) => JSX.Element;
13
+ export declare const HUrlUpload: ({ placeholder, value, onChange, mediaType, inputHelper, style, exFiles, spaceSize, ...props }: import("./Upload/modal").IUrlUploadProps) => JSX.Element;
14
14
  export declare const HButtonInput: import("react").FC<import("./Input/modal").HButtonInputProps>;
15
15
  export declare const HCheckBox: import("react").FC<import("./CheckboxGroup/modal").HCheckboxProps>;
16
16
  export declare const HSwitch: import("react").ForwardRefExoticComponent<import("./Form/modal").HFormItemProps & import("react").RefAttributes<any>>;
package/lib/index.js CHANGED
@@ -15,7 +15,7 @@ var HSelect = config.default.select;
15
15
  var HInput = config.default.input;
16
16
  var HSelectInput = config.default.selectInput;
17
17
  var HUpload = config.default.upload;
18
- var HUrlUpload = config.default.urlUpload;
18
+ var HUrlUpload = config.default.urlUpload.Component;
19
19
  var HButtonInput = config.default.buttonInput;
20
20
  var HCheckBox = config.default.checkBox;
21
21
  var HSwitch = config.default.switch;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.9.0",
3
+ "version": "1.9.1",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -6,6 +6,7 @@ import TypeEle from "../MediaTypeEle/TypeEle";
6
6
  import { useRef, useState } from "react";
7
7
  import type { RcFile, UploadFile } from "antd/es/upload/interface";
8
8
  import { useDefaultExFiles } from "./hooks";
9
+ import {HItemProps} from "@/components/Form/modal";
9
10
  const { Text } = Typography;
10
11
  const mkSubFileList = (fileList: UploadFile[], maxCount = 1) => {
11
12
  const len = fileList.length;
@@ -116,4 +117,9 @@ const Index = ({
116
117
  </Space>
117
118
  );
118
119
  };
119
- export default Index;
120
+ export default {
121
+ Component: Index,
122
+ placeholder: ({ label }: HItemProps) => {
123
+ return `请输入${label}文件地址`
124
+ },
125
+ };
@@ -14,7 +14,7 @@ export const HSelect = FormConfig.select;
14
14
  export const HInput = FormConfig.input;
15
15
  export const HSelectInput = FormConfig.selectInput;
16
16
  export const HUpload = FormConfig.upload;
17
- export const HUrlUpload = FormConfig.urlUpload;
17
+ export const HUrlUpload = FormConfig.urlUpload.Component;
18
18
  export const HButtonInput = FormConfig.buttonInput;
19
19
  export const HCheckBox = FormConfig.checkBox;
20
20
  export const HSwitch = FormConfig.switch;
@@ -32,6 +32,9 @@ export default () => {
32
32
  }}
33
33
  onChange={setFiles1}
34
34
  />
35
+ <HUrlUpload
36
+ inputHelper="测试"
37
+ />
35
38
  </Space>
36
39
  );
37
40
  };