pb-sxp-ui 14.0.6 → 15.0.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.
@@ -14,7 +14,10 @@ export interface IHashTagProps {
14
14
  };
15
15
  buttonBgStyle: CSSProperties;
16
16
  showBanner?: boolean;
17
- openFixedSize?: boolean;
17
+ openFixedSize?: {
18
+ open: true;
19
+ ratio: string;
20
+ };
18
21
  }
19
22
  declare const _default: React.NamedExoticComponent<IHashTagProps>;
20
23
  export default _default;
@@ -56,7 +56,8 @@ const HashTag = createMaterial(HashTagComponent, {
56
56
  paddingLeft: 20,
57
57
  paddingRight: 20,
58
58
  paddingBottom: 20
59
- }
59
+ },
60
+ openFixedSize: { open: true, ratio: '1' }
60
61
  }
61
62
  },
62
63
  w: 100,
@@ -5,12 +5,10 @@ declare const _default: ({
5
5
  label: string;
6
6
  name: string[];
7
7
  addonAfter: string;
8
- initialValue?: undefined;
9
8
  } | {
10
9
  type: string;
11
10
  label: string;
12
11
  name: string[];
13
- initialValue: boolean;
14
12
  addonAfter?: undefined;
15
13
  })[];
16
14
  } | {
@@ -19,10 +19,9 @@ export default [
19
19
  addonAfter: 'px'
20
20
  },
21
21
  {
22
- type: 'Switch',
22
+ type: 'HashTagFixedSize',
23
23
  label: '固定宽高',
24
- name: ['props', 'openFixedSize'],
25
- initialValue: true
24
+ name: ['props', 'openFixedSize']
26
25
  }
27
26
  ]
28
27
  },
@@ -12,7 +12,7 @@ const useEventReport_1 = require("../../../../core/hooks/useEventReport");
12
12
  const materials_1 = require("../../../../core/utils/materials");
13
13
  const WaterfallFlowItem = (props) => {
14
14
  var _a;
15
- const { rec, index, list, reportTagsView, textStyles, space } = props;
15
+ const { rec, index, list, reportTagsView, textStyles, space, openFixedSize } = props;
16
16
  const { swiperRef, setRtcList, setOpenHashtag, sxpParameter, globalConfig } = (0, hooks_1.useSxpDataSource)();
17
17
  const [showVideo, setShowVideo] = (0, react_1.useState)(false);
18
18
  const imgDom = (0, react_1.useRef)(null);
@@ -106,11 +106,11 @@ const WaterfallFlowItem = (props) => {
106
106
  }, 0);
107
107
  };
108
108
  return (react_1.default.createElement("div", { ref: ref, className: 'list-content-listItem', key: index, onClick: handleClickToDetail, style: { marginBottom: space } },
109
- react_1.default.createElement("div", { className: 'list-content-listItem-picture' },
109
+ react_1.default.createElement("div", { className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture' : 'list-content-listItem-picture1609' },
110
110
  showVideo && (react_1.default.createElement("div", { style: { display: 'none' } },
111
111
  react_1.default.createElement("video", { ref: videoDom, crossOrigin: 'anonymous', className: 'list-content-listItem-picture-img' }),
112
112
  react_1.default.createElement("canvas", { ref: canvasRef }))),
113
- react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: 'list-content-listItem-picture-img', ref: imgDom })),
113
+ react_1.default.createElement(FormatImage_1.default, { loading: 'lazy', className: (openFixedSize === null || openFixedSize === void 0 ? void 0 : openFixedSize.ratio) === '1' ? 'list-content-listItem-picture-img' : 'list-content-listItem-picture1609-img', ref: imgDom })),
114
114
  react_1.default.createElement("div", { className: 'list-content-listItem-info' },
115
115
  react_1.default.createElement("div", { className: `${'list-content-listItem-info-title'} ${priceText ? 'list-content-listItem-info-nowrap' : ''}`, style: textStyles === null || textStyles === void 0 ? void 0 : textStyles.title, dangerouslySetInnerHTML: {
116
116
  __html: (0, tool_1.setFontForText)(title, textStyles === null || textStyles === void 0 ? void 0 : textStyles.title)
@@ -11,7 +11,7 @@ const List_1 = tslib_1.__importDefault(require("./List"));
11
11
  const hooks_1 = require("../../../../core/hooks");
12
12
  const useEventReport_1 = require("../../../../core/hooks/useEventReport");
13
13
  const WaterFall = (props) => {
14
- var _a;
14
+ var _a, _b;
15
15
  const { waterFallData, setOpenHashtag, openHashtag, swiperRef, setWaterFallData, cacheRtcList, setRtcList, cacheActiveIndex, rtcList, setCacheRtcList, setIsFromHashtag, isFromHashtag, bffEventReport, themeTag, selectTag, bffFbReport } = (0, hooks_1.useSxpDataSource)();
16
16
  const { backMainFeed } = (0, useEventReport_1.useEventReport)();
17
17
  const modalEleRef = (0, react_1.useRef)(null);
@@ -100,6 +100,6 @@ const WaterFall = (props) => {
100
100
  display: openHashtag ? 'block' : 'none'
101
101
  } },
102
102
  react_1.default.createElement(Navbar_1.default, { icon: left_png_1.default, styles: { top: '32px' }, textStyle: (_a = props === null || props === void 0 ? void 0 : props.textStyles) === null || _a === void 0 ? void 0 : _a.hashTagTitle, onClose: handleClose }),
103
- (props === null || props === void 0 ? void 0 : props.openFixedSize) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
103
+ ((_b = props === null || props === void 0 ? void 0 : props.openFixedSize) === null || _b === void 0 ? void 0 : _b.open) === true || (props === null || props === void 0 ? void 0 : props.openFixedSize) === undefined ? (react_1.default.createElement(List_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props))) : (react_1.default.createElement(WaterfallList_1.default, Object.assign({ key: waterFallData, reportTagsView: reportTagsView }, props)))), modalEleRef.current);
104
104
  };
105
105
  exports.default = (0, react_1.memo)(WaterFall);