@hw-component/form 1.6.5 → 1.6.6

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.
@@ -75,6 +75,9 @@ var useValueChange = function useValueChange(params) {
75
75
  if (labelInValue) {
76
76
  return val;
77
77
  }
78
+ if (val === undefined || mode === "tags") {
79
+ return val;
80
+ }
78
81
  if (!val) {
79
82
  return val;
80
83
  }
@@ -76,6 +76,9 @@ var useValueChange = function useValueChange(params) {
76
76
  if (labelInValue) {
77
77
  return val;
78
78
  }
79
+ if (val === undefined || mode === "tags") {
80
+ return val;
81
+ }
79
82
  if (!val) {
80
83
  return val;
81
84
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@hw-component/form",
3
- "version": "1.6.5",
3
+ "version": "1.6.6",
4
4
  "description": "基于antd二次开发",
5
5
  "repository": {
6
6
  "type": "git",
@@ -67,6 +67,9 @@ export const useValueChange = (params: PartialHSelectProps) => {
67
67
  if (labelInValue) {
68
68
  return val;
69
69
  }
70
+ if (val===undefined||mode==="tags"){
71
+ return val
72
+ }
70
73
  if (!val) {
71
74
  return val;
72
75
  }
@@ -18,8 +18,9 @@ export default () => {
18
18
  { name: "测试2", value: 20, userId: 112321 },
19
19
  ]}
20
20
  placeholder="多选"
21
- value={[10, 20]}
21
+ value={null}
22
22
  onChange={(val, option) => {
23
+ console.log(val)
23
24
  setSelectVal(val);
24
25
  }}
25
26
  allSelect={true}
@@ -32,6 +33,7 @@ export default () => {
32
33
  placeholder="tags模式"
33
34
  showSearch={true}
34
35
  allowClear={true}
36
+ value={null}
35
37
  options={[
36
38
  { label: "测试1", value: 10 },
37
39
  { label: "测试2", value: 20 },