@pisell/materials 6.11.96 → 6.11.97
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 +6 -6
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +7 -7
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +8 -8
- package/es/components/buttonGroupPreview/index.js +1 -2
- package/es/components/pisellFind/index.d.ts +12 -34
- package/es/components/pisellFind/index.js +18 -114
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +2 -4
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.js +3 -1
- package/es/components/productCard/cartSkuCard/components/AmountFooter/index.less +5 -0
- package/es/components/productCard/cartSkuCard/components/resources/index.less +0 -4
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +3 -3
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +5 -0
- package/es/components/productCard/lineItem/BookingLineItem.d.ts +1 -2
- package/es/components/productCard/lineItem/BookingLineItem.js +6 -15
- package/es/components/productCard/lineItem/index.d.ts +8 -10
- package/es/components/productCard/lineItem/index.js +13 -61
- package/es/components/productCard/lineItem/index.less +3 -3
- package/es/components/productCard/lineItem/types.d.ts +0 -4
- package/es/components/productCard/types.d.ts +0 -1
- package/lib/components/buttonGroupPreview/index.js +1 -2
- package/lib/components/pisellFind/index.d.ts +12 -34
- package/lib/components/pisellFind/index.js +5 -80
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.js +17 -5
- package/lib/components/productCard/cartSkuCard/components/AmountFooter/index.less +5 -0
- package/lib/components/productCard/cartSkuCard/components/resources/index.less +0 -4
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +21 -1
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +5 -0
- package/lib/components/productCard/lineItem/BookingLineItem.d.ts +1 -2
- package/lib/components/productCard/lineItem/BookingLineItem.js +2 -14
- package/lib/components/productCard/lineItem/index.d.ts +8 -10
- package/lib/components/productCard/lineItem/index.js +10 -51
- package/lib/components/productCard/lineItem/index.less +3 -3
- package/lib/components/productCard/lineItem/types.d.ts +0 -4
- package/lib/components/productCard/types.d.ts +0 -1
- package/lowcode/pisell-find/meta.ts +0 -19
- package/package.json +3 -3
- package/es/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/es/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/es/components/PisellScrollView/types.d.ts +0 -203
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/es/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -27
- package/es/components/pisellDataSourceContainer/components/Pagination/index.d.ts +0 -6
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -29
- package/es/components/pisellFloorMapLayout/components/EdgeLayer.d.ts +0 -37
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -66
- package/es/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.d.ts +0 -16
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
- package/es/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -26
- package/es/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -44
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
- package/es/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +0 -9
- package/es/components/pisellFloorMapLayout/components/NodePortMarkers.d.ts +0 -20
- package/es/components/pisellFloorMapLayout/components/ViewControls.d.ts +0 -61
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -28
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +0 -5
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.d.ts +0 -61
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.d.ts +0 -15
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -79
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -91
- package/es/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.d.ts +0 -19
- package/es/components/pisellFloorMapLayout/index.d.ts +0 -37
- package/es/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/es/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/es/components/pisellFloorMapLayout/types.d.ts +0 -778
- package/es/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/es/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.d.ts +0 -45
- package/es/components/pisellFloorMapLayout/utils/edgeRouting.d.ts +0 -267
- package/es/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
- package/es/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +0 -35
- package/es/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
- package/es/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.d.ts +0 -44
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/es/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/es/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.d.ts +0 -34
- package/es/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
- package/es/components/productCard/lineItem/components/Holders/index.js +0 -74
- package/es/components/productCard/lineItem/components/Holders/index.less +0 -39
- package/es/components/productCard/lineItem/components/TimeRange/index.d.ts +0 -12
- package/lib/components/PisellScrollView/PisellScrollView.d.ts +0 -5
- package/lib/components/PisellScrollView/components/Actions/index.d.ts +0 -18
- package/lib/components/PisellScrollView/types.d.ts +0 -203
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +0 -3
- package/lib/components/dataSourceComponents/fields/Input.Mobile/serve.d.ts +0 -26
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.d.ts +0 -27
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.d.ts +0 -6
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -29
- package/lib/components/pisellFloorMapLayout/components/EdgeLayer.d.ts +0 -37
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.d.ts +0 -66
- package/lib/components/pisellFloorMapLayout/components/FloorMapEdgeEditPanel.d.ts +0 -16
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.d.ts +0 -14
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditQuickActions.d.ts +0 -26
- package/lib/components/pisellFloorMapLayout/components/FloorMapOverview.d.ts +0 -44
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.d.ts +0 -84
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbarViewAllModal.d.ts +0 -20
- package/lib/components/pisellFloorMapLayout/components/FloorMapZoneElement.d.ts +0 -9
- package/lib/components/pisellFloorMapLayout/components/NodePortMarkers.d.ts +0 -20
- package/lib/components/pisellFloorMapLayout/components/ViewControls.d.ts +0 -61
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.d.ts +0 -28
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.d.ts +0 -5
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.d.ts +0 -35
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeEditing.d.ts +0 -61
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEdgeViewModel.d.ts +0 -15
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.d.ts +0 -79
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.d.ts +0 -91
- package/lib/components/pisellFloorMapLayout/hooks/useShopFloorPlanSubscription.d.ts +0 -19
- package/lib/components/pisellFloorMapLayout/index.d.ts +0 -37
- package/lib/components/pisellFloorMapLayout/locales-ja.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales-pt.d.ts +0 -184
- package/lib/components/pisellFloorMapLayout/locales.d.ts +0 -969
- package/lib/components/pisellFloorMapLayout/types.d.ts +0 -778
- package/lib/components/pisellFloorMapLayout/utils/alignSnap.d.ts +0 -64
- package/lib/components/pisellFloorMapLayout/utils/batchScenePlacementLayout.d.ts +0 -45
- package/lib/components/pisellFloorMapLayout/utils/edgeRouting.d.ts +0 -267
- package/lib/components/pisellFloorMapLayout/utils/floorMapConfigMerge.d.ts +0 -8
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementKindUtils.d.ts +0 -35
- package/lib/components/pisellFloorMapLayout/utils/floorMapFallbackRender.d.ts +0 -11
- package/lib/components/pisellFloorMapLayout/utils/floorMapOverviewLayout.d.ts +0 -44
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerDisplay.d.ts +0 -27
- package/lib/components/pisellFloorMapLayout/utils/floorMapResourcePickerTypes.d.ts +0 -109
- package/lib/components/pisellFloorMapLayout/utils/floorMapToolbarPalette.d.ts +0 -34
- package/lib/components/productCard/lineItem/components/Holders/index.d.ts +0 -10
- package/lib/components/productCard/lineItem/components/Holders/index.js +0 -83
- package/lib/components/productCard/lineItem/components/Holders/index.less +0 -39
- package/lib/components/productCard/lineItem/components/TimeRange/index.d.ts +0 -12
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
&__delete-btn {
|
|
19
19
|
width: 34px;
|
|
20
20
|
height: 34px;
|
|
21
|
-
border: 1px solid
|
|
21
|
+
border: 1px solid rgba(255, 255, 255, 0.35);
|
|
22
22
|
border-radius: 8px;
|
|
23
|
-
background:
|
|
24
|
-
color:
|
|
23
|
+
background: rgba(255, 255, 255, 0.12);
|
|
24
|
+
color: #fff;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
padding: 0;
|
|
27
27
|
display: inline-flex;
|
|
@@ -71,8 +71,7 @@ var ButtonGroupPreview = (0, import_react.forwardRef)(
|
|
|
71
71
|
} = items;
|
|
72
72
|
const btnProps = { ...buttonProps, ...props.updateButtonProps };
|
|
73
73
|
const { children, ...dropdownButtonProps } = btnProps;
|
|
74
|
-
|
|
75
|
-
return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData } }, /* @__PURE__ */ import_react.default.createElement(import_button.default, { key: id, ...dropdownButtonProps }, moreButtonChildren)) : /* @__PURE__ */ import_react.default.createElement(
|
|
74
|
+
return isMore ? /* @__PURE__ */ import_react.default.createElement(import_antd.Dropdown, { menu: { items: menuData } }, /* @__PURE__ */ import_react.default.createElement(import_button.default, { key: id, ...dropdownButtonProps }, children ?? /* @__PURE__ */ import_react.default.createElement(import_icons.MoreOutlined, null))) : /* @__PURE__ */ import_react.default.createElement(
|
|
76
75
|
import_button.default,
|
|
77
76
|
{
|
|
78
77
|
key: id,
|
|
@@ -1,37 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PisellLookupProps, PisellLookupRef } from '../pisellLookup';
|
|
3
|
-
/**
|
|
4
|
-
* 原生扫码事件名,对齐宿主端约定。
|
|
5
|
-
*/
|
|
6
|
-
export declare const SCAN_RESULT_EVENT = "nativeScanResult";
|
|
7
|
-
/**
|
|
8
|
-
* 扫码枪回传数据(对齐宿主 ScanResultPayload)
|
|
9
|
-
* - code: 条码标识(如条码格式 / 业务字段)
|
|
10
|
-
* - data: 扫描得到的字符串值(写入输入框的内容)
|
|
11
|
-
*/
|
|
12
|
-
export interface PisellFindScannerData {
|
|
13
|
-
code: string;
|
|
14
|
-
data: string;
|
|
15
|
-
}
|
|
16
3
|
/**
|
|
17
4
|
* PisellFind Props
|
|
18
|
-
* 继承 PisellLookup 的所有 Props
|
|
5
|
+
* 继承 PisellLookup 的所有 Props
|
|
19
6
|
*/
|
|
20
|
-
export
|
|
21
|
-
/**
|
|
22
|
-
* 是否开启扫码枪监听
|
|
23
|
-
* 通过宿主 `app.pubsub.subscribe('nativeScanResult', ...)` 订阅;
|
|
24
|
-
* 切换 false 时会 unsubscribe,停止接收事件。
|
|
25
|
-
* @default false
|
|
26
|
-
*/
|
|
27
|
-
enableScanner?: boolean;
|
|
28
|
-
/**
|
|
29
|
-
* 扫码枪回调
|
|
30
|
-
* 监听到扫码枪事件时触发,参数为原始 payload 对象(含 `data` 字段)。
|
|
31
|
-
* 注意:仅在 enableScanner 为 true 时才会触发。
|
|
32
|
-
*/
|
|
33
|
-
onScannerData?: (data: PisellFindScannerData) => void;
|
|
34
|
-
}
|
|
7
|
+
export declare type PisellFindProps = PisellLookupProps;
|
|
35
8
|
/**
|
|
36
9
|
* PisellFind Ref
|
|
37
10
|
* 继承 PisellLookup 的所有 Ref 方法
|
|
@@ -46,17 +19,22 @@ export declare type PisellFindRef = PisellLookupRef;
|
|
|
46
19
|
* - 默认不显示确认按钮(输入即搜索)
|
|
47
20
|
* - 默认开启搜索历史
|
|
48
21
|
* - 默认不展示结果区(结果在页面其他位置展示)
|
|
49
|
-
* - 通过 `enableScanner` 接入扫码枪:使用宿主 `app.pubsub.subscribe(SCAN_RESULT_EVENT, ...)`,
|
|
50
|
-
* 每次扫码直接覆盖输入框内容并触发 onSearch / onScannerData;切回 false 时自动 unsubscribe。
|
|
51
22
|
*
|
|
52
23
|
* @example
|
|
53
24
|
* ```tsx
|
|
25
|
+
* // 基础用法
|
|
26
|
+
* <PisellFind
|
|
27
|
+
* onSearch={(keyword) => {
|
|
28
|
+
* const filtered = data.filter(item => item.name.includes(keyword));
|
|
29
|
+
* setFilteredData(filtered);
|
|
30
|
+
* }}
|
|
31
|
+
* />
|
|
32
|
+
*
|
|
33
|
+
* // 切换为 Input 模式
|
|
54
34
|
* <PisellFind
|
|
55
35
|
* triggerType="input"
|
|
56
|
-
* enableScanner={isActive}
|
|
57
|
-
* onScannerData={(payload) => console.log('scan:', payload.data)}
|
|
58
36
|
* onSearch={(keyword) => filterData(keyword)}
|
|
59
37
|
* />
|
|
60
38
|
* ```
|
|
61
39
|
*/
|
|
62
|
-
export declare const PisellFind: React.ForwardRefExoticComponent<
|
|
40
|
+
export declare const PisellFind: React.ForwardRefExoticComponent<PisellLookupProps & React.RefAttributes<PisellLookupRef>>;
|
|
@@ -29,19 +29,16 @@ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: tru
|
|
|
29
29
|
// src/components/pisellFind/index.tsx
|
|
30
30
|
var pisellFind_exports = {};
|
|
31
31
|
__export(pisellFind_exports, {
|
|
32
|
-
PisellFind: () => PisellFind
|
|
33
|
-
SCAN_RESULT_EVENT: () => SCAN_RESULT_EVENT
|
|
32
|
+
PisellFind: () => PisellFind
|
|
34
33
|
});
|
|
35
34
|
module.exports = __toCommonJS(pisellFind_exports);
|
|
36
35
|
var import_react = __toESM(require("react"));
|
|
37
36
|
var import_utils = require("@pisell/utils");
|
|
38
37
|
var import_pisellLookup = require("../pisellLookup");
|
|
39
|
-
var import_useEngineContext = __toESM(require("../../hooks/useEngineContext"));
|
|
40
38
|
var import_locales = require("../../locales");
|
|
41
|
-
var SCAN_RESULT_EVENT = "nativeScanResult";
|
|
42
39
|
var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
43
|
-
var _a, _b;
|
|
44
40
|
const {
|
|
41
|
+
// 提取需要设置默认值的 Props
|
|
45
42
|
triggerType = "button",
|
|
46
43
|
buttonText = (() => {
|
|
47
44
|
const key = "pisell2.recordBoard.toolbar.find";
|
|
@@ -56,90 +53,19 @@ var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
|
56
53
|
showConfirmButton = false,
|
|
57
54
|
showHistory = true,
|
|
58
55
|
historyKey = "pisell_find_history",
|
|
59
|
-
|
|
60
|
-
onScannerData,
|
|
61
|
-
onSearch,
|
|
56
|
+
// 透传其他所有 Props
|
|
62
57
|
...restProps
|
|
63
58
|
} = props;
|
|
64
|
-
const lookupRef = (0, import_react.useRef)(null);
|
|
65
|
-
const onScannerDataRef = (0, import_react.useRef)(onScannerData);
|
|
66
|
-
const onSearchRef = (0, import_react.useRef)(onSearch);
|
|
67
|
-
(0, import_react.useEffect)(() => {
|
|
68
|
-
onScannerDataRef.current = onScannerData;
|
|
69
|
-
}, [onScannerData]);
|
|
70
|
-
(0, import_react.useEffect)(() => {
|
|
71
|
-
onSearchRef.current = onSearch;
|
|
72
|
-
}, [onSearch]);
|
|
73
|
-
(0, import_react.useImperativeHandle)(
|
|
74
|
-
ref,
|
|
75
|
-
() => ({
|
|
76
|
-
open: () => {
|
|
77
|
-
var _a2;
|
|
78
|
-
return (_a2 = lookupRef.current) == null ? void 0 : _a2.open();
|
|
79
|
-
},
|
|
80
|
-
close: () => {
|
|
81
|
-
var _a2;
|
|
82
|
-
return (_a2 = lookupRef.current) == null ? void 0 : _a2.close();
|
|
83
|
-
},
|
|
84
|
-
getKeyword: () => {
|
|
85
|
-
var _a2;
|
|
86
|
-
return ((_a2 = lookupRef.current) == null ? void 0 : _a2.getKeyword()) ?? "";
|
|
87
|
-
},
|
|
88
|
-
setKeyword: (v) => {
|
|
89
|
-
var _a2;
|
|
90
|
-
return (_a2 = lookupRef.current) == null ? void 0 : _a2.setKeyword(v);
|
|
91
|
-
}
|
|
92
|
-
}),
|
|
93
|
-
[]
|
|
94
|
-
);
|
|
95
|
-
const engineContext = (0, import_useEngineContext.default)();
|
|
96
|
-
const getAppRef = (0, import_react.useRef)(void 0);
|
|
97
|
-
getAppRef.current = typeof ((_b = (_a = engineContext == null ? void 0 : engineContext.appHelper) == null ? void 0 : _a.utils) == null ? void 0 : _b.getApp) === "function" ? engineContext.appHelper.utils.getApp : void 0;
|
|
98
|
-
(0, import_react.useEffect)(() => {
|
|
99
|
-
if (!enableScanner) return void 0;
|
|
100
|
-
const getApp = getAppRef.current;
|
|
101
|
-
if (typeof getApp !== "function") return void 0;
|
|
102
|
-
const app = getApp();
|
|
103
|
-
const pubsub = app == null ? void 0 : app.pubsub;
|
|
104
|
-
if (!pubsub || typeof pubsub.subscribe !== "function") {
|
|
105
|
-
return void 0;
|
|
106
|
-
}
|
|
107
|
-
const onScan = (payload) => {
|
|
108
|
-
var _a2, _b2, _c;
|
|
109
|
-
const data = payload == null ? void 0 : payload.data;
|
|
110
|
-
if (typeof data !== "string" || data.length === 0) {
|
|
111
|
-
return;
|
|
112
|
-
}
|
|
113
|
-
(_a2 = lookupRef.current) == null ? void 0 : _a2.setKeyword(data);
|
|
114
|
-
(_b2 = onSearchRef.current) == null ? void 0 : _b2.call(onSearchRef, data);
|
|
115
|
-
(_c = onScannerDataRef.current) == null ? void 0 : _c.call(onScannerDataRef, payload);
|
|
116
|
-
};
|
|
117
|
-
try {
|
|
118
|
-
pubsub.subscribe(SCAN_RESULT_EVENT, onScan);
|
|
119
|
-
} catch (e) {
|
|
120
|
-
console.warn("[PisellFind] subscribe scanner failed:", e);
|
|
121
|
-
return void 0;
|
|
122
|
-
}
|
|
123
|
-
return () => {
|
|
124
|
-
var _a2;
|
|
125
|
-
try {
|
|
126
|
-
(_a2 = pubsub.unsubscribe) == null ? void 0 : _a2.call(pubsub, SCAN_RESULT_EVENT, onScan);
|
|
127
|
-
} catch (e) {
|
|
128
|
-
console.warn("[PisellFind] unsubscribe scanner failed:", e);
|
|
129
|
-
}
|
|
130
|
-
};
|
|
131
|
-
}, [enableScanner]);
|
|
132
59
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
133
60
|
import_pisellLookup.PisellLookup,
|
|
134
61
|
{
|
|
135
|
-
ref
|
|
62
|
+
ref,
|
|
136
63
|
triggerType,
|
|
137
64
|
buttonText,
|
|
138
65
|
placeholder,
|
|
139
66
|
showConfirmButton,
|
|
140
67
|
showHistory,
|
|
141
68
|
historyKey,
|
|
142
|
-
onSearch,
|
|
143
69
|
...restProps
|
|
144
70
|
}
|
|
145
71
|
);
|
|
@@ -147,6 +73,5 @@ var PisellFind = (0, import_react.forwardRef)((props, ref) => {
|
|
|
147
73
|
PisellFind.displayName = "PisellFind";
|
|
148
74
|
// Annotate the CommonJS export names for ESM import in node:
|
|
149
75
|
0 && (module.exports = {
|
|
150
|
-
PisellFind
|
|
151
|
-
SCAN_RESULT_EVENT
|
|
76
|
+
PisellFind
|
|
152
77
|
});
|
|
@@ -238,7 +238,7 @@ var RecordBoardGridView = (props) => {
|
|
|
238
238
|
}) : rawScrollX;
|
|
239
239
|
if ((scroll == null ? void 0 : scroll.autoCalc) && typeof ctx.scrollAreaHeight === "number") {
|
|
240
240
|
const wrapHeight = ctx.scrollAreaHeight;
|
|
241
|
-
const reservedHeight = 40 +
|
|
241
|
+
const reservedHeight = 40 + uniformSummaryHeight + 24;
|
|
242
242
|
return {
|
|
243
243
|
x: scrollX ?? sumColumnWidths,
|
|
244
244
|
y: Math.max(wrapHeight - reservedHeight, 100),
|
|
@@ -42,7 +42,9 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var import_utils2 = require("@pisell/utils");
|
|
43
43
|
var import__ = require("../../index");
|
|
44
44
|
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
+
var _a, _b;
|
|
45
46
|
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
47
|
+
const weighingInfo = (_b = (_a = item == null ? void 0 : item._origin) == null ? void 0 : _a._extend) == null ? void 0 : _b.weighing;
|
|
46
48
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
47
49
|
if (!origin_total) return false;
|
|
48
50
|
return Number(total) != Number(origin_total);
|
|
@@ -69,12 +71,22 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
69
71
|
isOnlyTotal && `${import__.PREFIX}__only-total-footer`
|
|
70
72
|
)
|
|
71
73
|
},
|
|
72
|
-
/* @__PURE__ */ import_react.default.createElement(
|
|
73
|
-
|
|
74
|
+
/* @__PURE__ */ import_react.default.createElement(
|
|
75
|
+
"div",
|
|
74
76
|
{
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
77
|
+
className: (0, import_classnames.default)(
|
|
78
|
+
`${import__.PREFIX}__footer-price-wrap`,
|
|
79
|
+
weighingInfo && `${import__.PREFIX}__footer-price-wrap--weighing`
|
|
80
|
+
)
|
|
81
|
+
},
|
|
82
|
+
!isOnlyTotal ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement("div", { className: (0, import_classnames.default)(`${import__.PREFIX}__footer-price`) }, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total, symbol)), tip ? /* @__PURE__ */ import_react.default.createElement(import_antd2.Tooltip, { title: import_utils2.locales.getText(tip), destroyTooltipOnHide: true }, /* @__PURE__ */ import_react.default.createElement(
|
|
83
|
+
import_icons.QuestionCircleOutlined,
|
|
84
|
+
{
|
|
85
|
+
style: { fontSize: "16px", color: "#1570ef" }
|
|
86
|
+
}
|
|
87
|
+
)) : null), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
88
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${import__.PREFIX}__footer-origin-total` }, (0, import_utils._formatAmount)(origin_total * num, symbol, 2)) : null, /* @__PURE__ */ import_react.default.createElement("span", null, (0, import_utils._formatAmount)(total * num, symbol)))
|
|
89
|
+
)
|
|
78
90
|
), renderDiscountReason());
|
|
79
91
|
};
|
|
80
92
|
var AmountFooter_default = Footer;
|
|
@@ -69,6 +69,26 @@ var Weighing = (props) => {
|
|
|
69
69
|
const tareLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.tare");
|
|
70
70
|
const netLabel = import_utils.locales.getText("pisell2.cart.sku-card.weighing.net");
|
|
71
71
|
const unitPriceText = `${symbol || ""}${unit_price ?? "0.00"}`;
|
|
72
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing` }, isManualWeight ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing-row` }, /* @__PURE__ */ import_react.default.createElement("span", null, manualLabel)) : null, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
72
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing` }, isManualWeight ? /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__weighing-row` }, /* @__PURE__ */ import_react.default.createElement("span", null, manualLabel)) : null, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
73
|
+
"div",
|
|
74
|
+
{
|
|
75
|
+
className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
|
|
76
|
+
},
|
|
77
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, grossLabel, ":"),
|
|
78
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, formatWeight(weight, unit))
|
|
79
|
+
) : null, tareValue > 0 ? /* @__PURE__ */ import_react.default.createElement(
|
|
80
|
+
"div",
|
|
81
|
+
{
|
|
82
|
+
className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
|
|
83
|
+
},
|
|
84
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, tareLabel, ":"),
|
|
85
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, formatWeight(tare == null ? void 0 : tare.value, (tare == null ? void 0 : tare.unit) || unit))
|
|
86
|
+
) : null, /* @__PURE__ */ import_react.default.createElement(
|
|
87
|
+
"div",
|
|
88
|
+
{
|
|
89
|
+
className: `${import__.PREFIX}__weighing-row ${import__.PREFIX}__weighing-row--large`
|
|
90
|
+
},
|
|
91
|
+
/* @__PURE__ */ import_react.default.createElement("span", null, `${formatWeight(net_weight, unit)} ${netLabel} @ ${unitPriceText}/${unitLabel}`)
|
|
92
|
+
));
|
|
73
93
|
};
|
|
74
94
|
var weighing_default = Weighing;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProductCardTypes } from '../types';
|
|
3
|
-
import type {
|
|
3
|
+
import type { LineItemStatusOption, LineItemType } from './types';
|
|
4
4
|
interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
5
5
|
dataSource: any;
|
|
6
6
|
type: LineItemType;
|
|
@@ -12,7 +12,6 @@ interface BookingLineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
|
12
12
|
statusLoading?: boolean;
|
|
13
13
|
statusDisabled?: boolean;
|
|
14
14
|
isShowRelatedProduct?: boolean;
|
|
15
|
-
holderOptions?: LineItemHolderOption[];
|
|
16
15
|
onBookingStatusChange?: (status: string, item: any) => void;
|
|
17
16
|
}
|
|
18
17
|
declare const BookingLineItem: (props: BookingLineItemProps) => React.JSX.Element | null;
|
|
@@ -48,7 +48,6 @@ var import_swipeAction = require("../cartSkuCard/components/swipeAction");
|
|
|
48
48
|
var import_Action = __toESM(require("../components/Action"));
|
|
49
49
|
var import_TimeRange = __toESM(require("./components/TimeRange"));
|
|
50
50
|
var import_Resources = __toESM(require("./components/Resources"));
|
|
51
|
-
var import_Holders = __toESM(require("./components/Holders"));
|
|
52
51
|
var import_iconfont = __toESM(require("../../iconfont"));
|
|
53
52
|
var import_useEngineContext = __toESM(require("../../../hooks/useEngineContext"));
|
|
54
53
|
var PREFIX = "pisell-line-item";
|
|
@@ -101,7 +100,6 @@ var BookingLineItem = (props) => {
|
|
|
101
100
|
rightActions = [],
|
|
102
101
|
escapeDom,
|
|
103
102
|
isShowImage,
|
|
104
|
-
isFormSubject,
|
|
105
103
|
isShowDelete,
|
|
106
104
|
isShowNote,
|
|
107
105
|
isShowAmountFooter,
|
|
@@ -111,7 +109,6 @@ var BookingLineItem = (props) => {
|
|
|
111
109
|
statusLoading = false,
|
|
112
110
|
statusDisabled = false,
|
|
113
111
|
isShowRelatedProduct = true,
|
|
114
|
-
holderOptions,
|
|
115
112
|
onBookingStatusChange,
|
|
116
113
|
onAction,
|
|
117
114
|
onDelete,
|
|
@@ -149,9 +146,7 @@ var BookingLineItem = (props) => {
|
|
|
149
146
|
}
|
|
150
147
|
};
|
|
151
148
|
const bookingRightActions = isShowDelete ? [deleteAction, ...rightActions] : rightActions;
|
|
152
|
-
const
|
|
153
|
-
const resolvedIsFormSubject = isFormSubject ?? (dataSource == null ? void 0 : dataSource.isFormSubject);
|
|
154
|
-
const bookingTitle = String((dataSource == null ? void 0 : dataSource.booking_id) || "");
|
|
149
|
+
const bookingTitle = String((dataSource == null ? void 0 : dataSource.booking_id) || "-");
|
|
155
150
|
const bookingTime = formatBookingTime(dataSource, locale);
|
|
156
151
|
const resourceName = getResourceName(dataSource, translationOriginal) || "-";
|
|
157
152
|
const renderStatusButton = () => /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -228,14 +223,7 @@ var BookingLineItem = (props) => {
|
|
|
228
223
|
/* @__PURE__ */ import_react.default.createElement(import_iconfont.default, { type: "pisell2-trash-01" })
|
|
229
224
|
) : null))
|
|
230
225
|
),
|
|
231
|
-
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__booking-detail` }, /* @__PURE__ */ import_react.default.createElement(import_Resources.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_TimeRange.default, { dataSource }),
|
|
232
|
-
import_Holders.default,
|
|
233
|
-
{
|
|
234
|
-
dataSource,
|
|
235
|
-
holderOptions: resolvedHolderOptions,
|
|
236
|
-
isFormSubject: resolvedIsFormSubject
|
|
237
|
-
}
|
|
238
|
-
) : null),
|
|
226
|
+
/* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__booking-detail` }, /* @__PURE__ */ import_react.default.createElement(import_Resources.default, { dataSource }), /* @__PURE__ */ import_react.default.createElement(import_TimeRange.default, { dataSource })),
|
|
239
227
|
isShowRelatedProduct && relatedProductDataSource ? /* @__PURE__ */ import_react.default.createElement(import_react.default.Fragment, null, /* @__PURE__ */ import_react.default.createElement(import_antd.Divider, { style: { margin: 0 } }), /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__related-product` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `${PREFIX}__related-product-card` }, /* @__PURE__ */ import_react.default.createElement(
|
|
240
228
|
import_basicInfo.default,
|
|
241
229
|
{
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { ProductCardTypes } from '../types';
|
|
3
|
-
import type { itemType,
|
|
3
|
+
import type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
4
4
|
import './index.less';
|
|
5
5
|
export declare const PREFIX = "pisell-line-item";
|
|
6
|
-
export type { itemType,
|
|
6
|
+
export type { itemType, LineItemStatusOption, LineItemType } from './types';
|
|
7
7
|
declare type LocalizedText = string | Record<string, unknown> | null | undefined;
|
|
8
8
|
export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
9
9
|
dataSource: any;
|
|
@@ -15,7 +15,6 @@ export interface LineItemProps extends Omit<ProductCardTypes, 'dataSource'> {
|
|
|
15
15
|
statusLoading?: boolean;
|
|
16
16
|
statusDisabled?: boolean;
|
|
17
17
|
isShowRelatedProduct?: boolean;
|
|
18
|
-
holderOptions?: LineItemHolderOption[];
|
|
19
18
|
onBookingStatusChange?: (status: string, item: any) => void;
|
|
20
19
|
}
|
|
21
20
|
export declare const convertProductToLineItemProduct: (product: any, translationOriginal: (text: LocalizedText) => string, symbol: string) => {
|
|
@@ -30,10 +29,10 @@ export declare const convertProductToLineItemProduct: (product: any, translation
|
|
|
30
29
|
image: any;
|
|
31
30
|
num: any;
|
|
32
31
|
quantity: any;
|
|
33
|
-
price:
|
|
34
|
-
total:
|
|
35
|
-
origin_total:
|
|
36
|
-
original_total:
|
|
32
|
+
price: any;
|
|
33
|
+
total: any;
|
|
34
|
+
origin_total: any;
|
|
35
|
+
original_total: any;
|
|
37
36
|
source_product_price: any;
|
|
38
37
|
selling_price: any;
|
|
39
38
|
payment_price: any;
|
|
@@ -46,7 +45,6 @@ export declare const convertProductToLineItemProduct: (product: any, translation
|
|
|
46
45
|
product_option_string: string;
|
|
47
46
|
discount_list: any;
|
|
48
47
|
promotions: any;
|
|
49
|
-
discount_reason: any;
|
|
50
48
|
isGift: boolean;
|
|
51
49
|
giftData: any;
|
|
52
50
|
_origin: any;
|
|
@@ -59,8 +57,8 @@ export declare const convertProductToLineItemProduct: (product: any, translation
|
|
|
59
57
|
quantity: any;
|
|
60
58
|
};
|
|
61
59
|
note: any;
|
|
62
|
-
total:
|
|
63
|
-
origin_total:
|
|
60
|
+
total: any;
|
|
61
|
+
origin_total: any;
|
|
64
62
|
payment_price: any;
|
|
65
63
|
};
|
|
66
64
|
};
|
|
@@ -55,40 +55,6 @@ var translateText = (text, translationOriginal) => {
|
|
|
55
55
|
if (!text) return "";
|
|
56
56
|
return translationOriginal(text);
|
|
57
57
|
};
|
|
58
|
-
function resolveLineItemUnitPrices(product) {
|
|
59
|
-
const metadata = (product == null ? void 0 : product.metadata) || {};
|
|
60
|
-
const promotion = metadata._promotion;
|
|
61
|
-
const optionSum = ((product == null ? void 0 : product.product_option_item) || []).reduce(
|
|
62
|
-
(sum, option) => {
|
|
63
|
-
const price = Number(option == null ? void 0 : option.price) || 0;
|
|
64
|
-
const num = Number(option == null ? void 0 : option.num) || 1;
|
|
65
|
-
return sum + price * num;
|
|
66
|
-
},
|
|
67
|
-
0
|
|
68
|
-
);
|
|
69
|
-
const unitOriginal = (() => {
|
|
70
|
-
if (metadata.main_product_original_price != null && metadata.main_product_original_price !== "") {
|
|
71
|
-
return Number(metadata.main_product_original_price) - optionSum;
|
|
72
|
-
}
|
|
73
|
-
if ((promotion == null ? void 0 : promotion.originalPrice) != null && promotion.originalPrice !== "") {
|
|
74
|
-
return Number(promotion.originalPrice);
|
|
75
|
-
}
|
|
76
|
-
return Number((product == null ? void 0 : product.original_price) ?? (product == null ? void 0 : product.selling_price) ?? 0);
|
|
77
|
-
})();
|
|
78
|
-
const unitSelling = (() => {
|
|
79
|
-
if (metadata.main_product_selling_price != null && metadata.main_product_selling_price !== "") {
|
|
80
|
-
return Number(metadata.main_product_selling_price) - optionSum;
|
|
81
|
-
}
|
|
82
|
-
if ((promotion == null ? void 0 : promotion.inPromotion) && promotion.finalPrice != null && promotion.finalPrice !== "") {
|
|
83
|
-
return Number(promotion.finalPrice);
|
|
84
|
-
}
|
|
85
|
-
return Number((product == null ? void 0 : product.payment_price) ?? (product == null ? void 0 : product.selling_price) ?? unitOriginal);
|
|
86
|
-
})();
|
|
87
|
-
return {
|
|
88
|
-
unitSelling: Number.isFinite(unitSelling) ? unitSelling : 0,
|
|
89
|
-
unitOriginal: Number.isFinite(unitOriginal) ? unitOriginal : 0
|
|
90
|
-
};
|
|
91
|
-
}
|
|
92
58
|
var convertBundleOption = (option, translationOriginal) => ({
|
|
93
59
|
...option,
|
|
94
60
|
id: option.option_group_item_id,
|
|
@@ -124,12 +90,11 @@ var convertBundle = (bundle, translationOriginal) => {
|
|
|
124
90
|
};
|
|
125
91
|
};
|
|
126
92
|
var convertProductToLineItemProduct = (product, translationOriginal, symbol) => {
|
|
127
|
-
var _a, _b, _c, _d
|
|
93
|
+
var _a, _b, _c, _d;
|
|
128
94
|
const title = translateText(product.product_title || product.title, translationOriginal);
|
|
129
95
|
const bundle = (product.product_bundle || []).map(
|
|
130
96
|
(bundleItem) => convertBundle(bundleItem, translationOriginal)
|
|
131
97
|
);
|
|
132
|
-
const { unitSelling, unitOriginal } = resolveLineItemUnitPrices(product);
|
|
133
98
|
return {
|
|
134
99
|
_id: ((_a = product.metadata) == null ? void 0 : _a.unique_identification_number) || product.order_detail_id || product.product_id,
|
|
135
100
|
id: product.product_id,
|
|
@@ -142,11 +107,11 @@ var convertProductToLineItemProduct = (product, translationOriginal, symbol) =>
|
|
|
142
107
|
image: product.cover,
|
|
143
108
|
num: product.num ?? product.product_quantity ?? 1,
|
|
144
109
|
quantity: product.num ?? product.product_quantity ?? 1,
|
|
145
|
-
price:
|
|
146
|
-
total:
|
|
147
|
-
origin_total:
|
|
148
|
-
original_total:
|
|
149
|
-
source_product_price: (
|
|
110
|
+
price: ((_b = product.metadata) == null ? void 0 : _b.source_product_price) ?? product.selling_price,
|
|
111
|
+
total: product.payment_price ?? product.selling_price,
|
|
112
|
+
origin_total: product.original_price,
|
|
113
|
+
original_total: product.original_price,
|
|
114
|
+
source_product_price: (_c = product.metadata) == null ? void 0 : _c.source_product_price,
|
|
150
115
|
selling_price: product.selling_price,
|
|
151
116
|
payment_price: product.payment_price,
|
|
152
117
|
tax_fee: product.tax_fee,
|
|
@@ -158,24 +123,20 @@ var convertProductToLineItemProduct = (product, translationOriginal, symbol) =>
|
|
|
158
123
|
product_option_string: product.product_sku ? translateText(product.product_sku.subtitle, translationOriginal) : "",
|
|
159
124
|
discount_list: product.discount_list,
|
|
160
125
|
promotions: product.promotions,
|
|
161
|
-
|
|
162
|
-
// 促销赠品走 metadata._giftInfo;礼品卡走 gift_card(对齐 legacy formatProducts isGift)
|
|
163
|
-
isGift: Boolean(
|
|
164
|
-
product.gift_card || product.isGift || product._isGiftPromotion || ((_g = product.metadata) == null ? void 0 : _g._giftInfo) || product._giftInfo
|
|
165
|
-
),
|
|
126
|
+
isGift: Boolean(product.gift_card),
|
|
166
127
|
giftData: product.giftData,
|
|
167
128
|
_origin: product,
|
|
168
129
|
_extend: {
|
|
169
130
|
other: {
|
|
170
131
|
product_id: product.product_id,
|
|
171
|
-
option: (
|
|
132
|
+
option: (_d = product.product_sku) == null ? void 0 : _d.option,
|
|
172
133
|
bundle: product.product_bundle,
|
|
173
134
|
product_variant_id: product.product_variant_id,
|
|
174
135
|
quantity: product.num ?? product.product_quantity ?? 1
|
|
175
136
|
},
|
|
176
137
|
note: product.note,
|
|
177
|
-
total:
|
|
178
|
-
origin_total:
|
|
138
|
+
total: product.payment_price,
|
|
139
|
+
origin_total: product.original_price,
|
|
179
140
|
payment_price: product.payment_price
|
|
180
141
|
}
|
|
181
142
|
};
|
|
@@ -198,7 +159,6 @@ var LineItem = (props) => {
|
|
|
198
159
|
statusLoading = false,
|
|
199
160
|
statusDisabled = false,
|
|
200
161
|
isShowRelatedProduct = true,
|
|
201
|
-
holderOptions,
|
|
202
162
|
onBookingStatusChange,
|
|
203
163
|
onAction,
|
|
204
164
|
onDelete,
|
|
@@ -274,7 +234,6 @@ var LineItem = (props) => {
|
|
|
274
234
|
statusLoading,
|
|
275
235
|
statusDisabled,
|
|
276
236
|
isShowRelatedProduct,
|
|
277
|
-
holderOptions,
|
|
278
237
|
onBookingStatusChange,
|
|
279
238
|
onAction,
|
|
280
239
|
onDelete,
|
|
@@ -18,10 +18,10 @@
|
|
|
18
18
|
&__delete-btn {
|
|
19
19
|
width: 34px;
|
|
20
20
|
height: 34px;
|
|
21
|
-
border: 1px solid
|
|
21
|
+
border: 1px solid rgba(255, 255, 255, 0.35);
|
|
22
22
|
border-radius: 8px;
|
|
23
|
-
background:
|
|
24
|
-
color:
|
|
23
|
+
background: rgba(255, 255, 255, 0.12);
|
|
24
|
+
color: #fff;
|
|
25
25
|
cursor: pointer;
|
|
26
26
|
padding: 0;
|
|
27
27
|
display: inline-flex;
|
|
@@ -326,20 +326,6 @@ const PisellFindMeta = {
|
|
|
326
326
|
setter: ['BoolSetter', 'VariableSetter'],
|
|
327
327
|
defaultValue: false,
|
|
328
328
|
},
|
|
329
|
-
{
|
|
330
|
-
name: 'enableScanner',
|
|
331
|
-
title: {
|
|
332
|
-
label: {
|
|
333
|
-
type: 'i18n',
|
|
334
|
-
'en-US': 'Enable Scanner',
|
|
335
|
-
'zh-CN': '开启扫码枪监听',
|
|
336
|
-
},
|
|
337
|
-
tip: '为 true 时通过 app.pubsub.subscribe("nativeScanResult") 订阅硬件扫码事件;切回 false 会自动 unsubscribe 不再接收回调',
|
|
338
|
-
},
|
|
339
|
-
propType: 'bool',
|
|
340
|
-
setter: ['BoolSetter', 'VariableSetter'],
|
|
341
|
-
defaultValue: false,
|
|
342
|
-
},
|
|
343
329
|
],
|
|
344
330
|
},
|
|
345
331
|
],
|
|
@@ -367,11 +353,6 @@ const PisellFindMeta = {
|
|
|
367
353
|
template:
|
|
368
354
|
'onClose(${extParams}){\n// 查找面板关闭回调\nconsole.log("onClose");}',
|
|
369
355
|
},
|
|
370
|
-
{
|
|
371
|
-
name: 'onScannerData',
|
|
372
|
-
template:
|
|
373
|
-
'onScannerData(payload,${extParams}){\n// 扫码枪事件回调(nativeScanResult)\n// payload: { code: 写入输入框并触发 onSearch 的关键词, data: 原始扫描字符串 }\nconsole.log("onScannerData", payload);}',
|
|
374
|
-
},
|
|
375
356
|
],
|
|
376
357
|
},
|
|
377
358
|
component: {},
|