@cloudbase/weda-ui 3.13.6 → 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.
Files changed (80) hide show
  1. package/dist/configs/components/chart/bar.d.ts +1 -1
  2. package/dist/configs/components/chart/line.d.ts +1 -1
  3. package/dist/configs/components/chart/pie.d.ts +1 -1
  4. package/dist/configs/components/form-date.d.ts +2 -2
  5. package/dist/configs/components/form-depart-tree-select.d.ts +2 -2
  6. package/dist/configs/components/form-email.d.ts +2 -2
  7. package/dist/configs/components/form-input.d.ts +2 -2
  8. package/dist/configs/components/form-location.d.ts +2 -2
  9. package/dist/configs/components/form-multi-region.d.ts +2 -2
  10. package/dist/configs/components/form-phone.d.ts +2 -2
  11. package/dist/configs/components/form-region.d.ts +2 -2
  12. package/dist/configs/components/form-select-multiple.d.ts +2 -2
  13. package/dist/configs/components/form-select.d.ts +2 -2
  14. package/dist/configs/components/form-text-area.d.ts +2 -2
  15. package/dist/configs/components/form-time.d.ts +2 -2
  16. package/dist/configs/components/form-url.d.ts +2 -2
  17. package/dist/configs/components/form-user-tree-select.d.ts +2 -2
  18. package/dist/configs/components/wd-canvas.d.ts +1 -1
  19. package/dist/configs/components/wd-cascader.d.ts +3 -3
  20. package/dist/configs/components/wd-checkbox.d.ts +1 -1
  21. package/dist/configs/components/wd-code-editor.d.ts +1 -1
  22. package/dist/configs/components/wd-date-range.d.ts +1 -1
  23. package/dist/configs/components/wd-date.d.ts +1 -1
  24. package/dist/configs/components/wd-department.d.ts +1 -1
  25. package/dist/configs/components/wd-form-arr.d.ts +1 -1
  26. package/dist/configs/components/wd-form-detail.d.ts +1 -1
  27. package/dist/configs/components/wd-form-obj.d.ts +1 -1
  28. package/dist/configs/components/wd-icon.d.ts +7 -2
  29. package/dist/configs/components/wd-icon.js +1 -5
  30. package/dist/configs/components/wd-input-email.d.ts +1 -1
  31. package/dist/configs/components/wd-input-number.d.ts +2 -2
  32. package/dist/configs/components/wd-input-phone.d.ts +1 -1
  33. package/dist/configs/components/wd-input-url.d.ts +1 -1
  34. package/dist/configs/components/wd-input.d.ts +1 -1
  35. package/dist/configs/components/wd-location.d.ts +2 -2
  36. package/dist/configs/components/wd-member.d.ts +1 -1
  37. package/dist/configs/components/wd-progress.d.ts +2 -2
  38. package/dist/configs/components/wd-radio.d.ts +1 -1
  39. package/dist/configs/components/wd-rating.d.ts +2 -2
  40. package/dist/configs/components/wd-region.d.ts +1 -1
  41. package/dist/configs/components/wd-rich-text.d.ts +1 -1
  42. package/dist/configs/components/wd-select-multiple.d.ts +1 -1
  43. package/dist/configs/components/wd-select.d.ts +2 -2
  44. package/dist/configs/components/wd-switch.d.ts +2 -2
  45. package/dist/configs/components/wd-tag-select.d.ts +1 -1
  46. package/dist/configs/components/wd-textarea.d.ts +1 -1
  47. package/dist/configs/components/wd-time.d.ts +1 -1
  48. package/dist/configs/components/wd-upload-file.d.ts +3 -3
  49. package/dist/configs/components/wd-upload-image.d.ts +1 -1
  50. package/dist/configs/index.d.ts +120 -110
  51. package/dist/configs/type-utils/index.d.ts +1 -1
  52. package/dist/style/index.css +1 -0
  53. package/dist/style/index.scss +1 -1
  54. package/dist/style/weda-ui.min.css +2 -2
  55. package/dist/web/components/form-date/index.d.ts +2 -2
  56. package/dist/web/components/form-depart-tree-select/index.d.ts +2 -2
  57. package/dist/web/components/form-email/index.d.ts +2 -2
  58. package/dist/web/components/form-image-uploader/index.d.ts +1 -1
  59. package/dist/web/components/form-input/index.d.ts +4 -4
  60. package/dist/web/components/form-location/index.d.ts +4 -4
  61. package/dist/web/components/form-multi-region/index.d.ts +2 -2
  62. package/dist/web/components/form-phone/index.d.ts +2 -2
  63. package/dist/web/components/form-radio/index.d.ts +3 -3
  64. package/dist/web/components/form-region/index.d.ts +2 -2
  65. package/dist/web/components/form-rich-text/index.d.ts +1 -1
  66. package/dist/web/components/form-select/index.d.ts +4 -4
  67. package/dist/web/components/form-select-multiple/index.d.ts +4 -4
  68. package/dist/web/components/form-switch/index.d.ts +1 -1
  69. package/dist/web/components/form-text-area/index.d.ts +2 -2
  70. package/dist/web/components/form-time/index.d.ts +2 -2
  71. package/dist/web/components/form-upload-file/index.d.ts +1 -1
  72. package/dist/web/components/form-url/index.d.ts +2 -2
  73. package/dist/web/components/form-user-tree-select/index.d.ts +2 -2
  74. package/dist/web/components/richText/index.js +29 -16
  75. package/dist/web/components/wd-input/wd-input.d.ts +2 -2
  76. package/dist/web/components/wd-input-number/wd-input-number.js +17 -34
  77. package/dist/web/components/wd-input-phone/wd-input-phone.d.ts +2 -2
  78. package/dist/web/components/wd-tree/utils.d.ts +6 -6
  79. package/dist/web/utils/loadIconCss.js +10 -7
  80. package/package.json +3 -3
