@cloudbase/weda-ui 3.13.5 → 3.13.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/chart/bar.d.ts +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/echart.js +7 -7
- 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/listView.js +6 -6
- package/dist/configs/components/navLayout.json +5 -5
- 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 +2 -4
- 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-layout.js +2 -2
- 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-menu-layout.d.ts +4 -4
- package/dist/configs/components/wd-modal.js +2 -2
- 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-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-upload-file.d.ts +3 -3
- package/dist/configs/components/wd-upload-image.d.ts +1 -1
- package/dist/configs/index.d.ts +124 -114
- package/dist/configs/type-utils/index.d.ts +1 -1
- package/dist/configs/type-utils/type-form.js +3 -3
- package/dist/configs/utils/layout.d.ts +1 -1
- package/dist/configs/utils/layout.js +3 -3
- package/dist/onlineConfig.json +20 -0
- package/dist/style/index.css +1 -0
- package/dist/style/index.scss +1 -1
- package/dist/style/weda-ui.min.css +3 -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/listView/index.css +15 -44
- package/dist/web/components/richText/index.js +40 -54
- 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-select/select/selectUI.js +3 -3
- package/dist/web/components/wd-select/wd-select.js +1 -1
- package/dist/web/components/wd-select-multiple/wd-select-multiple.js +1 -1
- package/dist/web/components/wd-tree/utils.d.ts +6 -6
- package/dist/web/utils/isPrivate.d.ts +5 -0
- package/dist/web/utils/isPrivate.js +12 -0
- package/dist/web/utils/loadIconCss.js +11 -3
- package/package.json +3 -3
- package/dist/iconConfig.json +0 -6
|
@@ -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;
|
|
@@ -124,7 +124,7 @@ function SelectH5(props) {
|
|
|
124
124
|
setCurrentSelected(dealSelectedItem(item));
|
|
125
125
|
}
|
|
126
126
|
};
|
|
127
|
-
return (_jsxs(_Fragment, { children: [_jsx("input", { "data-testid": "form-item-select", className: inputCls, type: "text", name: name, placeholder: placeholder, autoComplete: "off", disabled: disabled, readOnly: true, value: readValue, onClick: handleClick }), _jsxs(Modal, { visible: visible, onClose: () => {
|
|
127
|
+
return (_jsxs(_Fragment, { children: [_jsx("input", { "data-testid": "form-item-select", className: inputCls, type: "text", name: name, placeholder: placeholder, autoComplete: "off", disabled: disabled, readOnly: true, value: readValue || '', onClick: handleClick }), _jsxs(Modal, { visible: visible, onClose: () => {
|
|
128
128
|
if (inputFocus) {
|
|
129
129
|
// 聚焦在搜索框
|
|
130
130
|
setInputFocus(false);
|
|
@@ -153,11 +153,11 @@ export function SelectUI(props) {
|
|
|
153
153
|
const selectedItem = getSelectedItem(options, value);
|
|
154
154
|
if (isMultiple) {
|
|
155
155
|
return selectedItem
|
|
156
|
-
.map((i) => textToString(i === null || i === void 0 ? void 0 : i.label) || textToString(i.value))
|
|
156
|
+
.map((i) => textToString(i === null || i === void 0 ? void 0 : i.label) || textToString(i.value) || textToString(value))
|
|
157
157
|
.join(',');
|
|
158
158
|
}
|
|
159
159
|
else {
|
|
160
|
-
return textToString((_a = selectedItem[0]) === null || _a === void 0 ? void 0 : _a.label) || textToString((_b = selectedItem[0]) === null || _b === void 0 ? void 0 : _b.value) || value;
|
|
160
|
+
return textToString((_a = selectedItem[0]) === null || _a === void 0 ? void 0 : _a.label) || textToString((_b = selectedItem[0]) === null || _b === void 0 ? void 0 : _b.value) || textToString(value);
|
|
161
161
|
}
|
|
162
162
|
}, [isMultiple, options, value]);
|
|
163
163
|
const render = () => {
|
|
@@ -102,7 +102,7 @@ export const WdSelect = forwardRef(function WsSelect(props, ref) {
|
|
|
102
102
|
}, [debouncedTriggerSearchEvent]);
|
|
103
103
|
if (!visible)
|
|
104
104
|
return null;
|
|
105
|
-
return (_jsx(WdFormItem, { ...formItemProps, children: _jsxs(_Fragment, { children: [_jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(Select, { ...props, setAllOption: setOptions, onRelationTagClick: (item) => {
|
|
105
|
+
return (_jsx(WdFormItem, { ...formItemProps, children: _jsxs(_Fragment, { children: [_jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(Select, { ...props, style: undefined, className: undefined, setAllOption: setOptions, onRelationTagClick: (item) => {
|
|
106
106
|
var _a;
|
|
107
107
|
(_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.onRelationTagClick) === null || _a === void 0 ? void 0 : _a.call(delayEvents, item);
|
|
108
108
|
}, enableRelationOptionJump: enableRelationOptionJump, onRelationOptionJump: (item) => {
|
|
@@ -98,7 +98,7 @@ export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref)
|
|
|
98
98
|
}, [debouncedTriggerSearchEvent]);
|
|
99
99
|
if (!visible)
|
|
100
100
|
return null;
|
|
101
|
-
return (_jsx(WdFormItem, { ...formItemProps, children: _jsxs(_Fragment, { children: [_jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(SelectMultiple, { ...props, setAllOption: setOptions, onRelationTagClick: (item) => {
|
|
101
|
+
return (_jsx(WdFormItem, { ...formItemProps, children: _jsxs(_Fragment, { children: [_jsx(WdInputGroup, { ...inputGroupProps, children: _jsx(WdInputWrap, { ...inputWrapProps, children: _jsx(SelectMultiple, { ...props, style: undefined, className: undefined, setAllOption: setOptions, onRelationTagClick: (item) => {
|
|
102
102
|
var _a;
|
|
103
103
|
(_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.onRelationTagClick) === null || _a === void 0 ? void 0 : _a.call(delayEvents, item);
|
|
104
104
|
}, enableRelationOptionJump: enableRelationOptionJump, onRelationOptionJump: (item) => {
|
|
@@ -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,6 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getUrlPath } from './tool';
|
|
1
|
+
import onlineConfig from '../../onlineConfig.json';
|
|
3
2
|
import { errorHandler } from './error';
|
|
3
|
+
import { isPrivate } from './isPrivate';
|
|
4
4
|
let shadowRootCache = null;
|
|
5
5
|
const WEDA_PORTAL_ID = 'weda-module-portal';
|
|
6
6
|
export function getShadowRoot() {
|
|
@@ -57,7 +57,15 @@ function loadLink(url, className) {
|
|
|
57
57
|
// 组件库加载后默认挂载图标库
|
|
58
58
|
(function () {
|
|
59
59
|
try {
|
|
60
|
-
|
|
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
|
+
}
|
|
61
69
|
}
|
|
62
70
|
catch (e) {
|
|
63
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.13.
|
|
3
|
+
"version": "3.13.7",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"module": "./dist/index",
|
|
6
6
|
"miniprogram": "mpdist",
|
|
@@ -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.17",
|
|
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",
|