@cloudbase/weda-ui 3.12.4 → 3.13.1

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 (40) hide show
  1. package/dist/configs/components/wd-ad.d.ts +3 -0
  2. package/dist/configs/components/wd-ad.js +3 -3
  3. package/dist/configs/components/wd-select-multiple.d.ts +14 -0
  4. package/dist/configs/components/wd-select-multiple.js +18 -1
  5. package/dist/configs/components/wd-select.d.ts +9 -4
  6. package/dist/configs/components/wd-select.js +11 -2
  7. package/dist/configs/components/wd-store-home.d.ts +36 -0
  8. package/dist/configs/components/wd-store-home.js +38 -0
  9. package/dist/configs/components/wd-store-product.d.ts +106 -0
  10. package/dist/configs/components/wd-store-product.js +102 -0
  11. package/dist/configs/components/wd-table.d.ts +2 -0
  12. package/dist/configs/components/wd-table.js +7 -0
  13. package/dist/configs/index.d.ts +254 -8
  14. package/dist/configs/index.js +4 -0
  15. package/dist/configs/type-utils/type-form.d.ts +2 -0
  16. package/dist/configs/type-utils/type-form.js +25 -7
  17. package/dist/configs/type-utils/x-runtime-default.d.ts +1 -0
  18. package/dist/configs/type-utils/x-runtime-default.js +1 -0
  19. package/dist/style/weda-ui.min.css +2 -2
  20. package/dist/web/components/index.d.ts +2 -0
  21. package/dist/web/components/index.js +2 -0
  22. package/dist/web/components/wd-ad/style/view.css +1 -1
  23. package/dist/web/components/wd-form-item/wd-form-item-read-only.d.ts +1 -0
  24. package/dist/web/components/wd-form-item/wd-form-item-read-only.js +2 -2
  25. package/dist/web/components/wd-select/relationSelect/relationSelect.js +4 -1
  26. package/dist/web/components/wd-select/select/selectUI.js +11 -7
  27. package/dist/web/components/wd-select/wd-select.js +2 -2
  28. package/dist/web/components/wd-select-multiple/wd-select-multiple.js +2 -2
  29. package/dist/web/components/wd-store-home/index.css +81 -0
  30. package/dist/web/components/wd-store-home/index.d.ts +8 -0
  31. package/dist/web/components/wd-store-home/index.js +12 -0
  32. package/dist/web/components/wd-store-home/style.d.ts +2 -0
  33. package/dist/web/components/wd-store-home/style.js +2 -0
  34. package/dist/web/components/wd-store-product/index.d.ts +8 -0
  35. package/dist/web/components/wd-store-product/index.js +13 -0
  36. package/dist/web/components/wd-store-product/style.d.ts +2 -0
  37. package/dist/web/components/wd-store-product/style.js +2 -0
  38. package/dist/web/components/wd-table/hooks/useChooseList.js +2 -1
  39. package/dist/web/components/wd-table/wd-table.js +6 -3
  40. package/package.json +1 -1
@@ -150,5 +150,7 @@ export { default as WdFormObj } from "./wd-form-obj";
150
150
  export { default as WdFormArr } from "./wd-form-arr";
151
151
  export { default as WdRating } from "./wd-rating";
152
152
  export { default as WdCascader } from "./wd-cascader";
153
+ export { default as WdStoreHome } from "./wd-store-home";
154
+ export { default as WdStoreProduct } from "./wd-store-product";
153
155
  export { default as FormDetail, default as WdFormDetail } from "./formdetail";
154
156
  export { default as WdTagSelect, WdTag } from "./wd-tag";
@@ -211,3 +211,5 @@ export { default as WdFormObj } from './wd-form-obj';
211
211
  export { default as WdFormArr } from './wd-form-arr';
212
212
  export { default as WdRating } from './wd-rating';
213
213
  export { default as WdCascader } from './wd-cascader';
214
+ export { default as WdStoreHome } from './wd-store-home';
215
+ export { default as WdStoreProduct } from './wd-store-product';
@@ -14,7 +14,7 @@
14
14
  }
15
15
 