@@ -7,18 +7,18 @@ export type FormSelectMultipleProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormSelectMultiple: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string[];
11
- format: "many-many" | "one-many";
12
10
  name: string;
13
11
  label: string;
12
+ format: "many-many" | "one-many";
13
+ value: string[];
14
14
  required: boolean;
15
- size: "m" | "s" | "l" | "full";
15
+ size: "s" | "m" | "l" | "full";
16
16
  disabled: boolean;
17
17
  placeholder: string;
18
18
  layout: "" | "vertical" | "horizontal";
19
19
  range: {
20
- value: string;
21
20
  label: string;
21
+ value: string;
22
22
  }[];
23
23
  dataSourceName: string;
24
24
  tipBlock: string;
@@ -7,9 +7,9 @@ export type FormSwitchProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormSwitch: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: boolean;
11
10
  name: string;
12
11
  label: string;
12
+ value: boolean;
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,12 +7,12 @@ export type FormTextAreaProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormTextArea: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string;
11
10
  name: string;
12
11
  label: string;
13
12
  focus: boolean;
13
+ value: string;
14
14
  required: boolean;
15
- size: "m" | "s" | "l" | "full";
15
+ size: "s" | "m" | "l" | "full";
16
16
  disabled: boolean;
17
17
  maxLength: number;
18
18
  placeholder: string;
@@ -7,11 +7,11 @@ export type FormTimeProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormTime: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string;
11
10
  name: string;
12
11
  label: string;
12
+ value: string;
13
13
  required: boolean;
14
- size: "m" | "s" | "l" | "full";
14
+ size: "s" | "m" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  end: string;
@@ -7,9 +7,9 @@ export type FormUploadFileProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUploadFile: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string[];
11
10
  name: string;
12
11
  label: string;
12
+ value: string[];
13
13
  required: boolean;
14
14
  disabled: boolean;
15
15
  layout: "" | "vertical" | "horizontal";
@@ -7,12 +7,12 @@ export type PropsType = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUrl: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string;
11
10
  name: string;
12
11
  label: string;
13
12
  focus: boolean;
13
+ value: string;
14
14
  required: boolean;
15
- size: "m" | "s" | "l" | "full";
15
+ size: "s" | "m" | "l" | "full";
16
16
  disabled: boolean;
17
17
  maxLength: number;
18
18
  placeholder: string;
@@ -7,11 +7,11 @@ export type FormUserTreeSelectProps = CommonPropsType & DataType & {
7
7
  readOnly: boolean;
8
8
  } & EventsType;
