@cloudbase/weda-ui 3.6.5 → 3.6.7
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/configs/components/wd-upload-file.d.ts +1 -0
- package/dist/configs/components/wd-upload-file.js +4 -1
- package/dist/configs/components/wd-upload-image.d.ts +2 -0
- package/dist/configs/components/wd-upload-image.js +4 -1
- package/dist/configs/index.d.ts +4 -0
- package/dist/web/components/form/uploader/uploader.h5.js +3 -3
- package/dist/web/components/form/uploader/uploader.pc.js +3 -3
- package/dist/web/components/listView/index.js +4 -1
- package/dist/web/components/wd-table/utils/index.js +2 -2
- package/package.json +1 -1
|
@@ -109,6 +109,7 @@ declare const config: {
|
|
|
109
109
|
} | {
|
|
110
110
|
detail: import("@sinclair/typebox").TObject<{
|
|
111
111
|
value: import("@sinclair/typebox").TUnknown;
|
|
112
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
112
113
|
}>;
|
|
113
114
|
name: string;
|
|
114
115
|
title: string;
|
|
@@ -76,7 +76,10 @@ const classes = [
|
|
|
76
76
|
CLASSES.item_error,
|
|
77
77
|
CLASSES.item_help,
|
|
78
78
|
];
|
|
79
|
-
const paramValueType = Type.Object({
|
|
79
|
+
const paramValueType = Type.Object({
|
|
80
|
+
value: Type.Unknown({ title: '值' }),
|
|
81
|
+
isDelete: Type.Optional(Type.Boolean({ title: '是否删除动作' })),
|
|
82
|
+
});
|
|
80
83
|
// export default
|
|
81
84
|
const config = defineConfig({
|
|
82
85
|
$schema: 'https://comp-public-1303824488.cos.ap-shanghai.myqcloud.com/schema/lcds_component.json',
|
|
@@ -49,6 +49,7 @@ export type EventsType = {
|
|
|
49
49
|
}) => void;
|
|
50
50
|
change: (arg: {
|
|
51
51
|
value: unknown;
|
|
52
|
+
isDelete?: boolean;
|
|
52
53
|
}) => void;
|
|
53
54
|
error: (err: unknown) => void;
|
|
54
55
|
}>;
|
|
@@ -119,6 +120,7 @@ declare const config: {
|
|
|
119
120
|
} | {
|
|
120
121
|
detail: import("@sinclair/typebox").TObject<{
|
|
121
122
|
value: import("@sinclair/typebox").TUnknown;
|
|
123
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
122
124
|
}>;
|
|
123
125
|
name: string;
|
|
124
126
|
title: string;
|
|
@@ -105,7 +105,10 @@ const data = Type.Partial(Type.Object({
|
|
|
105
105
|
},
|
|
106
106
|
}),
|
|
107
107
|
}));
|
|
108
|
-
const paramValueType = Type.Object({
|
|
108
|
+
const paramValueType = Type.Object({
|
|
109
|
+
value: Type.Unknown({ title: '值' }),
|
|
110
|
+
isDelete: Type.Optional(Type.Boolean({ title: '是否删除动作' })),
|
|
111
|
+
});
|
|
109
112
|
const events = [
|
|
110
113
|
{ ...{}, ...FORM_ITEM_EVENTS.change, detail: paramValueType },
|
|
111
114
|
FORM_ITEM_EVENTS.success,
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -15382,6 +15382,7 @@ export declare const components: {
|
|
|
15382
15382
|
} | {
|
|
15383
15383
|
detail: import("@sinclair/typebox").TObject<{
|
|
15384
15384
|
value: import("@sinclair/typebox").TUnknown;
|
|
15385
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
15385
15386
|
}>;
|
|
15386
15387
|
name: string;
|
|
15387
15388
|
title: string;
|
|
@@ -15550,6 +15551,7 @@ export declare const components: {
|
|
|
15550
15551
|
} | {
|
|
15551
15552
|
detail: import("@sinclair/typebox").TObject<{
|
|
15552
15553
|
value: import("@sinclair/typebox").TUnknown;
|
|
15554
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
15553
15555
|
}>;
|
|
15554
15556
|
name: string;
|
|
15555
15557
|
title: string;
|
|
@@ -34658,6 +34660,7 @@ declare const _default: {
|
|
|
34658
34660
|
} | {
|
|
34659
34661
|
detail: import("@sinclair/typebox").TObject<{
|
|
34660
34662
|
value: import("@sinclair/typebox").TUnknown;
|
|
34663
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
34661
34664
|
}>;
|
|
34662
34665
|
name: string;
|
|
34663
34666
|
title: string;
|
|
@@ -34826,6 +34829,7 @@ declare const _default: {
|
|
|
34826
34829
|
} | {
|
|
34827
34830
|
detail: import("@sinclair/typebox").TObject<{
|
|
34828
34831
|
value: import("@sinclair/typebox").TUnknown;
|
|
34832
|
+
isDelete: import("@sinclair/typebox").TOptional<import("@sinclair/typebox").TBoolean>;
|
|
34829
34833
|
}>;
|
|
34830
34834
|
name: string;
|
|
34831
34835
|
title: string;
|
|
@@ -50,13 +50,13 @@ export function ImageUploaderH5({ title: label, maxUploadCount, maxSize = 10, ac
|
|
|
50
50
|
const deleteFile = (url) => {
|
|
51
51
|
const value = single ? '' : fileIdList.filter((f) => f !== url);
|
|
52
52
|
setInputValue(value);
|
|
53
|
-
handleChange([].concat(value));
|
|
53
|
+
handleChange([].concat(value), true);
|
|
54
54
|
};
|
|
55
|
-
const handleChange = (ids) => {
|
|
55
|
+
const handleChange = (ids, isDelete = false) => {
|
|
56
56
|
const value = single ? ids[0] || '' : ids;
|
|
57
57
|
setInputValue(value);
|
|
58
58
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
59
|
-
events === null || events === void 0 ? void 0 : events.change({ value });
|
|
59
|
+
events === null || events === void 0 ? void 0 : events.change({ value, isDelete });
|
|
60
60
|
};
|
|
61
61
|
const onProgress = (progressEvent) => {
|
|
62
62
|
let percentCompleted = 0;
|
|
@@ -44,12 +44,12 @@ export function UploaderPCInner(props) {
|
|
|
44
44
|
defaultValueRef.current = defaultValue;
|
|
45
45
|
setfileIDList(initialValue);
|
|
46
46
|
}, [defaultValue, single]);
|
|
47
|
-
const handleChange = (ids) => {
|
|
47
|
+
const handleChange = (ids, isDelete = false) => {
|
|
48
48
|
var _a;
|
|
49
49
|
setfileIDList(ids);
|
|
50
50
|
const value = single ? ids[0] || '' : ids;
|
|
51
51
|
onChange === null || onChange === void 0 ? void 0 : onChange(value);
|
|
52
|
-
(_a = events === null || events === void 0 ? void 0 : events.change) === null || _a === void 0 ? void 0 : _a.call(events, { value });
|
|
52
|
+
(_a = events === null || events === void 0 ? void 0 : events.change) === null || _a === void 0 ? void 0 : _a.call(events, { value, isDelete });
|
|
53
53
|
};
|
|
54
54
|
// 方法:上传前,判断图片大小、数量是否满足,取消默认组件的上传事件,用自定义的 tcb 上传方法
|
|
55
55
|
const beforeHandle = async (file, fileList, isAccepted, error) => {
|
|
@@ -178,7 +178,7 @@ export function UploaderPCInner(props) {
|
|
|
178
178
|
// 删除图片
|
|
179
179
|
const deleteHandle = (fileID) => {
|
|
180
180
|
const ids = fileIDList.filter((d) => d !== fileID);
|
|
181
|
-
handleChange(ids);
|
|
181
|
+
handleChange(ids, true);
|
|
182
182
|
};
|
|
183
183
|
// 转换后的属性
|
|
184
184
|
const extraProps = {};
|
|
@@ -98,6 +98,7 @@ export default React.forwardRef(function ListView(props, ref) {
|
|
|
98
98
|
(_a = observeRef.current) === null || _a === void 0 ? void 0 : _a.disconnect();
|
|
99
99
|
clearContext();
|
|
100
100
|
};
|
|
101
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
101
102
|
}, []);
|
|
102
103
|
// 监听更改数据源时,清空当前列表
|
|
103
104
|
useEffect(() => {
|
|
@@ -240,7 +241,9 @@ export default React.forwardRef(function ListView(props, ref) {
|
|
|
240
241
|
clearTimeout(delayRef.current.statusTimer);
|
|
241
242
|
delayRef.current.statusTimer = null;
|
|
242
243
|
}
|
|
243
|
-
delayRef.current.statusTimer = window.setTimeout(statusCb, pagination === 'bottomLoad'
|
|
244
|
+
delayRef.current.statusTimer = window.setTimeout(statusCb, pagination === 'bottomLoad' && dataSourceType === 'expression'
|
|
245
|
+
? 3000
|
|
246
|
+
: 150);
|
|
244
247
|
}
|
|
245
248
|
else {
|
|
246
249
|
statusCb();
|
|
@@ -185,7 +185,7 @@ const getSearchValues = (searchValues) => {
|
|
|
185
185
|
});
|
|
186
186
|
};
|
|
187
187
|
const getPageParam = ({ defaultSort, sort: _sort, params, _defaultPageSize, _defaultPageIndex, supportManyRelated, columns, isSupportMultipleSort, }) => {
|
|
188
|
-
let sort = defaultSort;
|
|
188
|
+
let sort = defaultSort || [];
|
|
189
189
|
// 运行态有值,以运行态为准
|
|
190
190
|
if ((_sort === null || _sort === void 0 ? void 0 : _sort.length) && _sort[0].order) {
|
|
191
191
|
params.orderBy = _sort[0].by;
|
|
@@ -193,7 +193,7 @@ const getPageParam = ({ defaultSort, sort: _sort, params, _defaultPageSize, _def
|
|
|
193
193
|
sort = _sort;
|
|
194
194
|
}
|
|
195
195
|
// 后端根据业务字段排序
|
|
196
|
-
sort = sort.map((n) => {
|
|
196
|
+
sort = sort === null || sort === void 0 ? void 0 : sort.map((n) => {
|
|
197
197
|
var _a;
|
|
198
198
|
return ({
|
|
199
199
|
...n,
|