@ecoding/components.antd 0.5.15 → 0.5.16

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.
@@ -152,6 +152,9 @@ const MultipleUpload = (props) => {
152
152
  isInnerChange.current = false;
153
153
  return;
154
154
  }
155
+ if (!value) {
156
+ setInfos([]);
157
+ }
155
158
  if (value && value.length > 0) {
156
159
  const temp = [];
157
160
  value.forEach((item, index) => {
@@ -222,6 +222,9 @@ const MultipleImgUpload = (props) => {
222
222
  isInnerChange.current = false;
223
223
  return;
224
224
  }
225
+ if (!value) {
226
+ setImgList([]);
227
+ }
225
228
  if (value && value.length > 0) {
226
229
  const temp = [];
227
230
  value.forEach((item, index) => {
@@ -13,7 +13,7 @@ import { UploadOutlined } from "@ant-design/icons";
13
13
  import { buildURL } from "@ecoding/helper.url";
14
14
  import Toast from "../../core/toast";
15
15
  const SingleFileUpload = (props) => {
16
- const [fileUrl, setFileUrl] = useState('');
16
+ const [fileUrl, setFileUrl] = useState(undefined);
17
17
  const [loading, setLoading] = useState(false);
18
18
  const action = useMemo(() => {
19
19
  if (typeof props.action === "string") {
@@ -93,6 +93,9 @@ const SingleFileUpload = (props) => {
93
93
  }, []);
94
94
  useEffect(() => {
95
95
  let item = props.value;
96
+ if (!item) {
97
+ setFileUrl(undefined);
98
+ }
96
99
  if (typeof item === "string" && (item || item == '') && fileUrl != item) {
97
100
  // 防止重复拼接domain
98
101
  item = props.domain ? item.replace(props.domain, "") : item;
@@ -166,6 +166,9 @@ const ImgUpload = (props) => {
166
166
  React.createElement("div", { style: { marginTop: 8 } }, props.buttonText))), [loading]);
167
167
  useEffect(() => {
168
168
  let item = props.value;
169
+ if (!item) {
170
+ setImageUrl(undefined);
171
+ }
169
172
  if (typeof item === "string" && item) {
170
173
  // 防止重复拼接domain
171
174
  item = props.domain ? item.replace(props.domain, "") : item;
@@ -72,7 +72,6 @@ const FiltersHorizontal = ({ items, itemValues, onFinish, onClear, y, setY, over
72
72
  setWrapH(110);
73
73
  }
74
74
  if (itemValues) {
75
- console.log(itemValues);
76
75
  form.setFieldsValue(itemValues);
77
76
  }
78
77
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ecoding/components.antd",
3
- "version": "0.5.15",
3
+ "version": "0.5.16",
4
4
  "author": "cxc",
5
5
  "homepage": "",
6
6
  "license": "MIT",
@@ -47,5 +47,5 @@
47
47
  "antd": "^6.0.0",
48
48
  "axios": "^1.1.2"
49
49
  },
50
- "gitHead": "aea1fd9c6bd9e8cb76f68b09e7779d5825ae56b4"
50
+ "gitHead": "078ccdbbe6892e97efd42efdd2afbe123be1daef"
51
51
  }