@pisell/private-materials 6.2.35 → 6.2.37
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/build/lowcode/assets-daily.json +11 -11
- package/build/lowcode/assets-dev.json +2 -2
- package/build/lowcode/assets-prod.json +11 -11
- package/build/lowcode/index.js +1 -1
- package/build/lowcode/meta.js +1 -1
- package/build/lowcode/preview.js +13 -29
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +6 -6
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/appointmentBooking/components/Content/index.js +1 -1
- package/es/components/appointmentBooking/components/Content/index.less +3 -3
- package/es/components/appointmentBooking/components/Services/index.js +2 -2
- package/es/components/appointmentBooking/index.js +8 -2
- package/es/components/booking/components/voucher/index.js +5 -0
- package/es/components/booking/deposit/ClientItem/index.js +1 -1
- package/es/components/booking/deposit/DepositItem/index.js +1 -1
- package/es/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/es/components/booking/forms/single/RenderValueById.js +68 -17
- package/es/components/booking/forms/single/index.less +67 -1
- package/es/components/booking/hooks/useQuotation.js +1 -1
- package/es/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/es/components/booking/info/clientVariant/utils.js +7 -0
- package/es/components/booking/info/clientVariant/vertical/index.js +3 -2
- package/es/components/booking/info2/service/addService/utils.js +2 -1
- package/es/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/es/components/booking/info2/service/editService/index.js +37 -29
- package/es/components/booking/info2/utilsByBooking.js +4 -4
- package/es/components/booking/locales.d.ts +3 -0
- package/es/components/booking/locales.js +6 -3
- package/es/components/booking/materiels/duration/index.js +1 -1
- package/es/components/booking/materiels/startTime/index.d.ts +1 -0
- package/es/components/booking/materiels/startTime/index.js +1 -1
- package/es/components/booking/utils.js +3 -3
- package/es/components/eftposPay/amount.d.ts +1 -1
- package/es/components/eftposPay/device.d.ts +1 -1
- package/es/components/eftposPay/store/index.d.ts +3 -3
- package/es/components/eventBooking/index.js +8 -1
- package/es/components/productSelect/components/TabProduct/index.js +7 -2
- package/es/components/schedules/utils.d.ts +1 -1
- package/es/components/shoppingCart/components/Cart/Product.js +2 -1
- package/es/components/ticketBooking/components/addServiceVariant/addService.js +172 -91
- package/es/components/ticketBooking/components/timeBar/index.js +3 -3
- package/es/components/ticketBooking/utils/index.d.ts +3 -1
- package/es/components/ticketBooking/utils/index.js +18 -2
- package/es/hooks/useWindowSize.js +8 -1
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.js +29 -0
- package/es/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/es/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/es/plus/productSelect/CategoryTabs/index.js +171 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.js +37 -0
- package/es/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/es/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/es/plus/productSelect/ProductCard/index.js +170 -0
- package/es/plus/productSelect/ProductCard/index.less +270 -0
- package/es/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/es/plus/productSelect/ProductList/gridComponents.js +149 -0
- package/es/plus/productSelect/ProductList/index.d.ts +22 -0
- package/es/plus/productSelect/ProductList/index.js +72 -0
- package/es/plus/productSelect/ProductList/index.less +0 -0
- package/es/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/es/plus/productSelect/components/IntersectionObserver.js +276 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.js +357 -0
- package/es/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/es/plus/productSelect/components/TabsStructure/hooks.js +243 -0
- package/es/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/es/plus/productSelect/components/TabsStructure/index.js +13 -0
- package/es/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/es/plus/productSelect/components/TabsStructure/styles.js +87 -0
- package/es/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/es/plus/productSelect/components/TabsStructure/types.js +1 -0
- package/es/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/es/plus/productSelect/components/TabsStructure/utils.js +56 -0
- package/es/plus/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/es/plus/productSelect/components/pisellPriceText/index.js +43 -0
- package/es/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/es/plus/productSelect/hooks/useToken.js +34 -0
- package/es/plus/productSelect/index.d.ts +31 -0
- package/es/plus/productSelect/index.js +270 -0
- package/es/plus/productSelect/index.less +56 -0
- package/es/plus/productSelect/locales.d.ts +18 -0
- package/es/plus/productSelect/locales.js +17 -0
- package/es/plus/productSelect/theme/token.d.ts +17 -0
- package/es/plus/productSelect/theme/token.js +19 -0
- package/es/plus/productSelect/utils.d.ts +39 -0
- package/es/plus/productSelect/utils.js +162 -0
- package/es/pro/pisellNumberSelector/index.js +3 -3
- package/es/pro/pisellPhoneKeyboard/index.js +1 -1
- package/es/utils/index.d.ts +1 -1
- package/lib/components/appointmentBooking/components/Content/index.js +1 -1
- package/lib/components/appointmentBooking/components/Content/index.less +3 -3
- package/lib/components/appointmentBooking/components/Services/index.js +2 -2
- package/lib/components/appointmentBooking/index.js +6 -1
- package/lib/components/booking/components/voucher/index.js +5 -0
- package/lib/components/booking/deposit/ClientItem/index.js +1 -1
- package/lib/components/booking/deposit/DepositItem/index.js +1 -1
- package/lib/components/booking/forms/single/RenderValueById.d.ts +1 -0
- package/lib/components/booking/forms/single/RenderValueById.js +37 -9
- package/lib/components/booking/forms/single/index.less +67 -1
- package/lib/components/booking/hooks/useQuotation.js +1 -1
- package/lib/components/booking/info/clientVariant/utils.d.ts +2 -0
- package/lib/components/booking/info/clientVariant/utils.js +13 -2
- package/lib/components/booking/info/clientVariant/vertical/index.js +7 -6
- package/lib/components/booking/info2/service/addService/utils.js +3 -3
- package/lib/components/booking/info2/service/addTimeModal/index.js +0 -1
- package/lib/components/booking/info2/service/editService/index.js +22 -12
- package/lib/components/booking/info2/utilsByBooking.js +7 -8
- package/lib/components/booking/locales.d.ts +3 -0
- package/lib/components/booking/locales.js +6 -3
- package/lib/components/booking/materiels/duration/index.js +1 -1
- package/lib/components/booking/materiels/startTime/index.d.ts +1 -0
- package/lib/components/booking/materiels/startTime/index.js +1 -1
- package/lib/components/booking/utils.js +3 -3
- package/lib/components/eftposPay/amount.d.ts +1 -1
- package/lib/components/eftposPay/device.d.ts +1 -1
- package/lib/components/eftposPay/store/index.d.ts +3 -3
- package/lib/components/eventBooking/index.js +6 -1
- package/lib/components/productSelect/components/TabProduct/index.js +7 -1
- package/lib/components/schedules/utils.d.ts +1 -1
- package/lib/components/shoppingCart/components/Cart/Product.js +7 -4
- package/lib/components/ticketBooking/components/addServiceVariant/addService.js +87 -14
- package/lib/components/ticketBooking/components/timeBar/index.js +89 -70
- package/lib/components/ticketBooking/utils/index.d.ts +3 -1
- package/lib/components/ticketBooking/utils/index.js +21 -0
- package/lib/hooks/useWindowSize.js +6 -1
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.d.ts +10 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.js +62 -0
- package/lib/plus/productSelect/CategoryTabs/CategorySkeleton.less +30 -0
- package/lib/plus/productSelect/CategoryTabs/index.d.ts +18 -0
- package/lib/plus/productSelect/CategoryTabs/index.js +183 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.d.ts +10 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.js +58 -0
- package/lib/plus/productSelect/ProductCard/ProductCardSkeleton.less +81 -0
- package/lib/plus/productSelect/ProductCard/index.d.ts +45 -0
- package/lib/plus/productSelect/ProductCard/index.js +184 -0
- package/lib/plus/productSelect/ProductCard/index.less +270 -0
- package/lib/plus/productSelect/ProductList/gridComponents.d.ts +44 -0
- package/lib/plus/productSelect/ProductList/gridComponents.js +148 -0
- package/lib/plus/productSelect/ProductList/index.d.ts +22 -0
- package/lib/plus/productSelect/ProductList/index.js +86 -0
- package/lib/plus/productSelect/ProductList/index.less +0 -0
- package/lib/plus/productSelect/components/IntersectionObserver.d.ts +42 -0
- package/lib/plus/productSelect/components/IntersectionObserver.js +269 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.d.ts +30 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.js +393 -0
- package/lib/plus/productSelect/components/TabsStructure/TabsStructure.less +224 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.d.ts +22 -0
- package/lib/plus/productSelect/components/TabsStructure/hooks.js +209 -0
- package/lib/plus/productSelect/components/TabsStructure/index.d.ts +5 -0
- package/lib/plus/productSelect/components/TabsStructure/index.js +92 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.d.ts +47 -0
- package/lib/plus/productSelect/components/TabsStructure/styles.js +122 -0
- package/lib/plus/productSelect/components/TabsStructure/types.d.ts +105 -0
- package/lib/plus/productSelect/components/TabsStructure/types.js +17 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.d.ts +12 -0
- package/lib/plus/productSelect/components/TabsStructure/utils.js +72 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.d.ts +11 -0
- package/lib/plus/productSelect/components/pisellPriceText/index.js +72 -0
- package/lib/plus/productSelect/hooks/useToken.d.ts +18 -0
- package/lib/plus/productSelect/hooks/useToken.js +50 -0
- package/lib/plus/productSelect/index.d.ts +31 -0
- package/lib/plus/productSelect/index.js +299 -0
- package/lib/plus/productSelect/index.less +56 -0
- package/lib/plus/productSelect/locales.d.ts +18 -0
- package/lib/plus/productSelect/locales.js +41 -0
- package/lib/plus/productSelect/theme/token.d.ts +17 -0
- package/lib/plus/productSelect/theme/token.js +47 -0
- package/lib/plus/productSelect/utils.d.ts +39 -0
- package/lib/plus/productSelect/utils.js +138 -0
- package/lib/pro/pisellNumberSelector/index.js +3 -3
- package/lib/pro/pisellPhoneKeyboard/index.js +1 -1
- package/lib/utils/index.d.ts +1 -1
- package/package.json +4 -4
@@ -349,7 +349,8 @@ export default {
|
|
349
349
|
'pisell2.text.quotation.product.change.title': "Notification",
|
350
350
|
'pisell2.text.quotation.product.change.describe': "Product updates available: Please refresh the following items to load the latest data.",
|
351
351
|
// Notes
|
352
|
-
'pisell2.booking.notes.placeholder': 'Enter a note...'
|
352
|
+
'pisell2.booking.notes.placeholder': 'Enter a note...',
|
353
|
+
'pisell2.text.form.link.to.another.record.more': 'View More'
|
353
354
|
},
|
354
355
|
'zh-CN': {
|
355
356
|
'pisell2.text.refunded-amount': '已退金额',
|
@@ -705,7 +706,8 @@ export default {
|
|
705
706
|
'pisell2.text.quotation.product.change.title': "提示",
|
706
707
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
707
708
|
// Notes
|
708
|
-
'pisell2.booking.notes.placeholder': '输入备注...'
|
709
|
+
'pisell2.booking.notes.placeholder': '输入备注...',
|
710
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
709
711
|
},
|
710
712
|
'zh-HK': {
|
711
713
|
'pisell2.text.refunded-amount': '已退金額',
|
@@ -1061,6 +1063,7 @@ export default {
|
|
1061
1063
|
'pisell2.text.quotation.product.change.title': "提示",
|
1062
1064
|
'pisell2.text.quotation.product.change.describe': "以下商品信息已更新,请重新编辑相关商品以同步最新数据。",
|
1063
1065
|
// Notes
|
1064
|
-
'pisell2.booking.notes.placeholder': '輸入備註...'
|
1066
|
+
'pisell2.booking.notes.placeholder': '輸入備註...',
|
1067
|
+
'pisell2.text.form.link.to.another.record.more': '查看更多'
|
1065
1068
|
}
|
1066
1069
|
};
|
@@ -60,7 +60,7 @@ var Duration = function Duration(props) {
|
|
60
60
|
});
|
61
61
|
}
|
62
62
|
return durationSlicesBasedOnTime;
|
63
|
-
}, [timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime === null || usableTime === void 0 ? void 0 : usableTime.end_at]);
|
63
|
+
}, [timeObj === null || timeObj === void 0 ? void 0 : timeObj.durationSlicesBasedOnTime, slice, locale, duration, startDateStr, usableTime === null || usableTime === void 0 ? void 0 : usableTime.end_at]);
|
64
64
|
useEffect(function () {
|
65
65
|
timeObjChange === null || timeObjChange === void 0 || timeObjChange(times);
|
66
66
|
}, [times]);
|
@@ -37,6 +37,6 @@ var StartTime = function StartTime(props) {
|
|
37
37
|
}, d[label]);
|
38
38
|
});
|
39
39
|
}, []);
|
40
|
-
return /*#__PURE__*/React.createElement(Select, _extends({}, selectProps, resetProps), renderOptions(timeObj.timeSlices));
|
40
|
+
return /*#__PURE__*/React.createElement(Select, _extends({}, selectProps, resetProps), renderOptions(timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices));
|
41
41
|
};
|
42
42
|
export default StartTime;
|
@@ -670,7 +670,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
670
670
|
if (isSession) {
|
671
671
|
return getDays(cacheItem, 'minutes');
|
672
672
|
}
|
673
|
-
return findNextDuration(cacheItem.duration, timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value);
|
673
|
+
return findNextDuration(cacheItem.duration, timeObj === null || timeObj === void 0 ? void 0 : timeObj.durationSlicesBasedOnTime, cacheItem === null || cacheItem === void 0 || (_cacheItem$duration = cacheItem.duration) === null || _cacheItem$duration === void 0 ? void 0 : _cacheItem$duration.value);
|
674
674
|
};
|
675
675
|
|
676
676
|
// 获取上一个服务商品
|
@@ -694,7 +694,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
694
694
|
} else {
|
695
695
|
// 如果上个服务商品的结束时间跨天, 那么设置为最后一个时间段, 不跨天则取上一个的结束时间
|
696
696
|
if (dayjs(lastServerEndDate).isAfter(lastServerStartDate, 'day')) {
|
697
|
-
_extend.start_time = timeObj.timeSlices[timeObj.timeSlices.length - 1].value;
|
697
|
+
_extend.start_time = timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices[(timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices.length) - 1].value;
|
698
698
|
} else {
|
699
699
|
_extend.start_time = lastServerEndDate.format("HH:mm");
|
700
700
|
}
|
@@ -704,7 +704,7 @@ export var getServerItemExtend = function getServerItemExtend(state, cacheItem,
|
|
704
704
|
// _extend.resource = 0;
|
705
705
|
|
706
706
|
var findNextSliceProps = {
|
707
|
-
timeSlices: timeObj.timeSlices,
|
707
|
+
timeSlices: timeObj === null || timeObj === void 0 ? void 0 : timeObj.timeSlices,
|
708
708
|
index: 0,
|
709
709
|
date: ''
|
710
710
|
};
|
@@ -8,7 +8,7 @@ import { PosProps } from './const';
|
|
8
8
|
*/
|
9
9
|
declare const _default: ({ className, onChange, onClose, formatAmount, isMobile, net, client }: {
|
10
10
|
className?: string | undefined;
|
11
|
-
onChange?: ((status: "success" | "page" | "
|
11
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
12
12
|
[keys: string]: unknown;
|
13
13
|
} | undefined, other?: any) => void) | undefined;
|
14
14
|
onClose: () => void;
|
@@ -10,7 +10,7 @@ import './device.less';
|
|
10
10
|
declare const _default: ({ api, onChange, onClose, className, device_number, isMobile, net, client, formatAmount, }: {
|
11
11
|
api: PayProps['api'];
|
12
12
|
className?: string | undefined;
|
13
|
-
onChange?: ((status: "success" | "page" | "
|
13
|
+
onChange?: ((status: "success" | "page" | "fail" | "print" | "mark_tx_processed", params?: string | {
|
14
14
|
[keys: string]: unknown;
|
15
15
|
} | undefined, other?: any) => void) | undefined;
|
16
16
|
onClose: () => void;
|
@@ -295,15 +295,15 @@ export declare const backUpFree: (payload: Partial<State>) => {
|
|
295
295
|
name?: string | undefined;
|
296
296
|
symbol?: string | undefined;
|
297
297
|
amount?: string | number | undefined;
|
298
|
-
mode?: "
|
298
|
+
mode?: "pay" | "fullPay" | "refund" | "query" | undefined;
|
299
299
|
order_id?: string | number | undefined;
|
300
300
|
eftpos?: "payo" | "tyro" | "windcave" | "stripe" | "linkly" | undefined;
|
301
|
-
action?: "amount" | "
|
301
|
+
action?: "amount" | "deviceList" | "pay" | undefined;
|
302
302
|
key?: number | undefined;
|
303
303
|
step?: number | undefined;
|
304
304
|
title?: string | undefined;
|
305
305
|
subTitle?: string | undefined;
|
306
|
-
type?: "
|
306
|
+
type?: "step" | "unset" | undefined;
|
307
307
|
render?: boolean | undefined;
|
308
308
|
net?: boolean | undefined;
|
309
309
|
component?: string | undefined;
|
@@ -61,7 +61,14 @@ var Content = function Content() {
|
|
61
61
|
useEffect(function () {
|
62
62
|
var setRealVH = function setRealVH() {
|
63
63
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
64
|
-
var
|
64
|
+
var height = window.innerHeight;
|
65
|
+
|
66
|
+
// 检查 URL 参数中是否有 formTabbar
|
67
|
+
var urlParams = new URLSearchParams(window.location.search);
|
68
|
+
if (urlParams.has('formTabbar')) {
|
69
|
+
height = height - 54;
|
70
|
+
}
|
71
|
+
var vh = height * 0.01;
|
65
72
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
66
73
|
};
|
67
74
|
|
@@ -24,7 +24,12 @@ var getOffsetTopRelativeToScrollContainer = function getOffsetTopRelativeToScrol
|
|
24
24
|
if (targetElement === scrollContainer) {
|
25
25
|
return 0;
|
26
26
|
}
|
27
|
-
|
27
|
+
var bodyTransform = getComputedStyle(document.body).transform;
|
28
|
+
var scaleY = 1;
|
29
|
+
if (bodyTransform !== 'none') {
|
30
|
+
var matrix = new DOMMatrix(bodyTransform);
|
31
|
+
scaleY = matrix.d;
|
32
|
+
}
|
28
33
|
// 使用getBoundingClientRect计算相对偏移量
|
29
34
|
var targetRect = targetElement.getBoundingClientRect();
|
30
35
|
var containerRect = scrollContainer.getBoundingClientRect();
|
@@ -32,7 +37,7 @@ var getOffsetTopRelativeToScrollContainer = function getOffsetTopRelativeToScrol
|
|
32
37
|
// targetRect.top - containerRect.top 得到目标元素相对于容器顶部的可视距离
|
33
38
|
// 考虑容器已经滚动的距离 再加上scrollContainer.scrollTop
|
34
39
|
// 这样得到的是目标元素在容器内容中的绝对位置
|
35
|
-
return targetRect.top - containerRect.top + scrollContainer.scrollTop;
|
40
|
+
return targetRect.top / scaleY - containerRect.top / scaleY + scrollContainer.scrollTop;
|
36
41
|
};
|
37
42
|
var TabProduct = function TabProduct(props) {
|
38
43
|
var _props$showTab = props.showTab,
|
@@ -17,6 +17,6 @@ declare let modal: Omit<ModalStaticFunctions, "warn">;
|
|
17
17
|
export declare const setModal: (m: Omit<ModalStaticFunctions, "warn">) => void;
|
18
18
|
export declare const saveConfirm: () => Promise<{
|
19
19
|
destroy: () => void;
|
20
|
-
update: (configUpdate: import("antd
|
20
|
+
update: (configUpdate: import("antd").ModalFuncProps | ((prevConfig: import("antd").ModalFuncProps) => import("antd").ModalFuncProps)) => void;
|
21
21
|
}>;
|
22
22
|
export { modal };
|
@@ -7,7 +7,7 @@ import { useContext } from "../../hooks/useContext";
|
|
7
7
|
import useAddService from "../../hooks/useAddService";
|
8
8
|
import { isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
|
9
9
|
import PisellNumberSelector from "../../../../pro/pisellNumberSelector";
|
10
|
-
import { useMemoizedFn } from
|
10
|
+
import { useMemoizedFn } from 'ahooks';
|
11
11
|
var Product = function Product(props) {
|
12
12
|
var id = props.id,
|
13
13
|
lists = props.lists,
|
@@ -59,6 +59,7 @@ var Product = function Product(props) {
|
|
59
59
|
}, [isShowNote, isShowPackageNote, disabledEdit, isShowChangeResource, isShowDelete, isShowHolder, isShowAddHolderButton, isShowChangeHolder, isShowEditProduct]);
|
60
60
|
var getProductCardStyleProps = useMemoizedFn(function (type) {
|
61
61
|
var conf = productCardStyleConfig["".concat(type, "_product_card_style")];
|
62
|
+
if (state.scenario !== 'booking2') return {};
|
62
63
|
return {
|
63
64
|
isShowImage: conf === null || conf === void 0 ? void 0 : conf.show_product_image,
|
64
65
|
isShowDelete: conf === null || conf === void 0 ? void 0 : conf.show_remove_button,
|
@@ -26,9 +26,9 @@ import { getProductExtend } from "../../../booking/info2/service/addService/util
|
|
26
26
|
import { holderId, isDaysBooking, isNormalProductByDurationSchedule } from "../../../booking/info/service2/utils";
|
27
27
|
import { isBooking4Shop } from "../../../booking/info/utils";
|
28
28
|
import { useService } from "../../../booking/info/service/serviceManager";
|
29
|
-
import ProductSelect from "
|
29
|
+
import ProductSelect from "../../../../plus/productSelect";
|
30
30
|
import "./index.less";
|
31
|
-
import { addService, addServiceScroll, genServiceKey, getIsShowNumber } from "../../utils";
|
31
|
+
import { addService, addServiceScroll, createSimpleCacheItem, genServiceKey, getIsShowNumber, isSameProduct } from "../../utils";
|
32
32
|
import NotAvailable from "../notAvailable";
|
33
33
|
import dayjs from 'dayjs';
|
34
34
|
import { useProducts } from "../../hooks/pisellos";
|
@@ -64,6 +64,35 @@ var AddSerivce = function AddSerivce(props) {
|
|
64
64
|
getProducts = _useProducts.getProducts,
|
65
65
|
products = _useProducts.products,
|
66
66
|
loading = _useProducts.loading;
|
67
|
+
// 组件卸载时清理所有定时器
|
68
|
+
useEffect(function () {
|
69
|
+
return function () {
|
70
|
+
Object.values(debounceTimersRef.current).forEach(function (timer) {
|
71
|
+
if (timer) clearTimeout(timer);
|
72
|
+
});
|
73
|
+
debounceTimersRef.current = {};
|
74
|
+
};
|
75
|
+
}, []);
|
76
|
+
|
77
|
+
// 处理商品添加后的列表归位
|
78
|
+
useEffect(function () {
|
79
|
+
var handler = function handler(event) {
|
80
|
+
var _event$detail;
|
81
|
+
var cacheItem = event === null || event === void 0 || (_event$detail = event.detail) === null || _event$detail === void 0 ? void 0 : _event$detail.cacheItem;
|
82
|
+
console.log('Modal closed with result:', event.detail.cacheItem);
|
83
|
+
if (!(cacheItem !== null && cacheItem !== void 0 && cacheItem.id)) return;
|
84
|
+
addServiceScroll(String(cacheItem.id), cacheItem);
|
85
|
+
};
|
86
|
+
window.addEventListener('onAddNewService', handler);
|
87
|
+
return function () {
|
88
|
+
window.removeEventListener('onAddNewService', handler);
|
89
|
+
};
|
90
|
+
}, []);
|
91
|
+
|
92
|
+
// 防抖相关的 refs
|
93
|
+
var pendingCacheValuesRef = useRef({});
|
94
|
+
var clickCountRef = useRef({});
|
95
|
+
var debounceTimersRef = useRef({});
|
67
96
|
var menuList = useMemo(function () {
|
68
97
|
var _state$bookingConfig;
|
69
98
|
return (state === null || state === void 0 || (_state$bookingConfig = state.bookingConfig) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.config) === null || _state$bookingConfig === void 0 || (_state$bookingConfig = _state$bookingConfig.menu_list_tab) === null || _state$bookingConfig === void 0 ? void 0 : _state$bookingConfig.menu_list) || [];
|
@@ -102,94 +131,86 @@ var AddSerivce = function AddSerivce(props) {
|
|
102
131
|
}, []);
|
103
132
|
|
104
133
|
/*
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
|
109
|
-
|
110
|
-
|
111
|
-
|
112
|
-
|
113
|
-
|
134
|
+
const removeNotAvailableService = (list: any) => {
|
135
|
+
if (!stateRef.current?.service?.value?.length) return;
|
136
|
+
const listMap = list.reduce((acc: any, cur: any) => {
|
137
|
+
acc[cur.id] = cur;
|
138
|
+
return acc;
|
139
|
+
}, {});
|
140
|
+
const newValue = (stateRef.current?.service?.value || []).filter(
|
141
|
+
(item: any) => listMap[item.product_id]
|
142
|
+
);
|
143
|
+
dispatch({
|
144
|
+
type: 'setService',
|
145
|
+
payload: {
|
146
|
+
value: newValue,
|
147
|
+
edit: true,
|
148
|
+
},
|
149
|
+
});
|
150
|
+
};
|
151
|
+
const getServices = async (params?: any) => {
|
152
|
+
setLoading(true);
|
153
|
+
// 活动预约如果没有绑定商品id不查询
|
154
|
+
if (
|
155
|
+
state.renderType === 'eventBooking' &&
|
156
|
+
!state.eventOtherParams?.productIds?.length
|
157
|
+
) {
|
114
158
|
dispatch({
|
115
159
|
type: 'setService',
|
116
160
|
payload: {
|
117
|
-
|
118
|
-
edit: true,
|
119
|
-
},
|
120
|
-
});
|
121
|
-
};
|
122
|
-
|
123
|
-
const getServices = async (params?: any) => {
|
124
|
-
setLoading(true);
|
125
|
-
// 活动预约如果没有绑定商品id不查询
|
126
|
-
if (
|
127
|
-
state.renderType === 'eventBooking' &&
|
128
|
-
!state.eventOtherParams?.productIds?.length
|
129
|
-
) {
|
130
|
-
dispatch({
|
131
|
-
type: 'setService',
|
132
|
-
payload: {
|
133
|
-
services: [],
|
134
|
-
},
|
135
|
-
});
|
136
|
-
setLoading(false);
|
137
|
-
return;
|
138
|
-
}
|
139
|
-
|
140
|
-
let data = await state.apis.getServices({
|
141
|
-
skip: 1,
|
142
|
-
num: 500,
|
143
|
-
// extension_type: state.productExtensionType,
|
144
|
-
exclude_extension_type: [
|
145
|
-
'product_party',
|
146
|
-
'product_event',
|
147
|
-
'product_series_event',
|
148
|
-
'product_package_ticket',
|
149
|
-
'ticket',
|
150
|
-
'event_item',
|
151
|
-
],
|
152
|
-
with: ['category'],
|
153
|
-
open_quotation: 1,
|
154
|
-
with_schedule: 1,
|
155
|
-
with_count: ['bundleGroup', 'optionGroup'],
|
156
|
-
order_by_string: 'sort:desc',
|
157
|
-
status: 'published',
|
158
|
-
schedule_date: params?.schedule_date,
|
159
|
-
schedule_datetime: params?.schedule_datetime,
|
160
|
-
customer_id: params?.customer_id,
|
161
|
-
menu_list_ids: params?.menu_list_ids,
|
162
|
-
_config: {
|
163
|
-
fullResult: true,
|
164
|
-
customResponse: true,
|
161
|
+
services: [],
|
165
162
|
},
|
166
163
|
});
|
167
|
-
|
168
164
|
setLoading(false);
|
169
|
-
|
170
|
-
|
171
|
-
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
176
|
-
|
177
|
-
|
178
|
-
|
179
|
-
|
165
|
+
return;
|
166
|
+
}
|
167
|
+
let data = await state.apis.getServices({
|
168
|
+
skip: 1,
|
169
|
+
num: 500,
|
170
|
+
// extension_type: state.productExtensionType,
|
171
|
+
exclude_extension_type: [
|
172
|
+
'product_party',
|
173
|
+
'product_event',
|
174
|
+
'product_series_event',
|
175
|
+
'product_package_ticket',
|
176
|
+
'ticket',
|
177
|
+
'event_item',
|
178
|
+
],
|
179
|
+
with: ['category'],
|
180
|
+
open_quotation: 1,
|
181
|
+
with_schedule: 1,
|
182
|
+
with_count: ['bundleGroup', 'optionGroup'],
|
183
|
+
order_by_string: 'sort:desc',
|
184
|
+
status: 'published',
|
185
|
+
schedule_date: params?.schedule_date,
|
186
|
+
schedule_datetime: params?.schedule_datetime,
|
187
|
+
customer_id: params?.customer_id,
|
188
|
+
menu_list_ids: params?.menu_list_ids,
|
189
|
+
_config: {
|
190
|
+
fullResult: true,
|
191
|
+
customResponse: true,
|
192
|
+
},
|
193
|
+
});
|
194
|
+
setLoading(false);
|
195
|
+
if (data?.code === 607100) {
|
196
|
+
// 第一次加载时,或者之前有数据
|
197
|
+
if (!isLoadedServiceRef.current || state.service?.services?.length) {
|
198
|
+
notAvailableRef.current?.open();
|
180
199
|
}
|
181
|
-
|
182
|
-
|
183
|
-
|
184
|
-
|
185
|
-
|
186
|
-
|
187
|
-
|
188
|
-
|
189
|
-
|
190
|
-
|
191
|
-
|
192
|
-
|
200
|
+
}
|
201
|
+
// 只有自动获取列表的时候才设置商品, 手动点击添加按钮的时候不设置
|
202
|
+
if (!state.service.addModal) {
|
203
|
+
setDefaultService(data?.data?.list);
|
204
|
+
}
|
205
|
+
removeNotAvailableService(data?.data?.list);
|
206
|
+
isLoadedServiceRef.current = true;
|
207
|
+
dispatch({
|
208
|
+
type: 'setService',
|
209
|
+
payload: {
|
210
|
+
services: data?.data?.list || [],
|
211
|
+
},
|
212
|
+
});
|
213
|
+
};
|
193
214
|
*/
|
194
215
|
|
195
216
|
var handleAddToast = function handleAddToast(title, quantity) {
|
@@ -202,6 +223,35 @@ var AddSerivce = function AddSerivce(props) {
|
|
202
223
|
className: "add-toast-quantity"
|
203
224
|
}, locales.getText('pisell2.ticket-booking.in-cart')(quantity || 1))));
|
204
225
|
};
|
226
|
+
var executeCacheValues = useMemoizedFn(function (productId, originalCacheValues, item, originalCallback) {
|
227
|
+
var clickCount = clickCountRef.current[productId] || 1;
|
228
|
+
|
229
|
+
// 更新 quantity 为累积的点击次数
|
230
|
+
var finalCacheValues = _objectSpread(_objectSpread({}, originalCacheValues), {}, {
|
231
|
+
quantity: clickCount
|
232
|
+
});
|
233
|
+
|
234
|
+
// 清理当前商品的缓存数据
|
235
|
+
delete pendingCacheValuesRef.current[productId];
|
236
|
+
delete clickCountRef.current[productId];
|
237
|
+
delete debounceTimersRef.current[productId];
|
238
|
+
|
239
|
+
// 执行原始的回调函数
|
240
|
+
originalCallback(finalCacheValues, '', item, true);
|
241
|
+
});
|
242
|
+
|
243
|
+
// 为每个商品单独创建防抖函数
|
244
|
+
var debouncedExecuteCacheValues = useMemoizedFn(function (productId, cacheValues, item, callback) {
|
245
|
+
// 清除该商品的旧定时器
|
246
|
+
if (debounceTimersRef.current[productId]) {
|
247
|
+
clearTimeout(debounceTimersRef.current[productId]);
|
248
|
+
}
|
249
|
+
|
250
|
+
// 创建新的防抖定时器
|
251
|
+
debounceTimersRef.current[productId] = setTimeout(function () {
|
252
|
+
executeCacheValues(productId, cacheValues, item, callback);
|
253
|
+
}, 0);
|
254
|
+
});
|
205
255
|
var handleSelectProduct = useMemoizedFn(function (item) {
|
206
256
|
var type = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : 'select';
|
207
257
|
if (!isNormalProductByDurationSchedule(item)) {
|
@@ -227,7 +277,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
227
277
|
setCurrentProduct(item);
|
228
278
|
} else {
|
229
279
|
setCurrentProduct(null);
|
230
|
-
if (
|
280
|
+
if ((item === null || item === void 0 ? void 0 : item.extension_type) === 'normal') {
|
231
281
|
cacheValues = {
|
232
282
|
bundle: [],
|
233
283
|
key: item.id,
|
@@ -237,12 +287,13 @@ var AddSerivce = function AddSerivce(props) {
|
|
237
287
|
quantity: 1,
|
238
288
|
rowKey: item.id,
|
239
289
|
session: null,
|
240
|
-
unique: '08974625397'
|
290
|
+
unique: '08974625397',
|
291
|
+
_originalItem: item // 保存原始商品信息
|
241
292
|
};
|
242
293
|
}
|
243
294
|
}
|
244
295
|
var callback = /*#__PURE__*/function () {
|
245
|
-
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, extension_type, detail) {
|
296
|
+
var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(e, extension_type, detail, notShowToast) {
|
246
297
|
var data, _detail, other, cacheItem, _total, _isEdit, _state$service$cacheI, _addService2, _list, quantity, _context$appHelper$ut4, _context$appHelper$ut5, val, sendData;
|
247
298
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
248
299
|
while (1) switch (_context.prev = _context.next) {
|
@@ -322,8 +373,14 @@ var AddSerivce = function AddSerivce(props) {
|
|
322
373
|
cacheItem.autoClose = false;
|
323
374
|
cacheItem._serviceKey = genServiceKey(cacheItem);
|
324
375
|
_addService2 = addService(_toConsumableArray(state.service.value), cacheItem, state), _list = _addService2.list, quantity = _addService2.quantity;
|
325
|
-
|
326
|
-
|
376
|
+
if (!notShowToast) {
|
377
|
+
handleAddToast(cacheItem.title, quantity || 1);
|
378
|
+
}
|
379
|
+
window.dispatchEvent(new CustomEvent('onAddNewService', {
|
380
|
+
detail: {
|
381
|
+
cacheItem: cacheItem
|
382
|
+
}
|
383
|
+
}));
|
327
384
|
try {
|
328
385
|
if (((_context$appHelper$ut4 = context.appHelper.utils.store) === null || _context$appHelper$ut4 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut4.getState) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.call(_context$appHelper$ut4)) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.global) === null || _context$appHelper$ut5 === void 0 || (_context$appHelper$ut5 = _context$appHelper$ut5.globalConfig) === null || _context$appHelper$ut5 === void 0 ? void 0 : _context$appHelper$ut5.id) === 2155) {
|
329
386
|
val = _list === null || _list === void 0 ? void 0 : _list.map(function (s) {
|
@@ -385,13 +442,37 @@ var AddSerivce = function AddSerivce(props) {
|
|
385
442
|
}
|
386
443
|
}, _callee);
|
387
444
|
}));
|
388
|
-
return function callback(_x, _x2, _x3) {
|
445
|
+
return function callback(_x, _x2, _x3, _x4) {
|
389
446
|
return _ref.apply(this, arguments);
|
390
447
|
};
|
391
448
|
}();
|
449
|
+
|
392
450
|
// 如果不需要打开弹窗, 直接添加数据
|
393
451
|
if (cacheValues) {
|
394
|
-
|
452
|
+
var _state$service$value, _detail$_extend, _Toast$success2;
|
453
|
+
var productId = item.id.toString();
|
454
|
+
|
455
|
+
// 如果已经有pending的同商品,增加点击次数
|
456
|
+
if (pendingCacheValuesRef.current[productId]) {
|
457
|
+
clickCountRef.current[productId] = (clickCountRef.current[productId] || 1) + 1;
|
458
|
+
} else {
|
459
|
+
// 第一次点击,初始化数据
|
460
|
+
pendingCacheValuesRef.current[productId] = cacheValues;
|
461
|
+
clickCountRef.current[productId] = 1;
|
462
|
+
}
|
463
|
+
var cacheItem = createSimpleCacheItem(item, cacheValues, state);
|
464
|
+
var detail = (_state$service$value = state.service.value) === null || _state$service$value === void 0 ? void 0 : _state$service$value.find(function (val) {
|
465
|
+
return isSameProduct(val, cacheItem);
|
466
|
+
});
|
467
|
+
var originalQuantity = (detail === null || detail === void 0 || (_detail$_extend = detail._extend) === null || _detail$_extend === void 0 ? void 0 : _detail$_extend.quantity) || 0;
|
468
|
+
Toast === null || Toast === void 0 || (_Toast$success2 = Toast.success) === null || _Toast$success2 === void 0 || _Toast$success2.call(Toast, /*#__PURE__*/React.createElement("div", {
|
469
|
+
className: "add-toast-wrap"
|
470
|
+
}, /*#__PURE__*/React.createElement("div", {
|
471
|
+
className: "add-toast-title"
|
472
|
+
}, item.title), /*#__PURE__*/React.createElement("div", {
|
473
|
+
className: "add-toast-quantity"
|
474
|
+
}, locales.getText('pisell2.ticket-booking.in-cart')((clickCountRef.current[productId] || 1) + originalQuantity))));
|
475
|
+
debouncedExecuteCacheValues(productId, cacheValues, item, callback);
|
395
476
|
return;
|
396
477
|
}
|
397
478
|
state.action({
|
@@ -464,7 +545,7 @@ var AddSerivce = function AddSerivce(props) {
|
|
464
545
|
isSubtitle: 1,
|
465
546
|
isPrice: 1,
|
466
547
|
isOriginPrice: 0,
|
467
|
-
isStock:
|
548
|
+
isStock: 0
|
468
549
|
}
|
469
550
|
}), /*#__PURE__*/React.createElement(NotAvailable, {
|
470
551
|
ref: notAvailableRef
|
@@ -7,7 +7,7 @@ function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
|
|
7
7
|
import React, { useMemo } from 'react';
|
8
8
|
import { LeftOutlined, RightOutlined } from '@ant-design/icons';
|
9
9
|
import { DatePicker, SelectTime } from '@pisell/materials';
|
10
|
-
import { useMemoizedFn } from
|
10
|
+
import { useMemoizedFn } from 'ahooks';
|
11
11
|
import { Button } from 'antd';
|
12
12
|
import classNames from 'classnames';
|
13
13
|
import { locales } from '@pisell/utils';
|
@@ -61,7 +61,7 @@ var TimeBar = function TimeBar(props) {
|
|
61
61
|
return /*#__PURE__*/React.createElement("div", {
|
62
62
|
className: "pisell-ticket-booking-time-bar",
|
63
63
|
style: {
|
64
|
-
backgroundColor: state.isDateChange ?
|
64
|
+
backgroundColor: state.isDateChange ? '#F79009' : ''
|
65
65
|
}
|
66
66
|
}, /*#__PURE__*/React.createElement(Button, {
|
67
67
|
icon: /*#__PURE__*/React.createElement(LeftOutlined, null),
|
@@ -124,6 +124,6 @@ var TimeBar = function TimeBar(props) {
|
|
124
124
|
size: "large",
|
125
125
|
type: "primary"
|
126
126
|
}, locales.getText('pisell2.ticket-booking.create-new')));
|
127
|
-
}, [(_state$modalState6 = state.modalState) === null || _state$modalState6 === void 0 || (_state$modalState6 = _state$modalState6.date) === null || _state$modalState6 === void 0 ? void 0 : _state$modalState6.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale
|
127
|
+
}, [(_state$modalState6 = state.modalState) === null || _state$modalState6 === void 0 || (_state$modalState6 = _state$modalState6.date) === null || _state$modalState6 === void 0 ? void 0 : _state$modalState6.value, state.intervalSetTime, state.isTimeChange, state.isDateChange, locale]);
|
128
128
|
};
|
129
129
|
export default TimeBar;
|
@@ -14,6 +14,7 @@ export declare const restoreProductOtherData: (data: any) => {
|
|
14
14
|
product_variant_id: any;
|
15
15
|
quantity: number;
|
16
16
|
} | undefined;
|
17
|
+
export declare const isSameProduct: (a: any, b: any) => boolean;
|
17
18
|
export declare const addService: (list: any[], addItem: any, state: any) => {
|
18
19
|
list: any[];
|
19
20
|
quantity: any;
|
@@ -40,7 +41,7 @@ declare type ScanData = {
|
|
40
41
|
};
|
41
42
|
};
|
42
43
|
export declare const formatScanCustomer: (data: ScanData) => {
|
43
|
-
searchType: "customer" | "
|
44
|
+
searchType: "customer" | "product" | "wallet" | "walletPass" | "local_product";
|
44
45
|
data: any;
|
45
46
|
scanCode: string;
|
46
47
|
} | null;
|
@@ -57,4 +58,5 @@ export declare const formatScanGlobal: (data: ScanData) => {
|
|
57
58
|
data: any;
|
58
59
|
scanCode: string;
|
59
60
|
} | null | undefined;
|
61
|
+
export declare const createSimpleCacheItem: (item: any, e: any, state: any) => any;
|
60
62
|
export {};
|
@@ -15,7 +15,7 @@ function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol"
|
|
15
15
|
function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
|
16
16
|
import dayjs from 'dayjs';
|
17
17
|
import { isNormalProductByDurationSchedule } from "../../booking/info/service2/utils";
|
18
|
-
import { isArr } from '@pisell/utils';
|
18
|
+
import { isArr, getUniqueId } from '@pisell/utils';
|
19
19
|
|
20
20
|
/** dayjs对象格式化为字符串时间 */
|
21
21
|
export var formatDateToStr = function formatDateToStr(date) {
|
@@ -125,7 +125,7 @@ export var restoreProductOtherData = function restoreProductOtherData(data) {
|
|
125
125
|
};
|
126
126
|
|
127
127
|
// 是相同的商品
|
128
|
-
var isSameProduct = function isSameProduct(a, b) {
|
128
|
+
export var isSameProduct = function isSameProduct(a, b) {
|
129
129
|
var _a$_extend2, _b$_extend2;
|
130
130
|
if (isNormalProductByDurationSchedule(a) && isNormalProductByDurationSchedule(b)) {
|
131
131
|
var _a$_extend, _b$_extend;
|
@@ -315,4 +315,20 @@ export var formatScanGlobal = function formatScanGlobal(data) {
|
|
315
315
|
scanCode: scanCode
|
316
316
|
};
|
317
317
|
}
|
318
|
+
};
|
319
|
+
export var createSimpleCacheItem = function createSimpleCacheItem(item, e, state) {
|
320
|
+
var cacheItem = _objectSpread(_objectSpread({}, item), {}, {
|
321
|
+
product_id: item.id,
|
322
|
+
_id: getUniqueId(),
|
323
|
+
_key: e.key,
|
324
|
+
_extend: {
|
325
|
+
start_date: state.date.value,
|
326
|
+
quantity: (e === null || e === void 0 ? void 0 : e.quantity) || 1,
|
327
|
+
price: item.price,
|
328
|
+
product_name: item.title,
|
329
|
+
other: e
|
330
|
+
},
|
331
|
+
new: 1
|
332
|
+
});
|
333
|
+
return cacheItem;
|
318
334
|
};
|
@@ -7,7 +7,14 @@ export var useWindowSize = function useWindowSize() {
|
|
7
7
|
var timeoutId;
|
8
8
|
var setRealVH = function setRealVH() {
|
9
9
|
// window.innerHeight 会返回视口真实的高度(不包括工具栏)
|
10
|
-
var
|
10
|
+
var height = window.innerHeight;
|
11
|
+
|
12
|
+
// 检查 URL 参数中是否有 formTabbar
|
13
|
+
var urlParams = new URLSearchParams(window.location.search);
|
14
|
+
if (urlParams.has('formTabbar')) {
|
15
|
+
height = height - 54;
|
16
|
+
}
|
17
|
+
var vh = height * 0.01;
|
11
18
|
document.documentElement.style.setProperty('--vh', "".concat(vh, "px"));
|
12
19
|
};
|
13
20
|
var debouncedHandleResize = function debouncedHandleResize() {
|
@@ -0,0 +1,10 @@
|
|
1
|
+
import React from 'react';
|
2
|
+
import './CategorySkeleton.less';
|
3
|
+
interface CategorySkeletonProps {
|
4
|
+
className?: string;
|
5
|
+
style?: React.CSSProperties;
|
6
|
+
tabCount?: number;
|
7
|
+
animated?: boolean;
|
8
|
+
}
|
9
|
+
declare const CategorySkeleton: React.FC<CategorySkeletonProps>;
|
10
|
+
export default CategorySkeleton;
|