@pisell/materials 6.6.7 → 6.6.9
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/meta.js +1 -1
- package/build/lowcode/render/default/view.js +2 -2
- package/build/lowcode/view.js +1 -1
- package/es/components/appVersionControl/index.d.ts +4 -0
- package/es/components/auto-complete-number/index.d.ts +1 -0
- package/es/components/badge/index.d.ts +1 -0
- package/es/components/batch-editor/fields/index.d.ts +1 -0
- package/es/components/calendar/index.d.ts +1 -0
- package/es/components/checkbox/index.d.ts +1 -0
- package/es/components/classicLayout/index.d.ts +1 -0
- package/es/components/colorPicker/index.d.ts +1 -0
- package/es/components/config-provider/index.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
- package/es/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/es/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
- package/es/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
- package/es/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +24 -0
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -0
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/es/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
- package/es/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/es/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/es/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/es/components/dataSourceComponents/fields/Translation/type.d.ts +16 -0
- package/es/components/dataSourceComponents/fields/index.d.ts +3 -3
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
- package/es/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
- package/es/components/drag-sort-tree/index.d.ts +4 -0
- package/es/components/dropdown/index.d.ts +1 -0
- package/es/components/filter/components/items/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/es/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/es/components/filter/components/items/text/index.d.ts +1 -0
- package/es/components/login-and-register/index.d.ts +82 -0
- package/es/components/pisellAdjustPrice/status.d.ts +32 -0
- package/es/components/pisellCard/index.d.ts +1 -0
- package/es/components/pisellEmpty/index.d.ts +19 -0
- package/es/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/es/components/pisellQrcode/index.d.ts +10 -0
- package/es/components/pisellUpload/index.d.ts +1 -0
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -2
- package/es/components/productCard/components/AmountFooter/index.js +4 -2
- package/es/components/productCard/components/Divider/index.d.ts +1 -0
- package/es/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/es/components/productCard/components/Packages/utils.d.ts +1 -1
- package/es/components/productCard/components/Time/components/Like/index.d.ts +1 -0
- package/es/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/es/components/productCard/components/Time/index.d.ts +3 -0
- package/es/components/radio/index.d.ts +1 -0
- package/es/components/segmented/index.d.ts +1 -0
- package/es/components/select-time/RightPanel/index.d.ts +1 -0
- package/es/components/select-time/index.d.ts +1 -0
- package/es/components/skeleton/index.d.ts +1 -0
- package/es/components/slider/index.d.ts +1 -0
- package/es/components/sort/components/InlineMenu/index.d.ts +1 -0
- package/es/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/es/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/es/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/es/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/es/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/es/components/table/Gallery/index.d.ts +5 -0
- package/es/components/table/Summary/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/date/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/image/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/link/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/number/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/numberRange/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/search/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/select/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/text/Sort/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Config/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Show/index.d.ts +1 -0
- package/es/components/table/Table/fields/treeSelect/Sort/index.d.ts +1 -0
- package/es/components/table/Table/index.d.ts +4 -0
- package/es/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/es/components/table/Table/utils.d.ts +161 -0
- package/es/components/table/TableFilter/SortIcon.d.ts +1 -0
- package/es/components/table/hooks/useTableSetting.d.ts +21 -0
- package/es/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/es/components/table/serve.d.ts +13 -0
- package/es/components/table/types.d.ts +268 -0
- package/es/components/tabs/index.d.ts +17 -0
- package/es/components/time-picker/index.d.ts +1 -0
- package/es/components/translation/index.d.ts +14 -0
- package/es/components/upload/index.d.ts +1 -0
- package/es/components/versionModal/index.d.ts +23 -0
- package/es/components/virtual-keyboard/Amount/index.d.ts +6 -0
- package/es/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/es/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/es/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/es/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/es/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/es/components/walletCard/Guest/index.d.ts +1 -0
- package/es/components/walletCard/Guide/index.d.ts +1 -0
- package/es/components/walletCard/index.d.ts +77 -0
- package/lib/components/appVersionControl/index.d.ts +4 -0
- package/lib/components/auto-complete-number/index.d.ts +1 -0
- package/lib/components/badge/index.d.ts +1 -0
- package/lib/components/batch-editor/fields/index.d.ts +1 -0
- package/lib/components/calendar/index.d.ts +1 -0
- package/lib/components/checkbox/index.d.ts +1 -0
- package/lib/components/classicLayout/index.d.ts +1 -0
- package/lib/components/colorPicker/index.d.ts +1 -0
- package/lib/components/config-provider/index.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingContext.d.ts +16 -0
- package/lib/components/dataSourceComponents/dataSourceForm/provider/formSetting/FormSettingProvider.d.ts +8 -0
- package/lib/components/dataSourceComponents/dataSourceForm/serve.d.ts +179 -0
- package/lib/components/dataSourceComponents/dataSourceForm/type.d.ts +32 -0
- package/lib/components/dataSourceComponents/dataSourceForm/urlUtils.d.ts +24 -0
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceImage/index.d.ts +2 -0
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.d.ts +100 -0
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +84 -0
- package/lib/components/dataSourceComponents/fields/ColorPicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.d.ts +4 -0
- package/lib/components/dataSourceComponents/fields/DatePicker/index.d.ts +3 -0
- package/lib/components/dataSourceComponents/fields/DateRangePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Email/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Subdomain/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.TextArea/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Input.Url/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Switch/ReadPretty.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Switch/type.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/TimePicker/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/BaseTranslation.d.ts +5 -0
- package/lib/components/dataSourceComponents/fields/Translation/ReadPretty.d.ts +1 -0
- package/lib/components/dataSourceComponents/fields/Translation/type.d.ts +16 -0
- package/lib/components/dataSourceComponents/fields/index.d.ts +3 -3
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceContext.d.ts +120 -0
- package/lib/components/drag-sort-tree/TreeItem/index.d.ts +19 -0
- package/lib/components/drag-sort-tree/index.d.ts +4 -0
- package/lib/components/dropdown/index.d.ts +1 -0
- package/lib/components/filter/components/items/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Editor/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/Preview/index.d.ts +1 -0
- package/lib/components/filter/components/items/text/index.d.ts +1 -0
- package/lib/components/login-and-register/index.d.ts +82 -0
- package/lib/components/pisellAdjustPrice/status.d.ts +32 -0
- package/lib/components/pisellCard/index.d.ts +1 -0
- package/lib/components/pisellEmpty/index.d.ts +19 -0
- package/lib/components/pisellInformationEntry/Scan/index.d.ts +1 -0
- package/lib/components/pisellQrcode/index.d.ts +10 -0
- package/lib/components/pisellUpload/index.d.ts +1 -0
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +3 -2
- package/lib/components/productCard/components/AmountFooter/index.js +2 -2
- package/lib/components/productCard/components/Divider/index.d.ts +1 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.d.ts +3 -0
- package/lib/components/productCard/components/Packages/utils.d.ts +1 -1
- package/lib/components/productCard/components/Time/components/Like/index.d.ts +1 -0
- package/lib/components/productCard/components/Time/components/SelectResource/index.d.ts +18 -0
- package/lib/components/productCard/components/Time/index.d.ts +3 -0
- package/lib/components/radio/index.d.ts +1 -0
- package/lib/components/segmented/index.d.ts +1 -0
- package/lib/components/select-time/RightPanel/index.d.ts +1 -0
- package/lib/components/select-time/index.d.ts +1 -0
- package/lib/components/skeleton/index.d.ts +1 -0
- package/lib/components/slider/index.d.ts +1 -0
- package/lib/components/sort/components/InlineMenu/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ColumnsSetting/index.d.ts +1 -0
- package/lib/components/table/Actions/component/ExportImport/components/ExportTable/function.d.ts +7 -0
- package/lib/components/table/Actions/component/ExportImport/index.d.ts +7 -0
- package/lib/components/table/Actions/component/Group/PopoverContent.d.ts +1 -0
- package/lib/components/table/Gallery/components/GalleryItem/index.d.ts +14 -0
- package/lib/components/table/Gallery/index.d.ts +5 -0
- package/lib/components/table/Summary/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/date/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/image/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/link/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/number/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/numberRange/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/oldRangePicker/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/pSwitch/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/rangePicker/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/search/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/select/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/text/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Config/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Show/index.d.ts +1 -0
- package/lib/components/table/Table/fields/treeSelect/Sort/index.d.ts +1 -0
- package/lib/components/table/Table/index.d.ts +4 -0
- package/lib/components/table/Table/tableConfig/summary/index.d.ts +1 -0
- package/lib/components/table/Table/utils.d.ts +161 -0
- package/lib/components/table/TableFilter/SortIcon.d.ts +1 -0
- package/lib/components/table/hooks/useTableSetting.d.ts +21 -0
- package/lib/components/table/hooks/useTransDataSource.d.ts +11 -0
- package/lib/components/table/serve.d.ts +13 -0
- package/lib/components/table/types.d.ts +268 -0
- package/lib/components/tabs/index.d.ts +17 -0
- package/lib/components/time-picker/index.d.ts +1 -0
- package/lib/components/translation/index.d.ts +14 -0
- package/lib/components/upload/index.d.ts +1 -0
- package/lib/components/versionModal/index.d.ts +23 -0
- package/lib/components/virtual-keyboard/Amount/index.d.ts +6 -0
- package/lib/components/virtual-keyboard/Amount/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Amount/types.d.ts +44 -0
- package/lib/components/virtual-keyboard/Keyboard/index.d.ts +21 -0
- package/lib/components/virtual-keyboard/Number/themeConfig.d.ts +32 -0
- package/lib/components/virtual-keyboard/Time/utils.d.ts +1 -0
- package/lib/components/virtual-keyboard/VirtualKeyInput/index.d.ts +13 -0
- package/lib/components/walletCard/Guest/index.d.ts +1 -0
- package/lib/components/walletCard/Guide/index.d.ts +1 -0
- package/lib/components/walletCard/index.d.ts +77 -0
- package/package.json +1 -1
- package/es/components/productCard/components/AmountFooter/index.d.ts +0 -4
- package/lib/components/productCard/components/AmountFooter/index.d.ts +0 -4
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { ColumnType } from 'antd/es/table';
|
|
3
|
+
import { LocalSettingsType } from '../../table/types';
|
|
4
|
+
import { DataSourceType } from '../provider/dataSource/DataSourceContext';
|
|
5
|
+
export declare type OperationItem = {
|
|
6
|
+
label?: string;
|
|
7
|
+
openMode: 'modal' | 'drawer' | 'custom';
|
|
8
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
9
|
+
openTitle: string;
|
|
10
|
+
actionType: 'detail' | 'edit' | 'delete' | 'custom';
|
|
11
|
+
key: string;
|
|
12
|
+
buttonProps?: any;
|
|
13
|
+
onClick?: (record: any) => void;
|
|
14
|
+
afterClose?: () => void;
|
|
15
|
+
};
|
|
16
|
+
export interface DataSourceTableProps {
|
|
17
|
+
__id?: string;
|
|
18
|
+
currentComponentId?: string;
|
|
19
|
+
currentSettingKey?: string;
|
|
20
|
+
title?: string | React.ReactNode | (() => React.ReactNode);
|
|
21
|
+
subTitle?: string | React.ReactNode | (() => React.ReactNode);
|
|
22
|
+
titleButtons?: {
|
|
23
|
+
show: boolean;
|
|
24
|
+
maxCount: number;
|
|
25
|
+
items: OperationItem[];
|
|
26
|
+
};
|
|
27
|
+
tableButtons?: {
|
|
28
|
+
show: boolean;
|
|
29
|
+
maxCount: number;
|
|
30
|
+
items: OperationItem[];
|
|
31
|
+
};
|
|
32
|
+
buttons?: any[];
|
|
33
|
+
operation?: {
|
|
34
|
+
show: boolean;
|
|
35
|
+
title: string;
|
|
36
|
+
width: number;
|
|
37
|
+
align: 'left' | 'center' | 'right';
|
|
38
|
+
fixed: 'left' | 'right' | false;
|
|
39
|
+
type: 'link' | 'button';
|
|
40
|
+
items: OperationItem[];
|
|
41
|
+
};
|
|
42
|
+
operationContent?: {
|
|
43
|
+
[key: string]: React.ReactNode;
|
|
44
|
+
};
|
|
45
|
+
dataSource: DataSourceType;
|
|
46
|
+
columns: ColumnType<any>[];
|
|
47
|
+
filter: any;
|
|
48
|
+
search?: {
|
|
49
|
+
show: boolean;
|
|
50
|
+
placeholder: string;
|
|
51
|
+
};
|
|
52
|
+
__designMode: string;
|
|
53
|
+
componentId: string;
|
|
54
|
+
clickToDetail?: {
|
|
55
|
+
show: boolean;
|
|
56
|
+
useCustomAction: boolean;
|
|
57
|
+
actionType: string;
|
|
58
|
+
openMode: 'modal' | 'drawer';
|
|
59
|
+
openContentSize: 'small' | 'middle' | 'large';
|
|
60
|
+
openTitle: string;
|
|
61
|
+
key: string;
|
|
62
|
+
};
|
|
63
|
+
onRow?: any;
|
|
64
|
+
filterBy?: Record<string, any>;
|
|
65
|
+
sortBy: string;
|
|
66
|
+
tabs?: {
|
|
67
|
+
show: boolean;
|
|
68
|
+
type: string;
|
|
69
|
+
items: {
|
|
70
|
+
name: string;
|
|
71
|
+
filterBy: Record<string, any>;
|
|
72
|
+
sortBy: string;
|
|
73
|
+
}[];
|
|
74
|
+
};
|
|
75
|
+
onValuesChange?: (changedValues: any, values: any) => void;
|
|
76
|
+
extraParams?: {
|
|
77
|
+
list?: Record<string, any>;
|
|
78
|
+
get?: Record<string, any>;
|
|
79
|
+
update?: Record<string, any>;
|
|
80
|
+
create?: Record<string, any>;
|
|
81
|
+
destroy?: Record<string, any>;
|
|
82
|
+
};
|
|
83
|
+
localSettings?: LocalSettingsType;
|
|
84
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
export interface SwitchProps {
|
|
3
|
+
value?: boolean;
|
|
4
|
+
checked?: boolean;
|
|
5
|
+
defaultChecked?: boolean;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
loading?: boolean;
|
|
8
|
+
size?: 'default' | 'small';
|
|
9
|
+
checkedChildren?: React.ReactNode;
|
|
10
|
+
unCheckedChildren?: React.ReactNode;
|
|
11
|
+
autoFocus?: boolean;
|
|
12
|
+
onChange?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
13
|
+
onClick?: (checked: boolean, event: React.MouseEvent<HTMLButtonElement>) => void;
|
|
14
|
+
renderMode?: 'view' | 'edit' | 'disabled' | 'hidden';
|
|
15
|
+
[key: string]: any;
|
|
16
|
+
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ModeType } from "../../dataSourceForm/type";
|
|
2
|
+
export interface TranslationValue {
|
|
3
|
+
en: string;
|
|
4
|
+
'zh-CN': string;
|
|
5
|
+
'zh-HK': string;
|
|
6
|
+
original: string;
|
|
7
|
+
}
|
|
8
|
+
export interface TranslationProps {
|
|
9
|
+
renderMode: ModeType;
|
|
10
|
+
value?: TranslationValue;
|
|
11
|
+
onChange?: (value: TranslationValue) => void;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
placeholder?: string;
|
|
14
|
+
className?: string;
|
|
15
|
+
type?: 'text' | 'textarea';
|
|
16
|
+
}
|
|
@@ -60,7 +60,7 @@ declare const formFieldMap: {
|
|
|
60
60
|
FormItemTranslation: import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
61
61
|
FormItemIconSelect: import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
62
62
|
};
|
|
63
|
-
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
63
|
+
declare const getFieldComponent: (fieldComponent: string) => import("react").FC<any> | import("react").FC<(import("antd").DatePickerProps & import("../dataSourceForm/utils").WithModeProps) & import("../dataSourceForm/utils").WithFormItemProps> | (import("react").FC<{}> & {
|
|
64
64
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
65
65
|
} & {
|
|
66
66
|
Group: import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps>;
|
|
@@ -96,7 +96,7 @@ declare const getFieldComponent: (fieldComponent: string) => import("react").FC<
|
|
|
96
96
|
extraParams?: Record<string, any> | undefined;
|
|
97
97
|
} & {
|
|
98
98
|
dataSource?: any;
|
|
99
|
-
}) => JSX.Element) | import("react").FC<
|
|
99
|
+
}) => JSX.Element) | import("react").FC<import("./TimePicker/type").TimePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Phone/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Input.Mobile/WithMode").PhoneInputProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & {
|
|
100
100
|
onChange: (value: string) => void;
|
|
101
|
-
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
101
|
+
} & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd").InputProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("antd/es/input").PasswordProps & import("react").RefAttributes<import("antd").InputRef> & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Radio/type").RadioGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./Checkbox/type").CheckboxGroupProps & import("../dataSourceForm/utils").WithModeProps> | import("react").FC<import("./DateRangePicker/type").DateRangePickerProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Upload/type").UploadProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./Translation/type").TranslationProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps> | import("react").FC<import("./IconSelect/type").IconSelectProps & import("../dataSourceForm/utils").WithModeProps & import("../dataSourceForm/utils").WithFormItemProps>;
|
|
102
102
|
export { getFieldComponent, formFieldMap };
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import { Result } from 'ahooks/es/useRequest/src/types';
|
|
3
|
+
import { ActionsItem } from '../../dataSourceForm/serve';
|
|
4
|
+
export interface Field {
|
|
5
|
+
name: string;
|
|
6
|
+
type: string;
|
|
7
|
+
allowNull: boolean;
|
|
8
|
+
primaryKey: boolean;
|
|
9
|
+
unique: boolean;
|
|
10
|
+
autoIncrement: boolean;
|
|
11
|
+
description?: (null | string)[];
|
|
12
|
+
possibleTypes?: string[];
|
|
13
|
+
rawType: string;
|
|
14
|
+
interface: string;
|
|
15
|
+
uiSchema: UiSchema;
|
|
16
|
+
key?: string;
|
|
17
|
+
collectionName?: string;
|
|
18
|
+
collectionKey?: any;
|
|
19
|
+
dataSourceKey?: string;
|
|
20
|
+
defaultValue?: any;
|
|
21
|
+
}
|
|
22
|
+
interface UiSchema {
|
|
23
|
+
type?: string;
|
|
24
|
+
'x-component': string;
|
|
25
|
+
'x-component-props'?: Xcomponentprops;
|
|
26
|
+
'x-validator'?: string;
|
|
27
|
+
title: string;
|
|
28
|
+
default?: any;
|
|
29
|
+
enum?: any[];
|
|
30
|
+
}
|
|
31
|
+
interface Xcomponentprops {
|
|
32
|
+
style?: Style;
|
|
33
|
+
autoSize?: AutoSize;
|
|
34
|
+
stringMode?: boolean;
|
|
35
|
+
step?: string;
|
|
36
|
+
dateFormat?: string;
|
|
37
|
+
showTime?: boolean;
|
|
38
|
+
}
|
|
39
|
+
interface AutoSize {
|
|
40
|
+
minRows: number;
|
|
41
|
+
}
|
|
42
|
+
interface Style {
|
|
43
|
+
width: string;
|
|
44
|
+
}
|
|
45
|
+
export declare type ActionTypes = 'list' | 'get' | 'update' | 'create' | 'destroy';
|
|
46
|
+
export declare type DataSourceType = {
|
|
47
|
+
fromSettingMeta: boolean;
|
|
48
|
+
actions: {
|
|
49
|
+
get: ActionsItem;
|
|
50
|
+
update: ActionsItem;
|
|
51
|
+
create: ActionsItem;
|
|
52
|
+
delete: ActionsItem;
|
|
53
|
+
list: ActionsItem;
|
|
54
|
+
};
|
|
55
|
+
headerDataSource: string;
|
|
56
|
+
dataSourceKey: string;
|
|
57
|
+
filterTargetKey: string;
|
|
58
|
+
introspected: boolean;
|
|
59
|
+
isCustomApi: boolean;
|
|
60
|
+
key: string;
|
|
61
|
+
tableName: string;
|
|
62
|
+
logging: boolean;
|
|
63
|
+
name: string;
|
|
64
|
+
title: string;
|
|
65
|
+
titleField: string;
|
|
66
|
+
types: ActionTypes[];
|
|
67
|
+
fields: Field[];
|
|
68
|
+
options: {
|
|
69
|
+
apiType: string;
|
|
70
|
+
baseUrl: string;
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
export declare type DataSourceContextProps = {
|
|
74
|
+
dataSource: DataSourceType;
|
|
75
|
+
children?: React.ReactNode;
|
|
76
|
+
currentValue?: string;
|
|
77
|
+
actions?: {
|
|
78
|
+
list?: () => Promise<any>;
|
|
79
|
+
get?: () => Promise<any>;
|
|
80
|
+
update?: () => Promise<any>;
|
|
81
|
+
create?: () => Promise<any>;
|
|
82
|
+
destroy?: () => Promise<any>;
|
|
83
|
+
};
|
|
84
|
+
requestOptions?: {
|
|
85
|
+
list?: any;
|
|
86
|
+
get?: any;
|
|
87
|
+
update?: any;
|
|
88
|
+
create?: any;
|
|
89
|
+
destroy?: any;
|
|
90
|
+
};
|
|
91
|
+
overrideData?: {
|
|
92
|
+
list?: any;
|
|
93
|
+
get?: any;
|
|
94
|
+
};
|
|
95
|
+
autoRun?: {
|
|
96
|
+
list?: boolean;
|
|
97
|
+
get?: boolean;
|
|
98
|
+
};
|
|
99
|
+
extraParams?: {
|
|
100
|
+
list?: Record<string, any>;
|
|
101
|
+
get?: Record<string, any>;
|
|
102
|
+
update?: Record<string, any>;
|
|
103
|
+
create?: Record<string, any>;
|
|
104
|
+
destroy?: Record<string, any>;
|
|
105
|
+
};
|
|
106
|
+
__id?: string;
|
|
107
|
+
__designMode?: string;
|
|
108
|
+
};
|
|
109
|
+
export interface DataSourceContextType {
|
|
110
|
+
dataSource?: DataSourceType;
|
|
111
|
+
list: Result<any, any>;
|
|
112
|
+
destroy: Result<any, any>;
|
|
113
|
+
get: Result<any, any>;
|
|
114
|
+
update: Result<any, any>;
|
|
115
|
+
create: Result<any, any>;
|
|
116
|
+
__designMode?: string;
|
|
117
|
+
getCurrentRecord: () => any;
|
|
118
|
+
}
|
|
119
|
+
export declare const DataSourceContext: import("react").Context<DataSourceContextType>;
|
|
120
|
+
export default DataSourceContext;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
/// <reference types="react" />
|
|
2
|
+
import './index.less';
|
|
3
|
+
import { ValueProps, SortType } from '../types';
|
|
4
|
+
declare type IdType = string | number;
|
|
5
|
+
declare type TreeItemProps = {
|
|
6
|
+
id: string | number;
|
|
7
|
+
key: string | number;
|
|
8
|
+
item: ValueProps | any;
|
|
9
|
+
depth: number;
|
|
10
|
+
lists: any[];
|
|
11
|
+
childrenProps?: SortType;
|
|
12
|
+
sensors?: any;
|
|
13
|
+
expandedKeys?: IdType[];
|
|
14
|
+
setExpandedKeys?: any;
|
|
15
|
+
onSelectKeys?: (ids: IdType) => void;
|
|
16
|
+
onChange?: (value: any[]) => void;
|
|
17
|
+
};
|
|
18
|
+
declare const TreeItem: (props: TreeItemProps) => JSX.Element;
|
|
19
|
+
export default TreeItem;
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
/**
|
|
4
|
+
* loginAndRegister组件的属性接口
|
|
5
|
+
*/
|
|
6
|
+
export interface loginAndRegisterProps {
|
|
7
|
+
/** Logo相关配置 */
|
|
8
|
+
showLogo?: boolean;
|
|
9
|
+
logo?: string;
|
|
10
|
+
logoPosition?: 'left' | 'center' | 'right';
|
|
11
|
+
logoSize?: {
|
|
12
|
+
width?: number;
|
|
13
|
+
height?: number;
|
|
14
|
+
};
|
|
15
|
+
/** 标题相关配置 */
|
|
16
|
+
title?: string;
|
|
17
|
+
showTitle?: boolean;
|
|
18
|
+
titleAlign?: 'left' | 'center' | 'right';
|
|
19
|
+
/** 副标题相关配置 */
|
|
20
|
+
subtitle?: string;
|
|
21
|
+
showSubtitle?: boolean;
|
|
22
|
+
subtitleAlign?: 'left' | 'center' | 'right';
|
|
23
|
+
/** 登录方式配置 */
|
|
24
|
+
loginMethods?: ('email' | 'google' | 'facebook' | 'apple')[];
|
|
25
|
+
defaultLoginMethod?: 'email' | 'google' | 'facebook' | 'apple';
|
|
26
|
+
/** 表单配置 */
|
|
27
|
+
emailLabel?: string;
|
|
28
|
+
passwordLabel?: string;
|
|
29
|
+
emailPlaceholder?: string;
|
|
30
|
+
passwordPlaceholder?: string;
|
|
31
|
+
emailRules?: any[];
|
|
32
|
+
buttonText?: string;
|
|
33
|
+
rememberMeText?: string;
|
|
34
|
+
forgotPasswordText?: string;
|
|
35
|
+
showRememberMe?: boolean;
|
|
36
|
+
showForgotPassword?: boolean;
|
|
37
|
+
/** 社交登录配置 */
|
|
38
|
+
socialLoginTexts?: {
|
|
39
|
+
google?: string;
|
|
40
|
+
facebook?: string;
|
|
41
|
+
apple?: string;
|
|
42
|
+
};
|
|
43
|
+
/** 底部配置 */
|
|
44
|
+
showFooter?: boolean;
|
|
45
|
+
showSignUp?: boolean;
|
|
46
|
+
signUpText?: string;
|
|
47
|
+
signUpLink?: string;
|
|
48
|
+
signUpPosition?: 'left' | 'center' | 'right';
|
|
49
|
+
otherLinks?: Array<{
|
|
50
|
+
text: string;
|
|
51
|
+
url: string;
|
|
52
|
+
}>;
|
|
53
|
+
otherLinksPosition?: 'left' | 'center' | 'right';
|
|
54
|
+
/** 登录/注册切换配置 */
|
|
55
|
+
showTabs?: boolean;
|
|
56
|
+
loginTabText?: string;
|
|
57
|
+
registerTabText?: string;
|
|
58
|
+
/** 注册表单配置 */
|
|
59
|
+
registerEmailPlaceholder?: string;
|
|
60
|
+
registerPasswordPlaceholder?: string;
|
|
61
|
+
registerButtonText?: string;
|
|
62
|
+
/** 事件回调 */
|
|
63
|
+
onLogin?: (values: {
|
|
64
|
+
email: string;
|
|
65
|
+
loginMethod: string;
|
|
66
|
+
}) => void;
|
|
67
|
+
onSocialLogin?: (type: 'google' | 'facebook' | 'apple') => void;
|
|
68
|
+
onSignUp?: () => void;
|
|
69
|
+
onRegister?: (values: {
|
|
70
|
+
email: string;
|
|
71
|
+
password: string;
|
|
72
|
+
}) => void;
|
|
73
|
+
/** 新增背景图片属性 */
|
|
74
|
+
backgroundImage?: string;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Saas登录组件
|
|
78
|
+
* @param props - 组件属性
|
|
79
|
+
* @returns React组件
|
|
80
|
+
*/
|
|
81
|
+
declare const loginAndRegister: React.FC<loginAndRegisterProps>;
|
|
82
|
+
export default loginAndRegister;
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
export declare const defaultConfig: {
|
|
2
|
+
dark: {
|
|
3
|
+
backgroundColor: string;
|
|
4
|
+
containerBackgroundColor: string;
|
|
5
|
+
buttonBackgroundColor: string;
|
|
6
|
+
textColor: string;
|
|
7
|
+
resetButtonBackgroundColor: string;
|
|
8
|
+
resetButtonTextColor: string;
|
|
9
|
+
isDoneButtonFollowTheme: boolean;
|
|
10
|
+
doneButtonBackgroundColor: string;
|
|
11
|
+
doneButtonTextColor: string;
|
|
12
|
+
isShowMainText: boolean;
|
|
13
|
+
mainTextColor: string;
|
|
14
|
+
isShowSubText: boolean;
|
|
15
|
+
subTextColor: string;
|
|
16
|
+
};
|
|
17
|
+
light: {
|
|
18
|
+
backgroundColor: string;
|
|
19
|
+
containerBackgroundColor: string;
|
|
20
|
+
buttonBackgroundColor: string;
|
|
21
|
+
textColor: string;
|
|
22
|
+
resetButtonBackgroundColor: string;
|
|
23
|
+
resetButtonTextColor: string;
|
|
24
|
+
isDoneButtonFollowTheme: boolean;
|
|
25
|
+
doneButtonBackgroundColor: string;
|
|
26
|
+
doneButtonTextColor: string;
|
|
27
|
+
isShowMainText: boolean;
|
|
28
|
+
mainTextColor: string;
|
|
29
|
+
isShowSubText: boolean;
|
|
30
|
+
subTextColor: string;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { EmptyProps } from 'antd';
|
|
3
|
+
import { PisellContextType } from '../pisell-config-provider/context';
|
|
4
|
+
import './index.less';
|
|
5
|
+
export interface PisellEmptyProps extends EmptyProps {
|
|
6
|
+
/** 平台 */
|
|
7
|
+
platform?: PisellContextType['platform'];
|
|
8
|
+
/** 额外内容描述 */
|
|
9
|
+
extraDescription?: React.ReactNode;
|
|
10
|
+
/** 额外内容描述 */
|
|
11
|
+
icon?: React.ReactNode;
|
|
12
|
+
/** 自定义底部额外操作区域 */
|
|
13
|
+
footer?: React.ReactNode;
|
|
14
|
+
[key: string]: any;
|
|
15
|
+
/** 最大宽度 */
|
|
16
|
+
maxWidth?: number;
|
|
17
|
+
}
|
|
18
|
+
declare const PisellEmpty: (props: PisellEmptyProps) => JSX.Element;
|
|
19
|
+
export default PisellEmpty;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import './index.less';
|
|
3
|
+
interface PisellQrcodeProps {
|
|
4
|
+
size?: number;
|
|
5
|
+
platform?: 'pc' | 'h5' | 'ipad';
|
|
6
|
+
value: string;
|
|
7
|
+
className?: string;
|
|
8
|
+
}
|
|
9
|
+
declare const PisellQrcode: React.FC<PisellQrcodeProps>;
|
|
10
|
+
export default PisellQrcode;
|
|
@@ -53,7 +53,8 @@ var BasicInfo = (props) => {
|
|
|
53
53
|
origin_total = 0,
|
|
54
54
|
num = 1,
|
|
55
55
|
holder_id,
|
|
56
|
-
isFormSubject
|
|
56
|
+
isFormSubject,
|
|
57
|
+
totalDifference = 0
|
|
57
58
|
} = dataSource;
|
|
58
59
|
const renderNumTag = () => {
|
|
59
60
|
return /* @__PURE__ */ import_react.default.createElement(
|
|
@@ -78,6 +79,6 @@ var BasicInfo = (props) => {
|
|
|
78
79
|
if (type === "a5") {
|
|
79
80
|
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), (!holder_id || !(holder_id == null ? void 0 : holder_id.length)) && !isFormSubject ? /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol)) : /* @__PURE__ */ import_react.default.createElement(import_holders.default, { dataSource })));
|
|
80
81
|
}
|
|
81
|
-
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num, 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
82
|
+
return /* @__PURE__ */ import_react.default.createElement("div", { className: `${import__.PREFIX}__basic-info`, style: style || {} }, renderNumTag(), renderImage(), !isShowImage || !image && !name ? /* @__PURE__ */ import_react.default.createElement("div", { style: { width: 20 } }) : null, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-info` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `product-name` }, name), hasSpecs ? /* @__PURE__ */ import_react.default.createElement(import_specs.default, { dataSource }) : /* @__PURE__ */ import_react.default.createElement("div", { className: `product-price` }, (0, import_utils.formatAmount)(price, 2, symbol))), /* @__PURE__ */ import_react.default.createElement("div", { className: `product-amount` }, /* @__PURE__ */ import_react.default.createElement("div", { className: `total-amont` }, (0, import_utils.formatAmount)(total * num - (totalDifference ?? 0), 2, symbol)), origin_total && Number(total) !== Number(origin_total) ? /* @__PURE__ */ import_react.default.createElement("div", { className: `origin-amount` }, (0, import_utils.formatAmount)(origin_total * num, 2, symbol)) : null));
|
|
82
83
|
};
|
|
83
84
|
var basicInfo_default = BasicInfo;
|
|
@@ -42,7 +42,7 @@ var import_index = require("./index.less");
|
|
|
42
42
|
var import_utils2 = require("@pisell/utils");
|
|
43
43
|
var prefix = "pisell-lowcode-";
|
|
44
44
|
var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
45
|
-
const { total, origin_total, symbol, tip, num, discount_reason } = item;
|
|
45
|
+
const { total, origin_total, symbol, tip, num, discount_reason, totalDifference = 0 } = item;
|
|
46
46
|
const isDiscount = (0, import_react.useMemo)(() => {
|
|
47
47
|
if (!origin_total) return false;
|
|
48
48
|
return Number(total) != Number(origin_total);
|
|
@@ -87,7 +87,7 @@ var Footer = ({ item, hideDivider, type, isOnlyTotal }) => {
|
|
|
87
87
|
}
|
|
88
88
|
)) : null
|
|
89
89
|
), /* @__PURE__ */ import_react.default.createElement("span", null, `×${num}`)) : null,
|
|
90
|
-
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-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)))
|
|
90
|
+
/* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-footer-total` }, isDiscount ? /* @__PURE__ */ import_react.default.createElement("span", { className: `${prefix}packages-product-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 - (totalDifference ?? 0), symbol)))
|
|
91
91
|
)
|
|
92
92
|
), renderDiscountReason());
|
|
93
93
|
};
|
|
@@ -17,4 +17,4 @@ export declare const minusSign: (item: any, type?: string) => "" | "-";
|
|
|
17
17
|
* @Author: WangHan
|
|
18
18
|
* @Date: 2024-11-22 10:58
|
|
19
19
|
*/
|
|
20
|
-
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) =>
|
|
20
|
+
export declare const _formatAmount: (price?: number, amountSymbol?: string, digit?: number) => string | number;
|