@cloudbase/weda-ui 3.7.6 → 3.7.8

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.
Files changed (87) hide show
  1. package/dist/configs/components/button.d.ts +2 -2
  2. package/dist/configs/components/chart/line.d.ts +1 -1
  3. package/dist/configs/components/customer-service.d.ts +1 -1
  4. package/dist/configs/components/form-date.d.ts +2 -2
  5. package/dist/configs/components/form-depart-tree-select.d.ts +2 -2
  6. package/dist/configs/components/form-email.d.ts +2 -2
  7. package/dist/configs/components/form-input.d.ts +4 -4
  8. package/dist/configs/components/form-location.d.ts +4 -4
  9. package/dist/configs/components/form-multi-region.d.ts +2 -2
  10. package/dist/configs/components/form-phone.d.ts +2 -2
  11. package/dist/configs/components/form-region.d.ts +2 -2
  12. package/dist/configs/components/form-select-multiple.d.ts +2 -2
  13. package/dist/configs/components/form-select.d.ts +2 -2
  14. package/dist/configs/components/form-text-area.d.ts +2 -2
  15. package/dist/configs/components/form-time.d.ts +2 -2
  16. package/dist/configs/components/form-url.d.ts +2 -2
  17. package/dist/configs/components/form-user-tree-select.d.ts +2 -2
  18. package/dist/configs/components/wd-bubble.d.ts +6 -6
  19. package/dist/configs/components/wd-canvas.d.ts +1 -1
  20. package/dist/configs/components/wd-cascader.d.ts +3 -3
  21. package/dist/configs/components/wd-checkbox.d.ts +1 -1
  22. package/dist/configs/components/wd-code-editor.d.ts +1 -1
  23. package/dist/configs/components/wd-date-range.d.ts +1 -1
  24. package/dist/configs/components/wd-date.d.ts +1 -1
  25. package/dist/configs/components/wd-department.d.ts +1 -1
  26. package/dist/configs/components/wd-form-arr.d.ts +1 -1
  27. package/dist/configs/components/wd-form-detail.d.ts +1 -1
  28. package/dist/configs/components/wd-form-obj.d.ts +1 -1
  29. package/dist/configs/components/wd-icon.d.ts +1 -1
  30. package/dist/configs/components/wd-input-email.d.ts +3 -3
  31. package/dist/configs/components/wd-input-number.d.ts +2 -2
  32. package/dist/configs/components/wd-input-phone.d.ts +3 -3
  33. package/dist/configs/components/wd-input-url.d.ts +3 -3
  34. package/dist/configs/components/wd-input.d.ts +1 -1
  35. package/dist/configs/components/wd-location.d.ts +2 -2
  36. package/dist/configs/components/wd-member.d.ts +1 -1
  37. package/dist/configs/components/wd-progress.d.ts +2 -2
  38. package/dist/configs/components/wd-radio.d.ts +1 -1
  39. package/dist/configs/components/wd-rating.d.ts +4 -2
  40. package/dist/configs/components/wd-rating.js +9 -0
  41. package/dist/configs/components/wd-region.d.ts +1 -1
  42. package/dist/configs/components/wd-rich-text.d.ts +1 -1
  43. package/dist/configs/components/wd-select-multiple.d.ts +1 -1
  44. package/dist/configs/components/wd-select.d.ts +2 -2
  45. package/dist/configs/components/wd-switch.d.ts +2 -2
  46. package/dist/configs/components/wd-tag-select.d.ts +1 -1
  47. package/dist/configs/components/wd-textarea.d.ts +1 -1
  48. package/dist/configs/components/wd-time.d.ts +1 -1
  49. package/dist/configs/components/wd-upload-file.d.ts +3 -3
  50. package/dist/configs/components/wd-upload-image.d.ts +1 -1
  51. package/dist/configs/index.d.ts +128 -126
  52. package/dist/configs/type-utils/index.d.ts +1 -1
  53. package/dist/iconConfig.json +1 -1
  54. package/dist/style/index.scss +1 -1
  55. package/dist/web/components/flow/process/constants.d.ts +3 -3
  56. package/dist/web/components/form-date/index.d.ts +2 -2
  57. package/dist/web/components/form-depart-tree-select/index.d.ts +2 -2
  58. package/dist/web/components/form-email/index.d.ts +3 -3
  59. package/dist/web/components/form-image-uploader/index.d.ts +1 -1
  60. package/dist/web/components/form-input/index.d.ts +6 -6
  61. package/dist/web/components/form-input-hooks/index.d.ts +1 -1
  62. package/dist/web/components/form-location/index.d.ts +5 -5
  63. package/dist/web/components/form-multi-region/index.d.ts +2 -2
  64. package/dist/web/components/form-phone/index.d.ts +3 -3
  65. package/dist/web/components/form-radio/index.d.ts +3 -3
  66. package/dist/web/components/form-region/index.d.ts +2 -2
  67. package/dist/web/components/form-rich-text/index.d.ts +1 -1
  68. package/dist/web/components/form-select/index.d.ts +4 -4
  69. package/dist/web/components/form-select-multiple/index.d.ts +4 -4
  70. package/dist/web/components/form-switch/index.d.ts +1 -1
  71. package/dist/web/components/form-text-area/index.d.ts +3 -3
  72. package/dist/web/components/form-time/index.d.ts +2 -2
  73. package/dist/web/components/form-upload-file/index.d.ts +1 -1
  74. package/dist/web/components/form-url/index.d.ts +3 -3
  75. package/dist/web/components/form-user-tree-select/index.d.ts +2 -2
  76. package/dist/web/components/style.js +2 -0
  77. package/dist/web/components/wd-icon/wd-icon.js +0 -2
  78. package/dist/web/components/wd-input/wd-input.d.ts +3 -3
  79. package/dist/web/components/wd-input-email/wd-input-email.d.ts +1 -1
  80. package/dist/web/components/wd-input-phone/wd-input-phone.d.ts +3 -3
  81. package/dist/web/components/wd-input-url/wd-input-url.d.ts +1 -1
  82. package/dist/web/components/wd-textarea/wd-textarea.js +6 -3
  83. package/dist/web/components/wd-tree/utils.d.ts +6 -6
  84. package/dist/web/utils/loadIconCss.d.ts +1 -0
  85. package/dist/web/{components/wd-icon/useLoadCss.js → utils/loadIconCss.js} +11 -12
  86. package/package.json +3 -2
  87. package/dist/web/components/wd-icon/useLoadCss.d.ts +0 -1
