@dataloop-ai/components 0.18.0 → 0.18.2
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/package.json +6 -3
- package/src/App.vue +5 -227
- package/src/assets/constants.scss +2 -1
- package/src/assets/globals.scss +21 -0
- package/src/components/basic/DlAccordion/DlAccordion.vue +26 -4
- package/src/components/basic/DlAccordion/components/AccordionHeader.vue +2 -1
- package/src/components/basic/DlAvatar/DlAvatar.vue +1 -1
- package/src/components/basic/DlButton/DlButton.vue +115 -25
- package/src/components/basic/DlButton/utils.ts +45 -2
- package/src/components/basic/DlChip/DlChip.vue +3 -7
- package/src/components/basic/DlChip/utils.ts +4 -4
- package/src/components/basic/DlContainer/DlContainer.vue +70 -0
- package/src/components/basic/DlContainer/index.ts +3 -0
- package/src/components/basic/DlEmptyState/DlEmptyState.vue +282 -0
- package/src/components/basic/DlEmptyState/index.ts +2 -0
- package/src/components/basic/DlEmptyState/types.ts +20 -0
- package/src/components/basic/DlGrid/DlGrid.vue +163 -0
- package/src/components/basic/DlGrid/index.ts +4 -0
- package/src/components/basic/DlGrid/types.ts +5 -0
- package/src/components/basic/DlKpi/components/KpiInfo.vue +2 -1
- package/src/components/basic/DlListItem/DlListItem.vue +96 -66
- package/src/components/basic/DlListItem/utils.ts +0 -3
- package/src/components/basic/DlPanelContainer/DlPanelContainer.vue +37 -13
- package/src/components/basic/DlPopup/DlPopup.vue +58 -11
- package/src/components/basic/DlPopup/components/PopupHeader.vue +11 -6
- package/src/components/basic/DlProgressChart/DlProgressChart.vue +2 -1
- package/src/components/basic/DlWidget/DlWidget.vue +273 -141
- package/src/components/basic/DlWidget/index.ts +1 -3
- package/src/components/basic/DlWidget/utils.ts +90 -8
- package/src/components/basic/index.ts +4 -2
- package/src/components/basic/types.ts +2 -0
- package/src/components/compound/DlCard/DlCard.vue +796 -0
- package/src/components/compound/DlCard/components/DescriptionModal.vue +137 -0
- package/src/components/compound/DlCard/types.ts +38 -0
- package/src/components/compound/DlCharts/charts/DlBarChart/DlBarChart.vue +39 -4
- package/src/components/compound/DlCharts/charts/DlColumnChart/DlColumnChart.vue +128 -36
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/DlConfusionMatrix.vue +167 -87
- package/src/components/compound/DlCharts/charts/DlConfusionMatrix/utils.ts +2 -1
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChart.vue +44 -3
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/DlDoughnutChartWidget.vue +1 -2
- package/src/components/compound/DlCharts/charts/DlDoughnutChart/components/DlDoughnutChartLegend.vue +9 -18
- package/src/components/compound/DlCharts/charts/DlLineChart/DlLineChart.vue +48 -9
- package/src/components/compound/DlCharts/charts/DlScatterChart/DlScatterChart.vue +667 -0
- package/src/components/compound/DlCharts/charts/DlScatterChart/index.ts +2 -0
- package/src/components/compound/DlCharts/charts/index.ts +1 -0
- package/src/components/compound/DlCharts/components/DlBrush.vue +3 -2
- package/src/components/compound/DlCharts/components/DlChartLabels.vue +2 -1
- package/src/components/compound/DlCharts/components/DlChartScrollBar.vue +1 -0
- package/src/components/compound/DlCharts/types/props.ts +5 -1
- package/src/components/compound/DlCharts/utils.ts +1 -1
- package/src/components/compound/DlCodeEditor/DlCodeEditor.vue +173 -0
- package/src/components/compound/DlCodeEditor/README.md +11 -0
- package/src/components/compound/DlCodeEditor/components/CodeEditor.vue +705 -0
- package/src/components/compound/DlCodeEditor/index.ts +3 -0
- package/src/components/compound/DlCodeEditor/styles/themes-base16.css +12809 -0
- package/src/components/compound/DlCodeEditor/styles/themes.css +3999 -0
- package/src/components/compound/DlCodeEditor/types.ts +21 -0
- package/src/components/compound/DlDateTime/DlDatePicker/DlDatePicker.vue +9 -1
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlCalendar.vue +4 -2
- package/src/components/compound/DlDateTime/DlDatePicker/components/DlMonthCalendar.vue +2 -1
- package/src/components/compound/DlDateTime/DlDateTimeRange/{DlCardSidebar.vue → CardSidebar.vue} +10 -11
- package/src/components/compound/DlDateTime/DlDateTimeRange/DlDateTimeRange.vue +18 -9
- package/src/components/compound/DlDateTime/DlTimePicker/DlTimePicker.vue +2 -2
- package/src/components/compound/DlDialogBox/DlDialogBox.vue +74 -15
- package/src/components/compound/DlDialogBox/components/DlDialogBoxFooter.vue +1 -1
- package/src/components/compound/DlDialogBox/components/DlDialogBoxHeader.vue +9 -7
- package/src/components/compound/DlDropdownButton/DlDropdownButton.vue +13 -4
- package/src/components/compound/DlInput/DlInput.vue +80 -17
- package/src/components/compound/DlJsonEditor/DlJsonEditor.vue +42 -219
- package/src/components/compound/DlOptionGroup/DlOptionGroup.vue +16 -17
- package/src/components/compound/DlOptionGroup/components/MenuItemWrapper.vue +2 -2
- package/src/components/compound/DlPagination/DlPagination.vue +1 -1
- package/src/components/compound/DlPagination/components/PaginationLegend.vue +0 -2
- package/src/components/compound/DlPagination/components/RowsSelector.vue +0 -2
- package/src/components/compound/DlRange/DlRange.vue +3 -2
- package/src/components/compound/DlSearches/DlSearch/DlSearch.vue +12 -5
- package/src/components/compound/DlSearches/DlSmartSearch/DlSmartSearch.vue +413 -97
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchFilters.vue +4 -1
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSmartSearchInput.vue +100 -39
- package/src/components/compound/DlSearches/DlSmartSearch/components/DlSuggestionsDropdown.vue +12 -7
- package/src/components/compound/DlSearches/DlSmartSearch/components/FiltersQuery.vue +5 -6
- package/src/components/compound/DlSearches/DlSmartSearch/types.ts +14 -0
- package/src/components/compound/DlSearches/DlSmartSearch/utils/highlightSyntax.ts +10 -6
- package/src/components/compound/DlSearches/DlSmartSearch/utils/index.ts +172 -48
- package/src/components/compound/DlSelect/DlSelect.vue +264 -130
- package/src/components/compound/DlSelect/utils.ts +4 -1
- package/src/components/compound/DlSlider/DlSlider.vue +10 -2
- package/src/components/compound/DlSlider/components/DlSliderBase.vue +3 -3
- package/src/components/compound/DlSlider/components/DlSliderInput.vue +17 -26
- package/src/components/compound/DlSlider/sliderStyles.scss +5 -1
- package/src/components/compound/DlSlider/useSlider.ts +2 -2
- package/src/components/compound/DlSlider/utils.ts +2 -2
- package/src/components/compound/DlStepper/DlStepper.vue +46 -4
- package/src/components/compound/DlStepper/components/DlStepperContent.vue +6 -2
- package/src/components/compound/DlStepper/components/DlStepperFooter.vue +12 -0
- package/src/components/compound/DlStepper/components/DlStepperSidebar.vue +24 -11
- package/src/components/compound/DlStepper/models/Step.ts +37 -8
- package/src/components/compound/DlStepper/models/Stepper.ts +108 -15
- package/src/components/compound/DlStepper/models/interfaces.ts +2 -1
- package/src/components/compound/DlTable/DlTable.vue +49 -14
- package/src/components/compound/DlTable/components/DlTd.vue +9 -9
- package/src/components/compound/DlTable/components/DlTh.vue +3 -2
- package/src/components/compound/DlTable/hooks/tableColumnSelection.ts +35 -40
- package/src/components/compound/DlTable/hooks/tableFilter.ts +33 -21
- package/src/components/compound/DlTable/hooks/tablePagination.ts +18 -18
- package/src/components/compound/DlTable/hooks/tableRowExpand.ts +2 -1
- package/src/components/compound/DlTable/hooks/tableRowSelection.ts +0 -1
- package/src/components/compound/DlTable/hooks/tableSort.ts +52 -47
- package/src/components/compound/DlTable/styles/dl-table-styles.scss +8 -0
- package/src/components/compound/DlTabs/DlTabs.vue +83 -31
- package/src/components/compound/DlTabs/components/DlTab.vue +14 -4
- package/src/components/compound/DlTabs/components/TabsWrapper.vue +32 -27
- package/src/components/compound/DlThumbnailGallery/DlThumbnailGallery.vue +268 -0
- package/src/components/compound/DlThumbnailGallery/index.ts +2 -0
- package/src/components/compound/DlThumbnailGallery/types.ts +11 -0
- package/src/components/compound/DlToast/api/useToast.ts +42 -1
- package/src/components/compound/DlToast/components/ToastComponent.vue +24 -32
- package/src/components/compound/DlToast/types.ts +52 -0
- package/src/components/compound/DlTreeTable/DlTreeTable.vue +1293 -0
- package/src/components/compound/DlTreeTable/components/DlTdTree.vue +119 -0
- package/src/components/compound/DlTreeTable/components/DlTrTree.vue +52 -0
- package/src/components/compound/DlTreeTable/index.ts +3 -0
- package/src/components/compound/DlTreeTable/types.ts +1 -0
- package/src/components/compound/DlTreeTable/utils/convertToNestedObject.ts +51 -0
- package/src/components/compound/DlTreeTable/utils/flatTreeData.ts +19 -0
- package/src/components/compound/DlTreeTable/utils/getFromChildren.ts +39 -0
- package/src/components/compound/DlTreeTable/utils/trSpacing.ts +13 -0
- package/src/components/compound/DlTreeTable/utils/treeTableRowSelection.ts +184 -0
- package/src/components/compound/index.ts +14 -1
- package/src/components/compound/types.ts +2 -0
- package/src/components/essential/DlBadge/DlBadge.vue +3 -3
- package/src/components/essential/DlCheckbox/DlCheckbox.vue +10 -7
- package/src/components/essential/DlEllipsis/DlEllipsis.vue +141 -0
- package/src/components/essential/DlIcon/DlIcon.vue +5 -5
- package/src/components/essential/DlLabel/DlLabel.vue +190 -0
- package/src/components/essential/DlLabel/index.ts +2 -0
- package/src/components/essential/DlList/DlList.vue +3 -3
- package/src/components/essential/DlMenu/DlMenu.vue +41 -22
- package/src/components/essential/DlMenu/utils.ts +8 -7
- package/src/components/essential/DlPageLayout/DlPageLayout.vue +90 -0
- package/src/components/essential/DlPageLayout/index.ts +2 -0
- package/src/components/essential/DlProgressBar/DlProgressBar.vue +1 -1
- package/src/components/essential/DlRadio/DlRadio.vue +10 -5
- package/src/components/essential/DlSeparator/DlSeparator.vue +2 -2
- package/src/components/essential/DlSpinner/index.ts +1 -13
- package/src/components/essential/DlSpinner/styles/spinnerStyles.scss +7 -0
- package/src/components/essential/DlSwitch/DlSwitch.vue +6 -3
- package/src/components/essential/DlTextArea/DlTextArea.vue +212 -7
- package/src/components/essential/DlThemeProvider/DlThemeProvider.vue +6 -0
- package/src/components/essential/DlTypography/DlTypography.vue +7 -1
- package/src/components/essential/index.ts +3 -2
- package/src/components/shared/DlInfoErrorMessage/DlInfoErrorMessage.vue +1 -1
- package/src/components/{essential → shared}/DlTooltip/DlTooltip.vue +26 -19
- package/src/components/shared/DlVirtualScroll/DlVirtualScroll.vue +106 -43
- package/src/components/shared/DlVirtualScroll/useVirtualScroll.ts +28 -4
- package/src/components/shared/index.ts +1 -0
- package/src/components/types.ts +2 -0
- package/src/demos/BarChartDemo.vue +59 -2
- package/src/demos/ColumnChartDemo.vue +67 -2
- package/src/demos/DlAccordionDemo.vue +92 -43
- package/src/demos/DlAlertDemo.vue +14 -0
- package/src/demos/DlButtonDemo.vue +41 -4
- package/src/demos/DlCardDemo.vue +156 -19
- package/src/demos/DlChartDoughnutDemo.vue +49 -2
- package/src/demos/DlCheckboxDemo.vue +28 -3
- package/src/demos/DlCodeEditor/DlCodeEditorDemo.vue +247 -0
- package/src/demos/DlCodeEditor/index.ts +2 -0
- package/src/demos/DlConfusionMatrixDemo.vue +93 -37
- package/src/demos/DlDemoPage.vue +235 -0
- package/src/demos/DlDialogBoxDemo.vue +56 -51
- package/src/demos/DlDropdownButtonDemo.vue +35 -27
- package/src/demos/DlEmptyStateDemo.vue +81 -0
- package/src/demos/DlGridDemo.vue +40 -0
- package/src/demos/DlInputDemo.vue +21 -1
- package/src/demos/DlJsonEditorDemo.vue +59 -0
- package/src/demos/DlLabelDemo.vue +208 -0
- package/src/demos/DlLineChartDemo.vue +50 -2
- package/src/demos/DlListDemo.vue +12 -9
- package/src/demos/DlMenuDemo.vue +147 -20
- package/src/demos/DlPageLayoutDemo.vue +146 -0
- package/src/demos/DlPanelContainerDemo.vue +113 -2
- package/src/demos/DlPopupDemo.vue +82 -1
- package/src/demos/DlRadioDemo.vue +16 -1
- package/src/demos/DlScatterChartDemo.vue +161 -0
- package/src/demos/DlSearchDemo.vue +9 -0
- package/src/demos/DlSelectDemo.vue +124 -27
- package/src/demos/DlSpinnerDemo.vue +0 -2
- package/src/demos/DlStepperDemo/DlStepperDemo.vue +5 -1
- package/src/demos/DlStepperDemo/EmptyStateStepper.vue +149 -0
- package/src/demos/DlStepperDemo/SimpleStepper.vue +4 -0
- package/src/demos/DlStepperDemo/steps/GeneralStep.vue +1 -0
- package/src/demos/DlSwitchDemo.vue +12 -0
- package/src/demos/DlTableDemo.vue +84 -5
- package/src/demos/DlTabsDemo.vue +92 -3
- package/src/demos/DlTextAreaDemo.vue +14 -17
- package/src/demos/DlThumbnailGalleryDemo.vue +99 -0
- package/src/demos/DlToastDemo.vue +3 -9
- package/src/demos/DlTooltipDemo.vue +66 -2
- package/src/demos/DlTreeTableDemo.vue +694 -0
- package/src/demos/DlVirtualScrollDemo.vue +3 -12
- package/src/demos/DlWidgetDemo.vue +252 -61
- package/src/demos/SmartSearchDemo/DlSmartSearchDemo.vue +151 -32
- package/src/demos/index.ts +23 -4
- package/src/hooks/use-anchor.ts +15 -17
- package/src/hooks/use-arrow-navigation.ts +64 -21
- package/src/hooks/use-model-toggle.ts +14 -16
- package/src/hooks/use-portal.ts +9 -3
- package/src/hooks/use-scroll-target.ts +2 -4
- package/src/hooks/use-size-observer.ts +3 -2
- package/src/hooks/use-suggestions.ts +239 -49
- package/src/hooks/use-transition.ts +10 -4
- package/src/index.ts +22 -1
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetFooter.vue +78 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetHeader.vue +22 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetLeftDrawer.vue +96 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetMainContent.vue +51 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/DatasetRightDrawer.vue +88 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/ActionsMenu.vue +70 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/AutomationMenu.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardView.vue +101 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewGallery.vue +141 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/CardViewTable.vue +193 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/LayoutEmptyState.vue +227 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/EmptyState/UploadData.vue +106 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentImages.vue +540 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/MainContent/MainContentNav.vue +329 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarKpi.vue +84 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/NavbarSearch.vue +132 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/SearchFilterMenu.vue +19 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/filters/AddFilter.vue +212 -0
- package/src/layouts/DlDatasetBrowser/DemoComponents/types/imageMetadata.ts +28 -0
- package/src/layouts/DlDatasetBrowser/DlDatasetBrowser.vue +42 -0
- package/src/layouts/DlStudioLayout/DlStudioLayout.vue +42 -0
- package/src/layouts/DlStudioLayout/components/Demo/LeftMenuContent.vue +23 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioFooter.vue +25 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioHeader.vue +121 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioLeftDrawer.vue +245 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioMainContent.vue +31 -0
- package/src/layouts/DlStudioLayout/components/Demo/StudioTabsMenu.vue +117 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/FilterMenu.vue +62 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuAnnotations.vue +98 -0
- package/src/layouts/DlStudioLayout/components/Demo/TabMenu/TabMenuItem.vue +66 -0
- package/src/layouts/DlStudioLayout/components/LayoutNavbar.vue +24 -0
- package/src/layouts/DlStudioLayout/components/ListAutocomplete.vue +149 -0
- package/src/layouts/DlStudioLayout/components/NavigationDrawer.vue +147 -0
- package/src/layouts/DlStudioLayout/index.ts +2 -0
- package/src/layouts/DlStudioLayout/types/HorizontalItems.ts +9 -0
- package/src/layouts/DlStudioLayout/types/VerticalItems.ts +10 -0
- package/src/simple-code-editor.d.ts +1 -0
- package/src/utils/click-outside.ts +1 -1
- package/src/utils/dom.ts +5 -5
- package/src/utils/events.ts +3 -3
- package/src/utils/global-nodes.ts +2 -2
- package/src/utils/input-sizes.ts +5 -2
- package/src/utils/is-ellipsis-active.ts +4 -1
- package/src/utils/parse-smart-query.ts +209 -111
- package/src/utils/portal.ts +5 -5
- package/src/utils/position-engine.ts +7 -7
- package/src/utils/render.ts +1 -1
- package/src/utils/scroll.ts +2 -2
- package/src/utils/selection.ts +3 -3
- package/vite.config.ts +9 -1
- package/src/components/basic/DlCard/DlCard.vue +0 -241
- package/src/components/basic/DlCard/types.ts +0 -20
- package/src/components/basic/DlEllipsis/DlEllipsis.vue +0 -114
- package/src/components/basic/DlWidget/DlGrid.vue +0 -33
- package/src/components/basic/DlWidget/DlGridRow.vue +0 -32
- package/src/components/compound/DlSearches/DlSmartSearch/utils/utils.ts +0 -124
- package/src/components/compound/DlToast/utils/config.ts +0 -17
- package/src/components/essential/DlTextHolder/DlTextHolder.vue +0 -65
- package/src/components/essential/DlTextHolder/index.ts +0 -2
- package/src/demos/DlTextHolderDemo.vue +0 -42
- package/src/utils/swapNodes.ts +0 -30
- /package/src/components/{basic → compound}/DlCard/index.ts +0 -0
- /package/src/components/compound/DlDateTime/DlDateTimeRange/{DlDateInput.vue → DateInput.vue} +0 -0
- /package/src/components/{basic → essential}/DlEllipsis/index.ts +0 -0
- /package/src/components/{essential → shared}/DlTooltip/index.ts +0 -0
|
@@ -0,0 +1,149 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="dl-stepper-wrapper">
|
|
3
|
+
<dl-stepper
|
|
4
|
+
v-model="isOpen"
|
|
5
|
+
:hide-close-button="true"
|
|
6
|
+
done-button-label="Create"
|
|
7
|
+
width="calc(100vh-400px)"
|
|
8
|
+
header-title="Create New Task"
|
|
9
|
+
:content-title="`${stepper.currentIndex + 1}. ${
|
|
10
|
+
stepper.currentStep.value
|
|
11
|
+
}`"
|
|
12
|
+
:bg-color="bgColor"
|
|
13
|
+
:state="stepper.currentStep"
|
|
14
|
+
:steps="stepper.steps"
|
|
15
|
+
:disabled-prev-step="true"
|
|
16
|
+
:disabled-next-step="true"
|
|
17
|
+
:is-done="stepper.isDone()"
|
|
18
|
+
:next-step="stepper.getNextStep()"
|
|
19
|
+
:prev-step="stepper.getPrevStep()"
|
|
20
|
+
is-empty
|
|
21
|
+
:empty-state-props="{
|
|
22
|
+
responsive: true,
|
|
23
|
+
style: 'min-height: 350px;',
|
|
24
|
+
bgSize: '130px',
|
|
25
|
+
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
26
|
+
title: 'Lorem ipsum',
|
|
27
|
+
subtitle:
|
|
28
|
+
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
29
|
+
info: 'To learn more about this analytics, read our documentation.'
|
|
30
|
+
}"
|
|
31
|
+
@next="handleNext"
|
|
32
|
+
@prev="handlePrev"
|
|
33
|
+
@done="handleDone"
|
|
34
|
+
@set-step="handleStep"
|
|
35
|
+
>
|
|
36
|
+
<template #links="">
|
|
37
|
+
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
38
|
+
<dl-button
|
|
39
|
+
padding="0px"
|
|
40
|
+
icon="icon-dl-sdk-documentation"
|
|
41
|
+
flat
|
|
42
|
+
uppercase
|
|
43
|
+
label="SDK"
|
|
44
|
+
/>
|
|
45
|
+
<div class="break" />
|
|
46
|
+
<dl-button
|
|
47
|
+
padding="0px"
|
|
48
|
+
icon="icon-dl-file"
|
|
49
|
+
flat
|
|
50
|
+
label="Documentation"
|
|
51
|
+
/>
|
|
52
|
+
<div class="break" />
|
|
53
|
+
<dl-button
|
|
54
|
+
padding="0px"
|
|
55
|
+
icon="icon-dl-youtube"
|
|
56
|
+
flat
|
|
57
|
+
label="Video"
|
|
58
|
+
/>
|
|
59
|
+
</div>
|
|
60
|
+
</template>
|
|
61
|
+
</dl-stepper>
|
|
62
|
+
</div>
|
|
63
|
+
</template>
|
|
64
|
+
<script lang="ts">
|
|
65
|
+
import { defineComponent } from 'vue-demi'
|
|
66
|
+
import { DlStepper, DlButton } from '../..'
|
|
67
|
+
import { StepState } from '../../types'
|
|
68
|
+
import { Stepper, Step } from '../../components/compound/DlStepper/models'
|
|
69
|
+
|
|
70
|
+
class EmptyStateStepper extends Stepper {
|
|
71
|
+
constructor(steps: Step[]) {
|
|
72
|
+
super(steps)
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
public completeStep() {
|
|
76
|
+
super.completeStep()
|
|
77
|
+
console.log('COMPLETED')
|
|
78
|
+
}
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export default defineComponent({
|
|
82
|
+
components: {
|
|
83
|
+
DlStepper,
|
|
84
|
+
DlButton
|
|
85
|
+
},
|
|
86
|
+
data() {
|
|
87
|
+
const stepper: Stepper = null
|
|
88
|
+
|
|
89
|
+
return {
|
|
90
|
+
counters: [{ value: 3, text: 'Assigmments' }],
|
|
91
|
+
isOpen: true,
|
|
92
|
+
stepper,
|
|
93
|
+
steps: [
|
|
94
|
+
{
|
|
95
|
+
value: 'general',
|
|
96
|
+
title: 'general',
|
|
97
|
+
warning: 'Some issues in the step',
|
|
98
|
+
completed: true
|
|
99
|
+
},
|
|
100
|
+
{
|
|
101
|
+
value: 'data',
|
|
102
|
+
title: 'data',
|
|
103
|
+
completed: true
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
value: 'instructions',
|
|
107
|
+
title: 'instructions'
|
|
108
|
+
},
|
|
109
|
+
{
|
|
110
|
+
value: 'assignments',
|
|
111
|
+
title: 'assignments'
|
|
112
|
+
},
|
|
113
|
+
{
|
|
114
|
+
value: 'quality',
|
|
115
|
+
title: 'quality',
|
|
116
|
+
optional: true
|
|
117
|
+
}
|
|
118
|
+
] as StepState[],
|
|
119
|
+
bgColor: 'dl-color-fill-third'
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
beforeMount() {
|
|
123
|
+
const steps = this.steps.map((step) => new Step(step))
|
|
124
|
+
this.stepper = new EmptyStateStepper(steps)
|
|
125
|
+
},
|
|
126
|
+
methods: {
|
|
127
|
+
handleNext() {
|
|
128
|
+
this.stepper.moveToNextStep()
|
|
129
|
+
},
|
|
130
|
+
handlePrev() {
|
|
131
|
+
this.stepper.moveToPrevStep()
|
|
132
|
+
},
|
|
133
|
+
handleDone() {
|
|
134
|
+
console.log('DONE')
|
|
135
|
+
},
|
|
136
|
+
handleStep(step: Step) {
|
|
137
|
+
this.stepper.currentIndex = this.stepper.steps.findIndex(
|
|
138
|
+
(s) => s.value === step.value
|
|
139
|
+
)
|
|
140
|
+
}
|
|
141
|
+
}
|
|
142
|
+
})
|
|
143
|
+
</script>
|
|
144
|
+
|
|
145
|
+
<style lang="scss" scoped>
|
|
146
|
+
.dl-stepper-wrapper {
|
|
147
|
+
height: calc(100vh - 200px);
|
|
148
|
+
}
|
|
149
|
+
</style>
|
|
@@ -59,6 +59,7 @@
|
|
|
59
59
|
@complete-click="stepper.completeStep()"
|
|
60
60
|
@warning-click="stepper.setStepWarning('Custom Warning')"
|
|
61
61
|
@reset-click="stepper.resetStep()"
|
|
62
|
+
@set-subtitle="setSubtitle"
|
|
62
63
|
/>
|
|
63
64
|
</template>
|
|
64
65
|
<template #data>
|
|
@@ -184,6 +185,9 @@ export default defineComponent({
|
|
|
184
185
|
this.stepper.currentIndex = this.stepper.steps.findIndex(
|
|
185
186
|
(s) => s.value === step.value
|
|
186
187
|
)
|
|
188
|
+
},
|
|
189
|
+
setSubtitle(subtitle: string) {
|
|
190
|
+
this.stepper.currentStep.subtitle = subtitle
|
|
187
191
|
}
|
|
188
192
|
}
|
|
189
193
|
})
|
|
@@ -9,6 +9,18 @@
|
|
|
9
9
|
/>
|
|
10
10
|
Switch with value not updating
|
|
11
11
|
<dl-switch v-model="switchValue" />
|
|
12
|
+
Switch with left-label
|
|
13
|
+
<dl-switch
|
|
14
|
+
v-model="switchValue"
|
|
15
|
+
left-label="Left label"
|
|
16
|
+
/>
|
|
17
|
+
<div style="width: 500px">
|
|
18
|
+
<dl-switch
|
|
19
|
+
v-model="switchValue"
|
|
20
|
+
left-label="Left label"
|
|
21
|
+
fluid
|
|
22
|
+
/>
|
|
23
|
+
</div>
|
|
12
24
|
</div>
|
|
13
25
|
</template>
|
|
14
26
|
|
|
@@ -117,6 +117,69 @@
|
|
|
117
117
|
@update:selected="updateSeleted"
|
|
118
118
|
/>
|
|
119
119
|
|
|
120
|
+
<div style="margin-top: 100px">
|
|
121
|
+
<DlTable
|
|
122
|
+
:selected="selected"
|
|
123
|
+
:separator="separator"
|
|
124
|
+
:columns="tableColumns"
|
|
125
|
+
:bordered="bordered"
|
|
126
|
+
:dense="dense"
|
|
127
|
+
class="sticky-header"
|
|
128
|
+
:filter="filter"
|
|
129
|
+
:selection="selection"
|
|
130
|
+
:loading="loading"
|
|
131
|
+
:rows="tableRows"
|
|
132
|
+
:resizable="resizable"
|
|
133
|
+
row-key="name"
|
|
134
|
+
color="dl-color-secondary"
|
|
135
|
+
title="Table Title"
|
|
136
|
+
:virtual-scroll="vScroll"
|
|
137
|
+
style="height: 500px"
|
|
138
|
+
:rows-per-page-options="rowsPerPageOptions"
|
|
139
|
+
hide-pagination
|
|
140
|
+
is-empty
|
|
141
|
+
:empty-state-props="{
|
|
142
|
+
responsive: false,
|
|
143
|
+
style: 'min-height: 350px; width: 300px;',
|
|
144
|
+
bgSize: '130px',
|
|
145
|
+
bgImage: `url(https://raw.githubusercontent.com/dataloop-ai/icons/main/assets/usage.svg)`,
|
|
146
|
+
title: 'Lorem ipsum',
|
|
147
|
+
subtitle:
|
|
148
|
+
'Lorem ipsum dolor sit amet consectetur. Senectus condimentum dolor sit',
|
|
149
|
+
info: 'To learn more about this analytics, read our documentation.'
|
|
150
|
+
}"
|
|
151
|
+
@row-click="log"
|
|
152
|
+
@th-click="log"
|
|
153
|
+
@update:selected="updateSeleted"
|
|
154
|
+
>
|
|
155
|
+
<template #links="">
|
|
156
|
+
<div style="display: flex; gap: 5px; padding: 0 20px">
|
|
157
|
+
<dl-button
|
|
158
|
+
padding="0px"
|
|
159
|
+
icon="icon-dl-sdk-documentation"
|
|
160
|
+
flat
|
|
161
|
+
uppercase
|
|
162
|
+
label="SDK"
|
|
163
|
+
/>
|
|
164
|
+
<div class="break" />
|
|
165
|
+
<dl-button
|
|
166
|
+
padding="0px"
|
|
167
|
+
icon="icon-dl-file"
|
|
168
|
+
flat
|
|
169
|
+
label="Documentation"
|
|
170
|
+
/>
|
|
171
|
+
<div class="break" />
|
|
172
|
+
<dl-button
|
|
173
|
+
padding="0px"
|
|
174
|
+
icon="icon-dl-youtube"
|
|
175
|
+
flat
|
|
176
|
+
label="Video"
|
|
177
|
+
/>
|
|
178
|
+
</div>
|
|
179
|
+
</template>
|
|
180
|
+
</DlTable>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
120
183
|
<div style="margin-top: 100px">
|
|
121
184
|
<DlTable
|
|
122
185
|
:selected="selected"
|
|
@@ -222,7 +285,6 @@
|
|
|
222
285
|
:selected="selected"
|
|
223
286
|
:separator="separator"
|
|
224
287
|
:draggable="draggable"
|
|
225
|
-
class="sticky-header"
|
|
226
288
|
:filter="filter"
|
|
227
289
|
:selection="selection"
|
|
228
290
|
:dense="dense"
|
|
@@ -233,9 +295,7 @@
|
|
|
233
295
|
:columns="tableColumns"
|
|
234
296
|
style="height: 500px"
|
|
235
297
|
row-key="index"
|
|
236
|
-
:pagination="{ rowsPerPage: 0 }"
|
|
237
298
|
virtual-scroll
|
|
238
|
-
:rows-per-page-options="[0]"
|
|
239
299
|
@virtual-scroll="onScroll"
|
|
240
300
|
/>
|
|
241
301
|
</div>
|
|
@@ -316,6 +376,25 @@
|
|
|
316
376
|
</template>
|
|
317
377
|
</DlTable>
|
|
318
378
|
</div>
|
|
379
|
+
|
|
380
|
+
<div>
|
|
381
|
+
<p>Test reactive cells</p>
|
|
382
|
+
first row:
|
|
383
|
+
<div class="row">
|
|
384
|
+
<dl-input
|
|
385
|
+
v-for="(value, key) in tableRows[0]"
|
|
386
|
+
:key="key"
|
|
387
|
+
v-model="tableRows[0][key]"
|
|
388
|
+
:title="key"
|
|
389
|
+
/>
|
|
390
|
+
</div>
|
|
391
|
+
|
|
392
|
+
<DlTable
|
|
393
|
+
:rows="tableRows"
|
|
394
|
+
:columns="tableColumns"
|
|
395
|
+
title="Table Title"
|
|
396
|
+
/>
|
|
397
|
+
</div>
|
|
319
398
|
</div>
|
|
320
399
|
</div>
|
|
321
400
|
</template>
|
|
@@ -329,7 +408,7 @@ import {
|
|
|
329
408
|
DlButton
|
|
330
409
|
} from '../components'
|
|
331
410
|
import { defineComponent, ref, computed, nextTick } from 'vue-demi'
|
|
332
|
-
import { times, cloneDeep } from 'lodash'
|
|
411
|
+
import { times, cloneDeep, isNumber } from 'lodash'
|
|
333
412
|
|
|
334
413
|
const columns = [
|
|
335
414
|
{
|
|
@@ -574,7 +653,7 @@ export default defineComponent({
|
|
|
574
653
|
if (p.page < 1) {
|
|
575
654
|
p.page = 1
|
|
576
655
|
}
|
|
577
|
-
if (p.rowsPerPage
|
|
656
|
+
if (isNumber(p.rowsPerPage) && p.rowsPerPage < 1) {
|
|
578
657
|
p.rowsPerPage = 0
|
|
579
658
|
}
|
|
580
659
|
return p
|
package/src/demos/DlTabsDemo.vue
CHANGED
|
@@ -16,18 +16,107 @@
|
|
|
16
16
|
<h1>{{ item.label }}</h1>
|
|
17
17
|
</dl-tab-panel>
|
|
18
18
|
</dl-tab-panels>
|
|
19
|
+
|
|
20
|
+
<dl-tabs
|
|
21
|
+
v-model="selectedTab"
|
|
22
|
+
:items="tabItems"
|
|
23
|
+
full-width
|
|
24
|
+
vertical
|
|
25
|
+
style="margin-top: 100px"
|
|
26
|
+
@update:model-value="handleModelValueUpdate"
|
|
27
|
+
>
|
|
28
|
+
<template #top-right="props">
|
|
29
|
+
<div
|
|
30
|
+
:style="props.styles"
|
|
31
|
+
style="
|
|
32
|
+
width: 200px;
|
|
33
|
+
display: flex;
|
|
34
|
+
align-items: center;
|
|
35
|
+
justify-content: flex-end;
|
|
36
|
+
"
|
|
37
|
+
>
|
|
38
|
+
<dl-button
|
|
39
|
+
flat
|
|
40
|
+
size="s"
|
|
41
|
+
icon="icon-dl-refresh"
|
|
42
|
+
label="Refresh"
|
|
43
|
+
/>
|
|
44
|
+
<dl-button
|
|
45
|
+
size="s"
|
|
46
|
+
icon="icon-dl-pause"
|
|
47
|
+
label="Pause"
|
|
48
|
+
/>
|
|
49
|
+
</div>
|
|
50
|
+
</template>
|
|
51
|
+
</dl-tabs>
|
|
52
|
+
<div style="height: 4px" />
|
|
53
|
+
<dl-tab-panels v-model="selectedTab">
|
|
54
|
+
<dl-tab-panel
|
|
55
|
+
v-for="item in tabItems"
|
|
56
|
+
:key="item.name"
|
|
57
|
+
class="tabpanel"
|
|
58
|
+
:name="item.name"
|
|
59
|
+
>
|
|
60
|
+
<h1>{{ item.label }}</h1>
|
|
61
|
+
</dl-tab-panel>
|
|
62
|
+
</dl-tab-panels>
|
|
63
|
+
|
|
64
|
+
With smaller font 14px
|
|
65
|
+
<dl-tabs
|
|
66
|
+
v-model="selectedTab"
|
|
67
|
+
:items="tabItems"
|
|
68
|
+
style="margin-top: 100px; max-width: 60%"
|
|
69
|
+
font-size="14px"
|
|
70
|
+
@update:model-value="handleModelValueUpdate"
|
|
71
|
+
>
|
|
72
|
+
<template #top-right="props">
|
|
73
|
+
<div
|
|
74
|
+
:style="props.styles"
|
|
75
|
+
style="
|
|
76
|
+
width: 200px;
|
|
77
|
+
display: flex;
|
|
78
|
+
align-items: center;
|
|
79
|
+
justify-content: flex-end;
|
|
80
|
+
"
|
|
81
|
+
>
|
|
82
|
+
<dl-button
|
|
83
|
+
flat
|
|
84
|
+
size="s"
|
|
85
|
+
icon="icon-dl-refresh"
|
|
86
|
+
label="Refresh"
|
|
87
|
+
/>
|
|
88
|
+
<dl-button
|
|
89
|
+
size="s"
|
|
90
|
+
icon="icon-dl-pause"
|
|
91
|
+
label="Pause"
|
|
92
|
+
/>
|
|
93
|
+
</div>
|
|
94
|
+
</template>
|
|
95
|
+
</dl-tabs>
|
|
96
|
+
<div style="height: 4px" />
|
|
97
|
+
<dl-tab-panels v-model="selectedTab">
|
|
98
|
+
<dl-tab-panel
|
|
99
|
+
v-for="item in tabItems"
|
|
100
|
+
:key="item.name"
|
|
101
|
+
class="tabpanel"
|
|
102
|
+
:name="item.name"
|
|
103
|
+
>
|
|
104
|
+
<h1>{{ item.label }}</h1>
|
|
105
|
+
</dl-tab-panel>
|
|
106
|
+
</dl-tab-panels>
|
|
19
107
|
</div>
|
|
20
108
|
</template>
|
|
21
109
|
<script lang="ts">
|
|
22
110
|
import { defineComponent } from 'vue-demi'
|
|
23
|
-
import { DlTabs, DlTabPanel, DlTabPanels } from '../components'
|
|
111
|
+
import { DlTabs, DlTabPanel, DlTabPanels, DlButton } from '../components'
|
|
24
112
|
import { DlTabDetails } from '../components/types'
|
|
25
113
|
|
|
26
114
|
export default defineComponent({
|
|
27
115
|
components: {
|
|
28
116
|
DlTabs,
|
|
29
117
|
DlTabPanel,
|
|
30
|
-
DlTabPanels
|
|
118
|
+
DlTabPanels,
|
|
119
|
+
DlButton
|
|
31
120
|
},
|
|
32
121
|
data() {
|
|
33
122
|
return {
|
|
@@ -56,7 +145,7 @@ export default defineComponent({
|
|
|
56
145
|
}
|
|
57
146
|
})
|
|
58
147
|
</script>
|
|
59
|
-
<style>
|
|
148
|
+
<style lang="scss" scoped>
|
|
60
149
|
.tabpanel {
|
|
61
150
|
margin: 0 auto;
|
|
62
151
|
padding: 1rem;
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div style="width: 800px">
|
|
3
|
+
<div style="font-size: 14px">
|
|
4
|
+
<span>Max length: </span>
|
|
5
|
+
<input v-model="maxLength">
|
|
6
|
+
</div>
|
|
3
7
|
<div style="max-width: 500px; width: 100%">
|
|
4
8
|
<dl-text-area
|
|
5
9
|
v-model="textAreaValue"
|
|
6
10
|
placeholder="Type your text..."
|
|
7
11
|
show-counter
|
|
8
|
-
:max-length="
|
|
12
|
+
:max-length="maxLength"
|
|
13
|
+
max-height="500px"
|
|
14
|
+
title="Text area title"
|
|
15
|
+
required
|
|
16
|
+
tooltip="Quis fugiat et non eu proident sit et amet."
|
|
17
|
+
top-message="Pariatur consequat non sit aliqua labore ad reprehenderit deserunt ullamco incididunt non irure laborum deserunt."
|
|
9
18
|
enable-resize
|
|
10
|
-
|
|
11
|
-
error-message="Something went wrong!"
|
|
12
|
-
@keydown="log"
|
|
13
|
-
@focus="textAreaFocused = true"
|
|
14
|
-
@blur="textAreaFocused = false"
|
|
19
|
+
clear-button-tooltip
|
|
15
20
|
/>
|
|
16
|
-
<div style="margin-left: 20px">
|
|
17
|
-
<p>Value: {{ textAreaValue }}</p>
|
|
18
|
-
<p>Status: {{ textAreaFocused ? 'focused' : 'unfocused' }}</p>
|
|
19
|
-
</div>
|
|
20
21
|
</div>
|
|
21
22
|
</div>
|
|
22
23
|
</template>
|
|
@@ -31,14 +32,10 @@ export default defineComponent({
|
|
|
31
32
|
},
|
|
32
33
|
setup() {
|
|
33
34
|
const textAreaValue = ref('')
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
const log = (e: KeyboardEvent) => console.log(e)
|
|
37
|
-
|
|
35
|
+
const maxLength = ref(20)
|
|
38
36
|
return {
|
|
39
|
-
|
|
40
|
-
textAreaValue
|
|
41
|
-
textAreaFocused
|
|
37
|
+
maxLength,
|
|
38
|
+
textAreaValue
|
|
42
39
|
}
|
|
43
40
|
}
|
|
44
41
|
})
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="gallery-wrapper">
|
|
3
|
+
<div
|
|
4
|
+
:style="imageContainerStyles"
|
|
5
|
+
class="image-container"
|
|
6
|
+
>
|
|
7
|
+
<dl-thumbnail-gallery
|
|
8
|
+
v-model="selectedImage"
|
|
9
|
+
:images="images"
|
|
10
|
+
invalid-image="/src/demo/DlThumbnailGallery/images/error.png"
|
|
11
|
+
/>
|
|
12
|
+
</div>
|
|
13
|
+
<div class="menu">
|
|
14
|
+
<div class="menu__pagination">
|
|
15
|
+
{{ selectedIndex }} / {{ images.length }} Items
|
|
16
|
+
</div>
|
|
17
|
+
</div>
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script lang="ts">
|
|
22
|
+
import { defineComponent, ref, computed, watch } from 'vue-demi'
|
|
23
|
+
import { DlThumbnailGallery } from '../components'
|
|
24
|
+
|
|
25
|
+
interface DlThumbnail {
|
|
26
|
+
name: string
|
|
27
|
+
src: string
|
|
28
|
+
status: string
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
const images: DlThumbnail[] = []
|
|
32
|
+
for (let i = 1; i < 20; i++) {
|
|
33
|
+
images.push({
|
|
34
|
+
name: `Image ${i}`,
|
|
35
|
+
src: `https://picsum.photos/1000/800?random=${i}`,
|
|
36
|
+
status: ''
|
|
37
|
+
})
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
export default defineComponent({
|
|
41
|
+
components: {
|
|
42
|
+
DlThumbnailGallery
|
|
43
|
+
},
|
|
44
|
+
setup() {
|
|
45
|
+
const selectedImage = ref()
|
|
46
|
+
const selectedIndex = ref(0)
|
|
47
|
+
const imageContainerStyles = computed(() => {
|
|
48
|
+
return {
|
|
49
|
+
backgroundImage: `url(${
|
|
50
|
+
selectedImage.value?.src || images[0].src
|
|
51
|
+
})`
|
|
52
|
+
}
|
|
53
|
+
})
|
|
54
|
+
watch(selectedImage, (val) => {
|
|
55
|
+
selectedIndex.value =
|
|
56
|
+
images.findIndex(
|
|
57
|
+
(element: DlThumbnail) => element.src === val.src
|
|
58
|
+
) + 1
|
|
59
|
+
})
|
|
60
|
+
|
|
61
|
+
return { images, selectedImage, imageContainerStyles, selectedIndex }
|
|
62
|
+
}
|
|
63
|
+
})
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style lang="scss" scoped>
|
|
67
|
+
.gallery-wrapper {
|
|
68
|
+
width: 100%;
|
|
69
|
+
height: 100%;
|
|
70
|
+
display: flex;
|
|
71
|
+
flex-direction: column;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
.image-container {
|
|
75
|
+
user-select: none;
|
|
76
|
+
height: 100%;
|
|
77
|
+
width: 100%;
|
|
78
|
+
display: flex;
|
|
79
|
+
justify-content: center;
|
|
80
|
+
background-size: contain;
|
|
81
|
+
background-repeat: no-repeat;
|
|
82
|
+
background-position: center;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
.menu {
|
|
86
|
+
display: flex;
|
|
87
|
+
justify-content: center;
|
|
88
|
+
cursor: pointer;
|
|
89
|
+
margin-top: 10px;
|
|
90
|
+
&__pagination {
|
|
91
|
+
display: flex;
|
|
92
|
+
justify-content: center;
|
|
93
|
+
align-items: center;
|
|
94
|
+
color: var(--dl-color-medium);
|
|
95
|
+
font-size: 0.7em;
|
|
96
|
+
margin: 0px 10px;
|
|
97
|
+
}
|
|
98
|
+
}
|
|
99
|
+
</style>
|
|
@@ -16,10 +16,6 @@
|
|
|
16
16
|
type="number"
|
|
17
17
|
title="Collapse count"
|
|
18
18
|
/>
|
|
19
|
-
<dl-input
|
|
20
|
-
v-model="classItem"
|
|
21
|
-
title="Custom class for toast item"
|
|
22
|
-
/>
|
|
23
19
|
<dl-input
|
|
24
20
|
v-model="width"
|
|
25
21
|
title="Custom width for toast item"
|
|
@@ -106,6 +102,7 @@ import {
|
|
|
106
102
|
DlTextArea,
|
|
107
103
|
DlToast
|
|
108
104
|
} from '../components'
|
|
105
|
+
import { DlToastPositions, DlToastTypes } from '../components/types'
|
|
109
106
|
|
|
110
107
|
export default defineComponent({
|
|
111
108
|
name: 'DlToast',
|
|
@@ -124,16 +121,14 @@ export default defineComponent({
|
|
|
124
121
|
const type = ref('success')
|
|
125
122
|
const position = ref('bottom')
|
|
126
123
|
const closable = ref(true)
|
|
127
|
-
const classItem = ref('demo-toast')
|
|
128
124
|
const width = ref('auto')
|
|
129
125
|
const collapseCount = ref(null)
|
|
130
126
|
function showToastMessage() {
|
|
131
127
|
DlToast.open({
|
|
132
128
|
message: message.value,
|
|
133
|
-
position: position.value,
|
|
134
|
-
type: type.value,
|
|
129
|
+
position: position.value as DlToastPositions,
|
|
130
|
+
type: type.value as DlToastTypes,
|
|
135
131
|
duration: Number(duration.value) || 1000,
|
|
136
|
-
classItem: classItem.value,
|
|
137
132
|
closable: closable.value,
|
|
138
133
|
width: width.value,
|
|
139
134
|
collapseCount: collapseCount.value
|
|
@@ -145,7 +140,6 @@ export default defineComponent({
|
|
|
145
140
|
duration,
|
|
146
141
|
type,
|
|
147
142
|
position,
|
|
148
|
-
classItem,
|
|
149
143
|
closable,
|
|
150
144
|
width,
|
|
151
145
|
collapseCount
|