@pisell/materials 1.8.38 → 1.8.41
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 +3 -3
- package/build/lowcode/render/default/view.css +1 -1
- package/build/lowcode/render/default/view.js +216 -51
- package/build/lowcode/view.css +1 -1
- package/build/lowcode/view.js +216 -51
- package/es/components/Pagination/index.js +9 -43
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +5 -2
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +169 -171
- package/es/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +87 -27
- package/es/components/PisellCards/components/GraphicTextCard/types.d.ts +18 -7
- package/es/components/PisellCards/components/TextCard/TextCard.js +2 -3
- package/es/components/PisellCards/components/TextCard/components/BadgeWrapper.js +20 -6
- package/es/components/PisellCards/components/TextCard/components/TextContent.js +3 -1
- package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +36 -5
- package/es/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +2434 -258
- package/es/components/PisellCards/components/TextCard/docs/TextCard.md +78 -13
- package/es/components/PisellCards/index.d.ts +3 -0
- package/es/components/PisellCards/index.js +3 -1
- package/es/components/PisellContactBrief/PisellContactBrief.d.ts +34 -0
- package/es/components/PisellContactBrief/PisellContactBrief.js +156 -0
- package/es/components/PisellContactBrief/PisellContactBrief.less +192 -0
- package/es/components/PisellContactBrief/components/ContactFormModal.js +140 -0
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +109 -0
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +106 -0
- package/es/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +125 -0
- package/es/components/PisellContactBrief/docs/PisellContactBrief.md +129 -0
- package/es/components/PisellContactBrief/index.d.ts +2 -0
- package/es/components/PisellContactBrief/locales.js +57 -0
- package/es/components/PisellContactBrief/types.d.ts +86 -0
- package/es/components/PisellLayouts/index.d.ts +1 -1
- package/es/components/PisellProcedure/components/ProcedureHeader.js +1 -1
- package/es/components/PisellTabbar/PisellTabbar.js +1 -1
- package/es/components/PisellTabbar/template/Template1/PisellTabbar.js +1 -1
- package/es/components/Template/[ComponentName].less +1 -0
- package/es/components/Template/docs/[ComponentName].$tab-design.md +7 -0
- package/es/components/Template/docs/[ComponentName].$tab-dev.md +1137 -0
- package/es/components/Template/docs/[ComponentName].$tab-test.md +7 -0
- package/es/components/Template/docs/[ComponentName].md +510 -0
- package/es/components/appVersionControl/index.js +3 -2
- package/es/components/dataSourceComponents/dataSourceForm/BaseForm.js +4 -4
- package/es/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
- package/es/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
- package/es/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
- package/es/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/es/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
- package/es/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/es/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
- package/es/components/dataSourceComponents/fields/DatePicker/WithMode.js +4 -0
- package/es/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/Input.Phone/serve.js +4 -1
- package/es/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
- package/es/components/dataSourceComponents/fields/TimePicker/WithMode.js +1 -1
- package/es/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/es/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
- package/es/components/drag-sort-tree/index.d.ts +1 -0
- package/es/components/drag-sort-tree/index.js +0 -1
- package/es/components/drawer/index.js +7 -6
- package/es/components/filter/components/FilterItem/index.js +1 -3
- package/es/components/filter/components/QuickFilter/index.js +2 -3
- package/es/components/hardwareErrorTip/errorCard/index.d.ts +25 -0
- package/es/components/hardwareErrorTip/errorCard/index.js +68 -0
- package/es/components/hardwareErrorTip/errorCard/index.less +137 -0
- package/es/components/hardwareErrorTip/errorTipStatistics/index.d.ts +10 -0
- package/es/components/hardwareErrorTip/errorTipStatistics/index.js +31 -0
- package/es/components/hardwareErrorTip/errorTipStatistics/index.less +34 -0
- package/es/components/hardwareErrorTip/index.d.ts +20 -0
- package/es/components/hardwareErrorTip/index.js +151 -0
- package/es/components/hardwareErrorTip/index.less +95 -0
- package/es/components/hardwareErrorTip/logCard/index.d.ts +25 -0
- package/es/components/hardwareErrorTip/logCard/index.js +72 -0
- package/es/components/hardwareErrorTip/logCard/index.less +121 -0
- package/es/components/hardwareErrorTip/readme.md +309 -0
- package/es/components/hardwareErrorTip/types.js +54 -0
- package/es/components/iconfont/index.js +1 -1
- package/es/components/login-and-register/index.js +4 -5
- package/es/components/page/index.js +1 -1
- package/es/components/pisellActionPanel/PisellActionPanel.d.ts +24 -0
- package/es/components/pisellActionPanel/PisellActionPanel.js +68 -0
- package/es/components/pisellActionPanel/PisellActionPanel.less +69 -0
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +148 -0
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +53 -0
- package/es/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +64 -0
- package/es/components/pisellActionPanel/docs/pisellActionPanel.md +160 -0
- package/es/components/pisellActionPanel/index.d.ts +2 -0
- package/es/components/pisellActionPanel/types.d.ts +87 -0
- package/es/components/pisellAppCard/PisellAppCard.js +1 -1
- package/es/components/pisellBaseCard/PisellBaseCard.d.ts +20 -0
- package/es/components/pisellBaseCard/PisellBaseCard.js +73 -0
- package/es/components/pisellBaseCard/PisellBaseCard.less +25 -0
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +144 -0
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +92 -0
- package/es/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +86 -0
- package/es/components/pisellBaseCard/docs/pisellBaseCard.md +165 -0
- package/es/components/pisellBaseCard/index.d.ts +2 -0
- package/es/components/pisellBaseCard/types.d.ts +49 -0
- package/es/components/pisellCardList/index.js +1 -1
- package/es/components/pisellCurrency/PisellCurrency.js +13 -6
- package/es/components/pisellCurrency/PisellCurrency.less +0 -123
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +57 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.js +92 -0
- package/es/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +115 -0
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +73 -0
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +66 -0
- package/es/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +132 -0
- package/es/components/pisellCustomerBrief/index.d.ts +2 -0
- package/es/components/pisellCustomerBrief/types.d.ts +86 -0
- package/es/components/pisellDataSourceContainer/components/Pagination/index.js +3 -9
- package/es/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +189 -240
- package/es/components/pisellDataSourceContainer/type.d.ts +1 -1
- package/es/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
- package/es/components/pisellEmail/PisellEmail.js +13 -6
- package/es/components/pisellEmail/PisellEmail.less +0 -92
- package/es/components/pisellEmpty/index.d.ts +1 -1
- package/es/components/pisellEntityCard/PisellEntityCard.d.ts +47 -0
- package/es/components/pisellEntityCard/PisellEntityCard.js +315 -0
- package/es/components/pisellEntityCard/PisellEntityCard.less +362 -0
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +209 -0
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +82 -0
- package/es/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +122 -0
- package/es/components/pisellEntityCard/docs/pisellEntityCard.md +176 -0
- package/es/components/pisellEntityCard/index.d.ts +2 -0
- package/es/components/pisellEntityCard/types.d.ts +148 -0
- package/es/components/pisellExport/PisellExport.d.ts +11 -0
- package/es/components/pisellExport/PisellExport.js +44 -0
- package/es/components/pisellExport/PisellExport.less +141 -0
- package/es/components/pisellExport/docs/pisellExport.$tab-design.md +116 -0
- package/es/components/pisellExport/docs/pisellExport.$tab-dev.md +132 -0
- package/es/components/pisellExport/docs/pisellExport.$tab-test.md +61 -0
- package/es/components/pisellExport/docs/pisellExport.md +162 -0
- package/es/components/pisellExport/index.d.ts +2 -0
- package/es/components/pisellExport/types.d.ts +67 -0
- package/es/components/pisellFilter/docs/PisellFilter.md +2 -2
- package/es/components/pisellFind/docs/pisellFind.md +2 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -2
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.js +51 -230
- package/es/components/pisellFloorMapLayout/PisellFloorMapLayout.less +0 -22
- package/es/components/pisellFloorMapLayout/components/EditableItemLayer.js +2 -3
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
- package/es/components/pisellFloorMapLayout/components/FigmaTableCard.js +74 -209
- package/es/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +5 -40
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +12 -131
- package/es/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +1 -9
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.js +3 -24
- package/es/components/pisellFloorMapLayout/components/FloorMapToolbar.less +4 -97
- package/es/components/pisellFloorMapLayout/components/ItemLayer.js +9 -29
- package/es/components/pisellFloorMapLayout/components/ItemLayer.less +2 -19
- package/es/components/pisellFloorMapLayout/components/ViewControls.js +65 -119
- package/es/components/pisellFloorMapLayout/components/ViewControls.less +44 -208
- package/es/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +0 -4
- package/es/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +1 -3
- package/es/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +194 -559
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +16 -82
- package/es/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +36 -369
- package/es/components/pisellFloorMapLayout/index.d.ts +0 -1
- package/es/components/pisellFloorMapLayout/locales-ja.js +1 -21
- package/es/components/pisellFloorMapLayout/locales-pt.js +1 -21
- package/es/components/pisellFloorMapLayout/locales.js +3 -63
- package/es/components/pisellFloorMapLayout/types.d.ts +9 -70
- package/es/components/pisellGoodPassCard/index.less +0 -1
- package/es/components/pisellGridPro/GridView/docs/GridView.md +48 -47
- package/es/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +2 -4
- package/es/components/pisellGridPro/ToolBar/docs/ToolBar.md +81 -95
- package/es/components/pisellGridPro/ToolBar/index.less +4 -5
- package/es/components/pisellGridPro/docs/PisellGridPro.md +262 -173
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +6 -3
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +4 -3
- package/es/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +2 -1
- package/es/components/pisellImport/PisellImport.d.ts +11 -0
- package/es/components/pisellImport/PisellImport.js +81 -0
- package/es/components/pisellImport/PisellImport.less +141 -0
- package/es/components/pisellImport/docs/pisellImport.$tab-design.md +121 -0
- package/es/components/pisellImport/docs/pisellImport.$tab-dev.md +137 -0
- package/es/components/pisellImport/docs/pisellImport.$tab-test.md +69 -0
- package/es/components/pisellImport/docs/pisellImport.md +174 -0
- package/es/components/pisellImport/index.d.ts +2 -0
- package/es/components/pisellImport/types.d.ts +89 -0
- package/es/components/pisellLongText/PisellLongText.js +13 -6
- package/es/components/pisellLongText/PisellLongText.less +0 -67
- package/es/components/pisellLookup/PisellLookup.less +1 -1
- package/es/components/pisellLookup/components/LookupTrigger.js +8 -6
- package/es/components/pisellLookup/docs/pisellLookup.md +1 -1
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.js +7 -5
- package/es/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
- package/es/components/pisellMultipleSelect/components/EditView.js +1 -0
- package/es/components/pisellNavigationMenu/PisellNavigationMenu.js +4 -0
- package/es/components/pisellNumber/PisellNumber.js +13 -6
- package/es/components/pisellNumber/PisellNumber.less +0 -103
- package/es/components/pisellPhone/PisellPhone.js +13 -6
- package/es/components/pisellPhone/PisellPhone.less +0 -119
- package/es/components/pisellPhone/components/EditView.js +37 -19
- package/es/components/pisellPhone/constants/countryCodes.js +26 -25
- package/es/components/pisellPhone/types.d.ts +2 -2
- package/es/components/pisellPhone/utils/countryCodeHelper.js +2 -2
- package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.md +1 -1
- package/es/components/pisellRating/PisellRating.js +5 -3
- package/es/components/pisellRecordBoard/PisellRecordBoard.js +10 -26
- package/es/components/pisellRecordBoard/README.md +0 -12
- package/es/components/pisellRecordBoard/docs/PisellRecordBoard.md +70 -716
- package/es/components/pisellRecordBoard/docs/ShellFrame.md +44 -62
- package/es/components/pisellRecordBoard/index.d.ts +1 -7
- package/es/components/pisellRecordBoard/index.js +0 -4
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.js +9 -147
- package/es/components/pisellRecordBoard/layouts/GridLayout/Grid.less +0 -31
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +3811 -0
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -5
- package/es/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +8 -10
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -2
- package/es/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -7
- package/es/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
- package/es/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +1 -5
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/index.js +65 -143
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +13 -181
- package/es/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +2 -10
- package/es/components/pisellRecordBoard/shellFrame/index.d.ts +2 -9
- package/es/components/pisellRecordBoard/shellFrame/index.js +19 -73
- package/es/components/pisellRecordBoard/types.d.ts +8 -374
- package/es/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +0 -16
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.js +15 -67
- package/es/components/pisellReservationSchedule/PisellReservationSchedule.less +0 -23
- package/es/components/pisellReservationSchedule/locales.js +3 -21
- package/es/components/pisellReservationSchedule/types.d.ts +0 -5
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -2
- package/es/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +4 -37
- package/es/components/pisellReservationScheduleBand/types.d.ts +0 -4
- package/es/components/pisellShellFrame/PisellShellFrame.js +2 -2
- package/es/components/pisellShellFrame/PisellShellFrame.less +2 -18
- package/es/components/pisellShellFrame/types.d.ts +0 -6
- package/es/components/pisellSingleLineText/PisellSingleLineText.js +21 -14
- package/es/components/pisellSingleLineText/PisellSingleLineText.less +0 -143
- package/es/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
- package/es/components/pisellSingleSelect/PisellSingleSelect.js +7 -4
- package/es/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
- package/es/components/pisellSingleSelect/docs/pisellSingleSelect.md +525 -428
- package/es/components/pisellSort/docs/PisellSort.md +67 -131
- package/es/components/pisellStatisticList/index.js +1 -0
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.js +37 -151
- package/es/components/pisellTimeNavigator/PisellTimeNavigator.less +13 -126
- package/es/components/pisellTimeNavigator/components/CursorLayer.js +2 -2
- package/es/components/pisellTimeNavigator/components/GestureLayer.js +3 -12
- package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +42 -26
- package/es/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
- package/es/components/pisellTimeNavigator/index.d.ts +1 -1
- package/es/components/pisellTimeNavigator/utils/index.d.ts +3 -9
- package/es/components/pisellTimeNavigator/utils/index.js +6 -15
- package/es/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +227 -226
- package/es/components/pisellUrl/PisellUrl.js +13 -6
- package/es/components/pisellWalletPassCard/index.js +11 -5
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.js +4 -65
- package/es/components/productCard/cartSkuCard/components/basicInfo/index.less +1 -80
- package/es/components/productCard/cartSkuCard/components/holders/index.js +1 -1
- package/es/components/productCard/cartSkuCard/components/packages/index.js +9 -24
- package/es/components/productCard/cartSkuCard/components/specs/index.js +7 -22
- package/es/components/productCard/cartSkuCard/components/specs/index.less +0 -11
- package/es/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
- package/es/components/productCard/cartSkuCard/index.js +8 -68
- package/es/components/productCard/cartSkuCard/locales.js +5 -40
- package/es/components/productCard/components/Header/Actions/index.less +15 -0
- package/es/components/productCard/components/Header/DeleteButton/index.js +2 -2
- package/es/components/productCard/components/Header/DeleteButton/index.less +2 -1
- package/es/components/productCard/components/Header/EditButton/index.js +1 -2
- package/es/components/productCard/components/Header/index.less +1 -1
- package/es/components/productCard/components/Time/components/SelectHolder/index.js +3 -2
- package/es/components/productCard/components/Time/components/SelectHolderModal/index.js +1 -1
- package/es/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
- package/es/components/productCard/components/Time/components/SelectResource/index.js +6 -3
- package/es/components/productCard/components/Time/index.js +3 -2
- package/es/components/productCard/status.js +0 -3
- package/es/components/productCard/types.d.ts +0 -10
- package/es/components/productCard/utils.js +1 -1
- package/es/components/select-time/index.js +0 -1
- package/es/components/table/Actions/component/ExportImport/index.js +3 -4
- package/es/components/table/Actions/component/GallerySetting/index.js +10 -9
- package/es/components/table/Actions/component/ViewMode/index.js +4 -3
- package/es/components/table/Actions/index.js +1 -1
- package/es/components/table/BasicTable/index.js +4 -3
- package/es/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/es/components/table/Gallery/components/GalleryItem/index.js +12 -4
- package/es/components/table/Gallery/components/GalleryItem/index.less +1 -0
- package/es/components/table/Gallery/index.js +11 -3
- package/es/components/table/Table/fields/text/Show/index.js +1 -1
- package/es/components/table/Table/index.js +2 -1
- package/es/components/table/Table/tableConfig/header/index.js +1 -1
- package/es/components/table/Table/utils.js +5 -1
- package/es/components/table/hooks/useTableSetting.js +3 -0
- package/es/components/table/hooks/useTransDataSource.js +4 -3
- package/es/components/table/index.js +1 -1
- package/es/components/tabs/index.less +1 -1
- package/es/components/translation/index.d.ts +1 -0
- package/es/components/translation/index.js +36 -10
- package/es/components/translation/index.less +12 -0
- package/es/components/versionModal/index.d.ts +1 -0
- package/es/components/versionModal/index.js +2 -2
- package/es/components/versionSelect/index.js +1 -1
- package/es/components/virtual-keyboard/Amount/index.js +2 -1
- package/es/components/virtual-keyboard/Amount/types.d.ts +1 -0
- package/es/index.d.ts +105 -94
- package/es/index.js +92 -90
- package/es/locales/en-US.js +69 -191
- package/es/locales/ja.js +12 -192
- package/es/locales/pt.js +12 -192
- package/es/locales/zh-CN.js +63 -185
- package/es/locales/zh-TW.js +68 -190
- package/es/pisell-materials.tw.css +1 -2414
- package/es/tailwind-input.css +1 -3
- package/es/theme/pisell-components.js +76 -0
- package/lib/components/Pagination/index.js +8 -42
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-dev.md +5 -2
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.$tab-test.md +169 -171
- package/lib/components/PisellCards/components/GraphicTextCard/docs/GraphicTextCard.md +87 -27
- package/lib/components/PisellCards/components/GraphicTextCard/types.d.ts +18 -7
- package/lib/components/PisellCards/components/TextCard/TextCard.js +2 -3
- package/lib/components/PisellCards/components/TextCard/components/BadgeWrapper.js +20 -6
- package/lib/components/PisellCards/components/TextCard/components/TextContent.js +3 -1
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-dev.md +36 -5
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.$tab-test.md +2434 -258
- package/lib/components/PisellCards/components/TextCard/docs/TextCard.md +78 -13
- package/lib/components/PisellCards/index.d.ts +3 -0
- package/lib/components/PisellCards/index.js +3 -1
- package/lib/components/PisellContactBrief/PisellContactBrief.d.ts +34 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.js +158 -0
- package/lib/components/PisellContactBrief/PisellContactBrief.less +192 -0
- package/lib/components/PisellContactBrief/components/ContactFormModal.js +139 -0
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-design.md +109 -0
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-dev.md +106 -0
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.$tab-test.md +125 -0
- package/lib/components/PisellContactBrief/docs/PisellContactBrief.md +129 -0
- package/lib/components/PisellContactBrief/index.d.ts +2 -0
- package/lib/components/PisellContactBrief/locales.js +57 -0
- package/lib/components/PisellContactBrief/types.d.ts +86 -0
- package/lib/components/PisellLayouts/index.d.ts +1 -1
- package/lib/components/PisellProcedure/components/ProcedureHeader.js +1 -1
- package/lib/components/PisellTabbar/PisellTabbar.js +6 -6
- package/lib/components/PisellTabbar/template/Template1/PisellTabbar.js +6 -6
- package/lib/components/Template/[ComponentName].less +1 -0
- package/lib/components/Template/docs/[ComponentName].$tab-design.md +7 -0
- package/lib/components/Template/docs/[ComponentName].$tab-dev.md +1137 -0
- package/lib/components/Template/docs/[ComponentName].$tab-test.md +7 -0
- package/lib/components/Template/docs/[ComponentName].md +510 -0
- package/lib/components/appVersionControl/index.js +12 -11
- package/lib/components/dataSourceComponents/dataSourceForm/BaseForm.js +6 -6
- package/lib/components/dataSourceComponents/dataSourceForm/formItem.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceForm/submitButton/index.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceForm/utils.js +3 -3
- package/lib/components/dataSourceComponents/dataSourceShow/dataSourceTypography/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceSubForm/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/BaseTable.js +2 -2
- package/lib/components/dataSourceComponents/dataSourceTable/filter/index.js +1 -1
- package/lib/components/dataSourceComponents/dataSourceTable/hooks/useTableProps.js +3 -2
- package/lib/components/dataSourceComponents/dataSourceTable/type.d.ts +1 -0
- package/lib/components/dataSourceComponents/dataSourceWrapper/BaseWrapper.js +1 -1
- package/lib/components/dataSourceComponents/fields/DatePicker/WithMode.js +4 -0
- package/lib/components/dataSourceComponents/fields/IconSelect/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/Input/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/Input.Phone/serve.js +4 -1
- package/lib/components/dataSourceComponents/fields/Radio/WithMode.js +1 -1
- package/lib/components/dataSourceComponents/fields/TimePicker/WithMode.js +4 -4
- package/lib/components/dataSourceComponents/hooks/useActions.js +1 -1
- package/lib/components/dataSourceComponents/provider/dataSource/DataSourceProvider.js +1 -1
- package/lib/components/drag-sort-tree/index.d.ts +1 -0
- package/lib/components/drag-sort-tree/index.js +0 -1
- package/lib/components/drawer/index.js +7 -6
- package/lib/components/filter/components/FilterItem/index.js +1 -3
- package/lib/components/filter/components/QuickFilter/index.js +2 -3
- package/lib/components/hardwareErrorTip/errorCard/index.d.ts +25 -0
- package/lib/components/hardwareErrorTip/errorCard/index.js +71 -0
- package/lib/components/hardwareErrorTip/errorCard/index.less +137 -0
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.d.ts +10 -0
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.js +34 -0
- package/lib/components/hardwareErrorTip/errorTipStatistics/index.less +34 -0
- package/lib/components/hardwareErrorTip/index.d.ts +20 -0
- package/lib/components/hardwareErrorTip/index.js +153 -0
- package/lib/components/hardwareErrorTip/index.less +95 -0
- package/lib/components/hardwareErrorTip/logCard/index.d.ts +25 -0
- package/lib/components/hardwareErrorTip/logCard/index.js +75 -0
- package/lib/components/hardwareErrorTip/logCard/index.less +121 -0
- package/lib/components/hardwareErrorTip/readme.md +309 -0
- package/lib/components/hardwareErrorTip/types.js +57 -0
- package/lib/components/iconfont/index.js +1 -1
- package/lib/components/login-and-register/index.js +4 -5
- package/lib/components/page/index.js +1 -1
- package/lib/components/pisellActionPanel/PisellActionPanel.d.ts +24 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.js +71 -0
- package/lib/components/pisellActionPanel/PisellActionPanel.less +69 -0
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-design.md +148 -0
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-dev.md +53 -0
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.$tab-test.md +64 -0
- package/lib/components/pisellActionPanel/docs/pisellActionPanel.md +160 -0
- package/lib/components/pisellActionPanel/index.d.ts +2 -0
- package/lib/components/pisellActionPanel/types.d.ts +87 -0
- package/lib/components/pisellAppCard/PisellAppCard.js +7 -7
- package/lib/components/pisellBaseCard/PisellBaseCard.d.ts +20 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.js +76 -0
- package/lib/components/pisellBaseCard/PisellBaseCard.less +25 -0
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-design.md +144 -0
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-dev.md +92 -0
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.$tab-test.md +86 -0
- package/lib/components/pisellBaseCard/docs/pisellBaseCard.md +165 -0
- package/lib/components/pisellBaseCard/index.d.ts +2 -0
- package/lib/components/pisellBaseCard/types.d.ts +49 -0
- package/lib/components/pisellCardList/index.js +6 -6
- package/lib/components/pisellCurrency/PisellCurrency.js +13 -6
- package/lib/components/pisellCurrency/PisellCurrency.less +0 -123
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.d.ts +57 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.js +94 -0
- package/lib/components/pisellCustomerBrief/PisellCustomerBrief.less +8 -0
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-design.md +115 -0
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-dev.md +73 -0
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.$tab-test.md +66 -0
- package/lib/components/pisellCustomerBrief/docs/pisellCustomerBrief.md +132 -0
- package/lib/components/pisellCustomerBrief/index.d.ts +2 -0
- package/lib/components/pisellCustomerBrief/types.d.ts +86 -0
- package/lib/components/pisellDataSourceContainer/components/Pagination/index.js +3 -9
- package/lib/components/pisellDataSourceContainer/docs/PisellDataSourceContainer.md +189 -240
- package/lib/components/pisellDataSourceContainer/type.d.ts +1 -1
- package/lib/components/pisellDateTimeDisplay/docs/pisellDateTimeDisplay.md +556 -556
- package/lib/components/pisellEmail/PisellEmail.js +13 -6
- package/lib/components/pisellEmail/PisellEmail.less +0 -92
- package/lib/components/pisellEmpty/index.d.ts +1 -1
- package/lib/components/pisellEntityCard/PisellEntityCard.d.ts +47 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.js +318 -0
- package/lib/components/pisellEntityCard/PisellEntityCard.less +362 -0
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-design.md +209 -0
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-dev.md +82 -0
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.$tab-test.md +122 -0
- package/lib/components/pisellEntityCard/docs/pisellEntityCard.md +176 -0
- package/lib/components/pisellEntityCard/index.d.ts +2 -0
- package/lib/components/pisellEntityCard/types.d.ts +148 -0
- package/lib/components/pisellExport/PisellExport.d.ts +11 -0
- package/lib/components/pisellExport/PisellExport.js +47 -0
- package/lib/components/pisellExport/PisellExport.less +141 -0
- package/lib/components/pisellExport/docs/pisellExport.$tab-design.md +116 -0
- package/lib/components/pisellExport/docs/pisellExport.$tab-dev.md +132 -0
- package/lib/components/pisellExport/docs/pisellExport.$tab-test.md +61 -0
- package/lib/components/pisellExport/docs/pisellExport.md +162 -0
- package/lib/components/pisellExport/index.d.ts +2 -0
- package/lib/components/pisellExport/types.d.ts +67 -0
- package/lib/components/pisellFilter/docs/PisellFilter.md +2 -2
- package/lib/components/pisellFind/docs/pisellFind.md +2 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.d.ts +1 -2
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.js +51 -230
- package/lib/components/pisellFloorMapLayout/PisellFloorMapLayout.less +0 -22
- package/lib/components/pisellFloorMapLayout/components/EditableItemLayer.js +2 -3
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.d.ts +2 -2
- package/lib/components/pisellFloorMapLayout/components/FigmaTableCard.js +74 -209
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditPanel.js +4 -39
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.js +11 -130
- package/lib/components/pisellFloorMapLayout/components/FloorMapEditTopBar.less +1 -9
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.js +2 -23
- package/lib/components/pisellFloorMapLayout/components/FloorMapToolbar.less +4 -97
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.js +9 -29
- package/lib/components/pisellFloorMapLayout/components/ItemLayer.less +2 -19
- package/lib/components/pisellFloorMapLayout/components/ViewControls.js +64 -118
- package/lib/components/pisellFloorMapLayout/components/ViewControls.less +44 -208
- package/lib/components/pisellFloorMapLayout/components/ViewControlsWithZoom.js +0 -4
- package/lib/components/pisellFloorMapLayout/context/mergeFloorMapLayoutContext.js +1 -3
- package/lib/components/pisellFloorMapLayout/docs/pisellFloorMapLayout.md +194 -559
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapEditState.js +16 -82
- package/lib/components/pisellFloorMapLayout/hooks/useFloorMapTransformMetrics.js +36 -369
- package/lib/components/pisellFloorMapLayout/index.d.ts +0 -1
- package/lib/components/pisellFloorMapLayout/locales-ja.js +1 -21
- package/lib/components/pisellFloorMapLayout/locales-pt.js +1 -21
- package/lib/components/pisellFloorMapLayout/locales.js +3 -63
- package/lib/components/pisellFloorMapLayout/types.d.ts +9 -70
- package/lib/components/pisellGoodPassCard/index.less +0 -1
- package/lib/components/pisellGridPro/GridView/docs/GridView.md +48 -47
- package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.$tab-dev.md +2 -4
- package/lib/components/pisellGridPro/ToolBar/docs/ToolBar.md +81 -95
- package/lib/components/pisellGridPro/ToolBar/index.less +4 -5
- package/lib/components/pisellGridPro/docs/PisellGridPro.md +262 -173
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-dev.md +6 -3
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.$tab-test.md +4 -3
- package/lib/components/pisellHierarchicalSummaryList/docs/pisellHierarchicalSummaryList.md +2 -1
- package/lib/components/pisellImport/PisellImport.d.ts +11 -0
- package/lib/components/pisellImport/PisellImport.js +84 -0
- package/lib/components/pisellImport/PisellImport.less +141 -0
- package/lib/components/pisellImport/docs/pisellImport.$tab-design.md +121 -0
- package/lib/components/pisellImport/docs/pisellImport.$tab-dev.md +137 -0
- package/lib/components/pisellImport/docs/pisellImport.$tab-test.md +69 -0
- package/lib/components/pisellImport/docs/pisellImport.md +174 -0
- package/lib/components/pisellImport/index.d.ts +2 -0
- package/lib/components/pisellImport/types.d.ts +89 -0
- package/lib/components/pisellLongText/PisellLongText.js +13 -6
- package/lib/components/pisellLongText/PisellLongText.less +0 -67
- package/lib/components/pisellLookup/PisellLookup.less +1 -1
- package/lib/components/pisellLookup/components/LookupTrigger.js +8 -6
- package/lib/components/pisellLookup/docs/pisellLookup.md +1 -1
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.js +6 -4
- package/lib/components/pisellMultipleSelect/PisellMultipleSelect.less +18 -139
- package/lib/components/pisellMultipleSelect/components/EditView.js +1 -0
- package/lib/components/pisellNavigationMenu/PisellNavigationMenu.js +4 -0
- package/lib/components/pisellNumber/PisellNumber.js +13 -6
- package/lib/components/pisellNumber/PisellNumber.less +0 -103
- package/lib/components/pisellPhone/PisellPhone.js +13 -6
- package/lib/components/pisellPhone/PisellPhone.less +0 -119
- package/lib/components/pisellPhone/components/EditView.js +37 -19
- package/lib/components/pisellPhone/constants/countryCodes.js +26 -25
- package/lib/components/pisellPhone/types.d.ts +2 -2
- package/lib/components/pisellPhone/utils/countryCodeHelper.js +2 -2
- package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.md +1 -1
- package/lib/components/pisellRating/PisellRating.js +4 -2
- package/lib/components/pisellRecordBoard/PisellRecordBoard.js +10 -26
- package/lib/components/pisellRecordBoard/README.md +0 -12
- package/lib/components/pisellRecordBoard/docs/PisellRecordBoard.md +70 -716
- package/lib/components/pisellRecordBoard/docs/ShellFrame.md +44 -62
- package/lib/components/pisellRecordBoard/index.d.ts +1 -7
- package/lib/components/pisellRecordBoard/index.js +0 -4
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.js +8 -146
- package/lib/components/pisellRecordBoard/layouts/GridLayout/Grid.less +0 -31
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendarDemo.js +3813 -0
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.d.ts +1 -5
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/PisellRecordBoardCalendarView.js +8 -11
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarPersistGuard.d.ts +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ColumnSetting/index.js +1 -2
- package/lib/components/pisellRecordBoard/shellFrame/Pagination/index.js +1 -7
- package/lib/components/pisellRecordBoard/shellFrame/Search/index.js +1 -1
- package/lib/components/pisellRecordBoard/shellFrame/ShellBodyMetaContext.d.ts +1 -5
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/index.js +78 -156
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolbar.less +13 -181
- package/lib/components/pisellRecordBoard/shellFrame/ToolBarQuickFilter/index.js +2 -10
- package/lib/components/pisellRecordBoard/shellFrame/index.d.ts +2 -9
- package/lib/components/pisellRecordBoard/shellFrame/index.js +19 -73
- package/lib/components/pisellRecordBoard/types.d.ts +8 -374
- package/lib/components/pisellRecordBoard/utils/partitionShellFrameChildren.js +0 -16
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.js +15 -67
- package/lib/components/pisellReservationSchedule/PisellReservationSchedule.less +0 -23
- package/lib/components/pisellReservationSchedule/locales.js +3 -21
- package/lib/components/pisellReservationSchedule/types.d.ts +0 -5
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.js +2 -2
- package/lib/components/pisellReservationScheduleBand/PisellReservationScheduleBand.less +4 -37
- package/lib/components/pisellReservationScheduleBand/types.d.ts +0 -4
- package/lib/components/pisellShellFrame/PisellShellFrame.js +2 -2
- package/lib/components/pisellShellFrame/PisellShellFrame.less +2 -18
- package/lib/components/pisellShellFrame/types.d.ts +0 -6
- package/lib/components/pisellSingleLineText/PisellSingleLineText.js +21 -14
- package/lib/components/pisellSingleLineText/PisellSingleLineText.less +0 -143
- package/lib/components/pisellSingleLineText/docs/pisellSingleLineText.md +256 -256
- package/lib/components/pisellSingleSelect/PisellSingleSelect.js +7 -4
- package/lib/components/pisellSingleSelect/PisellSingleSelect.less +5 -106
- package/lib/components/pisellSingleSelect/docs/pisellSingleSelect.md +525 -428
- package/lib/components/pisellSort/docs/PisellSort.md +67 -131
- package/lib/components/pisellStatisticList/index.js +1 -0
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.js +38 -152
- package/lib/components/pisellTimeNavigator/PisellTimeNavigator.less +13 -126
- package/lib/components/pisellTimeNavigator/components/CursorLayer.js +2 -2
- package/lib/components/pisellTimeNavigator/components/GestureLayer.js +3 -12
- package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-dev.md +42 -26
- package/lib/components/pisellTimeNavigator/docs/pisellTimeNavigator.$tab-test.md +5 -5
- package/lib/components/pisellTimeNavigator/index.d.ts +1 -1
- package/lib/components/pisellTimeNavigator/utils/index.d.ts +3 -9
- package/lib/components/pisellTimeNavigator/utils/index.js +5 -16
- package/lib/components/pisellTimeRangeDisplay/docs/pisellTimeRangeDisplay.md +227 -226
- package/lib/components/pisellUrl/PisellUrl.js +13 -6
- package/lib/components/pisellWalletPassCard/index.js +11 -5
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.js +8 -69
- package/lib/components/productCard/cartSkuCard/components/basicInfo/index.less +1 -80
- package/lib/components/productCard/cartSkuCard/components/holders/index.js +1 -1
- package/lib/components/productCard/cartSkuCard/components/packages/index.js +11 -26
- package/lib/components/productCard/cartSkuCard/components/specs/index.js +8 -23
- package/lib/components/productCard/cartSkuCard/components/specs/index.less +0 -11
- package/lib/components/productCard/cartSkuCard/components/timeRange/index.js +1 -2
- package/lib/components/productCard/cartSkuCard/index.js +8 -68
- package/lib/components/productCard/cartSkuCard/locales.js +5 -40
- package/lib/components/productCard/components/Header/Actions/index.less +15 -0
- package/lib/components/productCard/components/Header/DeleteButton/index.js +2 -2
- package/lib/components/productCard/components/Header/DeleteButton/index.less +2 -1
- package/lib/components/productCard/components/Header/EditButton/index.js +1 -2
- package/lib/components/productCard/components/Header/index.less +1 -1
- package/lib/components/productCard/components/Time/components/SelectHolder/index.js +3 -2
- package/lib/components/productCard/components/Time/components/SelectHolderModal/index.js +5 -5
- package/lib/components/productCard/components/Time/components/SelectHolderMultiple/index.js +2 -2
- package/lib/components/productCard/components/Time/components/SelectResource/index.js +6 -3
- package/lib/components/productCard/components/Time/index.js +3 -2
- package/lib/components/productCard/status.js +0 -3
- package/lib/components/productCard/types.d.ts +0 -10
- package/lib/components/productCard/utils.js +1 -1
- package/lib/components/select-time/index.js +0 -1
- package/lib/components/table/Actions/component/ExportImport/index.js +3 -4
- package/lib/components/table/Actions/component/GallerySetting/index.js +12 -11
- package/lib/components/table/Actions/component/ViewMode/index.js +6 -5
- package/lib/components/table/Actions/index.js +1 -1
- package/lib/components/table/BasicTable/index.js +4 -3
- package/lib/components/table/Gallery/components/GalleryItem/components/Title/index.less +1 -1
- package/lib/components/table/Gallery/components/GalleryItem/index.js +17 -9
- package/lib/components/table/Gallery/components/GalleryItem/index.less +1 -0
- package/lib/components/table/Gallery/index.js +11 -3
- package/lib/components/table/Table/fields/text/Show/index.js +1 -1
- package/lib/components/table/Table/index.js +2 -1
- package/lib/components/table/Table/tableConfig/header/index.js +2 -2
- package/lib/components/table/Table/utils.js +5 -1
- package/lib/components/table/hooks/useTableSetting.js +3 -0
- package/lib/components/table/hooks/useTransDataSource.js +4 -3
- package/lib/components/table/index.js +1 -1
- package/lib/components/tabs/index.less +1 -1
- package/lib/components/translation/index.d.ts +1 -0
- package/lib/components/translation/index.js +35 -9
- package/lib/components/translation/index.less +12 -0
- package/lib/components/versionModal/index.d.ts +1 -0
- package/lib/components/versionModal/index.js +2 -2
- package/lib/components/versionSelect/index.js +4 -4
- package/lib/components/virtual-keyboard/Amount/index.js +5 -4
- package/lib/components/virtual-keyboard/Amount/types.d.ts +1 -0
- package/lib/index.d.ts +105 -94
- package/lib/index.js +298 -299
- package/lib/locales/en-US.js +69 -191
- package/lib/locales/ja.js +12 -192
- package/lib/locales/pt.js +12 -192
- package/lib/locales/zh-CN.js +63 -185
- package/lib/locales/zh-TW.js +68 -190
- package/lib/pisell-materials.tw.css +1 -2414
- package/lib/tailwind-input.css +1 -3
- package/lib/theme/pisell-components.js +76 -0
- package/lowcode/pisell-time-navigator/meta.ts +10 -0
- package/package.json +3 -2
- package/es/components/SafeAreaTop/index.d.ts +0 -6
- package/es/components/SafeAreaTop/index.js +0 -112
- package/es/components/SafeAreaTop/index.less +0 -11
- package/es/components/SafeAreaTop/types.d.ts +0 -13
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -4
- package/es/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +0 -22
- package/es/components/pisellFloorMapLayout/components/HistoryIcons.js +0 -64
- package/es/components/pisellFloorMapLayout/floorMapLayoutConstants.js +0 -7
- package/es/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +0 -47
- package/es/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +0 -95
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -52
- package/es/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +0 -61
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +0 -758
- package/es/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +0 -313
- package/es/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +0 -191
- package/es/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +0 -22
- package/es/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +0 -39
- package/es/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +0 -74
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +0 -61
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +0 -26
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +0 -79
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +0 -48
- package/es/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +0 -37
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +0 -20
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +0 -532
- package/es/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +0 -17
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +0 -31
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +0 -583
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +0 -41
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +0 -111
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +0 -612
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +0 -162
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +0 -8
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +0 -33
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +0 -37
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +0 -18
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +0 -33
- package/es/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +0 -29
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +0 -43
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +0 -14
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +0 -436
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +0 -11
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +0 -9
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +0 -179
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +0 -62
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -57
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +0 -45
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +0 -91
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +0 -218
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +0 -339
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +0 -52
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +0 -153
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +0 -32
- package/es/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +0 -170
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +0 -11
- package/es/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +0 -56
- package/es/components/pisellRecordBoard/types.js +0 -12
- package/es/components/pisellTimeNavigator/timeNavigatorConstants.js +0 -7
- package/es/components/productCard/cartSkuCard/components/Gift/index.js +0 -34
- package/es/components/productCard/cartSkuCard/components/Gift/index.less +0 -84
- package/es/components/productCard/cartSkuCard/components/Promotion/index.js +0 -23
- package/es/components/productCard/cartSkuCard/components/Promotion/index.less +0 -16
- package/es/components/productCard/cartSkuCard/components/weighing/index.js +0 -27
- package/es/components/productCard/cartSkuCard/components/weighing/index.less +0 -25
- package/lib/components/SafeAreaTop/index.d.ts +0 -6
- package/lib/components/SafeAreaTop/index.js +0 -115
- package/lib/components/SafeAreaTop/index.less +0 -11
- package/lib/components/SafeAreaTop/types.d.ts +0 -13
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.d.ts +0 -4
- package/lib/components/pisellFloorMapLayout/appearance/floorMapAppearance.js +0 -22
- package/lib/components/pisellFloorMapLayout/components/HistoryIcons.js +0 -67
- package/lib/components/pisellFloorMapLayout/floorMapLayoutConstants.js +0 -7
- package/lib/components/pisellFloorMapLayout/hooks/floorMapViewportPersistence.js +0 -52
- package/lib/components/pisellFloorMapLayout/hooks/useDraftConfigHistory.js +0 -96
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.d.ts +0 -52
- package/lib/components/pisellFloorMapLayout/utils/floorMapElementNameAsTitle.js +0 -64
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.js +0 -760
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/BookingCalendar.less +0 -313
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/bookingCalendarViewShared.js +0 -197
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/calendarI18n.js +0 -23
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/const/bookingCalendarConstants.js +0 -44
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/hooks/useBookingCalendarDayOverlayLayout.js +0 -75
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarBlockPanel.js +0 -63
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/BookingCalendarOverflowListLayer.js +0 -28
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/MoveConfirmModal.js +0 -81
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowListModal.js +0 -50
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/modal/OverflowPopover.js +0 -39
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/BookingCalendarStyle.js +0 -21
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarDateUtils.js +0 -562
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/utils/bookingCalendarSelectionUtils.js +0 -17
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDaySelectionBar.js +0 -33
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarDayView.js +0 -585
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarGroupRowHeader.js +0 -43
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarMonthView.js +0 -113
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarResourceView.js +0 -614
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/BookingCalendarWeekView.js +0 -164
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/bookingCalendarDayViewContext.js +0 -10
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDayHourRemaining.js +0 -34
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/day/useBookingCalendarDaySelection.js +0 -38
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceCellToggle.js +0 -19
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/resource/useBookingCalendarResourceDayHeaderRemaining.js +0 -34
- package/lib/components/pisellRecordBoard/shellFrame/Calendar/view/useBookingCalendarGoToDayFromCell.js +0 -30
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/NoteTicker.js +0 -45
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.d.ts +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/PisellRecordBoardResourceWallView.js +0 -439
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.d.ts +0 -11
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/RecordBoardResourceWall.js +0 -9
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanel.js +0 -181
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelColorTab.js +0 -64
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallControlPanelLayoutTab.js +0 -57
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewport.less +0 -45
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/ResourceWallViewportToolbar.js +0 -93
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.js +0 -220
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallCard.less +0 -339
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/VenueWallMarquee.less +0 -52
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallCardPresentation.js +0 -153
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.d.ts +0 -32
- package/lib/components/pisellRecordBoard/shellFrame/ResourceWall/venueWallUtils.js +0 -181
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarConstants.js +0 -14
- package/lib/components/pisellRecordBoard/shellFrame/ToolBar/recordBoardToolBarI18n.js +0 -63
- package/lib/components/pisellRecordBoard/types.js +0 -12
- package/lib/components/pisellTimeNavigator/timeNavigatorConstants.js +0 -7
- package/lib/components/productCard/cartSkuCard/components/Gift/index.js +0 -36
- package/lib/components/productCard/cartSkuCard/components/Gift/index.less +0 -84
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.js +0 -25
- package/lib/components/productCard/cartSkuCard/components/Promotion/index.less +0 -16
- package/lib/components/productCard/cartSkuCard/components/weighing/index.js +0 -29
- package/lib/components/productCard/cartSkuCard/components/weighing/index.less +0 -25
- /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-design.md +0 -0
- /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-dev.md +0 -0
- /package/es/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-test.md +0 -0
- /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-design.md +0 -0
- /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-dev.md +0 -0
- /package/lib/components/pisellQuickFilter/{docs → doc}/PisellQuickFilter.$tab-test.md +0 -0
|
@@ -3,7 +3,7 @@ nav:
|
|
|
3
3
|
title: 组件
|
|
4
4
|
order: 1
|
|
5
5
|
group:
|
|
6
|
-
title:
|
|
6
|
+
title: Form Fields
|
|
7
7
|
order: 1
|
|
8
8
|
title: PisellSingleSelect
|
|
9
9
|
order: 1
|
|
@@ -12,92 +12,134 @@ category: pro
|
|
|
12
12
|
|
|
13
13
|
# PisellSingleSelect 单选下拉组件
|
|
14
14
|
|
|
15
|
-
|
|
15
|
+
PisellSingleSelect 是基于 Ant Design Select 封装的单选表单组件,提供只读/编辑/禁用三种状态、搜索过滤、受控与非受控模式,适用于表单与表格中的单选场景。
|
|
16
16
|
|
|
17
|
-
|
|
18
|
-
设计规范的单选功能、搜索过滤、状态管理等核心能力,适用于各种单选场景。
|
|
17
|
+
## 何时使用
|
|
19
18
|
|
|
20
|
-
|
|
19
|
+
- 表单中需要单选一项(分类、状态、城市等)
|
|
20
|
+
- 表格列中需要只读展示选项文案
|
|
21
|
+
- 需要带搜索、清空、必填校验的单选控件
|
|
21
22
|
|
|
22
|
-
|
|
23
|
-
- ✅ 搜索与过滤:支持防抖搜索和自定义过滤逻辑
|
|
24
|
-
- ✅ 完整的状态管理:受控和非受控模式
|
|
25
|
-
- ✅ 样式定制:基于 Token 系统和 Less
|
|
26
|
-
- ✅ 基于 Ant Design Select 开发
|
|
27
|
-
- ✅ 复用逻辑抽取到 @pisell/utils
|
|
23
|
+
## 特性
|
|
28
24
|
|
|
29
|
-
|
|
25
|
+
- 三种交互状态:只读、编辑、禁用
|
|
26
|
+
- 搜索与过滤:支持防抖搜索和自定义 `filterOption`
|
|
27
|
+
- 受控与非受控模式
|
|
28
|
+
- 样式:Token、Less、className/style
|
|
29
|
+
- 基于 Ant Design Select,逻辑复用 @pisell/utils
|
|
30
30
|
|
|
31
31
|
## 基础用法
|
|
32
32
|
|
|
33
|
-
###
|
|
33
|
+
### 受控模式
|
|
34
34
|
|
|
35
35
|
```tsx
|
|
36
|
-
import {
|
|
37
|
-
import {
|
|
36
|
+
import React, { useState } from 'react';
|
|
37
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
38
38
|
|
|
39
39
|
const fruitOptions = [
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
40
|
+
{ value: 'apple', label: '苹果' },
|
|
41
|
+
{ value: 'banana', label: '香蕉' },
|
|
42
|
+
{ value: 'orange', label: '橙子' },
|
|
43
43
|
];
|
|
44
44
|
|
|
45
45
|
export default () => {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
}
|
|
46
|
+
const [value, setValue] = useState<string | null>(null);
|
|
47
|
+
return (
|
|
48
|
+
<PisellSingleSelect
|
|
49
|
+
options={fruitOptions}
|
|
50
|
+
value={value}
|
|
51
|
+
onChange={(val) => setValue(val)}
|
|
52
|
+
placeholder="请选择一种水果"
|
|
53
|
+
/>
|
|
54
|
+
);
|
|
55
|
+
};
|
|
57
56
|
```
|
|
58
57
|
|
|
59
58
|
### 非受控模式
|
|
60
59
|
|
|
61
|
-
```
|
|
62
|
-
|
|
60
|
+
```tsx
|
|
61
|
+
import React from 'react';
|
|
62
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
63
|
+
|
|
64
|
+
const fruitOptions = [
|
|
65
|
+
{ value: 'apple', label: '苹果' },
|
|
66
|
+
{ value: 'banana', label: '香蕉' },
|
|
67
|
+
{ value: 'orange', label: '橙子' },
|
|
68
|
+
];
|
|
69
|
+
|
|
70
|
+
export default () => (
|
|
71
|
+
<PisellSingleSelect
|
|
63
72
|
options={fruitOptions}
|
|
64
73
|
defaultValue="apple"
|
|
65
74
|
placeholder="请选择"
|
|
66
|
-
/>
|
|
75
|
+
/>
|
|
76
|
+
);
|
|
67
77
|
```
|
|
68
78
|
|
|
69
79
|
### 带标签和辅助文本
|
|
70
80
|
|
|
71
|
-
```
|
|
72
|
-
|
|
81
|
+
```tsx
|
|
82
|
+
import React from 'react';
|
|
83
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
84
|
+
|
|
85
|
+
const fruitOptions = [
|
|
86
|
+
{ value: 'apple', label: '苹果' },
|
|
87
|
+
{ value: 'banana', label: '香蕉' },
|
|
88
|
+
{ value: 'orange', label: '橙子' },
|
|
89
|
+
];
|
|
90
|
+
|
|
91
|
+
export default () => (
|
|
92
|
+
<PisellSingleSelect
|
|
73
93
|
options={fruitOptions}
|
|
74
94
|
label="最爱水果"
|
|
75
95
|
helperText="请选择你最喜欢的水果"
|
|
76
96
|
placeholder="请选择"
|
|
77
97
|
required
|
|
78
|
-
/>
|
|
98
|
+
/>
|
|
99
|
+
);
|
|
79
100
|
```
|
|
80
101
|
|
|
81
102
|
### 只读态展示
|
|
82
103
|
|
|
83
|
-
```
|
|
84
|
-
|
|
104
|
+
```tsx
|
|
105
|
+
import React from 'react';
|
|
106
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
107
|
+
|
|
108
|
+
const fruitOptions = [
|
|
109
|
+
{ value: 'apple', label: '苹果' },
|
|
110
|
+
{ value: 'banana', label: '香蕉' },
|
|
111
|
+
{ value: 'orange', label: '橙子' },
|
|
112
|
+
];
|
|
113
|
+
|
|
114
|
+
export default () => (
|
|
115
|
+
<PisellSingleSelect
|
|
85
116
|
options={fruitOptions}
|
|
86
117
|
value="apple"
|
|
87
118
|
readOnly
|
|
88
119
|
label="已选择的水果"
|
|
89
|
-
/>
|
|
90
|
-
|
|
120
|
+
/>
|
|
121
|
+
);
|
|
91
122
|
```
|
|
92
123
|
|
|
93
124
|
### 禁用态
|
|
94
125
|
|
|
95
|
-
```
|
|
96
|
-
|
|
126
|
+
```tsx
|
|
127
|
+
import React from 'react';
|
|
128
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
129
|
+
|
|
130
|
+
const fruitOptions = [
|
|
131
|
+
{ value: 'apple', label: '苹果' },
|
|
132
|
+
{ value: 'banana', label: '香蕉' },
|
|
133
|
+
{ value: 'orange', label: '橙子' },
|
|
134
|
+
];
|
|
135
|
+
|
|
136
|
+
export default () => (
|
|
137
|
+
<PisellSingleSelect
|
|
97
138
|
options={fruitOptions}
|
|
98
139
|
value="apple"
|
|
99
140
|
disabled
|
|
100
|
-
/>
|
|
141
|
+
/>
|
|
142
|
+
);
|
|
101
143
|
```
|
|
102
144
|
|
|
103
145
|
---
|
|
@@ -106,46 +148,84 @@ export default () => {
|
|
|
106
148
|
|
|
107
149
|
### 基础搜索
|
|
108
150
|
|
|
109
|
-
```
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
151
|
+
```tsx
|
|
152
|
+
import React, { useState } from 'react';
|
|
153
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
154
|
+
|
|
155
|
+
const cityOptions = [
|
|
156
|
+
{ value: 'beijing', label: '北京' },
|
|
157
|
+
{ value: 'shanghai', label: '上海' },
|
|
158
|
+
{ value: 'guangzhou', label: '广州' },
|
|
159
|
+
{ value: 'shenzhen', label: '深圳' },
|
|
160
|
+
];
|
|
161
|
+
|
|
162
|
+
export default () => {
|
|
163
|
+
const [value, setValue] = useState<string | null>(null);
|
|
164
|
+
return (
|
|
165
|
+
<PisellSingleSelect
|
|
166
|
+
options={cityOptions}
|
|
167
|
+
label="选择城市"
|
|
168
|
+
placeholder="搜索城市..."
|
|
169
|
+
showSearch
|
|
170
|
+
value={value}
|
|
171
|
+
onChange={setValue}
|
|
172
|
+
/>
|
|
173
|
+
);
|
|
174
|
+
};
|
|
118
175
|
```
|
|
119
176
|
|
|
120
177
|
### 自定义过滤逻辑
|
|
121
178
|
|
|
122
|
-
```
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
179
|
+
```tsx
|
|
180
|
+
import React, { useState } from 'react';
|
|
181
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
182
|
+
|
|
183
|
+
const cityOptions = [
|
|
184
|
+
{ value: 'beijing', label: '北京' },
|
|
185
|
+
{ value: 'shanghai', label: '上海' },
|
|
186
|
+
{ value: 'guangzhou', label: '广州' },
|
|
187
|
+
{ value: 'shenzhen', label: '深圳' },
|
|
188
|
+
];
|
|
189
|
+
|
|
190
|
+
export default () => {
|
|
191
|
+
const [value, setValue] = useState<string | null>(null);
|
|
192
|
+
return (
|
|
193
|
+
<PisellSingleSelect
|
|
194
|
+
options={cityOptions}
|
|
195
|
+
label="选择城市"
|
|
196
|
+
placeholder="输入城市名..."
|
|
197
|
+
showSearch
|
|
198
|
+
value={value}
|
|
199
|
+
onChange={setValue}
|
|
200
|
+
filterOption={(input, option) =>
|
|
201
|
+
option.label.toLowerCase().includes(input.toLowerCase()) ||
|
|
202
|
+
String(option.value).includes(input)
|
|
203
|
+
}
|
|
204
|
+
/>
|
|
205
|
+
);
|
|
206
|
+
};
|
|
136
207
|
```
|
|
137
208
|
|
|
138
209
|
### 搜索回调
|
|
139
210
|
|
|
140
|
-
```
|
|
141
|
-
|
|
211
|
+
```tsx
|
|
212
|
+
import React from 'react';
|
|
213
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
214
|
+
|
|
215
|
+
const options = [
|
|
216
|
+
{ value: 'a', label: '选项 A' },
|
|
217
|
+
{ value: 'b', label: '选项 B' },
|
|
218
|
+
];
|
|
219
|
+
|
|
220
|
+
export default () => (
|
|
221
|
+
<PisellSingleSelect
|
|
142
222
|
options={options}
|
|
143
223
|
showSearch
|
|
144
224
|
onSearch={(keyword) => {
|
|
145
|
-
|
|
146
|
-
// 可以在这里触发远程搜索
|
|
225
|
+
console.log('搜索关键词:', keyword);
|
|
147
226
|
}}
|
|
148
|
-
/>
|
|
227
|
+
/>
|
|
228
|
+
);
|
|
149
229
|
```
|
|
150
230
|
|
|
151
231
|
---
|
|
@@ -154,51 +234,70 @@ export default () => {
|
|
|
154
234
|
|
|
155
235
|
### 显示错误状态
|
|
156
236
|
|
|
157
|
-
```
|
|
158
|
-
|
|
237
|
+
```tsx
|
|
238
|
+
import React from 'react';
|
|
239
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
240
|
+
|
|
241
|
+
const fruitOptions = [
|
|
242
|
+
{ value: 'apple', label: '苹果' },
|
|
243
|
+
{ value: 'banana', label: '香蕉' },
|
|
244
|
+
{ value: 'orange', label: '橙子' },
|
|
245
|
+
];
|
|
246
|
+
|
|
247
|
+
export default () => (
|
|
248
|
+
<PisellSingleSelect
|
|
159
249
|
options={fruitOptions}
|
|
160
250
|
label="选择水果"
|
|
161
251
|
value={null}
|
|
162
252
|
required
|
|
163
253
|
error
|
|
164
254
|
errorText="此项为必填项,请选择"
|
|
165
|
-
/>
|
|
255
|
+
/>
|
|
256
|
+
);
|
|
166
257
|
```
|
|
167
258
|
|
|
168
259
|
### 表单校验场景
|
|
169
260
|
|
|
170
|
-
```
|
|
261
|
+
```tsx
|
|
262
|
+
import React, { useState } from 'react';
|
|
263
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
264
|
+
|
|
265
|
+
const fruitOptions = [
|
|
266
|
+
{ value: 'apple', label: '苹果' },
|
|
267
|
+
{ value: 'banana', label: '香蕉' },
|
|
268
|
+
{ value: 'orange', label: '橙子' },
|
|
269
|
+
];
|
|
270
|
+
|
|
171
271
|
export default () => {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
}
|
|
272
|
+
const [value, setValue] = useState<string | null>(null);
|
|
273
|
+
const [error, setError] = useState(false);
|
|
274
|
+
|
|
275
|
+
const handleSubmit = () => {
|
|
276
|
+
if (!value) setError(true);
|
|
277
|
+
else {
|
|
278
|
+
setError(false);
|
|
279
|
+
console.log('提交值:', value);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
return (
|
|
284
|
+
<div>
|
|
285
|
+
<PisellSingleSelect
|
|
286
|
+
options={fruitOptions}
|
|
287
|
+
label="选择水果(必填)"
|
|
288
|
+
value={value}
|
|
289
|
+
onChange={(val) => {
|
|
290
|
+
setValue(val);
|
|
291
|
+
setError(false);
|
|
292
|
+
}}
|
|
293
|
+
required
|
|
294
|
+
error={error}
|
|
295
|
+
errorText="请选择一个选项"
|
|
296
|
+
/>
|
|
297
|
+
<button type="button" onClick={handleSubmit}>提交</button>
|
|
298
|
+
</div>
|
|
299
|
+
);
|
|
300
|
+
};
|
|
202
301
|
```
|
|
203
302
|
|
|
204
303
|
---
|
|
@@ -207,26 +306,48 @@ export default () => {
|
|
|
207
306
|
|
|
208
307
|
### 清空按钮
|
|
209
308
|
|
|
210
|
-
```
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
309
|
+
```tsx
|
|
310
|
+
import React, { useState } from 'react';
|
|
311
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
312
|
+
|
|
313
|
+
const fruitOptions = [
|
|
314
|
+
{ value: 'apple', label: '苹果' },
|
|
315
|
+
{ value: 'banana', label: '香蕉' },
|
|
316
|
+
{ value: 'orange', label: '橙子' },
|
|
317
|
+
];
|
|
318
|
+
|
|
319
|
+
export default () => {
|
|
320
|
+
const [value, setValue] = useState<string | null>(null);
|
|
321
|
+
return (
|
|
322
|
+
<PisellSingleSelect
|
|
323
|
+
options={fruitOptions}
|
|
324
|
+
value={value}
|
|
325
|
+
onChange={setValue}
|
|
326
|
+
allowClear
|
|
327
|
+
/>
|
|
328
|
+
);
|
|
329
|
+
};
|
|
217
330
|
```
|
|
218
331
|
|
|
219
332
|
### 不同尺寸
|
|
220
333
|
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
|
|
334
|
+
```tsx
|
|
335
|
+
import React from 'react';
|
|
336
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
224
337
|
|
|
225
|
-
|
|
226
|
-
|
|
338
|
+
const fruitOptions = [
|
|
339
|
+
{ value: 'apple', label: '苹果' },
|
|
340
|
+
{ value: 'banana', label: '香蕉' },
|
|
341
|
+
{ value: 'orange', label: '橙子' },
|
|
342
|
+
];
|
|
227
343
|
|
|
228
|
-
|
|
229
|
-
<
|
|
344
|
+
export default () => (
|
|
345
|
+
<div style={{ display: 'flex', gap: 16, flexWrap: 'wrap' }}>
|
|
346
|
+
<PisellSingleSelect options={fruitOptions} size="small" placeholder="小" />
|
|
347
|
+
<PisellSingleSelect options={fruitOptions} size="medium" placeholder="中" />
|
|
348
|
+
<PisellSingleSelect options={fruitOptions} size="large" placeholder="大" />
|
|
349
|
+
</div>
|
|
350
|
+
);
|
|
230
351
|
```
|
|
231
352
|
|
|
232
353
|
---
|
|
@@ -235,39 +356,68 @@ export default () => {
|
|
|
235
356
|
|
|
236
357
|
### 值变化回调
|
|
237
358
|
|
|
238
|
-
```
|
|
239
|
-
|
|
359
|
+
```tsx
|
|
360
|
+
import React from 'react';
|
|
361
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
362
|
+
|
|
363
|
+
const fruitOptions = [
|
|
364
|
+
{ value: 'apple', label: '苹果' },
|
|
365
|
+
{ value: 'banana', label: '香蕉' },
|
|
366
|
+
{ value: 'orange', label: '橙子' },
|
|
367
|
+
];
|
|
368
|
+
|
|
369
|
+
export default () => (
|
|
370
|
+
<PisellSingleSelect
|
|
240
371
|
options={fruitOptions}
|
|
241
372
|
onChange={(value, option) => {
|
|
242
|
-
|
|
243
|
-
|
|
373
|
+
console.log('选中值:', value);
|
|
374
|
+
console.log('选中选项:', option);
|
|
244
375
|
}}
|
|
245
|
-
/>
|
|
376
|
+
/>
|
|
377
|
+
);
|
|
246
378
|
```
|
|
247
379
|
|
|
248
380
|
### 焦点事件
|
|
249
381
|
|
|
250
|
-
```
|
|
251
|
-
|
|
382
|
+
```tsx
|
|
383
|
+
import React from 'react';
|
|
384
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
385
|
+
|
|
386
|
+
const fruitOptions = [
|
|
387
|
+
{ value: 'apple', label: '苹果' },
|
|
388
|
+
{ value: 'banana', label: '香蕉' },
|
|
389
|
+
{ value: 'orange', label: '橙子' },
|
|
390
|
+
];
|
|
391
|
+
|
|
392
|
+
export default () => (
|
|
393
|
+
<PisellSingleSelect
|
|
252
394
|
options={fruitOptions}
|
|
253
|
-
onFocus={(
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
console.log('失去焦点');
|
|
258
|
-
}}
|
|
259
|
-
/>
|
|
395
|
+
onFocus={() => console.log('获得焦点')}
|
|
396
|
+
onBlur={() => console.log('失去焦点')}
|
|
397
|
+
/>
|
|
398
|
+
);
|
|
260
399
|
```
|
|
261
400
|
|
|
262
401
|
### 下拉框显隐
|
|
263
402
|
|
|
264
|
-
```
|
|
265
|
-
|
|
403
|
+
```tsx
|
|
404
|
+
import React from 'react';
|
|
405
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
406
|
+
|
|
407
|
+
const fruitOptions = [
|
|
408
|
+
{ value: 'apple', label: '苹果' },
|
|
409
|
+
{ value: 'banana', label: '香蕉' },
|
|
410
|
+
{ value: 'orange', label: '橙子' },
|
|
411
|
+
];
|
|
412
|
+
|
|
413
|
+
export default () => (
|
|
414
|
+
<PisellSingleSelect
|
|
266
415
|
options={fruitOptions}
|
|
267
416
|
onDropdownVisibleChange={(visible) => {
|
|
268
|
-
|
|
417
|
+
console.log('下拉框', visible ? '打开' : '关闭');
|
|
269
418
|
}}
|
|
270
|
-
/>
|
|
419
|
+
/>
|
|
420
|
+
);
|
|
271
421
|
```
|
|
272
422
|
|
|
273
423
|
---
|
|
@@ -277,55 +427,53 @@ export default () => {
|
|
|
277
427
|
### 在 Form 中使用
|
|
278
428
|
|
|
279
429
|
```tsx
|
|
280
|
-
import {
|
|
281
|
-
import {
|
|
282
|
-
import {
|
|
430
|
+
import React, { useState } from 'react';
|
|
431
|
+
import { Form } from 'antd';
|
|
432
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
283
433
|
|
|
284
434
|
const fruitOptions = [
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
435
|
+
{ value: 'apple', label: '苹果' },
|
|
436
|
+
{ value: 'banana', label: '香蕉' },
|
|
437
|
+
{ value: 'orange', label: '橙子' },
|
|
288
438
|
];
|
|
289
439
|
|
|
290
440
|
const cityOptions = [
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
// ... 更多城市
|
|
441
|
+
{ value: 'beijing', label: '北京' },
|
|
442
|
+
{ value: 'shanghai', label: '上海' },
|
|
443
|
+
{ value: 'guangzhou', label: '广州' },
|
|
444
|
+
{ value: 'shenzhen', label: '深圳' },
|
|
445
|
+
{ value: 'chengdu', label: '成都' },
|
|
446
|
+
{ value: 'hangzhou', label: '杭州' },
|
|
298
447
|
];
|
|
299
448
|
|
|
300
449
|
export default () => {
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
}
|
|
450
|
+
const [fruit, setFruit] = useState<string | null>(null);
|
|
451
|
+
const [city, setCity] = useState<string | null>(null);
|
|
452
|
+
|
|
453
|
+
return (
|
|
454
|
+
<Form layout="vertical" style={{ maxWidth: 400 }}>
|
|
455
|
+
<Form.Item label="最爱水果(必填)">
|
|
456
|
+
<PisellSingleSelect
|
|
457
|
+
options={fruitOptions}
|
|
458
|
+
value={fruit}
|
|
459
|
+
onChange={setFruit}
|
|
460
|
+
placeholder="请选择水果"
|
|
461
|
+
required
|
|
462
|
+
/>
|
|
463
|
+
</Form.Item>
|
|
464
|
+
<Form.Item label="所在城市">
|
|
465
|
+
<PisellSingleSelect
|
|
466
|
+
options={cityOptions}
|
|
467
|
+
value={city}
|
|
468
|
+
onChange={setCity}
|
|
469
|
+
placeholder="请选择城市"
|
|
470
|
+
showSearch
|
|
471
|
+
allowClear
|
|
472
|
+
/>
|
|
473
|
+
</Form.Item>
|
|
474
|
+
</Form>
|
|
475
|
+
);
|
|
476
|
+
};
|
|
329
477
|
```
|
|
330
478
|
|
|
331
479
|
---
|
|
@@ -335,41 +483,37 @@ export default () => {
|
|
|
335
483
|
### 表格列中使用(只读态)
|
|
336
484
|
|
|
337
485
|
```tsx
|
|
338
|
-
import
|
|
339
|
-
import {
|
|
486
|
+
import React from 'react';
|
|
487
|
+
import { Table } from 'antd';
|
|
488
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
340
489
|
|
|
341
490
|
const statusOptions = [
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
491
|
+
{ value: 'active', label: '激活' },
|
|
492
|
+
{ value: 'inactive', label: '未激活' },
|
|
493
|
+
{ value: 'pending', label: '待审核' },
|
|
345
494
|
];
|
|
346
495
|
|
|
347
496
|
const columns = [
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
/>
|
|
361
|
-
),
|
|
362
|
-
},
|
|
497
|
+
{ title: '用户名', dataIndex: 'name' },
|
|
498
|
+
{
|
|
499
|
+
title: '状态',
|
|
500
|
+
dataIndex: 'status',
|
|
501
|
+
render: (value: string) => (
|
|
502
|
+
<PisellSingleSelect
|
|
503
|
+
options={statusOptions}
|
|
504
|
+
value={value}
|
|
505
|
+
readOnly
|
|
506
|
+
/>
|
|
507
|
+
),
|
|
508
|
+
},
|
|
363
509
|
];
|
|
364
510
|
|
|
365
511
|
const dataSource = [
|
|
366
|
-
|
|
367
|
-
|
|
512
|
+
{ id: 1, name: '张三', status: 'active' },
|
|
513
|
+
{ id: 2, name: '李四', status: 'pending' },
|
|
368
514
|
];
|
|
369
515
|
|
|
370
|
-
export default () => {
|
|
371
|
-
return <Table dataSource={dataSource} columns={columns}/>;
|
|
372
|
-
}
|
|
516
|
+
export default () => <Table dataSource={dataSource} columns={columns} rowKey="id" />;
|
|
373
517
|
```
|
|
374
518
|
|
|
375
519
|
---
|
|
@@ -379,45 +523,27 @@ export default () => {
|
|
|
379
523
|
### 使用 Ref 控制组件
|
|
380
524
|
|
|
381
525
|
```tsx
|
|
382
|
-
import {useRef} from 'react';
|
|
383
|
-
import {PisellSingleSelect} from '@pisell/materials';
|
|
384
|
-
import type {SingleSelectRef} from '@pisell/materials';
|
|
526
|
+
import React, { useRef } from 'react';
|
|
527
|
+
import { PisellSingleSelect, type SingleSelectRef } from '@pisell/materials';
|
|
385
528
|
|
|
386
529
|
const fruitOptions = [
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
530
|
+
{ value: 'apple', label: '苹果' },
|
|
531
|
+
{ value: 'banana', label: '香蕉' },
|
|
532
|
+
{ value: 'orange', label: '橙子' },
|
|
390
533
|
];
|
|
391
534
|
|
|
392
|
-
|
|
393
535
|
export default () => {
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
404
|
-
|
|
405
|
-
const currentValue = selectRef.current?.getValue();
|
|
406
|
-
console.log('当前值:', currentValue);
|
|
407
|
-
};
|
|
408
|
-
|
|
409
|
-
return (
|
|
410
|
-
<div>
|
|
411
|
-
<PisellSingleSelect
|
|
412
|
-
ref={selectRef}
|
|
413
|
-
options={fruitOptions}
|
|
414
|
-
/>
|
|
415
|
-
<button onClick={handleFocus}>聚焦</button>
|
|
416
|
-
<button onClick={handleClear}>清空</button>
|
|
417
|
-
<button onClick={handleGetValue}>获取值</button>
|
|
418
|
-
</div>
|
|
419
|
-
);
|
|
420
|
-
}
|
|
536
|
+
const selectRef = useRef<SingleSelectRef>(null);
|
|
537
|
+
|
|
538
|
+
return (
|
|
539
|
+
<div style={{ display: 'flex', gap: 8, alignItems: 'center', flexWrap: 'wrap' }}>
|
|
540
|
+
<PisellSingleSelect ref={selectRef} options={fruitOptions} />
|
|
541
|
+
<button type="button" onClick={() => selectRef.current?.focus()}>聚焦</button>
|
|
542
|
+
<button type="button" onClick={() => selectRef.current?.clearValue()}>清空</button>
|
|
543
|
+
<button type="button" onClick={() => console.log(selectRef.current?.getValue())}>获取值</button>
|
|
544
|
+
</div>
|
|
545
|
+
);
|
|
546
|
+
};
|
|
421
547
|
```
|
|
422
548
|
|
|
423
549
|
---
|
|
@@ -426,79 +552,80 @@ export default () => {
|
|
|
426
552
|
|
|
427
553
|
### 自定义类名和样式
|
|
428
554
|
|
|
429
|
-
```
|
|
430
|
-
|
|
555
|
+
```tsx
|
|
556
|
+
import React from 'react';
|
|
557
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
558
|
+
|
|
559
|
+
const fruitOptions = [
|
|
560
|
+
{ value: 'apple', label: '苹果' },
|
|
561
|
+
{ value: 'banana', label: '香蕉' },
|
|
562
|
+
{ value: 'orange', label: '橙子' },
|
|
563
|
+
];
|
|
564
|
+
|
|
565
|
+
export default () => (
|
|
566
|
+
<PisellSingleSelect
|
|
431
567
|
options={fruitOptions}
|
|
432
568
|
className="custom-select"
|
|
433
|
-
style={{width: 300}}
|
|
434
|
-
/>
|
|
569
|
+
style={{ width: 300 }}
|
|
570
|
+
/>
|
|
571
|
+
);
|
|
435
572
|
```
|
|
436
573
|
|
|
437
574
|
### 通过 Token 定制(全局)
|
|
438
575
|
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
```
|
|
442
|
-
Select: {
|
|
443
|
-
fontSize: 16,
|
|
444
|
-
controlHeight: 48,
|
|
445
|
-
borderRadius: 8,
|
|
446
|
-
colorBorder: '#D0D5DD',
|
|
447
|
-
// ... 其他配置
|
|
448
|
-
}
|
|
449
|
-
```
|
|
576
|
+
在项目的 theme tokens 中修改 Select 相关 Token(如 `fontSize`、`controlHeight`、`borderRadius`、`colorBorder` 等)。
|
|
450
577
|
|
|
451
578
|
### 通过 Less 定制(组件级别)
|
|
452
579
|
|
|
453
|
-
|
|
580
|
+
在组件 Less 或业务 Less 中覆盖 `.pisell-single-select` 相关类名实现组件级定制。
|
|
454
581
|
|
|
455
582
|
---
|
|
456
583
|
|
|
457
|
-
## API
|
|
458
|
-
|
|
459
|
-
### Props
|
|
460
|
-
|
|
461
|
-
| 属性名 | 类型 | 默认值 | 说明 |
|
|
462
|
-
|
|
463
|
-
| **核心数据** | | | |
|
|
464
|
-
| options | `SelectOption<T>[]` | - |
|
|
465
|
-
| value | `T \| null` | - | 当前选中值(受控) |
|
|
466
|
-
| defaultValue | `T` | - | 默认值(非受控) |
|
|
467
|
-
| **交互控制** | | | |
|
|
468
|
-
| placeholder | `string` | `'请选择'` | 占位符文本 |
|
|
469
|
-
| showSearch | `boolean` | `false` | 是否显示搜索框 |
|
|
470
|
-
| allowClear | `boolean` | `false` | 是否显示清空按钮 |
|
|
471
|
-
| disabled | `boolean` | `false` | 是否禁用 |
|
|
472
|
-
| readOnly | `boolean` | `false` | 是否只读 |
|
|
473
|
-
| **样式与布局** | | | |
|
|
474
|
-
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | 尺寸 |
|
|
475
|
-
| className | `string` | - | 自定义类名 |
|
|
476
|
-
| style | `CSSProperties` | - | 自定义样式 |
|
|
477
|
-
| **表单标签与校验** | | | |
|
|
478
|
-
| label | `string` | - | 标签文本 |
|
|
479
|
-
| helperText | `string` | - | 辅助提示文本 |
|
|
480
|
-
| required | `boolean` | `false` | 是否必填 |
|
|
481
|
-
| error | `boolean` | `false` | 是否显示错误状态 |
|
|
482
|
-
| errorText | `string` | - | 错误提示文本 |
|
|
483
|
-
| **筛选与排序** | | | |
|
|
484
|
-
| filterable | `boolean` | `false` | 是否启用过滤 |
|
|
485
|
-
| filterOption | `(input, option) => boolean` | - | 自定义过滤函数 |
|
|
486
|
-
| sortable | `boolean` | `false` | 是否启用排序 |
|
|
487
|
-
| sortDirection | `'asc' \| 'desc'` | - | 排序方向 |
|
|
488
|
-
| **无障碍访问** | | | |
|
|
489
|
-
| aria-label | `string` | - | ARIA 标签 |
|
|
490
|
-
| aria-required | `boolean` | - | ARIA 是否必填 |
|
|
491
|
-
| aria-invalid | `boolean` | - | ARIA 是否无效 |
|
|
492
|
-
| aria-describedby | `string` | - | ARIA 描述关联 ID |
|
|
584
|
+
## API
|
|
585
|
+
|
|
586
|
+
### Props
|
|
587
|
+
|
|
588
|
+
| 属性名 | 类型 | 默认值 | 必填 | 说明 |
|
|
589
|
+
|------------------|----------------------------------|------------|-----|--------------|
|
|
590
|
+
| **核心数据** | | | | |
|
|
591
|
+
| options | `SelectOption<T>[]` | - | ✅ | 选项列表 |
|
|
592
|
+
| value | `T \| null` | - | ❌ | 当前选中值(受控) |
|
|
593
|
+
| defaultValue | `T` | - | ❌ | 默认值(非受控) |
|
|
594
|
+
| **交互控制** | | | | |
|
|
595
|
+
| placeholder | `string` | `'请选择'` | ❌ | 占位符文本 |
|
|
596
|
+
| showSearch | `boolean` | `false` | ❌ | 是否显示搜索框 |
|
|
597
|
+
| allowClear | `boolean` | `false` | ❌ | 是否显示清空按钮 |
|
|
598
|
+
| disabled | `boolean` | `false` | ❌ | 是否禁用 |
|
|
599
|
+
| readOnly | `boolean` | `false` | ❌ | 是否只读 |
|
|
600
|
+
| **样式与布局** | | | | |
|
|
601
|
+
| size | `'small' \| 'medium' \| 'large'` | `'medium'` | ❌ | 尺寸 |
|
|
602
|
+
| className | `string` | - | ❌ | 自定义类名 |
|
|
603
|
+
| style | `CSSProperties` | - | ❌ | 自定义样式 |
|
|
604
|
+
| **表单标签与校验** | | | | |
|
|
605
|
+
| label | `string` | - | ❌ | 标签文本 |
|
|
606
|
+
| helperText | `string` | - | ❌ | 辅助提示文本 |
|
|
607
|
+
| required | `boolean` | `false` | ❌ | 是否必填 |
|
|
608
|
+
| error | `boolean` | `false` | ❌ | 是否显示错误状态 |
|
|
609
|
+
| errorText | `string` | - | ❌ | 错误提示文本 |
|
|
610
|
+
| **筛选与排序** | | | | |
|
|
611
|
+
| filterable | `boolean` | `false` | ❌ | 是否启用过滤 |
|
|
612
|
+
| filterOption | `(input, option) => boolean` | - | ❌ | 自定义过滤函数 |
|
|
613
|
+
| sortable | `boolean` | `false` | ❌ | 是否启用排序 |
|
|
614
|
+
| sortDirection | `'asc' \| 'desc'` | - | ❌ | 排序方向 |
|
|
615
|
+
| **无障碍访问** | | | | |
|
|
616
|
+
| aria-label | `string` | - | ❌ | ARIA 标签 |
|
|
617
|
+
| aria-required | `boolean` | - | ❌ | ARIA 是否必填 |
|
|
618
|
+
| aria-invalid | `boolean` | - | ❌ | ARIA 是否无效 |
|
|
619
|
+
| aria-describedby | `string` | - | ❌ | ARIA 描述关联 ID |
|
|
493
620
|
|
|
494
621
|
### SelectOption 类型
|
|
495
622
|
|
|
496
|
-
```
|
|
623
|
+
```ts
|
|
497
624
|
interface SelectOption<T = string | number> {
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
625
|
+
value: T; // 选项值(唯一标识)
|
|
626
|
+
label: string; // 选项显示文本
|
|
627
|
+
disabled?: boolean; // 是否禁用该选项
|
|
628
|
+
icon?: ReactNode; // 选项图标
|
|
502
629
|
}
|
|
503
630
|
```
|
|
504
631
|
|
|
@@ -529,80 +656,71 @@ interface SelectOption<T = string | number> {
|
|
|
529
656
|
### 商品分类选择
|
|
530
657
|
|
|
531
658
|
```tsx
|
|
532
|
-
import {
|
|
533
|
-
import {
|
|
534
|
-
import {
|
|
659
|
+
import React, { useState } from 'react';
|
|
660
|
+
import { Form } from 'antd';
|
|
661
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
535
662
|
|
|
536
663
|
const categoryOptions = [
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
664
|
+
{ value: 'electronics', label: '电子产品' },
|
|
665
|
+
{ value: 'clothing', label: '服装' },
|
|
666
|
+
{ value: 'food', label: '食品' },
|
|
667
|
+
{ value: 'books', label: '图书' },
|
|
541
668
|
];
|
|
542
669
|
|
|
543
670
|
export default () => {
|
|
544
|
-
|
|
545
|
-
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
|
|
551
|
-
}
|
|
552
|
-
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
placeholder="请选择商品分类"
|
|
565
|
-
error={error}
|
|
566
|
-
errorText="请选择商品分类"
|
|
567
|
-
allowClear
|
|
568
|
-
/>
|
|
569
|
-
</Form.Item>
|
|
570
|
-
);
|
|
571
|
-
}
|
|
671
|
+
const [category, setCategory] = useState<string | null>(null);
|
|
672
|
+
const [error, setError] = useState(false);
|
|
673
|
+
|
|
674
|
+
return (
|
|
675
|
+
<Form.Item label="商品分类" required>
|
|
676
|
+
<PisellSingleSelect
|
|
677
|
+
options={categoryOptions}
|
|
678
|
+
value={category}
|
|
679
|
+
onChange={(val) => {
|
|
680
|
+
setCategory(val);
|
|
681
|
+
setError(false);
|
|
682
|
+
}}
|
|
683
|
+
placeholder="请选择商品分类"
|
|
684
|
+
error={error}
|
|
685
|
+
errorText="请选择商品分类"
|
|
686
|
+
allowClear
|
|
687
|
+
/>
|
|
688
|
+
</Form.Item>
|
|
689
|
+
);
|
|
690
|
+
};
|
|
572
691
|
```
|
|
573
692
|
|
|
574
693
|
### 城市选择(带搜索)
|
|
575
694
|
|
|
576
|
-
```
|
|
695
|
+
```tsx
|
|
696
|
+
import React, { useState } from 'react';
|
|
697
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
698
|
+
|
|
577
699
|
const cityOptions = [
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
// ... 更多城市
|
|
700
|
+
{ value: 'beijing', label: '北京' },
|
|
701
|
+
{ value: 'shanghai', label: '上海' },
|
|
702
|
+
{ value: 'guangzhou', label: '广州' },
|
|
703
|
+
{ value: 'shenzhen', label: '深圳' },
|
|
704
|
+
{ value: 'chengdu', label: '成都' },
|
|
705
|
+
{ value: 'hangzhou', label: '杭州' },
|
|
585
706
|
];
|
|
586
707
|
|
|
587
708
|
export default () => {
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
/>
|
|
604
|
-
);
|
|
605
|
-
}
|
|
709
|
+
const [city, setCity] = useState<string | null>(null);
|
|
710
|
+
return (
|
|
711
|
+
<PisellSingleSelect
|
|
712
|
+
options={cityOptions}
|
|
713
|
+
label="所在城市"
|
|
714
|
+
helperText="输入城市名快速查找"
|
|
715
|
+
value={city}
|
|
716
|
+
onChange={setCity}
|
|
717
|
+
placeholder="搜索城市..."
|
|
718
|
+
showSearch
|
|
719
|
+
allowClear
|
|
720
|
+
onSearch={(keyword) => console.log('搜索关键词:', keyword)}
|
|
721
|
+
/>
|
|
722
|
+
);
|
|
723
|
+
};
|
|
606
724
|
```
|
|
607
725
|
|
|
608
726
|
---
|
|
@@ -611,105 +729,78 @@ export default () => {
|
|
|
611
729
|
|
|
612
730
|
### 1. 如何处理空值?
|
|
613
731
|
|
|
614
|
-
|
|
732
|
+
只读态空值显示为 `-`,编辑态显示占位符。
|
|
615
733
|
|
|
616
|
-
```
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
734
|
+
```tsx
|
|
735
|
+
import React from 'react';
|
|
736
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
737
|
+
|
|
738
|
+
const fruitOptions = [
|
|
739
|
+
{ value: 'apple', label: '苹果' },
|
|
740
|
+
{ value: 'banana', label: '香蕉' },
|
|
741
|
+
];
|
|
742
|
+
|
|
743
|
+
export default () => (
|
|
744
|
+
<PisellSingleSelect options={fruitOptions} value={null} readOnly label="只读空值" />
|
|
745
|
+
);
|
|
624
746
|
```
|
|
625
747
|
|
|
626
748
|
### 2. 如何实现搜索功能?
|
|
627
749
|
|
|
628
|
-
设置 `showSearch
|
|
750
|
+
设置 `showSearch` 即可,组件内置防抖。
|
|
629
751
|
|
|
630
|
-
```
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
752
|
+
```tsx
|
|
753
|
+
import React from 'react';
|
|
754
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
755
|
+
|
|
756
|
+
const options = [
|
|
757
|
+
{ value: 'a', label: '选项 A' },
|
|
758
|
+
{ value: 'b', label: '选项 B' },
|
|
759
|
+
];
|
|
760
|
+
|
|
761
|
+
export default () => (
|
|
762
|
+
<PisellSingleSelect options={options} showSearch placeholder="搜索..." />
|
|
763
|
+
);
|
|
636
764
|
```
|
|
637
765
|
|
|
638
766
|
### 3. 如何自定义过滤逻辑?
|
|
639
767
|
|
|
640
|
-
使用 `filterOption`
|
|
768
|
+
使用 `filterOption` 属性。
|
|
641
769
|
|
|
642
|
-
```
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
showSearch
|
|
646
|
-
filterOption={(input, option) => {
|
|
647
|
-
// 自定义过滤逻辑
|
|
648
|
-
return option.label.includes(input);
|
|
649
|
-
}}
|
|
650
|
-
/>
|
|
651
|
-
```
|
|
652
|
-
|
|
653
|
-
### 4. 受控模式和非受控模式有什么区别?
|
|
770
|
+
```tsx
|
|
771
|
+
import React from 'react';
|
|
772
|
+
import { PisellSingleSelect } from '@pisell/materials';
|
|
654
773
|
|
|
655
|
-
|
|
774
|
+
const options = [
|
|
775
|
+
{ value: 'apple', label: '苹果' },
|
|
776
|
+
{ value: 'banana', label: '香蕉' },
|
|
777
|
+
];
|
|
656
778
|
|
|
657
|
-
|
|
658
|
-
|
|
659
|
-
|
|
779
|
+
export default () => (
|
|
780
|
+
<PisellSingleSelect
|
|
781
|
+
options={options}
|
|
782
|
+
showSearch
|
|
783
|
+
filterOption={(input, option) => option.label.includes(input)}
|
|
784
|
+
/>
|
|
785
|
+
);
|
|
660
786
|
```
|
|
661
787
|
|
|
662
|
-
|
|
788
|
+
### 4. 受控与非受控区别
|
|
663
789
|
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
```
|
|
790
|
+
- **受控**:外部通过 `value` + `onChange` 管理。
|
|
791
|
+
- **非受控**:使用 `defaultValue`,组件内部管理。
|
|
667
792
|
|
|
668
793
|
### 5. 如何在表格中使用?
|
|
669
794
|
|
|
670
|
-
|
|
671
|
-
|
|
672
|
-
```
|
|
673
|
-
{
|
|
674
|
-
title: '状态',
|
|
675
|
-
dataIndex: 'status',
|
|
676
|
-
render: (value) => (
|
|
677
|
-
<PisellSingleSelect
|
|
678
|
-
options={statusOptions}
|
|
679
|
-
value={value}
|
|
680
|
-
readOnly
|
|
681
|
-
/>
|
|
682
|
-
),
|
|
683
|
-
}
|
|
684
|
-
```
|
|
795
|
+
表格列中用 `readOnly` 展示选项文案,见上文「表格列中使用(只读态)」示例。
|
|
685
796
|
|
|
686
797
|
### 6. 如何使用 Ref 方法?
|
|
687
798
|
|
|
688
|
-
|
|
689
|
-
const ref = useRef<SingleSelectRef>(null);
|
|
690
|
-
|
|
691
|
-
// 聚焦
|
|
692
|
-
ref.current?.focus();
|
|
693
|
-
|
|
694
|
-
// 获取值
|
|
695
|
-
const value = ref.current?.getValue();
|
|
696
|
-
|
|
697
|
-
// 清空
|
|
698
|
-
ref.current?.clearValue();
|
|
699
|
-
```
|
|
799
|
+
通过 `ref` 调用 `focus()`、`getValue()`、`clearValue()` 等,见上文「使用 Ref 控制组件」示例。
|
|
700
800
|
|
|
701
801
|
### 7. 如何自定义样式?
|
|
702
802
|
|
|
703
|
-
|
|
704
|
-
// 方式1:通过 className
|
|
705
|
-
<PisellSingleSelect className="custom-select"/>
|
|
706
|
-
|
|
707
|
-
// 方式2:通过 style
|
|
708
|
-
<PisellSingleSelect style={{width: 300}}/>
|
|
709
|
-
|
|
710
|
-
// 方式3:通过 Token(全局)
|
|
711
|
-
// 在 tokens.ts 中修改 Select Token
|
|
712
|
-
```
|
|
803
|
+
通过 `className`、`style` 传入,或通过项目 Token / Less 覆盖。
|
|
713
804
|
|
|
714
805
|
---
|
|
715
806
|
|
|
@@ -742,6 +833,12 @@ ref.current?.clearValue();
|
|
|
742
833
|
|
|
743
834
|
---
|
|
744
835
|
|
|
836
|
+
## 相关文档
|
|
837
|
+
|
|
838
|
+
- [设计文档](./pisellSingleSelect.$tab-design.md)
|
|
839
|
+
- [开发文档](./pisellSingleSelect.$tab-dev.md)
|
|
840
|
+
- [测试文档](./pisellSingleSelect.$tab-test.md)
|
|
841
|
+
|
|
745
842
|
## 相关组件
|
|
746
843
|
|
|
747
844
|
- **PisellMultipleSelect** - 多选下拉组件
|