9
9
  declare const FormUserTreeSelect: React.ForwardRefExoticComponent<CommonPropsType & {
10
- value: string;
11
10
  name: string;
12
11
  label: string;
12
+ value: string;
13
13
  required: boolean;
14
- size: "m" | "s" | "l" | "full";
14
+ size: "s" | "m" | "l" | "full";
15
15
  disabled: boolean;
16
16
  placeholder: string;
17
17
  layout: "" | "vertical" | "horizontal";
@@ -12,7 +12,6 @@ import './style';
12
12
  import { useSyncValue } from '../../utils/hooks/useSyncValue';
13
13
  import xss from 'xss';
14
14
  import onlineConfig from '../../../onlineConfig.json';
15
- const cfg = isPrivate() ? { ...onlineConfig.richText, ...onlineConfig.richText.private } : onlineConfig.richText;
16
15
  // 默认图片类型
17
16
  const IMAGE_TYPES = ['image/jpeg', 'image/png', 'image/gif', 'image/bmp', 'image/tiff', 'image/svg+xml'];
18
17
  // 默认音频类型
@@ -142,24 +141,38 @@ initialContent, placeholder, iconPack, maxSize, cloudPath, visible, }) {
142
141
  };
143
142
  React.useEffect(() => {
144
143
  if (!(window === null || window === void 0 ? void 0 : window.ExEditor3) && !loadEditorPromise) {
145
- loadEditorPromise = new Promise((resolve) => {
146
- const script = document.createElement('script');
147
- script.src = cfg.js;
148
- script.onload = () => {
149
- resolve('');
150
- };
151
- document.body.appendChild(script);
152
- const link = document.createElement('link');
153
- link.setAttribute('rel', 'stylesheet');
154
- link.setAttribute('href', cfg.css);
155
- const head = document.getElementsByTagName('head');
156
- if (head.length) {
157
- head[0].appendChild(link);
144
+ // 挂载资源
145
+ function loadSrc(src, css) {
146
+ return new Promise((resolve, reject) => {
147
+ const script = document.createElement('script');
148
+ script.src = src;
149
+ script.onload = () => resolve('');
150
+ script.onerror = () => reject('');
151
+ document.body.appendChild(script);
152
+ const link = document.createElement('link');
153
+ link.setAttribute('rel', 'stylesheet');
154
+ link.setAttribute('href', css);
155
+ const head = document.getElementsByTagName('head');
156
+ if (head.length) {
157
+ head[0].appendChild(link);
158
+ }
159
+ else {
160
+ document.body.appendChild(link);
161
+ }
162
+ });
163
+ }
164
+ try {
165
+ const cfg = onlineConfig.richText;
166
+ if (isPrivate()) {
167
+ loadEditorPromise = loadSrc(cfg.private.js, cfg.private.css).catch((_) => loadSrc(cfg.js, cfg.css));
158
168
  }
159
169
  else {
160
- document.body.appendChild(link);
170
+ loadEditorPromise = loadSrc(cfg.js, cfg.css);
161
171
  }
162
- });
172
+ }
173
+ catch (e) {
174
+ errorHandler({ code: 'LoadRichtextResourceError', error: e });
175
+ }
163
176
  }
164
177
  if (loadEditorPromise) {
165
178
  loadEditorPromise.then(() => {
@@ -5,8 +5,8 @@ import type { DataType, EventsType } from '../../../configs/components/wd-input'
5
5
  * 标准化:单行输入组件
6
6
  */
7
7
  export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType & {
8
- type?: string;
9
8
  name?: string;
9
+ type?: string;
10
10
  label?: string;
11
11
  template?: string;
12
12
  focus?: boolean;
@@ -40,9 +40,9 @@ export declare const WdInput: React.ForwardRefExoticComponent<CommonPropsType &
40
40
  borderedH5?: boolean;
41
41
  borderedPc?: boolean;
42
42
  rules?: {
43
- format: string;
44
43
  message: string;
45
44
  pattern: string;
45
+ format: string;
46
46
  }[];
47
47
  requiredFlag?: boolean;
48
48
  requiredMsg?: string;
@@ -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, } from 'react';
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, } from './number';
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(props.clearable, focus, disabled, readOnly, realValue);
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
- (type === 'plus' && stepPlusDisabled) ||
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 || showValue), type);
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 (_jsx("div", { className: `${text === '%'
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;
@@ -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 iconConfig = onlineConfig.icon;
62
- const cfg = isPrivate()
63
- ? { ...iconConfig, ...iconConfig.private }
64
- : iconConfig;
65
- loadLink(cfg.css, 'wd-load-remote-icon');
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.13.6",
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.16",
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.0",
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",