@thefreshop/tb 1.0.17 → 1.0.18
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/dist/cjs/index.js +16 -15
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/tbpage/component/modules/antBaseModalCreate/wiget.d.ts +1 -1
- package/dist/esm/index.js +16 -15
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/tbpage/component/modules/antBaseModalCreate/wiget.d.ts +1 -1
- package/package.json +9 -3
package/dist/cjs/index.js
CHANGED
|
@@ -21181,7 +21181,7 @@ const readfileData = (file) => {
|
|
|
21181
21181
|
};
|
|
21182
21182
|
}
|
|
21183
21183
|
else {
|
|
21184
|
-
reject(
|
|
21184
|
+
reject("not_file");
|
|
21185
21185
|
}
|
|
21186
21186
|
});
|
|
21187
21187
|
};
|
|
@@ -21194,25 +21194,25 @@ const Files = (props) => {
|
|
|
21194
21194
|
return;
|
|
21195
21195
|
let init = props.initialValues[props.id];
|
|
21196
21196
|
if (init) {
|
|
21197
|
-
if (typeof init ===
|
|
21197
|
+
if (typeof init === "string") {
|
|
21198
21198
|
setFileList([
|
|
21199
21199
|
{
|
|
21200
21200
|
fileData: init,
|
|
21201
|
-
name:
|
|
21202
|
-
status:
|
|
21201
|
+
name: "",
|
|
21202
|
+
status: "done",
|
|
21203
21203
|
thumbUrl: init,
|
|
21204
|
-
uid: props.id
|
|
21205
|
-
}
|
|
21204
|
+
uid: props.id,
|
|
21205
|
+
},
|
|
21206
21206
|
]);
|
|
21207
21207
|
}
|
|
21208
21208
|
else
|
|
21209
21209
|
setFileList(init.map((i) => {
|
|
21210
21210
|
return {
|
|
21211
21211
|
fileData: i,
|
|
21212
|
-
name:
|
|
21213
|
-
status:
|
|
21212
|
+
name: "",
|
|
21213
|
+
status: "done",
|
|
21214
21214
|
thumbUrl: i,
|
|
21215
|
-
uid: props.id
|
|
21215
|
+
uid: props.id,
|
|
21216
21216
|
};
|
|
21217
21217
|
}));
|
|
21218
21218
|
}
|
|
@@ -21225,8 +21225,8 @@ const Files = (props) => {
|
|
|
21225
21225
|
onChange(fileList);
|
|
21226
21226
|
}
|
|
21227
21227
|
}, [fileList, props.count, onChange]);
|
|
21228
|
-
return (React.createElement(antd.Upload, { listType: props.listType, accept: props.listType ===
|
|
21229
|
-
removeIcon:
|
|
21228
|
+
return (React.createElement(antd.Upload, { listType: props.listType, accept: props.listType === "picture" ? "image/*" : "", fileList: fileList, showUploadList: {
|
|
21229
|
+
removeIcon: "x",
|
|
21230
21230
|
}, onRemove: (file) => {
|
|
21231
21231
|
const index = fileList.indexOf(file);
|
|
21232
21232
|
const newFileList = fileList.slice();
|
|
@@ -21243,17 +21243,18 @@ const Files = (props) => {
|
|
|
21243
21243
|
{
|
|
21244
21244
|
uid: file.uid,
|
|
21245
21245
|
name: file.name,
|
|
21246
|
-
status:
|
|
21246
|
+
status: "done",
|
|
21247
21247
|
fileData: fileData,
|
|
21248
|
-
thumbUrl: fileData
|
|
21249
|
-
|
|
21248
|
+
thumbUrl: fileData,
|
|
21249
|
+
file: file,
|
|
21250
|
+
},
|
|
21250
21251
|
]);
|
|
21251
21252
|
if (props.setImgCheck)
|
|
21252
21253
|
props.setImgCheck(true);
|
|
21253
21254
|
return false;
|
|
21254
21255
|
} }, fileList.length >= props.count ? null : (React.createElement(React.Fragment, null,
|
|
21255
21256
|
React.createElement(antd.Button, { icon: React.createElement(icons.UploadOutlined, null) }, "\uD30C\uC77C\uC120\uD0DD"),
|
|
21256
|
-
fileList.length === 0 ?
|
|
21257
|
+
fileList.length === 0 ? " 선택된 파일 없음" : null))));
|
|
21257
21258
|
};
|
|
21258
21259
|
|
|
21259
21260
|
/******************************************************************************
|