16
16
  .ad-view__mark-ad {
17
- width: 52px;
17
+ width: 60px;
18
18
  height: 20px;
19
19
  position: absolute;
20
20
  top: 10px;
@@ -8,6 +8,7 @@ interface IWdFormItemReadOnly {
8
8
  readBeforeAfter?: boolean;
9
9
  format?: string;
10
10
  value?: any;
11
+ enableRelationTag?: boolean;
11
12
  onRelationTagClick?: () => void;
12
13
  }
13
14
  /**
@@ -10,7 +10,7 @@ import { isFormatWithRelation } from '../form/select/formats-util';
10
10
  */
11
11
  export function WdFormItemReadOnly(props) {
12
12
  const ctx = useRecycle();
13
- const { readValue, readOnly, version, readBeforeAfter, before, after, format, onRelationTagClick = undefined, value, } = Object.assign({}, ctx, props);
13
+ const { readValue, readOnly, version, readBeforeAfter, before, after, format, enableRelationTag, onRelationTagClick = undefined, value, } = Object.assign({}, ctx, props);
14
14
  const platform = usePlatform();
15
15
  const { classPrefix } = useConfig();
16
16
  const item = `${classPrefix}-form-item`;
@@ -20,7 +20,7 @@ export function WdFormItemReadOnly(props) {
20
20
  const _after = useMemo(() => readBeforeAfter && textToString(after), [after, readBeforeAfter]);
21
21
  const isRelation = isFormatWithRelation(format);
22
22
  const isXEnum = 'x-enum' === format;
23
- return readOnly && version === 'wd' ? (_jsxs("div", { className: cls, children: [_before && _jsx("span", { className: `${item}__readonly-before`, children: _before }), _jsx("span", { className: `${item}__readonly-value`, children: isRelation && _readValue ? (_jsx(WdTag, { range: _readValue === null || _readValue === void 0 ? void 0 : _readValue.split(',').map((i, index) => ({
23
+ return readOnly && version === 'wd' ? (_jsxs("div", { className: cls, children: [_before && _jsx("span", { className: `${item}__readonly-before`, children: _before }), _jsx("span", { className: `${item}__readonly-value`, children: enableRelationTag && isRelation && _readValue ? (_jsx(WdTag, { range: _readValue === null || _readValue === void 0 ? void 0 : _readValue.split(',').map((i, index) => ({
24
24
  label: i,
25
25
  value: Array.isArray(value) ? value[index] : value,
26
26
  prefixType: !isXEnum && 'inner',
@@ -39,7 +39,10 @@ const OptionText = ({ mode, option, selectFields, authFields, onChange, onRelati
39
39
  if (platform === 'pc' && mode !== 'multiple') {
40
40
  e.stopPropagation();
41
41
  e.preventDefault();
42
- onChange === null || onChange === void 0 ? void 0 : onChange(option === null || option === void 0 ? void 0 : option.value);
42
+ onChange === null || onChange === void 0 ? void 0 : onChange(option === null || option === void 0 ? void 0 : option.value, {
43
+ event: e,
44
+ option,
45
+ });
43
46
  }
44
47
  }, children: [_jsxs("div", { className: "wd-relation-select-header", children: [_jsx("p", { className: "wd-relation-select-header-text", children: (option === null || option === void 0 ? void 0 : option.label) || (option === null || option === void 0 ? void 0 : option.value) }), enableRelationOptionJump && (_jsx("span", { onClick: () => {
45
48
  onRelationOptionJump({ item: option });
@@ -9,6 +9,7 @@ import { usePlatform, textToString } from '../../../utils/platform';
9
9
  import { useSyncValue } from '../../../utils/hooks/useSyncValue';
10
10
  import isObjectEqual from '../../../utils/isObjectEqual';
11
11
  import AllEmpty from '../../form/select/status/allEmpty';
12
+ import { X_RUNTIME_DEFAULT } from '../../../../configs/type-utils/x-runtime-default';
12
13
  import '../style';
13
14
  const OptionList = ({ options, inputFocus, currentSelected, optionClick, bottomTips, onScrollBottom }) => {
14
15
  return (_jsxs(List, { className: "weda-ui-custom-picker__cloumn", style: {
@@ -20,7 +21,7 @@ const OptionList = ({ options, inputFocus, currentSelected, optionClick, bottomT
20
21
  'is-selected': currentSelected.find((i) => i.value === item.value),
21
22
  'is-disabled': item.disabled,
22
23
  });
23
- return (_jsx(List.Item, { className: itemCls, onClick: () => optionClick(item), children: _jsx("p", { className: 'weda-ui-custom-picker__cloumn-item-text', children: item.text || item.label }) }, index));
24
+ return (_jsx(List.Item, { className: itemCls, onClick: (e) => optionClick(item, e), children: _jsx("p", { className: 'weda-ui-custom-picker__cloumn-item-text', children: item.text || item.label }) }, index));
24
25
  }), bottomTips && (_jsx(List.Item, { children: _jsx("div", { className: "weda-ui-custom-picker__status weda-ui-custom-picker__status--empty", children: bottomTips }) }))] }));
25
26
  };
26
27
  const getSelectedItem = (options = [], value) => {
@@ -93,7 +94,7 @@ function SelectH5(props) {
93
94
  };
94
95
  const handleOk = () => {
95
96
  const selectedVal = currentSelected === null || currentSelected === void 0 ? void 0 : currentSelected.map((i) => i.value);
96
- onChange(isMultiple ? selectedVal : selectedVal[0]);
97
+ onChange(isMultiple ? selectedVal : selectedVal[0], { options: currentSelected });
97
98
  setVisible(false);
98
99
  };
99
100
  // 处理当前选中值
@@ -109,13 +110,13 @@ function SelectH5(props) {
109
110
  }
110
111
  return [...currentSelected, item];
111
112
  };
112
- const optionClick = (item) => {
113
+ const optionClick = (item, e) => {
113
114
  if (item.disabled)
114
115
  return;
115
116
  setInputFocus(false);
116
117
  if (!isMultiple) {
117
118
  // 单选直接关弹窗
118
- onChange(item.value);
119
+ onChange(item.value, { event: e, option: item });
119
120
  setCurrentSelected([item]);
120
121
  setVisible(false);
121
122
  }
@@ -137,7 +138,7 @@ function SelectH5(props) {
137
138
  }, children: _jsx(OptionList, { onScrollBottom: onScrollBottom, options: customOptions, inputFocus: inputFocus, currentSelected: currentSelected, optionClick: optionClick, bottomTips: bottomTips }) }), footer] })) })] })] }));
138
139
  }
139
140
  export function SelectUI(props) {
140
- const { placeholder, size, disabled, onChange, onSearch, searchable, options = [], value, footer, overlayClassName, onOpen, onScrollBottom, tips, bottomTips, mode, format, readOnly, setAllOption, listHeight, listWidth, popupContainer, searchPlaceholder = '搜索选项', matchButtonWidth = true, ...restProps } = props;
141
+ const { placeholder, size, disabled, onChange, onSearch, searchable, options = [], value, footer, overlayClassName, onOpen, onScrollBottom, tips, bottomTips, mode, format, readOnly, setAllOption, listHeight, listWidth, popupContainer, searchPlaceholder = '搜索选项', matchButtonWidth = true, enableRelationTag = X_RUNTIME_DEFAULT.enableRelationTag, ...restProps } = props;
141
142
  const platform = usePlatform();
142
143
  const [currentOption] = useSyncValue((options === null || options === void 0 ? void 0 : options.map(({ label, value }) => ({ label, value }))) || [], isObjectEqual);
143
144
  // 更新option,从而更新最新的选项值
@@ -169,7 +170,10 @@ export function SelectUI(props) {
169
170
  return _jsx("div", { className: "wedatea2td-text-weak", children: placeholder });
170
171
  }
171
172
  return selectedItem.map((i) => (i === null || i === void 0 ? void 0 : i.label) || i.value).join(',');
172
- }, staging: false, overlayClassName: `${overlayClassName} multiple`, searchable: searchable, matchButtonWidth: matchButtonWidth, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: Array.isArray(value) ? value : [], onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
173
+ }, staging: false, overlayClassName: `${overlayClassName} multiple`, searchable: searchable, matchButtonWidth: matchButtonWidth, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: Array.isArray(value) ? value : [], onChange: (v, context) => {
174
+ const _options = v === null || v === void 0 ? void 0 : v.map((item) => options === null || options === void 0 ? void 0 : options.find((i) => i.value === item));
175
+ onChange(v, { ...context, options: _options });
176
+ }, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
173
177
  }
174
178
  else {
175
179
  return (_jsx(Select, { ...restProps, popupContainer: popupContainer, button: (selectedItem) => {
@@ -180,5 +184,5 @@ export function SelectUI(props) {
180
184
  }, overlayClassName: overlayClassName, searchable: searchable, matchButtonWidth: matchButtonWidth, placeholder: placeholder, searchPlaceholder: searchPlaceholder, appearance: 'button', size: size, disabled: disabled, autoClearSearchValue: true, options: options === null || options === void 0 ? void 0 : options.map((i) => ({ ...i, text: i.text || i.label })), value: value, onChange: onChange, onSearch: onSearch, footer: footer, onOpen: onOpen, onScrollBottom: onScrollBottom, bottomTips: bottomTips, tips: tips, listHeight: listHeight, listWidth: listWidth }));
181
185
  }
182
186
  };
183
- return (_jsx(WdFormItemReadOnly, { after: props.after, before: props.before, onRelationTagClick: props.onRelationTagClick, readBeforeAfter: true, readOnly: readOnly, readValue: readValue, format: format, value: value, version: 'wd', children: _jsx("div", { "data-testid": isMultiple ? 'form-item-select-multiple-pc' : 'form-select', className: isMultiple ? 'form-select-multiple-pc' : 'form-select-pc', children: render() }) }));
187
+ return (_jsx(WdFormItemReadOnly, { after: props.after, before: props.before, onRelationTagClick: props.onRelationTagClick, readBeforeAfter: true, readOnly: readOnly, readValue: readValue, format: format, value: value, version: 'wd', enableRelationTag: enableRelationTag, children: _jsx("div", { "data-testid": isMultiple ? 'form-item-select-multiple-pc' : 'form-select', className: isMultiple ? 'form-select-multiple-pc' : 'form-select-pc', children: render() }) }));
184
188
  }
@@ -40,10 +40,10 @@ export const WdSelect = forwardRef(function WsSelect(props, ref) {
40
40
  onChange === null || onChange === void 0 ? void 0 : onChange(v);
41
41
  (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.change) === null || _a === void 0 ? void 0 : _a.call(delayEvents, { value: v });
42
42
  }, [onChange, delayEvents]);
43
- const handleChange = (v) => {
43
+ const handleChange = (v, context) => {
44
44
  var _a;
45
45
  onChange === null || onChange === void 0 ? void 0 : onChange(v);
46
- (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.change) === null || _a === void 0 ? void 0 : _a.call(delayEvents, { value: v });
46
+ (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.change) === null || _a === void 0 ? void 0 : _a.call(delayEvents, { value: v, context });
47
47
  };
48
48
  const clearProps = useHandleClear({
49
49
  onChange: onClearChange,
@@ -48,10 +48,10 @@ export const WdSelectMultiple = forwardRef(function WdSelectMultiple(props, ref)
48
48
  disabled,
49
49
  value,
50
50
  });
51
- const handleChange = (v) => {
51
+ const handleChange = (v, context) => {
52
52
  var _a;
53
53
  onChange === null || onChange === void 0 ? void 0 : onChange(v);
54
- (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.change) === null || _a === void 0 ? void 0 : _a.call(delayEvents, { value: v });
54
+ (_a = delayEvents === null || delayEvents === void 0 ? void 0 : delayEvents.change) === null || _a === void 0 ? void 0 : _a.call(delayEvents, { value: v, context });
55
55
  };
56
56
  const isRelation = isFormatWithRelation(format);
57
57
  const LabelAdornment = isRelation && (_jsx(RelationalSetting, { size: props.size, refresh: () => {
@@ -0,0 +1,81 @@
1
+ .wd-store-home__wrap {
2
+ width: 320px;
3
+ background-color: #fff;
4
+ border: 1px solid #f2f2f2;
5
+ border-radius: 2px;
6
+ padding: 15px 15px 0 15px;
7
+ }
8
+
9
+ .wd-store-home__content {
10
+ display: flex;
11
+ margin-bottom: 15px;
12
+ }
13
+ .wd-store-home__title {
14
+ margin-bottom: 5px;
15
+ font-size: 18px;
16
+ font-weight: bold;
17
+ }
18
+ .wd-store-home__label {
19
+ font-size: 14px;
20
+ color: rgba(0, 0, 0, 0.4);
21
+ }
22
+ .wd-store-home__img {
23
+ height: 54px;
24
+ width: 54px;
25
+ border-radius: 100%;
26
+ margin-right: 15px;
27
+ }
28
+ .wd-store-home__footer {
29
+ border-top: 1px solid #f2f2f2;
30
+ font-size: 12px;
31
+ padding: 5px 0;
32
+ display: flex;
33
+ color: #b7b7b7;
34
+ font-weight: bold;
35
+ }
36
+ .wd-store-home__icon {
37
+ background-image: url(data:image/svg+xml;charset=utf-8;base64,PHN2ZyB3aWR0aD0iMjYiIGhlaWdodD0iMjYiIHZpZXdCb3g9IjAgMCAyNiAyNiIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZD0iTTIzLjgzMzIgMTAuNjQ0OUMyMy44MzMyIDEyLjAzOCAyMi42ODA1IDEzLjIxMDIgMjEuMTI3IDEzLjUzNTJDMjAuODQ5NyAxMy41OTM3IDIwLjU1NzIgMTMuNjI0IDIwLjI1ODIgMTMuNjI0QzE5Ljg1OTUgMTMuNjI0IDE5LjQ3NiAxMy41Njk5IDE5LjExNjMgMTMuNDY4QzE4LjAxMTMgMTMuMTU2IDE3LjE0NjggMTIuNDA2NCAxNi44MjE4IDExLjQ2ODJDMTYuNzkxNSAxMS4zODE1IDE2Ljc2NzcgMTEuMjkyNyAxNi43NDgyIDExLjIwMzlDMTYuNzI2NSAxMS4yNjY3IDE2LjcwMjcgMTEuMzI5NSAxNi42NzQ1IDExLjM5MjRDMTYuMTMyOCAxMi42NDY5IDE0LjY4OTggMTMuNTQ4MiAxMi45OTk4IDEzLjU0ODJDMTEuMzA5OCAxMy41NDgyIDkuODY2ODQgMTIuNjQ2OSA5LjMyMyAxMS4zOTI0QzkuMjk5MTcgMTEuMzMxNyA5LjI3MzE3IDExLjI3MSA5LjI1MzY3IDExLjIwODJDOS4yMzQxNyAxMS4yOTQ5IDkuMjEwMzQgMTEuMzgxNSA5LjE4IDExLjQ2NkM4Ljg1OTM0IDEyLjQxMjkgNy45ODgzNCAxMy4xNjY5IDYuODc2ODQgMTMuNDc4OUM2LjUyMTUgMTMuNTc4NSA2LjEzOCAxMy42MzI3IDUuNzQxNSAxMy42MzI3QzUuNDQwMzQgMTMuNjMyNyA1LjE1IDEzLjYwMjQgNC44NzA1IDEzLjU0MzlDMy4zMTkxNyAxMy4yMTY3IDIuMTY2NSAxMi4wNDQ1IDIuMTY2NSAxMC42NTM1QzIuMTY2NSAxMC4yODk1IDIuMjQ0NSA5Ljk0MDcxIDIuMzg5NjcgOS42MTc4N0wyLjM5NCA5LjYwNzA0TDQuNjEyNjcgNC42MzQ1NEM1LjExOTY3IDMuNDk5MjEgNi4yNTcxNyAyLjcwODM3IDcuNTgxIDIuNzA4MzdIMTguNDE0M0MxOS43MzYgMi43MDgzNyAyMC44NzM1IDMuNDk5MjEgMjEuMzgwNSA0LjYzMjM3QzIxLjM5MTMgNC42NTE4NyAyMS40IDQuNjcxMzcgMjEuNDA4NyA0LjY5MzA0TDIzLjYwNzggOS42MDQ4N0MyMy43NTA4IDkuOTI3NzEgMjMuODMxIDEwLjI3ODcgMjMuODMxIDEwLjY0NDlIMjMuODMzMloiIGZpbGw9IiNiN2I3YjciLz4KPHBhdGggZD0iTTIxLjY0MDcgMTYuNTc1QzIxLjY0MDcgMTYuNTk2NyAyMS42NDA3IDE2LjYyMDUgMjEuNjM2NCAxNi42NDIyQzIxLjYzNjQgMTYuNjU3NCAyMS42MzY0IDE2LjY3NDcgMjEuNjMyIDE2LjY4OTlWMTYuNjk4NUMyMS4yNDIgMjAuMzk0OSAxNy41MjYyIDIzLjI5MTcgMTMgMjMuMjkxN0M4LjQ3Mzg4IDIzLjI5MTcgNC43NTgwNCAyMC4zOTQ5IDQuMzY4MDQgMTYuNjk4NVYxNi42ODk5QzQuMzYzNzEgMTYuNjc0NyA0LjM2MzcxIDE2LjY1NzQgNC4zNjM3MSAxNi42NDIyQzQuMzU5MzcgMTYuNjIwNSA0LjM1OTM4IDE2LjU5NjcgNC4zNTkzOCAxNi41NzVDNC4zNTkzOCAxNi4wOTYyIDQuNzQ3MjEgMTUuNzA4NCA1LjIyNjA0IDE1LjcwODRDNS42NjgwNCAxNS43MDg0IDYuMDMyMDQgMTYuMDM5OSA2LjA4NjIxIDE2LjQ2NjdDNi4wODgzNyAxNi40Nzk3IDYuMDg4MzcgMTYuNDk0OSA2LjA5MDU0IDE2LjUxQzYuMzgzMDQgMTkuMzMzMiA5LjM2ODcxIDIxLjU1ODQgMTMgMjEuNTU4NEMxNi42MzE0IDIxLjU1ODQgMTkuNjE3IDE5LjMzMzIgMTkuOTA5NSAxNi41MUMxOS45MDk1IDE2LjQ5NDkgMTkuOTA5NSAxNi40Nzk3IDE5LjkxMzkgMTYuNDY2N0MxOS45NjggMTYuMDM5OSAyMC4zMzIgMTUuNzA4NCAyMC43NzQgMTUuNzA4NEMyMS4yNTI5IDE1LjcwODQgMjEuNjQwNyAxNi4wOTYyIDIxLjY0MDcgMTYuNTc1WiIgZmlsbD0iI2I3YjdiNyIvPgo8L3N2Zz4K);
38
+ background-repeat: no-repeat;
39
+ background-position: center;
40
+ background-size: cover;
41
+ width: 20px;
42
+ height: 20px;
43
+ display: inline-block;
44
+ margin-right: 5px;
45
+ }
46
+
47
+ /* 微信商品 */
48
+ .wd-store-product__wrap {
49
+ background-color: #fafafa;
50
+ border-radius: 15px;
51
+ padding: 15px 15px 0 15px;
52
+ }
53
+ .wd-store-product__img {
54
+ width: 30%;
55
+ margin-right: 15px;
56
+ }
57
+ .wd-store-product__text {
58
+ flex: 1;
59
+ display: flex;
60
+ flex-direction: column;
61
+ justify-content: space-between;
62
+ }
63
+ .wd-store-product__text__footer {
64
+ display: flex;
65
+ justify-content: space-between;
66
+ align-items: end;
67
+ margin-top: 20px;
68
+ color: #fc6346;
69
+ }
70
+ .wd-store-product__text .wd-store-home__label {
71
+ border: 1px solid rgba(0, 0, 0, 0.2);
72
+ border-radius: 3px;
73
+ color: rgba(0, 0, 0, 0.4);
74
+ padding: 5px;
75
+ }
76
+ .wd-store-product__text__footer .wd-btn {
77
+ --wd-btn-color-brand: #fc6346;
78
+ --wd-btn-color-brand-hover: #fc6346;
79
+ --wd-btn-color-brand-active: #fc6346;
80
+ --wd-btn-color-brand-focus: #fc6346;
81
+ }
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { CommonPropsType } from '../../types';
3
+ import type { DataType } from '../../../configs/components/wd-store-home';
4
+ import './style';
5
+ export default function WdStoreHome({ className, id }: WdStoreHomeProps): JSX.Element;
6
+ interface WdStoreHomeProps extends CommonPropsType, DataType {
7
+ }
8
+ export { type WdStoreHomeProps };
@@ -0,0 +1,12 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ConfigProvider, Bubble } from 'tea-component';
3
+ import { useCanPreview } from '../../utils/hooks/useCanPreview';
4
+ import { useConfig } from '../../utils/config-context';
5
+ import './style';
6
+ export default function WdStoreHome({ className, id }) {
7
+ const { classPrefix } = useConfig();
8
+ const canPreview = useCanPreview();
9
+ if (!canPreview)
10
+ return null;
11
+ return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Bubble, { placement: "auto", openDelay: 300, content: _jsxs(_Fragment, { children: ["\u8BE5\u7EC4\u4EF6\u5FC5\u987B\u5728\u5C0F\u7A0B\u5E8F\u771F\u5B9E\u73AF\u5883\u4F7F\u7528\u624D\u80FD\u591F\u770B\u5230\u5B9E\u9645\u6548\u679C\u3002", _jsx("br", {}), _jsx("a", { href: "https://developers.weixin.qq.com/miniprogram/dev/component/store-home.html", target: "_blank", rel: "noreferrer", children: "\u67E5\u770B\u8BF4\u660E" })] }), children: _jsxs("div", { className: `${className} ${classPrefix}-store-home__wrap`, id: id, children: [_jsxs("div", { className: `${classPrefix}-store-home__content`, children: [_jsx("img", { className: `${classPrefix}-store-home__img`, src: "https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg", alt: "" }), _jsxs("div", { children: [_jsx("p", { className: `${classPrefix}-store-home__title`, children: "\u5C0F\u5E97\u540D\u79F0" }), _jsx("p", { className: `${classPrefix}-store-home__label`, children: "\u5C0F\u5E97\u7B80\u4ECB" })] })] }), _jsxs("div", { className: `${classPrefix}-store-home__footer`, children: [_jsx("i", { className: `${classPrefix}-store-home__icon` }), "\u5C0F\u5E97\u540D\u79F0"] })] }) }) }));
12
+ }
@@ -0,0 +1,2 @@
1
+ import './index.css';
2
+ import '../style';
@@ -0,0 +1,2 @@
1
+ import './index.css';
2
+ import '../style';
@@ -0,0 +1,8 @@
1
+ /// <reference types="react" />
2
+ import type { CommonPropsType } from '../../types';
3
+ import type { DataType } from '../../../configs/components/wd-store-product';
4
+ import './style';
5
+ export default function WdStoreProduct({ className, id }: WdStoreProductProps): JSX.Element;
6
+ interface WdStoreProductProps extends CommonPropsType, DataType {
7
+ }
8
+ export { type WdStoreProductProps };
@@ -0,0 +1,13 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
2
+ import { ConfigProvider, Bubble } from 'tea-component';
3
+ import './style';
4
+ import WdButton from '../wd-button';
5
+ import { useCanPreview } from '../../utils/hooks/useCanPreview';
6
+ import { useConfig } from '../../utils/config-context';
7
+ export default function WdStoreProduct({ className, id }) {
8
+ const { classPrefix } = useConfig();
9
+ const canPreview = useCanPreview();
10
+ if (!canPreview)
11
+ return null;
12
+ return (_jsx(ConfigProvider, { classPrefix: "wedatea2td", children: _jsx(Bubble, { placement: "auto", openDelay: 300, content: _jsxs(_Fragment, { children: ["\u8BE5\u7EC4\u4EF6\u5FC5\u987B\u5728\u5C0F\u7A0B\u5E8F\u771F\u5B9E\u73AF\u5883\u4F7F\u7528\u624D\u80FD\u591F\u770B\u5230\u5B9E\u9645\u6548\u679C\u3002", _jsx("br", {}), _jsx("a", { href: "https://developers.weixin.qq.com/miniprogram/dev/component/store-product.html", target: "_blank", rel: "noreferrer", children: "\u67E5\u770B\u8BF4\u660E" })] }), children: _jsxs("div", { className: `${className} ${classPrefix}-store-product__wrap`, id: id, children: [_jsxs("div", { className: `${classPrefix}-store-home__content`, children: [_jsx("img", { className: `${classPrefix}-store-product__img`, src: "https://qcloudimg.tencent-cloud.cn/raw/4a29d51b504f12b4933ce4490110b4dc.svg", alt: "" }), _jsxs("div", { className: `${classPrefix}-store-product__text`, children: [_jsxs("div", { children: [_jsx("p", { className: `${classPrefix}-store-home__title`, children: "\u5546\u54C1\u540D\u79F0" }), _jsx("span", { className: `${classPrefix}-store-home__label`, children: "\u5546\u54C1\u6807\u7B7E" })] }), _jsxs("div", { className: `${classPrefix}-store-product__text__footer`, children: [_jsx("p", { className: "price", children: "\u00A5\u4EF7\u683C \u8D77" }), " ", _jsx(WdButton, { text: "\u8D2D\u4E70" })] })] })] }), _jsxs("div", { className: `${classPrefix}-store-home__footer`, children: [_jsx("i", { className: `${classPrefix}-store-home__icon` }), "\u5C0F\u5E97\u540D\u79F0"] })] }) }) }));
13
+ }
@@ -0,0 +1,2 @@
1
+ import '../wd-store-home/index';
2
+ import '../style';
@@ -0,0 +1,2 @@
1
+ import '../wd-store-home/index';
2
+ import '../style';
@@ -34,7 +34,8 @@ export const getDataBaseInfo = (fields, format, childDbName) => {
34
34
  return dataBase;
35
35
  };
36
36
  export const mapResult = (records, primaryColumn) => {
37
- return records === null || records === void 0 ? void 0 : records.map((childItem) => ({
37
+ var _a;
38
+ return (_a = records === null || records === void 0 ? void 0 : records.filter((i) => i._id)) === null || _a === void 0 ? void 0 : _a.map((childItem) => ({
38
39
  _id: childItem._id,
39
40
  value: childItem._id,
40
41
  text: childItem[primaryColumn] ? childItem[primaryColumn] : childItem._id,
@@ -73,7 +73,8 @@ export const WdTable = forwardRef(function TableComp(tableProps, ref) {
73
73
  isSuspendFooter = true, // 是否分页器在页面底部悬停
74
74
  isSupportMultipleSort = false, // 是否支持多字段排序
75
75
  sorter, // 排序规则
76
- __innerSlot, ...props } = tableProps;
76
+ __innerSlot, enableRelationTag = true, // 关联关系字段是否开启关联标签
77
+ ...props } = tableProps;
77
78
  const wList = convertWhere(props, supportManyRelated); // 查询参数
78
79
  const { classPrefix } = useConfig();
79
80
  const platform = usePlatform();
@@ -211,6 +212,7 @@ export const WdTable = forwardRef(function TableComp(tableProps, ref) {
211
212
  fixedEnd,
212
213
  isH5,
213
214
  supportManyRelated,
215
+ showRelationWithTag: enableRelationTag,
214
216
  });
215
217
  // 操作列
216
218
  if (enableCellCustomOption && !isH5) {
@@ -259,11 +261,12 @@ export const WdTable = forwardRef(function TableComp(tableProps, ref) {
259
261
  fixedFront,
260
262
  fixedEnd,
261
263
  isH5,
264
+ supportManyRelated,
265
+ enableRelationTag,
262
266
  enableCellCustomOption,
263
- customOptionTitle,
264
267
  columnSelectType,
268
+ customOptionTitle,
265
269
  classPrefix,
266
- supportManyRelated,
267
270
  resizeColumns,
268
271
  ]);
269
272
  // 主键
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cloudbase/weda-ui",
3
- "version": "3.12.4",
3
+ "version": "3.13.1",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index",
6
6
  "miniprogram": "mpdist",