pb-sxp-ui 1.6.4 → 1.6.5
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/index.cjs +7 -6
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -6
- package/dist/index.js.map +1 -1
- package/dist/index.min.cjs +3 -3
- package/dist/index.min.cjs.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.min.js.map +1 -1
- package/dist/pb-ui.js +7 -6
- package/dist/pb-ui.js.map +1 -1
- package/dist/pb-ui.min.js +3 -3
- package/dist/pb-ui.min.js.map +1 -1
- package/es/core/components/SxpPageRender/Hashtag/index.js +3 -2
- package/es/materials/sxp/template/components/Scroll.d.ts +0 -1
- package/es/materials/sxp/template/components/Scroll.js +2 -2
- package/lib/core/components/SxpPageRender/Hashtag/index.js +3 -2
- package/lib/materials/sxp/template/components/Scroll.d.ts +0 -1
- package/lib/materials/sxp/template/components/Scroll.js +2 -2
- package/package.json +1 -1
@@ -37,9 +37,10 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle, hashTagRigh
|
|
37
37
|
return (React.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
38
38
|
}, [isShowMore, tags]);
|
39
39
|
return (React.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: {
|
40
|
-
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px
|
40
|
+
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
|
41
|
+
width: hashTagRightMargin
|
41
42
|
} },
|
42
|
-
React.createElement(Scroll,
|
43
|
+
React.createElement(Scroll, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (React.createElement(SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
|
43
44
|
React.createElement("div", { dangerouslySetInnerHTML: { __html: setFontForText(`#${item}`, hashTagStyle) } })))))));
|
44
45
|
};
|
45
46
|
export default memo(Hashtag);
|
@@ -5,7 +5,7 @@ import 'swiper/css/free-mode';
|
|
5
5
|
import 'swiper/css/scrollbar';
|
6
6
|
import { FreeMode, Scrollbar, Mousewheel } from 'swiper/modules';
|
7
7
|
import { useSxpDataSource } from '../../../../core/hooks';
|
8
|
-
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false
|
8
|
+
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
|
9
9
|
const ref = useRef();
|
10
10
|
const { popupDetailData } = useSxpDataSource();
|
11
11
|
useEffect(() => {
|
@@ -13,6 +13,6 @@ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false,
|
|
13
13
|
if (enableSlideActive)
|
14
14
|
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
15
15
|
}, [popupDetailData, enableSlideActive]);
|
16
|
-
return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: Object.assign(
|
16
|
+
return (React.createElement(Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [FreeMode, Scrollbar, Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
|
17
17
|
};
|
18
18
|
export default memo(Scroll);
|
@@ -40,9 +40,10 @@ const Hashtag = ({ tags, itemId, itemType, index, rec, hashTagStyle, hashTagRigh
|
|
40
40
|
return (react_1.default.createElement("span", { style: { textDecoration: 'underline', cursor: 'pointer', color: '#fff' }, onClick: () => setIsShowMore(!isShowMore) }, isShowMore ? 'show less' : 'show more'));
|
41
41
|
}, [isShowMore, tags]);
|
42
42
|
return (react_1.default.createElement("div", { className: 'clc-sxp-bottom-hashtag', style: {
|
43
|
-
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px
|
43
|
+
marginTop: `${(_a = hashTagStyle === null || hashTagStyle === void 0 ? void 0 : hashTagStyle.marginTop) !== null && _a !== void 0 ? _a : 16}px`,
|
44
|
+
width: hashTagRightMargin
|
44
45
|
} },
|
45
|
-
react_1.default.createElement(Scroll_1.default,
|
46
|
+
react_1.default.createElement(Scroll_1.default, null, tags === null || tags === void 0 ? void 0 : tags.map((item, index) => (react_1.default.createElement(react_2.SwiperSlide, { key: index, hidden: !isShowMore ? index >= 6 : false, className: 'clc-sxp-bottom-hashtag-item', style: hashTagStyle, onClick: () => handleClickTag(item), tag: 'button', "aria-label": item },
|
46
47
|
react_1.default.createElement("div", { dangerouslySetInnerHTML: { __html: (0, tool_1.setFontForText)(`#${item}`, hashTagStyle) } })))))));
|
47
48
|
};
|
48
49
|
exports.default = (0, react_1.memo)(Hashtag);
|
@@ -8,7 +8,7 @@ require("swiper/css/free-mode");
|
|
8
8
|
require("swiper/css/scrollbar");
|
9
9
|
const modules_1 = require("swiper/modules");
|
10
10
|
const hooks_1 = require("../../../../core/hooks");
|
11
|
-
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false
|
11
|
+
const Scroll = ({ children, isPadding = true, style, enableSlideActive = false }) => {
|
12
12
|
const ref = (0, react_1.useRef)();
|
13
13
|
const { popupDetailData } = (0, hooks_1.useSxpDataSource)();
|
14
14
|
(0, react_1.useEffect)(() => {
|
@@ -16,6 +16,6 @@ const Scroll = ({ children, isPadding = true, style, enableSlideActive = false,
|
|
16
16
|
if (enableSlideActive)
|
17
17
|
(_a = ref === null || ref === void 0 ? void 0 : ref.current) === null || _a === void 0 ? void 0 : _a.swiper.slideTo((_b = popupDetailData === null || popupDetailData === void 0 ? void 0 : popupDetailData.multiCheckIndex) !== null && _b !== void 0 ? _b : 0);
|
18
18
|
}, [popupDetailData, enableSlideActive]);
|
19
|
-
return (react_1.default.createElement(react_2.Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: Object.assign(
|
19
|
+
return (react_1.default.createElement(react_2.Swiper, { ref: ref, direction: 'horizontal', slidesPerView: 'auto', freeMode: true, mousewheel: true, modules: [modules_1.FreeMode, modules_1.Scrollbar, modules_1.Mousewheel], style: Object.assign({ padding: isPadding ? '0 12px 0 20px' : 0 }, style) }, children));
|
20
20
|
};
|
21
21
|
exports.default = (0, react_1.memo)(Scroll);
|