@@ -83,11 +83,11 @@ declare const OPERATION_NODE_STATUS: readonly [{
83
83
  /** 操作节点状态相关映射关系转换 */
84
84
  declare const
85
85
  /** 状态码-状态名称映射 */
86
- CODE_NAME_MAPPING: Record<number, "stop" | "end" | "start" | "down" | "drop" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling">,
86
+ CODE_NAME_MAPPING: Record<number, "stop" | "drop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling">,
87
87
  /** 状态名称-状态码映射 */
88
- NAME_CODE_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "END" | "START" | "DOWN" | "DROP" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING", number>,
88
+ NAME_CODE_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "DROP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING", number>,
89
89
  /** 状态名称映射 */
90
- NAME_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "END" | "START" | "DOWN" | "DROP" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING", "stop" | "end" | "start" | "down" | "drop" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling">,
90
+ NAME_MAPPING: Record<"CC" | "REVOKE" | "STOP" | "DROP" | "END" | "START" | "DOWN" | "PENDING" | "PASS" | "TURN" | "TRANS" | "COUNTERSIGN" | "SKIP_PASS" | "SKIP_DOWN" | "HANDLED" | "HANDLING", "stop" | "drop" | "end" | "start" | "down" | "pending" | "revoke" | "cc" | "pass" | "turn" | "trans" | "countersign" | "skip_pass" | "skip_down" | "handled" | "handling">,
91
91
  /** 状态名称-状态文本信息映射 */
92
92
  NAME_TEXT_MAPPING: Record<string, {
93
93
  theme: string;
@@ -7,11 +7,11 @@ export type FormDateProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormDate: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  end: string;
@@ -7,11 +7,11 @@ export type FormDepartTreeSelectProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormDepartTreeSelect: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  layout: "" | "vertical" | "horizontal";
@@ -7,16 +7,16 @@ export type PropsType = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormEmail: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
12
+ focus: boolean;
11
13
  name: string;
12
- value: string;
13
14
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
15
16
  disabled: boolean;
16
17
  maxLength: number;
17
18
  placeholder: string;
18
19
  layout: "" | "vertical" | "horizontal";
19
- focus: boolean;
20
20
  labelVisible: boolean;
21
21
  clearable: boolean;
22
22
  requiredFlag: boolean;
@@ -7,9 +7,9 @@ export type FormImageUploaderProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormImageUploader: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string[];
10
11
  title: string;
11
12
  name: string;
12
- value: string[];
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,27 +7,27 @@ export type PropsType = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  };
9
9
  declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
11
+ type: "number" | "text" | "idcard" | "digit";
10
12
  label: string;
13
+ focus: boolean;
11
14
  name: string;
12
- type: "number" | "text" | "idcard" | "digit";
13
- value: string;
14
15
  required: boolean;
15
- size: "s" | "m" | "l" | "full";
16
+ size: "m" | "s" | "l" | "full";
16
17
  disabled: boolean;
17
18
  maxLength: number;
18
19
  placeholder: string;
19
20
  layout: "" | "vertical" | "horizontal";
20
- focus: boolean;
21
21
  labelVisible: boolean;
22
22
  isNickNameType: boolean;
23
23
  clearable: boolean;
24
24
  password: boolean;
25
25
  rules: {
26
+ format: string;
26
27
  pattern: string;
27
28
  message: string;
28
- format: string;
29
29
  }[];
30
- validateStatus: "success" | "error" | "warn";
30
+ validateStatus: "error" | "success" | "warn";
31
31
  requiredFlag: boolean;
32
32
  requiredMsg: string;
33
33
  }> & {
@@ -37,7 +37,7 @@ export declare function useFormInputTrait<Value = unknown>(inputParams: FormInpu
37
37
  readOnly: boolean;
38
38
  required: boolean;
39
39
  name: string;
40
- validateState: "success" | "error" | "warn";
40
+ validateState: "error" | "success" | "warn";
41
41
  validateErrorMsg: string;
42
42
  /**
43
43
  * @deprecated 在Wd组件中应该直接用输入的那个,通过css联动而不是js
@@ -7,8 +7,6 @@ export type FormLocationProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormLocation: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
- label: string;
11
- name: string;
12
10
  value: {
13
11
  address: string;
14
12
  geopoint: {
@@ -16,16 +14,18 @@ declare const FormLocation: React.ForwardRefExoticComponent<CommonPropsType & im
16
14
  coordinates: [number, number];
17
15
  };
18
16
  };
17
+ label: string;
18
+ drag: boolean;
19
+ name: string;
19
20
  required: boolean;
20
21
  disabled: boolean;
21
22
  layout: "" | "vertical" | "horizontal";
22
23
  zoom: boolean;
23
- drag: boolean;
24
- locationType: 2 | 1;
24
+ locationType: 1 | 2;
25
25
  labelVisible: boolean;
26
26
  showLngLat: boolean;
27
27
  showMap: boolean;
28
- validateStatus: "success" | "error" | "warn";
28
+ validateStatus: "error" | "success" | "warn";
29
29
  locationRange: 0 | -1 | 100 | 1000 | 500 | 300 | 2000;
30
30
  customRange: number;
31
31
  requiredFlag: boolean;
@@ -7,11 +7,11 @@ export type FormMultiRegionProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormMultiRegion: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  layout: "" | "vertical" | "horizontal";
@@ -7,15 +7,15 @@ export type PropsType = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormPhone: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
12
+ focus: boolean;
11
13
  name: string;
12
- value: string;
13
14
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
15
16
  disabled: boolean;
16
17
  placeholder: string;
17
18
  layout: "" | "vertical" | "horizontal";
18
- focus: boolean;
19
19
  labelVisible: boolean;
20
20
  clearable: boolean;
21
21
  requiredFlag: boolean;
@@ -11,16 +11,16 @@ declare const FormRadio: React.ForwardRefExoticComponent<CommonPropsType & {
11
11
  disabled: boolean;
12
12
  readOnly: boolean;
13
13
  } & import("type-fest").Simplify<{
14
+ value: string;
15
+ format: string;
14
16
  label: string;
15
17
  name: string;
16
- format: string;
17
- value: string;
18
18
  required: boolean;
19
19
  disabled: boolean;
20
20
  layout: "" | "vertical" | "horizontal";
21
21
  range: {
22
- label: string;
23
22
  value: string;
23
+ label: string;
24
24
  }[];
25
25
  tipBlock: string;
26
26
  labelVisible: boolean;
@@ -7,11 +7,11 @@ export type FormRegionProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormRegion: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string[];
10
11
  label: string;
11
12
  name: string;
12
- value: string[];
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  separator: string;
@@ -7,9 +7,9 @@ export type FormRichTextProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FromRichText: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  title: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,18 +7,18 @@ export type FormSelectProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormSelect: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
11
+ format: "x-enum" | "related" | "father-son" | "many-one";
10
12
  label: string;
11
13
  name: string;
12
- format: "x-enum" | "related" | "father-son" | "many-one";
13
- value: string;
14
14
  required: boolean;
15
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
16
16
  disabled: boolean;
17
17
  placeholder: string;
18
18
  layout: "" | "vertical" | "horizontal";
19
19
  range: {
20
- label: string;
21
20
  value: string;
21
+ label: string;
22
22
  }[];
23
23
  dataSourceName: string;
24
24
  tipBlock: string;
@@ -7,18 +7,18 @@ export type FormSelectMultipleProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormSelectMultiple: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string[];
11
+ format: "many-many" | "one-many";
10
12
  label: string;
11
13
  name: string;
12
- format: "many-many" | "one-many";
13
- value: string[];
14
14
  required: boolean;
15
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
16
16
  disabled: boolean;
17
17
  placeholder: string;
18
18
  layout: "" | "vertical" | "horizontal";
19
19
  range: {
20
- label: string;
21
20
  value: string;
21
+ label: string;
22
22
  }[];
23
23
  dataSourceName: string;
24
24
  tipBlock: string;
@@ -7,9 +7,9 @@ export type FormSwitchProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormSwitch: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: boolean;
10
11
  label: string;
11
12
  name: string;
12
- value: boolean;
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,16 +7,16 @@ export type FormTextAreaProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormTextArea: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
12
+ focus: boolean;
11
13
  name: string;
12
- value: string;
13
14
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
15
16
  disabled: boolean;
16
17
  maxLength: number;
17
18
  placeholder: string;
18
19
  layout: "" | "vertical" | "horizontal";
19
- focus: boolean;
20
20
  labelVisible: boolean;
21
21
  counterVisible: boolean;
22
22
  requiredFlag: boolean;
@@ -7,11 +7,11 @@ export type FormTimeProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormTime: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  end: string;
@@ -7,9 +7,9 @@ export type FormUploadFileProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUploadFile: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string[];
10
11
  label: string;
11
12
  name: string;
12
- value: string[];
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,16 +7,16 @@ export type PropsType = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUrl: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
12
+ focus: boolean;
11
13
  name: string;
12
- value: string;
13
14
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
15
+ size: "m" | "s" | "l" | "full";
15
16
  disabled: boolean;
16
17
  maxLength: number;
17
18
  placeholder: string;
18
19
  layout: "" | "vertical" | "horizontal";
19
- focus: boolean;
20
20
  labelVisible: boolean;
21
21
  clearable: boolean;
22
22
  requiredFlag: boolean;
@@ -7,11 +7,11 @@ export type FormUserTreeSelectProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUserTreeSelect: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
10
+ value: string;
10
11
  label: string;
11
12
  name: string;
12
- value: string;
13
13
  required: boolean;
14
- size: "s" | "m" | "l" | "full";
14
+ size: "m" | "s" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  layout: "" | "vertical" | "horizontal";
@@ -4,3 +4,5 @@ import '../weda-ui.css';
4
4
  // 组件标准化
5
5
  import '../../style/index.scss';
6
6
  import '../../style/components/icon/font/font.css';
7
+ // 加载图标库样式
8
+ import '../utils/loadIconCss';
@@ -7,10 +7,8 @@ import { usePlatform } from '../../utils/platform';
7
7
  import { convertLegacyEnum } from '../../utils/tool';
8
8
  import { WD_ICON_TYPE, WD_ICON_SIZE } from '../../../enum';
9
9
  import WdImage from '../wd-image';
10
- import { useLoadCss } from './useLoadCss';
11
10
  import '../style';
12
11
  export const WdIcon = forwardRef(function WdIcon({ type: _type = 'inner', name = 'success', src, size: _size = 'md', sizeSelfAdaptive: _sizeSelfAdaptive = false, events = emptyObject, className, style: _style, id, color: _color, ...props }, ref) {
13
- useLoadCss(); // 加载远程样式
14
12
  const platform = usePlatform();
15
13
  // 兼容旧版组件的属性值 size/color
16
14
  const remdiff = 2;
@@ -5,10 +5,11 @@ import type { DataType, EventsType } from '../../../configs/components/wd-input'
5
5
  * 标准化:单行输入组件
6
6
  */
7
7
  export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
8
+ type?: string;
8
9
  label?: string;
9
10
  template?: string;
11
+ focus?: boolean;
10
12
  name?: string;
11
- type?: string;
12
13
  required?: boolean;
13
14
  extra?: string;
14
15
  size?: string;
@@ -17,7 +18,6 @@ export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType &
17
18
  status?: string;
18
19
  layout?: string;
19
20
  after?: string;
20
- focus?: boolean;
21
21
  before?: string;
22
22
  prefixType?: string;
23
23
  prefixIcon?: string;
@@ -41,8 +41,8 @@ export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType &
41
41
  borderedPc?: boolean;
42
42
  rules?: {
43
43
  pattern?: string;
44
- message: string;
45
44
  format: string;
45
+ message: string;
46
46
  }[];
47
47
  requiredFlag?: boolean;
48
48
  requiredMsg?: string;
@@ -7,6 +7,7 @@ import type { DataType, EventsType } from '../../../configs/components/wd-input-
7
7
  export declare const WdInputEmail: React.ForwardRefExoticComponent<CommonPropsType & import("type-fest").Simplify<{
8
8
  label?: string;
9
9
  template?: string;
10
+ focus?: boolean;
10
11
  name?: string;
11
12
  required?: boolean;
12
13
  extra?: string;
@@ -16,7 +17,6 @@ export declare const WdInputEmail: React.ForwardRefExoticComponent<CommonPropsTy
16
17
  status?: string;
17
18
  layout?: string;
18
19
  after?: string;
19
- focus?: boolean;
20
20
  before?: string;
21
21
  prefixType?: string;
22
22
  prefixIcon?: string;
@@ -36,10 +36,11 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
36
36
  originValue: import("@sinclair/typebox").TString;
37
37
  }>;
38
38
  }]>> & import("type-fest").Simplify<{
39
+ type?: string;
39
40
  label?: string;
40
41
  template?: string;
42
+ focus?: boolean;
41
43
  name?: string;
42
- type?: string;
43
44
  required?: boolean;
44
45
  extra?: string;
45
46
  size?: string;
@@ -48,7 +49,6 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
48
49
  status?: string;
49
50
  layout?: string;
50
51
  after?: string;
51
- focus?: boolean;
52
52
  before?: string;
53
53
  prefixType?: string;
54
54
  prefixIcon?: string;
@@ -72,8 +72,8 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
72
72
  borderedPc?: boolean;
73
73
  rules?: {
74
74
  pattern?: string;
75
- message: string;
76
75
  format: string;
76
+ message: string;
77
77
  }[];
78
78
  requiredFlag?: boolean;
79
79
  requiredMsg?: string;
@@ -38,6 +38,7 @@ export declare const WdInputUrl: React.ForwardRefExoticComponent<CommonPropsType
38
38
  }]>> & import("type-fest").Simplify<{
39
39
  label?: string;
40
40
  template?: string;
41
+ focus?: boolean;
41
42
  name?: string;
42
43
  required?: boolean;
43
44
  extra?: string;
@@ -47,7 +48,6 @@ export declare const WdInputUrl: React.ForwardRefExoticComponent<CommonPropsType
47
48
  status?: string;
48
49
  layout?: string;
49
50
  after?: string;
50
- focus?: boolean;
51
51
  before?: string;
52
52
  prefixType?: string;
53
53
  prefixIcon?: string;
@@ -37,7 +37,7 @@ export const WdTextarea = forwardRef(function WdTextarea(props, ref) {
37
37
  });
38
38
  const countCls = `${textareaWrap}__label ${root}-${classRoot}__count-text`;
39
39
  const displayValue = (_a = (zhRef.current ? zhValue : value)) !== null && _a !== void 0 ? _a : '';
40
- // 输入自动滚动
40
+ // 输入自动滚动,关闭自动增高,value 变化不应该去改变样式
41
41
  const autoScroll = function (isManual) {
42
42
  if (!textareaRef.current)
43
43
  return;
@@ -52,7 +52,11 @@ export const WdTextarea = forwardRef(function WdTextarea(props, ref) {
52
52
  useEffect(() => {
53
53
  autoScroll();
54
54
  // eslint-disable-next-line react-hooks/exhaustive-deps
55
- }, [autoHeight, inputId]);
55
+ }, [autoHeight]);
56
+ useEffect(() => {
57
+ autoScroll(true);
58
+ // eslint-disable-next-line react-hooks/exhaustive-deps
59
+ }, [value]);
56
60
  /** 内部事件 */
57
61
  const onChange = function (e) {
58
62
  var _a;
@@ -63,7 +67,6 @@ export const WdTextarea = forwardRef(function WdTextarea(props, ref) {
63
67
  else {
64
68
  onChangeForm(text);
65
69
  (_a = events.change) === null || _a === void 0 ? void 0 : _a.call(events, { value: text }, { originEvent: e });
66
- autoScroll(true);
67
70
  }
68
71
  };
69
72
  const onFocus = function (e) {
@@ -127,9 +127,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
127
127
  selected: string[];
128
128
  currentNode: {
129
129
  data?: {
130
+ value: string;
130
131
  label: string;
131
132
  children: any[];
132
- value: string;
133
133
  disabled: boolean;
134
134
  foldIcon: string;
135
135
  expendIcon: string;
@@ -138,9 +138,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
138
138
  };
139
139
  selectedPositions: string[];
140
140
  selectedNodes: {
141
+ value: string;
141
142
  label: string;
142
143
  children: any[];
143
- value: string;
144
144
  disabled: boolean;
145
145
  foldIcon: string;
146
146
  expendIcon: string;
@@ -148,9 +148,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
148
148
  }[];
149
149
  expandedPositions: string[];
150
150
  expandedNodes: {
151
+ value: string;
151
152
  label: string;
152
153
  children: any[];
153
- value: string;
154
154
  disabled: boolean;
155
155
  foldIcon: string;
156
156
  expendIcon: string;
@@ -159,9 +159,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
159
159
  searched: string[];
160
160
  searchedPositions: string[];
161
161
  searchedNodes: {
162
+ value: string;
162
163
  label: string;
163
164
  children: any[];
164
- value: string;
165
165
  disabled: boolean;
166
166
  foldIcon: string;
167
167
  expendIcon: string;
@@ -169,9 +169,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
169
169
  }[];
170
170
  checkedPositions: string[];
171
171
  checkedNodes: {
172
+ value: string;
172
173
  label: string;
173
174
  children: any[];
174
- value: string;
175
175
  disabled: boolean;
176
176
  foldIcon: string;
177
177
  expendIcon: string;
@@ -180,9 +180,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
180
180
  childChecked: string[];
181
181
  childCheckedPositions: string[];
182
182
  childCheckedNodes: {
183
+ value: string;
183
184
  label: string;
184
185
  children: any[];
185
- value: string;
186
186
  disabled: boolean;
187
187
  foldIcon: string;
188
188
  expendIcon: string;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,5 @@
1
- import { useState, useEffect } from 'react';
2
- import cfg from '../../../iconConfig.json';
3
- import { getUrlPath } from '../../utils/tool';
1
+ import cfg from '../../iconConfig.json';
2
+ import { getUrlPath } from './tool';
4
3
  // 加载样式,失败抛出错误
5
4
  function loadLink(url, className) {
6
5
  return new Promise((resolve, reject) => {
@@ -21,12 +20,12 @@ function loadLink(url, className) {
21
20
  }
22
21
  });
23
22
  }
24
- export function useLoadCss() {
25
- const [isLoad, setIsLoad] = useState(false);
26
- useEffect(() => {
27
- loadLink(getUrlPath(cfg.path, cfg.cssFile), 'wd-load-remote-icon')
28
- .then(() => setIsLoad(true))
29
- .catch();
30
- }, []);
31
- return isLoad;
32
- }
23
+ // 组件库加载后默认挂载图标库
24
+ (function () {
25
+ try {
26
+ loadLink(getUrlPath(cfg.path, cfg.cssFile), 'wd-load-remote-icon');
27
+ }
28
+ catch (e) {
29
+ console.error('加载图标库失败', e);
30
+ }
31
+ })();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.7.6",
3
+ "version": "3.7.8",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",
@@ -24,7 +24,8 @@
24
24
  "src/web/components/form/select/moment-locale.{ts,js}",
25
25
  "src/web/components/form-input-hooks/validator.ts",
26
26
  "dist/web/**/style.{js,ts}",
27
- "dist/style/**/*"
27
+ "dist/style/**/*",
28
+ "src/web/utils/loadIconCss.js"
28
29
  ],
29
30
  "publishConfig": {
30
31
  "access": "public"
@@ -1 +0,0 @@
1
- export declare function useLoadCss(): boolean;