@cloudbase/weda-ui 3.13.6 → 3.14.0
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/chart/bar.d.ts +2 -2
- package/dist/configs/components/chart/bar.js +1 -1
- package/dist/configs/components/chart/line.d.ts +1 -1
- package/dist/configs/components/chart/pie.d.ts +1 -1
- package/dist/configs/components/form-date.d.ts +2 -2
- package/dist/configs/components/form-depart-tree-select.d.ts +2 -2
- package/dist/configs/components/form-email.d.ts +2 -2
- package/dist/configs/components/form-input.d.ts +2 -2
- package/dist/configs/components/form-location.d.ts +2 -2
- package/dist/configs/components/form-multi-region.d.ts +2 -2
- package/dist/configs/components/form-phone.d.ts +2 -2
- package/dist/configs/components/form-region.d.ts +2 -2
- package/dist/configs/components/form-select-multiple.d.ts +2 -2
- package/dist/configs/components/form-select.d.ts +2 -2
- package/dist/configs/components/form-text-area.d.ts +2 -2
- package/dist/configs/components/form-time.d.ts +2 -2
- package/dist/configs/components/form-url.d.ts +2 -2
- package/dist/configs/components/form-user-tree-select.d.ts +2 -2
- package/dist/configs/components/swiper.json +122 -0
- package/dist/configs/components/wd-canvas.d.ts +1 -1
- package/dist/configs/components/wd-cascader.d.ts +3 -3
- package/dist/configs/components/wd-checkbox.d.ts +1 -1
- package/dist/configs/components/wd-code-editor.d.ts +1 -1
- package/dist/configs/components/wd-date-range.d.ts +1 -1
- package/dist/configs/components/wd-date.d.ts +1 -1
- package/dist/configs/components/wd-department.d.ts +1 -1
- package/dist/configs/components/wd-form-arr.d.ts +1 -1
- package/dist/configs/components/wd-form-detail.d.ts +1 -1
- package/dist/configs/components/wd-form-obj.d.ts +1 -1
- package/dist/configs/components/wd-icon.d.ts +7 -2
- package/dist/configs/components/wd-icon.js +1 -5
- package/dist/configs/components/wd-input-email.d.ts +1 -1
- package/dist/configs/components/wd-input-number.d.ts +2 -2
- package/dist/configs/components/wd-input-phone.d.ts +1 -1
- package/dist/configs/components/wd-input-url.d.ts +1 -1
- package/dist/configs/components/wd-input.d.ts +1 -1
- package/dist/configs/components/wd-location.d.ts +2 -2
- package/dist/configs/components/wd-member.d.ts +1 -1
- package/dist/configs/components/wd-progress.d.ts +2 -2
- package/dist/configs/components/wd-radio.d.ts +1 -1
- package/dist/configs/components/wd-rating.d.ts +2 -2
- package/dist/configs/components/wd-region.d.ts +1 -1
- package/dist/configs/components/wd-rich-text.d.ts +1 -1
- package/dist/configs/components/wd-select-multiple.d.ts +1 -1
- package/dist/configs/components/wd-select.d.ts +2 -2
- package/dist/configs/components/wd-store-product.d.ts +6 -0
- package/dist/configs/components/wd-store-product.js +35 -0
- package/dist/configs/components/wd-switch.d.ts +2 -2
- package/dist/configs/components/wd-tag-select.d.ts +1 -1
- package/dist/configs/components/wd-textarea.d.ts +1 -1
- package/dist/configs/components/wd-time.d.ts +1 -1
- package/dist/configs/components/wd-top-tab.d.ts +2 -1
- package/dist/configs/components/wd-top-tab.js +8 -1
- package/dist/configs/components/wd-upload-file.d.ts +3 -3
- package/dist/configs/components/wd-upload-image.d.ts +1 -1
- package/dist/configs/index.d.ts +256 -114
- package/dist/configs/type-utils/index.d.ts +1 -1
- package/dist/style/index.css +19 -0
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +4 -4
- package/dist/web/components/form/location/common/mapChoose.js +17 -3
- package/dist/web/components/form-date/index.d.ts +2 -2
- package/dist/web/components/form-depart-tree-select/index.d.ts +2 -2
- package/dist/web/components/form-email/index.d.ts +2 -2
- package/dist/web/components/form-image-uploader/index.d.ts +1 -1
- package/dist/web/components/form-input/index.d.ts +4 -4
- package/dist/web/components/form-location/index.d.ts +4 -4
- package/dist/web/components/form-multi-region/index.d.ts +2 -2
- package/dist/web/components/form-phone/index.d.ts +2 -2
- package/dist/web/components/form-radio/index.d.ts +3 -3
- package/dist/web/components/form-region/index.d.ts +2 -2
- package/dist/web/components/form-rich-text/index.d.ts +1 -1
- package/dist/web/components/form-select/index.d.ts +4 -4
- package/dist/web/components/form-select-multiple/index.d.ts +4 -4
- package/dist/web/components/form-switch/index.d.ts +1 -1
- package/dist/web/components/form-text-area/index.d.ts +2 -2
- package/dist/web/components/form-time/index.d.ts +2 -2
- package/dist/web/components/form-upload-file/index.d.ts +1 -1
- package/dist/web/components/form-url/index.d.ts +2 -2
- package/dist/web/components/form-user-tree-select/index.d.ts +2 -2
- package/dist/web/components/richText/index.js +29 -16
- package/dist/web/components/statusContent/index.css +1 -0
- package/dist/web/components/wd-image/ImagePreview.js +3 -3
- package/dist/web/components/wd-input/wd-input.d.ts +2 -2
- package/dist/web/components/wd-input-number/wd-input-number.js +17 -34
- package/dist/web/components/wd-input-phone/wd-input-phone.d.ts +2 -2
- package/dist/web/components/wd-table/components/FilterFieldsPanel/index.js +9 -13
- package/dist/web/components/wd-tree/utils.d.ts +6 -6
- package/dist/web/utils/loadIconCss.js +10 -7
- package/package.json +4 -4
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
/* eslint-disable max-lines */
|
|
3
3
|
/* eslint-disable complexity */
|
|
4
|
-
import { forwardRef, useRef, useCallback, useMemo, useState, useEffect
|
|
4
|
+
import { forwardRef, useRef, useCallback, useMemo, useState, useEffect } from 'react';
|
|
5
5
|
import { useConfig } from '../../utils/config-context';
|
|
6
6
|
import { WdIcon, WdButton } from '../index';
|
|
7
7
|
import { WdFormItem } from '../wd-form-item';
|
|
@@ -13,11 +13,12 @@ import { filterPropsWithOn, getUuid } from '../../utils/tool';
|
|
|
13
13
|
import { useSyncValue } from '../../utils/hooks/useSyncValue';
|
|
14
14
|
import { usePlatform } from '../../utils/platform';
|
|
15
15
|
import classNames from '../../utils/classnames';
|
|
16
|
-
import { dealDecimals, strNumAddCalc, isNumber, dealPercent, getPercentUnit, filterDigit
|
|
16
|
+
import { dealDecimals, strNumAddCalc, isNumber, dealPercent, getPercentUnit, filterDigit } from './number';
|
|
17
17
|
import { useSetWidgetApi } from '../../utils/widget-api/use-set-widget-api';
|
|
18
|
+
import { X_RUNTIME_DEFAULT } from '../../../configs/type-utils/x-runtime-default';
|
|
18
19
|
const classRoot = 'input-number';
|
|
19
20
|
const getHasClearIcon = (clearable, focus, disabled, readOnly, realValue) => clearable && focus && !disabled && !readOnly && isNumber(realValue);
|
|
20
|
-
const judgeRule = ({ value = undefined, max = undefined, min = undefined, resultType = 'boolean'
|
|
21
|
+
const judgeRule = ({ value = undefined, max = undefined, min = undefined, resultType = 'boolean' } = {}) => {
|
|
21
22
|
let maxFit = true;
|
|
22
23
|
let minFit = true;
|
|
23
24
|
if (isNumber(max)) {
|
|
@@ -28,7 +29,7 @@ const judgeRule = ({ value = undefined, max = undefined, min = undefined, result
|
|
|
28
29
|
}
|
|
29
30
|
return resultType === 'boolean' ? maxFit && minFit : { maxFit, minFit };
|
|
30
31
|
};
|
|
31
|
-
const getRuleMessage = ({ value = undefined, max = undefined, min = undefined, validMsgObj = {}
|
|
32
|
+
const getRuleMessage = ({ value = undefined, max = undefined, min = undefined, validMsgObj = {} } = {}) => {
|
|
32
33
|
const { maxFit, minFit } = judgeRule({
|
|
33
34
|
value,
|
|
34
35
|
max,
|
|
@@ -38,19 +39,16 @@ const getRuleMessage = ({ value = undefined, max = undefined, min = undefined, v
|
|
|
38
39
|
return !maxFit ? validMsgObj.max : !minFit ? validMsgObj.min : '';
|
|
39
40
|
};
|
|
40
41
|
export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
42
|
+
const { clearable = X_RUNTIME_DEFAULT.clearable } = props;
|
|
41
43
|
const [realValue, setRealValue] = useState(null); // 真实值
|
|
42
44
|
const [showValue, setShowValue] = useState(''); // 显示值
|
|
43
45
|
// 最大值,用于输入值比较
|
|
44
46
|
const max = useMemo(() => {
|
|
45
|
-
return Number(props.format === 'percent'
|
|
46
|
-
? dealPercent(`${props.max}`, 'add')
|
|
47
|
-
: props.max);
|
|
47
|
+
return Number(props.format === 'percent' ? dealPercent(`${props.max}`, 'add') : props.max);
|
|
48
48
|
}, [props.format, props.max]);
|
|
49
49
|
// 最小值,用于输入值比较
|
|
50
50
|
const min = useMemo(() => {
|
|
51
|
-
return Number(props.format === 'percent'
|
|
52
|
-
? dealPercent(`${props.min}`, 'add')
|
|
53
|
-
: props.min);
|
|
51
|
+
return Number(props.format === 'percent' ? dealPercent(`${props.min}`, 'add') : props.min);
|
|
54
52
|
}, [props.format, props.min]);
|
|
55
53
|
// 校验提示
|
|
56
54
|
const validMsgObj = useMemo(() => {
|
|
@@ -116,9 +114,7 @@ export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
|
116
114
|
let validMsg = '';
|
|
117
115
|
let res = `${value}`;
|
|
118
116
|
if (isNumber(value) && res.includes('e')) {
|
|
119
|
-
res = `${res.startsWith('-') ? '-' : ''}${res
|
|
120
|
-
.replace(/^-/, '')
|
|
121
|
-
.toLocaleString()}`;
|
|
117
|
+
res = `${res.startsWith('-') ? '-' : ''}${res.replace(/^-/, '').toLocaleString()}`;
|
|
122
118
|
}
|
|
123
119
|
res = res.replace(/,/g, '');
|
|
124
120
|
if (res !== 'Infinity' && res !== '-Infinity') {
|
|
@@ -209,19 +205,10 @@ export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
|
209
205
|
validMsg = validMsgObj.min;
|
|
210
206
|
}
|
|
211
207
|
initValidate(validState, validMsg);
|
|
212
|
-
}, [
|
|
213
|
-
showValue,
|
|
214
|
-
props.min,
|
|
215
|
-
props.max,
|
|
216
|
-
max,
|
|
217
|
-
min,
|
|
218
|
-
initValidate,
|
|
219
|
-
validMsgObj.max,
|
|
220
|
-
validMsgObj.min,
|
|
221
|
-
]);
|
|
208
|
+
}, [showValue, props.min, props.max, max, min, initValidate, validMsgObj.max, validMsgObj.min]);
|
|
222
209
|
const valueRef = useRef(value);
|
|
223
210
|
const [focus, setFocus] = useSyncValue(props.focus);
|
|
224
|
-
const hasClearIcon = getHasClearIcon(
|
|
211
|
+
const hasClearIcon = getHasClearIcon(clearable, focus, disabled, readOnly, realValue);
|
|
225
212
|
const isRow = props.stepOption === 'both'; // 右侧调整只在pc端生效
|
|
226
213
|
const root = `${classPrefix}-${classRoot}`;
|
|
227
214
|
const inputWrap = `${classPrefix}-form-input-wrap`;
|
|
@@ -322,7 +309,7 @@ export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
|
322
309
|
const onChange = (e) => {
|
|
323
310
|
const value = typeof e === 'string' ? e : e.target.value;
|
|
324
311
|
setShowValue(value);
|
|
325
|
-
onRealChange(e, '', { needSetData: false, value });
|
|
312
|
+
onRealChange(e, '', { needSetData: false, value, _showValue: value });
|
|
326
313
|
};
|
|
327
314
|
/**
|
|
328
315
|
* 真实值变化
|
|
@@ -330,18 +317,16 @@ export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
|
330
317
|
* @param type
|
|
331
318
|
* @returns
|
|
332
319
|
*/
|
|
333
|
-
const onRealChange = (e, type = '', { needSetData = true, value = '' } = {}) => {
|
|
320
|
+
const onRealChange = (e, type = '', { needSetData = true, value = '', _showValue = showValue } = {}) => {
|
|
334
321
|
var _a, _b, _c, _d;
|
|
335
322
|
if (editDisabled)
|
|
336
323
|
return realValue;
|
|
337
324
|
if (['plus', 'minus'].includes(type)) {
|
|
338
|
-
if (!isNumber(props.step) ||
|
|
339
|
-
(
|
|
340
|
-
(type === 'minus' && stepMinusDisabled)) {
|
|
341
|
-
return Number(value || showValue);
|
|
325
|
+
if (!isNumber(props.step) || (type === 'plus' && stepPlusDisabled) || (type === 'minus' && stepMinusDisabled)) {
|
|
326
|
+
return Number(value || _showValue);
|
|
342
327
|
}
|
|
343
328
|
}
|
|
344
|
-
const toShow = getShowValue(filterDigit(value ||
|
|
329
|
+
const toShow = getShowValue(filterDigit(value || _showValue), type);
|
|
345
330
|
const toReal = getRealValue(toShow);
|
|
346
331
|
if (needSetData) {
|
|
347
332
|
setShowValue(toShow);
|
|
@@ -426,9 +411,7 @@ export const WdInputNumber = forwardRef(function WdInputNumber(props, ref) {
|
|
|
426
411
|
const getAfterShow = (text) => {
|
|
427
412
|
if (!text)
|
|
428
413
|
return null;
|
|
429
|
-
return
|
|
430
|
-
? `${classPrefix}-input-number__text-right-percent`
|
|
431
|
-
: ''}`, children: text }));
|
|
414
|
+
return _jsx("div", { className: `${text === '%' ? `${classPrefix}-input-number__text-right-percent` : ''}`, children: text });
|
|
432
415
|
};
|
|
433
416
|
if (!visible)
|
|
434
417
|
return null;
|
|
@@ -21,8 +21,8 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
|
|
|
21
21
|
}, ...args: unknown[]) => unknown);
|
|
22
22
|
};
|
|
23
23
|
} & {
|
|
24
|
-
type?: string;
|
|
25
24
|
name?: string;
|
|
25
|
+
type?: string;
|
|
26
26
|
label?: string;
|
|
27
27
|
template?: string;
|
|
28
28
|
focus?: boolean;
|
|
@@ -56,9 +56,9 @@ export declare const WdInputPhone: React.ForwardRefExoticComponent<CommonPropsTy
|
|
|
56
56
|
borderedH5?: boolean;
|
|
57
57
|
borderedPc?: boolean;
|
|
58
58
|
rules?: {
|
|
59
|
-
format: string;
|
|
60
59
|
message: string;
|
|
61
60
|
pattern: string;
|
|
61
|
+
format: string;
|
|
62
62
|
}[];
|
|
63
63
|
requiredFlag?: boolean;
|
|
64
64
|
requiredMsg?: string;
|
|
@@ -9,7 +9,7 @@ import { filterFieldsGenerate } from './filterFieldsGenerate';
|
|
|
9
9
|
import { WdButton } from '../../../wd-button';
|
|
10
10
|
import { usePlatform } from '../../../../utils/platform';
|
|
11
11
|
import { useSetWidgetApi } from '../../../../utils/widget-api/use-set-widget-api';
|
|
12
|
-
const getFilterConfig = (data) => data.map(({ name, label, value, fieldCalculationOption = [], fieldCalculation
|
|
12
|
+
const getFilterConfig = (data) => data.map(({ name, label, value, fieldCalculationOption = [], fieldCalculation }) => ({
|
|
13
13
|
name,
|
|
14
14
|
label,
|
|
15
15
|
value,
|
|
@@ -18,7 +18,7 @@ const getFilterConfig = (data) => data.map(({ name, label, value, fieldCalculati
|
|
|
18
18
|
}));
|
|
19
19
|
// 筛选表单
|
|
20
20
|
export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
21
|
-
const { filterFields, fetchData, openMobileFilter, setOpenMobileFilter, setFilterConfig
|
|
21
|
+
const { filterFields, fetchData, openMobileFilter, setOpenMobileFilter, setFilterConfig } = props;
|
|
22
22
|
const num = 2;
|
|
23
23
|
const maxlength = 3;
|
|
24
24
|
const { classPrefix } = useConfig();
|
|
@@ -27,7 +27,7 @@ export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
|
27
27
|
const [initFilterData, setInitFilterData] = useState([]);
|
|
28
28
|
const [filterData, setFilterData] = useState([]);
|
|
29
29
|
const updateFilterData = (filterFieldItemConfig) => {
|
|
30
|
-
const newData = filterData.map((i) => i.id === filterFieldItemConfig.id ? filterFieldItemConfig : i);
|
|
30
|
+
const newData = filterData.map((i) => (i.id === filterFieldItemConfig.id ? filterFieldItemConfig : i));
|
|
31
31
|
setFilterData(newData);
|
|
32
32
|
setFilterConfig(getFilterConfig(newData));
|
|
33
33
|
};
|
|
@@ -54,9 +54,7 @@ export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
|
54
54
|
const searchHandle = (searchData = filterData) => {
|
|
55
55
|
let searchValues = [];
|
|
56
56
|
const filterValues = searchData.filter((i) => {
|
|
57
|
-
if (Array.isArray(i.value) &&
|
|
58
|
-
i.filterType === 'number' &&
|
|
59
|
-
i.fieldCalculation.value === 'scope') {
|
|
57
|
+
if (Array.isArray(i.value) && i.filterType === 'number' && i.fieldCalculation.value === 'scope') {
|
|
60
58
|
// 若筛选字段为number类型,且为范围选择时,只要有一个值则返回
|
|
61
59
|
return i.value[0] || i.value[1];
|
|
62
60
|
}
|
|
@@ -72,10 +70,7 @@ export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
|
72
70
|
var _a;
|
|
73
71
|
if (n.$and) {
|
|
74
72
|
return {
|
|
75
|
-
$and: [
|
|
76
|
-
...n.$and,
|
|
77
|
-
{ [i.name]: { [(_a = i === null || i === void 0 ? void 0 : i.fieldCalculation) === null || _a === void 0 ? void 0 : _a.value]: '1' } },
|
|
78
|
-
],
|
|
73
|
+
$and: [...n.$and, { [i.name]: { [(_a = i === null || i === void 0 ? void 0 : i.fieldCalculation) === null || _a === void 0 ? void 0 : _a.value]: '1' } }],
|
|
79
74
|
};
|
|
80
75
|
}
|
|
81
76
|
return n;
|
|
@@ -90,6 +85,7 @@ export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
|
90
85
|
});
|
|
91
86
|
// 值筛选条件
|
|
92
87
|
filterValues.forEach((i) => {
|
|
88
|
+
var _a, _b, _c;
|
|
93
89
|
switch (i.fieldCalculation.value) {
|
|
94
90
|
case 'scope':
|
|
95
91
|
if (i.filterType === 'number') {
|
|
@@ -126,17 +122,17 @@ export const FilterFieldsPanel = forwardRef(function Comp(props, ref) {
|
|
|
126
122
|
case 'exclude':
|
|
127
123
|
searchValues.push({
|
|
128
124
|
key: i.name,
|
|
129
|
-
val: `^((?!${i.value}).)*$`,
|
|
125
|
+
val: `^((?!${(_a = i.value) === null || _a === void 0 ? void 0 : _a.trim()}).)*$`,
|
|
130
126
|
rel: 'regex',
|
|
131
127
|
});
|
|
132
128
|
break;
|
|
133
129
|
case 'startWith':
|
|
134
|
-
searchValues.push({ key: i.name, val: `^${i.value}`, rel: 'regex' });
|
|
130
|
+
searchValues.push({ key: i.name, val: `^${(_b = i.value) === null || _b === void 0 ? void 0 : _b.trim()}`, rel: 'regex' });
|
|
135
131
|
break;
|
|
136
132
|
default: {
|
|
137
133
|
const searchItem = {
|
|
138
134
|
key: i.name,
|
|
139
|
-
val: i.value,
|
|
135
|
+
val: (_c = i.value) === null || _c === void 0 ? void 0 : _c.trim(),
|
|
140
136
|
rel: i.fieldCalculation.value,
|
|
141
137
|
};
|
|
142
138
|
if (i.filterType === 'number') {
|
|
@@ -127,9 +127,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
127
127
|
selected: string[];
|
|
128
128
|
currentNode: {
|
|
129
129
|
data?: {
|
|
130
|
-
value: string;
|
|
131
130
|
label: string;
|
|
132
131
|
children: any[];
|
|
132
|
+
value: string;
|
|
133
133
|
disabled: boolean;
|
|
134
134
|
foldIcon: string;
|
|
135
135
|
expendIcon: string;
|
|
@@ -138,9 +138,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
138
138
|
};
|
|
139
139
|
selectedPositions: string[];
|
|
140
140
|
selectedNodes: {
|
|
141
|
-
value: string;
|
|
142
141
|
label: string;
|
|
143
142
|
children: any[];
|
|
143
|
+
value: string;
|
|
144
144
|
disabled: boolean;
|
|
145
145
|
foldIcon: string;
|
|
146
146
|
expendIcon: string;
|
|
@@ -148,9 +148,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
148
148
|
}[];
|
|
149
149
|
expandedPositions: string[];
|
|
150
150
|
expandedNodes: {
|
|
151
|
-
value: string;
|
|
152
151
|
label: string;
|
|
153
152
|
children: any[];
|
|
153
|
+
value: string;
|
|
154
154
|
disabled: boolean;
|
|
155
155
|
foldIcon: string;
|
|
156
156
|
expendIcon: string;
|
|
@@ -159,9 +159,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
159
159
|
searched: string[];
|
|
160
160
|
searchedPositions: string[];
|
|
161
161
|
searchedNodes: {
|
|
162
|
-
value: string;
|
|
163
162
|
label: string;
|
|
164
163
|
children: any[];
|
|
164
|
+
value: string;
|
|
165
165
|
disabled: boolean;
|
|
166
166
|
foldIcon: string;
|
|
167
167
|
expendIcon: string;
|
|
@@ -169,9 +169,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
169
169
|
}[];
|
|
170
170
|
checkedPositions: string[];
|
|
171
171
|
checkedNodes: {
|
|
172
|
-
value: string;
|
|
173
172
|
label: string;
|
|
174
173
|
children: any[];
|
|
174
|
+
value: string;
|
|
175
175
|
disabled: boolean;
|
|
176
176
|
foldIcon: string;
|
|
177
177
|
expendIcon: string;
|
|
@@ -180,9 +180,9 @@ declare const getTreeInfo: (params: IFindNodeParams, checkable: boolean) => {
|
|
|
180
180
|
childChecked: string[];
|
|
181
181
|
childCheckedPositions: string[];
|
|
182
182
|
childCheckedNodes: {
|
|
183
|
-
value: string;
|
|
184
183
|
label: string;
|
|
185
184
|
children: any[];
|
|
185
|
+
value: string;
|
|
186
186
|
disabled: boolean;
|
|
187
187
|
foldIcon: string;
|
|
188
188
|
expendIcon: string;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import onlineConfig from '../../onlineConfig.json';
|
|
2
|
-
import { getUrlPath } from './tool';
|
|
3
|
-
import { isPrivate } from './isPrivate';
|
|
4
2
|
import { errorHandler } from './error';
|
|
3
|
+
import { isPrivate } from './isPrivate';
|
|
5
4
|
let shadowRootCache = null;
|
|
6
5
|
const WEDA_PORTAL_ID = 'weda-module-portal';
|
|
7
6
|
export function getShadowRoot() {
|
|
@@ -58,11 +57,15 @@ function loadLink(url, className) {
|
|
|
58
57
|
// 组件库加载后默认挂载图标库
|
|
59
58
|
(function () {
|
|
60
59
|
try {
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
60
|
+
const cfg = onlineConfig.icon;
|
|
61
|
+
if (isPrivate()) {
|
|
62
|
+
loadLink(cfg.private.css, 'wd-load-remote-icon').catch((e) => {
|
|
63
|
+
loadLink(cfg.css, 'wd-load-remote-icon');
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
else {
|
|
67
|
+
loadLink(cfg.css, 'wd-load-remote-icon');
|
|
68
|
+
}
|
|
66
69
|
}
|
|
67
70
|
catch (e) {
|
|
68
71
|
errorHandler({ code: 'LoadIconResourceError', error: e });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@cloudbase/weda-ui",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.14.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index",
|
|
6
6
|
"miniprogram": "mpdist",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"prestart:e2e-server": "node ./tools/e2e-prepare.mjs",
|
|
44
44
|
"start:e2e-server": "node ./lowcode-comps/e2e-server.js",
|
|
45
45
|
"test:e2e-component": "npm run build-mp && npx cypress run --component",
|
|
46
|
-
"test:e2e-cals": "start-server-and-test start:e2e-server 2333 'npx cypress run -b chrome --headless'",
|
|
46
|
+
"test:e2e-cals": "WAIT_ON_TIMEOUT=900000 start-server-and-test start:e2e-server 2333 'npx cypress run -b chrome --headless'",
|
|
47
47
|
"test:manual-e2e-cals": "start-server-and-test start:e2e-server 2333 'npx cypress open -b chrome'",
|
|
48
48
|
"test:e2e": "npm run test:e2e-component && npm run test:e2e-cals",
|
|
49
49
|
"posttest:e2e-cals": "npm run e2e:report",
|
|
@@ -85,7 +85,7 @@
|
|
|
85
85
|
"description": "腾讯云微搭低代码组件库模板",
|
|
86
86
|
"dependencies": {
|
|
87
87
|
"@antv/g6": "^4.8.5",
|
|
88
|
-
"@cloudbase/weda-client": "^1.1.
|
|
88
|
+
"@cloudbase/weda-client": "^1.1.21",
|
|
89
89
|
"@codemirror/autocomplete": "^6.16.0",
|
|
90
90
|
"@codemirror/lang-javascript": "^6.2.2",
|
|
91
91
|
"@codemirror/lang-json": "^6.0.1",
|
|
@@ -148,7 +148,7 @@
|
|
|
148
148
|
"@babel/preset-react": "^7.22.15",
|
|
149
149
|
"@babel/preset-typescript": "^7.22.15",
|
|
150
150
|
"@cloudbase/cals": "^1.2.8",
|
|
151
|
-
"@cloudbase/lowcode-cli": "^0.22.
|
|
151
|
+
"@cloudbase/lowcode-cli": "^0.22.1",
|
|
152
152
|
"@cloudbase/weda-cloud-sdk": "^1.0.96",
|
|
153
153
|
"@commitlint/cli": "^16.0.2",
|
|
154
154
|
"@commitlint/config-conventional": "^17.7.0",
|