@cloudbase/weda-ui 3.7.12 → 3.7.14
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-menu-layout.d.ts +8 -0
- package/dist/configs/components/wd-menu-layout.js +5 -0
- package/dist/configs/index.d.ts +8 -0
- package/dist/configs/utils/layout.js +0 -8
- package/dist/web/components/form/select/index.d.ts +2 -0
- package/dist/web/components/form/select/index.js +2 -2
- package/dist/web/components/wd-form-obj/base-form-obj.js +7 -3
- package/dist/web/components/wd-table/utils/index.js +1 -1
- package/dist/web/components/wd-table/wd-table.js +1 -1
- package/package.json +1 -1
|
@@ -108,6 +108,10 @@ export declare const configInfo: {
|
|
|
108
108
|
readonly name: "布局导航头部";
|
|
109
109
|
readonly selector: ".wd-menulayout-header";
|
|
110
110
|
readonly description: "可以为布局导航头部编写样式";
|
|
111
|
+
}, {
|
|
112
|
+
readonly name: "布局导航品牌插槽";
|
|
113
|
+
readonly selector: ".wd-menulayout-header__logo-wrap";
|
|
114
|
+
readonly description: "可以为布局导航品牌插槽编写样式";
|
|
111
115
|
}, {
|
|
112
116
|
readonly name: "布局导航主体";
|
|
113
117
|
readonly selector: ".wd-menulayout-body";
|
|
@@ -312,6 +316,10 @@ declare const config: {
|
|
|
312
316
|
readonly name: "布局导航头部";
|
|
313
317
|
readonly selector: ".wd-menulayout-header";
|
|
314
318
|
readonly description: "可以为布局导航头部编写样式";
|
|
319
|
+
}, {
|
|
320
|
+
readonly name: "布局导航品牌插槽";
|
|
321
|
+
readonly selector: ".wd-menulayout-header__logo-wrap";
|
|
322
|
+
readonly description: "可以为布局导航品牌插槽编写样式";
|
|
315
323
|
}, {
|
|
316
324
|
readonly name: "布局导航主体";
|
|
317
325
|
readonly selector: ".wd-menulayout-body";
|
|
@@ -166,6 +166,11 @@ export const configInfo = {
|
|
|
166
166
|
selector: '.wd-menulayout-header',
|
|
167
167
|
description: '可以为布局导航头部编写样式',
|
|
168
168
|
},
|
|
169
|
+
{
|
|
170
|
+
name: '布局导航品牌插槽',
|
|
171
|
+
selector: '.wd-menulayout-header__logo-wrap',
|
|
172
|
+
description: '可以为布局导航品牌插槽编写样式',
|
|
173
|
+
},
|
|
169
174
|
{
|
|
170
175
|
name: '布局导航主体',
|
|
171
176
|
selector: '.wd-menulayout-body',
|
package/dist/configs/index.d.ts
CHANGED
|
@@ -18685,6 +18685,10 @@ export declare const components: {
|
|
|
18685
18685
|
readonly name: "布局导航头部";
|
|
18686
18686
|
readonly selector: ".wd-menulayout-header";
|
|
18687
18687
|
readonly description: "可以为布局导航头部编写样式";
|
|
18688
|
+
}, {
|
|
18689
|
+
readonly name: "布局导航品牌插槽";
|
|
18690
|
+
readonly selector: ".wd-menulayout-header__logo-wrap";
|
|
18691
|
+
readonly description: "可以为布局导航品牌插槽编写样式";
|
|
18688
18692
|
}, {
|
|
18689
18693
|
readonly name: "布局导航主体";
|
|
18690
18694
|
readonly selector: ".wd-menulayout-body";
|
|
@@ -38744,6 +38748,10 @@ declare const _default: {
|
|
|
38744
38748
|
readonly name: "布局导航头部";
|
|
38745
38749
|
readonly selector: ".wd-menulayout-header";
|
|
38746
38750
|
readonly description: "可以为布局导航头部编写样式";
|
|
38751
|
+
}, {
|
|
38752
|
+
readonly name: "布局导航品牌插槽";
|
|
38753
|
+
readonly selector: ".wd-menulayout-header__logo-wrap";
|
|
38754
|
+
readonly description: "可以为布局导航品牌插槽编写样式";
|
|
38747
38755
|
}, {
|
|
38748
38756
|
readonly name: "布局导航主体";
|
|
38749
38757
|
readonly selector: ".wd-menulayout-body";
|
|
@@ -497,10 +497,6 @@ export const getItems = (template = 'horizontal') => {
|
|
|
497
497
|
id: 'headSlot',
|
|
498
498
|
component: '',
|
|
499
499
|
},
|
|
500
|
-
{
|
|
501
|
-
id: 'headRightSlot',
|
|
502
|
-
component: '',
|
|
503
|
-
},
|
|
504
500
|
]);
|
|
505
501
|
}
|
|
506
502
|
else if (template === 'base') {
|
|
@@ -513,10 +509,6 @@ export const getItems = (template = 'horizontal') => {
|
|
|
513
509
|
id: 'headSlot',
|
|
514
510
|
component: '',
|
|
515
511
|
},
|
|
516
|
-
{
|
|
517
|
-
id: 'headRightSlot',
|
|
518
|
-
component: '',
|
|
519
|
-
},
|
|
520
512
|
]);
|
|
521
513
|
}
|
|
522
514
|
else {
|
|
@@ -4,6 +4,7 @@ import './style';
|
|
|
4
4
|
import type { CommonFormPropsType } from '../types';
|
|
5
5
|
import { IUseoptionsParams } from './request';
|
|
6
6
|
import { TSingleForeignFormat } from './formats-util';
|
|
7
|
+
import { AttachContainer } from 'tea-component/lib/_util/get-overlay-root';
|
|
7
8
|
export declare const moment: any;
|
|
8
9
|
declare const Select: React.NamedExoticComponent<PropsType>;
|
|
9
10
|
export default Select;
|
|
@@ -57,6 +58,7 @@ export interface PropsType extends CommonFormPropsType {
|
|
|
57
58
|
readOnly?: boolean;
|
|
58
59
|
ignoreCase?: boolean;
|
|
59
60
|
staticSearchable?: boolean;
|
|
61
|
+
popupContainer?: AttachContainer;
|
|
60
62
|
}
|
|
61
63
|
export declare const defaultProps: {
|
|
62
64
|
events: {};
|
|
@@ -70,7 +70,7 @@ export const defaultProps = {
|
|
|
70
70
|
separator: ',',
|
|
71
71
|
};
|
|
72
72
|
// const button = <Button type="icon" icon="more" />;
|
|
73
|
-
function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, enumName, defaultValue, placeholder = '请选择', mode = 'selector', dateMode = 'day', events = emptyObject, disabled = false, range = defaultProps.range, startDate, endDate, defaultDate, defaultTime, startTime, endTime, defaultRegion, defaultMutiRegion, regionType, separator = defaultProps.separator, size = defaultProps.size, clearable = false, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, }) {
|
|
73
|
+
function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, enumName, defaultValue, placeholder = '请选择', mode = 'selector', dateMode = 'day', events = emptyObject, disabled = false, range = defaultProps.range, startDate, endDate, defaultDate, defaultTime, startTime, endTime, defaultRegion, defaultMutiRegion, regionType, separator = defaultProps.separator, size = defaultProps.size, clearable = false, onChange, onSearchValueInput, readOnly, ignoreCase, staticSearchable, popupContainer, }) {
|
|
74
74
|
const { classPrefix } = useConfig();
|
|
75
75
|
// 两次默认值不同, 需要刷新
|
|
76
76
|
const prevDefaultRef = React.useRef();
|
|
@@ -251,5 +251,5 @@ function SelectPc({ name, where, dataSourceName, viewId, format, primaryField, e
|
|
|
251
251
|
}
|
|
252
252
|
};
|
|
253
253
|
const dropdown = createDropdown();
|
|
254
|
-
return _jsx(ConfigProvider, { classPrefix: "wedatea2td", children: dropdown });
|
|
254
|
+
return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", popupContainer: popupContainer, children: dropdown }));
|
|
255
255
|
}
|
|
@@ -138,9 +138,13 @@ export const BaseFormObj = forwardRef(function BaseFormObj(props, ref) {
|
|
|
138
138
|
return value;
|
|
139
139
|
};
|
|
140
140
|
const dealObjChange = (params, objValue) => {
|
|
141
|
-
var _a;
|
|
141
|
+
var _a, _b;
|
|
142
|
+
// 如果设置的是空对象,则认为是覆盖更新
|
|
143
|
+
if (!((_a = Object.keys(params.value)) === null || _a === void 0 ? void 0 : _a.length)) {
|
|
144
|
+
return params.value;
|
|
145
|
+
}
|
|
142
146
|
let value;
|
|
143
|
-
if ((
|
|
147
|
+
if ((_b = Object.keys(objValue || {})) === null || _b === void 0 ? void 0 : _b.length) {
|
|
144
148
|
value = deepClone({ ...objValue, ...params.value });
|
|
145
149
|
}
|
|
146
150
|
return value;
|
|
@@ -204,7 +208,7 @@ export const BaseFormObj = forwardRef(function BaseFormObj(props, ref) {
|
|
|
204
208
|
]);
|
|
205
209
|
const changeDebounce = useDebouncedCallback(useCallback((value, option) => {
|
|
206
210
|
change(value, option);
|
|
207
|
-
}, [change]),
|
|
211
|
+
}, [change]), 300);
|
|
208
212
|
/**
|
|
209
213
|
* 子组件默认值变更,触发嵌套表单值更新
|
|
210
214
|
*/
|
|
@@ -603,7 +603,7 @@ export const getWhereParam = (relatedKey, rowId) => {
|
|
|
603
603
|
return whereList;
|
|
604
604
|
};
|
|
605
605
|
export const getCurrentPageData = (data = [], pageNo, pageSize) => {
|
|
606
|
-
const records = [].concat(data);
|
|
606
|
+
const records = [].concat(deepClone(data));
|
|
607
607
|
// eslint-disable-next-line @typescript-eslint/no-magic-numbers
|
|
608
608
|
return records.slice((pageNo - 1) * pageSize, pageNo * pageSize) || []; // 当前页的数据
|
|
609
609
|
};
|
|
@@ -548,7 +548,7 @@ export const WdTable = forwardRef(function TableComp(tableProps, ref) {
|
|
|
548
548
|
}
|
|
549
549
|
},
|
|
550
550
|
// 当前页数据
|
|
551
|
-
records: isExpression
|
|
551
|
+
records: isExpression && !enableTotal
|
|
552
552
|
? getCurrentPageData(dataRef.current.tableRecords, query.pageNo, query.pageSize)
|
|
553
553
|
: dataRef.current.tableRecords,
|
|
554
554
|
// 当前总数
|