@mixd-id/web-scaffold 0.2.250801010 → 0.2.250801012
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/docs/components/AccountIcon.md +16 -0
- package/docs/components/Ahref.md +35 -0
- package/docs/components/Alert.md +72 -0
- package/docs/components/ArrayList.md +39 -0
- package/docs/components/Article.md +28 -0
- package/docs/components/BarChart.md +81 -0
- package/docs/components/Block.md +23 -0
- package/docs/components/Box.md +15 -0
- package/docs/components/Button.md +68 -0
- package/docs/components/Card.md +67 -0
- package/docs/components/Carousel.md +70 -0
- package/docs/components/Cart.md +20 -0
- package/docs/components/CartIcon.md +29 -0
- package/docs/components/Chart.md +53 -0
- package/docs/components/ChartBar.md +34 -0
- package/docs/components/ChatTyping.md +21 -0
- package/docs/components/Checkbox.md +63 -0
- package/docs/components/CodeEditor.md +25 -0
- package/docs/components/CollapsiblePanel.md +41 -0
- package/docs/components/ColorPicker.md +52 -0
- package/docs/components/Confirm.md +62 -0
- package/docs/components/ContextMenu.md +76 -0
- package/docs/components/ContextMenuItem.md +29 -0
- package/docs/components/CopyToClipboard.md +43 -0
- package/docs/components/Countdown.md +47 -0
- package/docs/components/Datepicker.md +61 -0
- package/docs/components/Datetimepicker.md +57 -0
- package/docs/components/DayTimeRange.md +20 -0
- package/docs/components/Dropdown.md +65 -0
- package/docs/components/ErrorText.md +15 -0
- package/docs/components/FBLogin.md +21 -0
- package/docs/components/Flex.md +44 -0
- package/docs/components/GHeatMaps.md +16 -0
- package/docs/components/GSignIn.md +21 -0
- package/docs/components/Gmaps.md +16 -0
- package/docs/components/GmapsDirection.md +20 -0
- package/docs/components/Grid.md +36 -0
- package/docs/components/HTMLEditor.md +26 -0
- package/docs/components/IconMenu.md +20 -0
- package/docs/components/Image.md +78 -0
- package/docs/components/Link.md +33 -0
- package/docs/components/MultiDropdown.md +46 -0
- package/docs/components/Radio.md +55 -0
- package/docs/components/Slider.md +47 -0
- package/docs/components/Switch.md +43 -0
- package/docs/components/Table.md +31 -0
- package/docs/components/Tabs.md +65 -0
- package/docs/components/Text.md +30 -0
- package/docs/components/Textarea.md +66 -0
- package/docs/components/Textbox.md +97 -0
- package/docs/components/Timepicker.md +62 -0
- package/docs/components/Toast.md +59 -0
- package/docs/components/Uploader.md +51 -0
- package/docs/components/Video.md +54 -0
- package/package.json +65 -2
- package/docs/components/Dashboard.md +0 -56
- package/docs/components/Header2.md +0 -16
- package/log.txt +0 -7
- package/public/assets/dashboard/bar.png +0 -0
- package/public/assets/dashboard/doughnut.png +0 -0
- package/public/assets/dashboard/metric.png +0 -0
- package/public/assets/dashboard/pie.png +0 -0
- package/public/assets/dashboard/polar-area.png +0 -0
- package/public/assets/dashboard/virtual-table.png +0 -0
- package/public/static/dashboard/bar.png +0 -0
- package/public/static/dashboard/doughnut.png +0 -0
- package/public/static/dashboard/metric.png +0 -0
- package/public/static/dashboard/pie.png +0 -0
- package/public/static/dashboard/polar-area.png +0 -0
- package/public/static/dashboard/virtual-table.png +0 -0
- package/src/components/404.vue +0 -61
- package/src/components/AccountIcon.vue +0 -19
- package/src/components/Ahref.vue +0 -200
- package/src/components/Alert.vue +0 -257
- package/src/components/ArrayList.vue +0 -49
- package/src/components/Article.vue +0 -387
- package/src/components/Block.vue +0 -31
- package/src/components/Box.vue +0 -34
- package/src/components/Button.vue +0 -258
- package/src/components/Card.vue +0 -257
- package/src/components/Carousel.vue +0 -364
- package/src/components/Cart.vue +0 -192
- package/src/components/CartIcon.vue +0 -89
- package/src/components/Chart.vue +0 -485
- package/src/components/ChartBar.vue +0 -192
- package/src/components/ChatTyping.vue +0 -69
- package/src/components/Checkbox.vue +0 -200
- package/src/components/Checkout.vue +0 -373
- package/src/components/CheckoutDelivery.vue +0 -267
- package/src/components/CodeEditor.vue +0 -50
- package/src/components/CollapsiblePanel.vue +0 -70
- package/src/components/ColorPicker.vue +0 -165
- package/src/components/ColorPicker2.vue +0 -186
- package/src/components/ColorPicker3.vue +0 -100
- package/src/components/Confirm.vue +0 -180
- package/src/components/ContextMenu.vue +0 -265
- package/src/components/ContextMenuItem.vue +0 -53
- package/src/components/ConversationBuilder.vue +0 -161
- package/src/components/CopyToClipboard.vue +0 -34
- package/src/components/Countdown.vue +0 -264
- package/src/components/DGrid.vue +0 -21
- package/src/components/DGridItem.vue +0 -263
- package/src/components/Dashboard.vue +0 -243
- package/src/components/Dashboard2.vue +0 -118
- package/src/components/DashboardComponentSelector.vue +0 -96
- package/src/components/DashboardConfigs.vue +0 -202
- package/src/components/DataList.vue +0 -92
- package/src/components/Datepicker.vue +0 -399
- package/src/components/DayTimeRange.vue +0 -126
- package/src/components/Dropdown.vue +0 -224
- package/src/components/ErrorText.vue +0 -57
- package/src/components/FBLogin.vue +0 -194
- package/src/components/Feed.vue +0 -118
- package/src/components/Flex.vue +0 -44
- package/src/components/GHeatMaps.vue +0 -317
- package/src/components/GSignIn.vue +0 -166
- package/src/components/Gmaps.vue +0 -251
- package/src/components/GmapsDirection.vue +0 -191
- package/src/components/Grid.vue +0 -35
- package/src/components/HTMLEditor.vue +0 -588
- package/src/components/IconMenu.vue +0 -95
- package/src/components/IconMenu2.vue +0 -89
- package/src/components/IconPlus.vue +0 -89
- package/src/components/Image.vue +0 -263
- package/src/components/Image360.vue +0 -140
- package/src/components/ImageFullScreen.vue +0 -101
- package/src/components/ImagePreview.vue +0 -93
- package/src/components/ImageUploader.vue +0 -114
- package/src/components/ImportModal.vue +0 -260
- package/src/components/Link.vue +0 -95
- package/src/components/List.vue +0 -1381
- package/src/components/ListContextMenu.vue +0 -88
- package/src/components/ListItem.vue +0 -160
- package/src/components/ListPage1.vue +0 -1401
- package/src/components/ListPage1Filter.vue +0 -170
- package/src/components/ListView.vue +0 -961
- package/src/components/ListViewBarSummary.vue +0 -81
- package/src/components/ListViewLineSummary.vue +0 -75
- package/src/components/ListViewLiveBarSummary.vue +0 -52
- package/src/components/ListViewMapSummary.vue +0 -56
- package/src/components/ListViewSettings.vue +0 -514
- package/src/components/ListViewTableSummary.vue +0 -77
- package/src/components/LogViewerItem.vue +0 -116
- package/src/components/MarkdownEdit.vue +0 -128
- package/src/components/MarkdownPreview.vue +0 -102
- package/src/components/MenuItem1.vue +0 -36
- package/src/components/Modal.vue +0 -456
- package/src/components/MultiDropdown.vue +0 -124
- package/src/components/MultilineText.vue +0 -174
- package/src/components/OTPField.vue +0 -139
- package/src/components/ObjectTree.vue +0 -105
- package/src/components/PageBuilder.vue +0 -449
- package/src/components/Paragraph.vue +0 -40
- package/src/components/PresetSelectorFilterItem.vue +0 -203
- package/src/components/Radio.vue +0 -109
- package/src/components/SearchModal.vue +0 -153
- package/src/components/Slider.vue +0 -317
- package/src/components/SplitPane.vue +0 -129
- package/src/components/Svg.vue +0 -33
- package/src/components/SvgEditor.vue +0 -173
- package/src/components/Switch.vue +0 -101
- package/src/components/TabView.vue +0 -105
- package/src/components/Table.vue +0 -56
- package/src/components/TableView.vue +0 -200
- package/src/components/TableViewHead.vue +0 -159
- package/src/components/Tabs.vue +0 -131
- package/src/components/Test.vue +0 -23
- package/src/components/Testimonial.vue +0 -86
- package/src/components/Text.vue +0 -34
- package/src/components/TextBlock.vue +0 -50
- package/src/components/TextEditor.vue +0 -85
- package/src/components/TextWithTag.vue +0 -298
- package/src/components/Textarea.vue +0 -184
- package/src/components/Textbox.vue +0 -216
- package/src/components/Thumbnail.vue +0 -27
- package/src/components/Timepicker.vue +0 -125
- package/src/components/Toast.vue +0 -117
- package/src/components/TreeMenu.vue +0 -122
- package/src/components/TreeView.vue +0 -106
- package/src/components/TreeView2.vue +0 -38
- package/src/components/TreeViewItem.vue +0 -453
- package/src/components/TreeViewItem1.vue +0 -282
- package/src/components/TreeViewItem2.vue +0 -55
- package/src/components/Uploader.vue +0 -45
- package/src/components/Video.vue +0 -119
- package/src/components/VirtualGrid.vue +0 -297
- package/src/components/VirtualScroll.vue +0 -282
- package/src/components/VirtualTable.vue +0 -956
- package/src/components/YoutubeVideo.vue +0 -196
- package/src/configs/dashboard/bar.js +0 -10
- package/src/configs/dashboard/collection-1.js +0 -5
- package/src/configs/dashboard/data-table.js +0 -9
- package/src/configs/dashboard/doughnut.js +0 -7
- package/src/configs/dashboard/gheatmaps.js +0 -9
- package/src/configs/dashboard/grid-2.js +0 -34
- package/src/configs/dashboard/grid-3.js +0 -34
- package/src/configs/dashboard/grid-4.js +0 -34
- package/src/configs/dashboard/grid.js +0 -15
- package/src/configs/dashboard/metric.js +0 -10
- package/src/configs/dashboard/pie.js +0 -7
- package/src/configs/dashboard/polar-area.js +0 -7
- package/src/configs/dashboard/virtual-table.js +0 -9
- package/src/configs/icons-fa.json +0 -12
- package/src/configs/web-page-builder.js +0 -118
- package/src/defs/dashboard-preset.js +0 -22
- package/src/directives/intersect.js +0 -26
- package/src/hooks/device.js +0 -14
- package/src/index.css +0 -3
- package/src/index.js +0 -648
- package/src/middleware/http/trim-string.js +0 -20
- package/src/mixin/component.js +0 -306
- package/src/mixin/ready-state.js +0 -37
- package/src/stores/components.js +0 -36
- package/src/stores/datasource.js +0 -11
- package/src/themes/default/index.js +0 -303
- package/src/utils/dashboard.js +0 -140
- package/src/utils/event-bus.js +0 -8
- package/src/utils/helpers.cjs +0 -635
- package/src/utils/helpers.js +0 -635
- package/src/utils/helpers.mjs +0 -722
- package/src/utils/importer.js +0 -209
- package/src/utils/list.mjs +0 -1509
- package/src/utils/listpage1.js +0 -1507
- package/src/utils/listview.js +0 -1287
- package/src/utils/preset-selector.cjs +0 -1455
- package/src/utils/preset-selector.js +0 -1452
- package/src/utils/preset-selector.mjs +0 -234
- package/src/utils/queue.js +0 -63
- package/src/utils/selection.js +0 -43
- package/src/utils/web.js +0 -50
- package/src/utils/web.mjs +0 -120
- package/src/utils/wss.js +0 -296
- package/src/utils/wss.mjs +0 -285
- package/src/widgets/AhrefSetting.vue +0 -97
- package/src/widgets/ArticleSetting.vue +0 -457
- package/src/widgets/BackgroundColorSetting.vue +0 -153
- package/src/widgets/BackgroundSetting.vue +0 -132
- package/src/widgets/BlockSetting.vue +0 -49
- package/src/widgets/BorderColorSetting.vue +0 -57
- package/src/widgets/BorderSetting.vue +0 -201
- package/src/widgets/BotEditor/BotEditorActions.vue +0 -163
- package/src/widgets/BotEditor/BotEditorSettings.vue +0 -21
- package/src/widgets/BotEditor.vue +0 -248
- package/src/widgets/BoxSetting.vue +0 -53
- package/src/widgets/ButtonSetting.vue +0 -113
- package/src/widgets/CarouselSetting.vue +0 -181
- package/src/widgets/CartSetting.vue +0 -46
- package/src/widgets/CheckoutSetting.vue +0 -46
- package/src/widgets/CollapsiblePanelSetting.vue +0 -46
- package/src/widgets/ColumnSelector.vue +0 -104
- package/src/widgets/ComponentPropertyLabel.vue +0 -35
- package/src/widgets/ComponentPropertySelector.vue +0 -115
- package/src/widgets/ComponentSetting.vue +0 -2220
- package/src/widgets/ComponentSetting2.vue +0 -927
- package/src/widgets/ComponentSetting3.vue +0 -231
- package/src/widgets/ContactForm.vue +0 -193
- package/src/widgets/ContactFormSetting.vue +0 -395
- package/src/widgets/CountdownSetting.vue +0 -76
- package/src/widgets/Dashboard/BarChart.vue +0 -366
- package/src/widgets/Dashboard/BarChartSetting.vue +0 -317
- package/src/widgets/Dashboard/DataTable.vue +0 -125
- package/src/widgets/Dashboard/DataTableSetting.vue +0 -243
- package/src/widgets/Dashboard/DatasourceFilterSharing.vue +0 -93
- package/src/widgets/Dashboard/DatasourcePreview.vue +0 -93
- package/src/widgets/Dashboard/DatasourceSelector.vue +0 -122
- package/src/widgets/Dashboard/Doughnut.vue +0 -199
- package/src/widgets/Dashboard/DoughnutSetting.vue +0 -196
- package/src/widgets/Dashboard/GHeatMapsSetting.vue +0 -108
- package/src/widgets/Dashboard/InteractionEdit.vue +0 -228
- package/src/widgets/Dashboard/Metric.vue +0 -135
- package/src/widgets/Dashboard/MetricSetting.vue +0 -227
- package/src/widgets/Dashboard/Pie.vue +0 -188
- package/src/widgets/Dashboard/PieSetting.vue +0 -247
- package/src/widgets/Dashboard/PolarArea.vue +0 -201
- package/src/widgets/Dashboard/PolarAreaSetting.vue +0 -195
- package/src/widgets/Dashboard/SharingModal.vue +0 -115
- package/src/widgets/Dashboard/ViewSelector.vue +0 -183
- package/src/widgets/Dashboard/VirtualColumnEdit.vue +0 -97
- package/src/widgets/Dashboard/VirtualTableSetting.vue +0 -171
- package/src/widgets/Dashboard0.vue +0 -1856
- package/src/widgets/DataListSetting.vue +0 -102
- package/src/widgets/EffectSetting.vue +0 -94
- package/src/widgets/EmbeddedVideo.vue +0 -60
- package/src/widgets/EmbeddedVideoSetting.vue +0 -50
- package/src/widgets/FAQ.vue +0 -98
- package/src/widgets/FAQSetting.vue +0 -94
- package/src/widgets/FeatureList.vue +0 -131
- package/src/widgets/FeatureListSetting.vue +0 -233
- package/src/widgets/FiltersSetting.vue +0 -88
- package/src/widgets/FlexSetting.vue +0 -174
- package/src/widgets/GridSetting.vue +0 -165
- package/src/widgets/Header.vue +0 -15
- package/src/widgets/Header0.vue +0 -41
- package/src/widgets/Header0Setting.vue +0 -75
- package/src/widgets/Header2.vue +0 -65
- package/src/widgets/Header2Setting.vue +0 -193
- package/src/widgets/HeaderSetting.vue +0 -102
- package/src/widgets/IconList.vue +0 -51
- package/src/widgets/IconListSetting.vue +0 -188
- package/src/widgets/ImageSetting.vue +0 -119
- package/src/widgets/LayoutSetting.vue +0 -251
- package/src/widgets/LinkSetting.vue +0 -209
- package/src/widgets/LinkSettingModal.vue +0 -173
- package/src/widgets/LogViewer.vue +0 -85
- package/src/widgets/MarginPaddingSetting.vue +0 -58
- package/src/widgets/MarginSetting.vue +0 -142
- package/src/widgets/MenuEditor.vue +0 -256
- package/src/widgets/MenuItem1Setting.vue +0 -78
- package/src/widgets/ModalSetting.vue +0 -94
- package/src/widgets/MultiValueSetting.vue +0 -121
- package/src/widgets/MultiValueSetting2.vue +0 -147
- package/src/widgets/OGSettingModal.vue +0 -103
- package/src/widgets/PaddingSetting.vue +0 -142
- package/src/widgets/ParagraphSetting.vue +0 -89
- package/src/widgets/PositionSetting.vue +0 -209
- package/src/widgets/PresetBar.vue +0 -990
- package/src/widgets/PresetBarPivot.vue +0 -198
- package/src/widgets/PresetBarPivotColumnEdit.vue +0 -197
- package/src/widgets/PresetSelector.vue +0 -685
- package/src/widgets/Review.vue +0 -131
- package/src/widgets/ReviewSetting.vue +0 -201
- package/src/widgets/SearchModalSetting.vue +0 -70
- package/src/widgets/Share.vue +0 -164
- package/src/widgets/ShareSetting.vue +0 -99
- package/src/widgets/SizingSetting.vue +0 -306
- package/src/widgets/SpacingSetting.vue +0 -77
- package/src/widgets/StyleSetting.vue +0 -543
- package/src/widgets/StyleSetting2.vue +0 -90
- package/src/widgets/SvgSetting.vue +0 -133
- package/src/widgets/TableSetting.vue +0 -172
- package/src/widgets/TestimonialSetting.vue +0 -161
- package/src/widgets/TextBlockSetting.vue +0 -81
- package/src/widgets/ThumbnailSetting.vue +0 -49
- package/src/widgets/TransitionSetting.vue +0 -64
- package/src/widgets/TypographySetting.vue +0 -334
- package/src/widgets/UserActionBuilder/UserActionCondition.vue +0 -99
- package/src/widgets/UserActionBuilder/UserActionConsole.vue +0 -97
- package/src/widgets/UserActionBuilder/UserActionItem.vue +0 -273
- package/src/widgets/UserActionBuilder/UserActionOutput.vue +0 -152
- package/src/widgets/UserActionBuilder/UserActionOutputDelay.vue +0 -27
- package/src/widgets/UserActionBuilder/UserActionOutputLog.vue +0 -28
- package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +0 -112
- package/src/widgets/UserActionBuilder/UserActionProps.vue +0 -213
- package/src/widgets/UserActionBuilder.vue +0 -314
- package/src/widgets/WebComponentSelector.vue +0 -205
- package/src/widgets/WebDatasourceSelector.vue +0 -153
- package/src/widgets/WebLayoutSelector.vue +0 -147
- package/src/widgets/WebPageBuilder.vue +0 -2161
- package/src/widgets/WebPageBuilder2.vue +0 -1091
- package/src/widgets/WebPageBuilder3.vue +0 -411
- package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +0 -54
- package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BlurSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +0 -64
- package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +0 -69
- package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +0 -73
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -65
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +0 -178
- package/src/widgets/WebPageBuilder4/DisplaySetting.vue +0 -76
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +0 -71
- package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +0 -70
- package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +0 -74
- package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +0 -71
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +0 -96
- package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +0 -69
- package/src/widgets/WebPageBuilder4/GapSetting.vue +0 -75
- package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +0 -68
- package/src/widgets/WebPageBuilder4/GridSetting.vue +0 -216
- package/src/widgets/WebPageBuilder4/HeightSetting.vue +0 -98
- package/src/widgets/WebPageBuilder4/ImageSetting.vue +0 -102
- package/src/widgets/WebPageBuilder4/MarginSetting.vue +0 -73
- package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +0 -82
- package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +0 -90
- package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +0 -81
- package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +0 -101
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +0 -163
- package/src/widgets/WebPageBuilder4/OpacitySetting.vue +0 -77
- package/src/widgets/WebPageBuilder4/OverflowSetting.vue +0 -81
- package/src/widgets/WebPageBuilder4/PaddingSetting.vue +0 -57
- package/src/widgets/WebPageBuilder4/PositionSetting.vue +0 -191
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -176
- package/src/widgets/WebPageBuilder4/TextSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4/TreeView.vue +0 -46
- package/src/widgets/WebPageBuilder4/TreeViewItem.vue +0 -303
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +0 -141
- package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +0 -172
- package/src/widgets/WebPageBuilder4/WidthSetting.vue +0 -105
- package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +0 -72
- package/src/widgets/WebPageBuilder4.vue +0 -798
- package/src/widgets/WebPagePreview.vue +0 -295
- package/src/widgets/WebPageSelector.vue +0 -173
- package/src/widgets/WebTemplateCreator.vue +0 -156
- package/src/widgets/YoutubeVideoSetting.vue +0 -68
- package/tailwind.config.js +0 -481
package/src/components/Svg.vue
DELETED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<svg xmlns="http://www.w3.org/2000/svg" :viewBox="viewBox" :width="svgWidth" :height="svgHeight" v-html="html" />
|
|
3
|
-
</template>
|
|
4
|
-
|
|
5
|
-
<script>
|
|
6
|
-
|
|
7
|
-
import {componentMixin} from "../mixin/component";
|
|
8
|
-
|
|
9
|
-
export default {
|
|
10
|
-
|
|
11
|
-
mixins: [ componentMixin ],
|
|
12
|
-
|
|
13
|
-
props: {
|
|
14
|
-
|
|
15
|
-
html: {
|
|
16
|
-
type: String,
|
|
17
|
-
default: ''
|
|
18
|
-
},
|
|
19
|
-
|
|
20
|
-
viewBox: String,
|
|
21
|
-
|
|
22
|
-
svgWidth: [ String, Number ],
|
|
23
|
-
|
|
24
|
-
svgHeight: [ String, Number ],
|
|
25
|
-
|
|
26
|
-
},
|
|
27
|
-
}
|
|
28
|
-
</script>
|
|
29
|
-
|
|
30
|
-
<style module>
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
</style>
|
|
@@ -1,173 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div>
|
|
5
|
-
<small class="text-text-400">SVG Text</small>
|
|
6
|
-
<code ref="code"
|
|
7
|
-
contenteditable="true"
|
|
8
|
-
spellcheck="false"
|
|
9
|
-
@paste="onPaste"
|
|
10
|
-
@blur="textChanged">
|
|
11
|
-
{{ modelValue }}
|
|
12
|
-
</code>
|
|
13
|
-
</div>
|
|
14
|
-
|
|
15
|
-
<div class="flex flex-row gap-3">
|
|
16
|
-
<div>
|
|
17
|
-
<small class="text-text-400">Width</small>
|
|
18
|
-
<Textbox ref="widthText"
|
|
19
|
-
class="w-[100px]"
|
|
20
|
-
maxlength="6"
|
|
21
|
-
v-model="attrs.width"
|
|
22
|
-
@change="sizeChanged"
|
|
23
|
-
@keyup.enter="sizeChanged">
|
|
24
|
-
<template #end>
|
|
25
|
-
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.widthText, { key:'width' })">
|
|
26
|
-
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
27
|
-
</button>
|
|
28
|
-
</template>
|
|
29
|
-
</Textbox>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div>
|
|
33
|
-
<small class="text-text-400">Height</small>
|
|
34
|
-
<Textbox ref="heightText"
|
|
35
|
-
class="w-[100px]"
|
|
36
|
-
maxlength="6"
|
|
37
|
-
v-model="attrs.height"
|
|
38
|
-
@change="sizeChanged"
|
|
39
|
-
@keyup.enter="sizeChanged">
|
|
40
|
-
<template #end>
|
|
41
|
-
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.heightText, { key:'height' })">
|
|
42
|
-
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
43
|
-
</button>
|
|
44
|
-
</template>
|
|
45
|
-
</Textbox>
|
|
46
|
-
</div>
|
|
47
|
-
|
|
48
|
-
<div>
|
|
49
|
-
<small class="text-text-400">Fill</small>
|
|
50
|
-
<Textbox ref="fillText"
|
|
51
|
-
class="w-[100px]"
|
|
52
|
-
maxlength="6"
|
|
53
|
-
v-model="attrs.fill"
|
|
54
|
-
@change="sizeChanged"
|
|
55
|
-
@keyup.enter="sizeChanged">
|
|
56
|
-
<template #end>
|
|
57
|
-
<button type="button" class="pr-3" @click="$refs.sizeMenu.open($refs.fillText, { key:'fill' })">
|
|
58
|
-
<svg width="11" height="11" class="fill-text-300 hover:fill-text" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M310.6 246.6l-127.1 128C176.4 380.9 168.2 384 160 384s-16.38-3.125-22.63-9.375l-127.1-128C.2244 237.5-2.516 223.7 2.438 211.8S19.07 192 32 192h255.1c12.94 0 24.62 7.781 29.58 19.75S319.8 237.5 310.6 246.6z"/></svg>
|
|
59
|
-
</button>
|
|
60
|
-
</template>
|
|
61
|
-
</Textbox>
|
|
62
|
-
</div>
|
|
63
|
-
</div>
|
|
64
|
-
|
|
65
|
-
<ContextMenu ref="sizeMenu" position="bottom-right">
|
|
66
|
-
<template #default="{ context }">
|
|
67
|
-
<div class="flex flex-col divide-y divide-border-50">
|
|
68
|
-
<button v-for="value in defaultValues[context?.key]"
|
|
69
|
-
type="button"
|
|
70
|
-
class="menu-item p-3"
|
|
71
|
-
@click="attrs[context.key] = value; sizeChanged()">
|
|
72
|
-
{{ value }}
|
|
73
|
-
</button>
|
|
74
|
-
</div>
|
|
75
|
-
</template>
|
|
76
|
-
</ContextMenu>
|
|
77
|
-
</div>
|
|
78
|
-
</template>
|
|
79
|
-
|
|
80
|
-
<script setup>
|
|
81
|
-
|
|
82
|
-
import {ref, useTemplateRef} from "vue";
|
|
83
|
-
|
|
84
|
-
const attrs = ref({
|
|
85
|
-
width: '',
|
|
86
|
-
height: '',
|
|
87
|
-
fill: ''
|
|
88
|
-
})
|
|
89
|
-
|
|
90
|
-
const size = [
|
|
91
|
-
'11px',
|
|
92
|
-
'12px',
|
|
93
|
-
'13px',
|
|
94
|
-
'14px',
|
|
95
|
-
'16px',
|
|
96
|
-
'18px',
|
|
97
|
-
'21px',
|
|
98
|
-
'24px',
|
|
99
|
-
]
|
|
100
|
-
|
|
101
|
-
const defaultValues = ref({
|
|
102
|
-
height: size,
|
|
103
|
-
width: size,
|
|
104
|
-
fill: [
|
|
105
|
-
'#000',
|
|
106
|
-
'#fff'
|
|
107
|
-
]
|
|
108
|
-
})
|
|
109
|
-
|
|
110
|
-
const { modelValue } = defineProps({
|
|
111
|
-
modelValue: String
|
|
112
|
-
})
|
|
113
|
-
|
|
114
|
-
const emit = defineEmits(['update:modelValue'])
|
|
115
|
-
const code = useTemplateRef('code')
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
function onPaste(e) {
|
|
119
|
-
e.preventDefault()
|
|
120
|
-
let text = (e.clipboardData || window.clipboardData).getData("text");
|
|
121
|
-
|
|
122
|
-
for(let key in attrs.value){
|
|
123
|
-
const match = text.match(new RegExp(`${key}="([^"]*)"`))
|
|
124
|
-
if(match && match[1]){
|
|
125
|
-
attrs.value[key] = match[1]
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
|
|
129
|
-
emit('update:modelValue', text)
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
function textChanged(){
|
|
133
|
-
emit('update:modelValue', code.value.innerText)
|
|
134
|
-
}
|
|
135
|
-
|
|
136
|
-
function sizeChanged(){
|
|
137
|
-
let curValue = modelValue ?? ''
|
|
138
|
-
|
|
139
|
-
let text = []
|
|
140
|
-
for(let key in attrs.value){
|
|
141
|
-
if(attrs.value[key] && attrs.value[key].length > 0){
|
|
142
|
-
text.push(`${key}="${attrs.value[key]}"`)
|
|
143
|
-
|
|
144
|
-
curValue = curValue.replace(new RegExp(`${key}="[^"]*"`, 'g'), '')
|
|
145
|
-
}
|
|
146
|
-
}
|
|
147
|
-
text = text.length > 0 ? ' ' + text.join(' ') : ''
|
|
148
|
-
|
|
149
|
-
curValue = curValue.replace(/<svg /, `<svg${text} `)
|
|
150
|
-
|
|
151
|
-
emit('update:modelValue', curValue)
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
</script>
|
|
155
|
-
|
|
156
|
-
<style module>
|
|
157
|
-
|
|
158
|
-
.comp{
|
|
159
|
-
@apply flex flex-col gap-3;
|
|
160
|
-
}
|
|
161
|
-
|
|
162
|
-
.comp code{
|
|
163
|
-
@apply border-[1px] border-border-200 bg-base-300 rounded-lg flex flex-col overflow-hidden;
|
|
164
|
-
@apply p-6;
|
|
165
|
-
white-space: pre-wrap;
|
|
166
|
-
tab-size: 1rem;
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
.comp [contenteditable]{
|
|
170
|
-
outline: 0px solid transparent;
|
|
171
|
-
}
|
|
172
|
-
|
|
173
|
-
</style>
|
|
@@ -1,101 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.switch">
|
|
3
|
-
<input type="checkbox" :id="id" @change="changed"
|
|
4
|
-
:checked="checked" :disabled="isReadonly" />
|
|
5
|
-
<label :for="id"><span></span></label>
|
|
6
|
-
</div>
|
|
7
|
-
</template>
|
|
8
|
-
|
|
9
|
-
<script>
|
|
10
|
-
|
|
11
|
-
import {parseBoolean, uid} from "../utils/helpers.mjs"
|
|
12
|
-
|
|
13
|
-
export default{
|
|
14
|
-
|
|
15
|
-
props:{
|
|
16
|
-
|
|
17
|
-
modelValue: undefined,
|
|
18
|
-
|
|
19
|
-
trueValue: undefined,
|
|
20
|
-
|
|
21
|
-
falseValue: undefined,
|
|
22
|
-
|
|
23
|
-
readonly: undefined,
|
|
24
|
-
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
computed: {
|
|
28
|
-
|
|
29
|
-
checked(){
|
|
30
|
-
return (this.trueValue && this.trueValue === this.modelValue) ||
|
|
31
|
-
parseBoolean(this.modelValue)
|
|
32
|
-
},
|
|
33
|
-
|
|
34
|
-
isReadonly(){
|
|
35
|
-
return parseBoolean(this.readonly)
|
|
36
|
-
},
|
|
37
|
-
|
|
38
|
-
},
|
|
39
|
-
|
|
40
|
-
emits: ['update:modelValue', 'change'],
|
|
41
|
-
|
|
42
|
-
data(){
|
|
43
|
-
return {
|
|
44
|
-
id: uid('switch_')
|
|
45
|
-
}
|
|
46
|
-
},
|
|
47
|
-
|
|
48
|
-
methods: {
|
|
49
|
-
|
|
50
|
-
changed(e){
|
|
51
|
-
const value = e.target.checked ?
|
|
52
|
-
(this.trueValue ?? 1) :
|
|
53
|
-
(this.falseValue ?? 0)
|
|
54
|
-
|
|
55
|
-
this.$emit('update:modelValue', value)
|
|
56
|
-
this.$emit('change', value)
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
</script>
|
|
62
|
-
|
|
63
|
-
<style module>
|
|
64
|
-
|
|
65
|
-
.switch{
|
|
66
|
-
@apply text-left flex items-center;
|
|
67
|
-
}
|
|
68
|
-
|
|
69
|
-
.switch>*{
|
|
70
|
-
vertical-align: middle;
|
|
71
|
-
}
|
|
72
|
-
|
|
73
|
-
.switch input{
|
|
74
|
-
@apply hidden;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.switch label{
|
|
78
|
-
@apply w-[3rem] inline-block rounded-2xl bg-base-300 h-[2rem];
|
|
79
|
-
@apply border-[1px] border-border-200 hover:border-border-300;
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
.switch label>span{
|
|
83
|
-
@apply mt-[.2rem] mx-1 w-[1.4rem] h-[1.4rem] inline-block align-middle rounded-full bg-text-300;
|
|
84
|
-
transition: margin 200ms ease;
|
|
85
|
-
}
|
|
86
|
-
|
|
87
|
-
.switch>input:checked + label{
|
|
88
|
-
@apply bg-primary;
|
|
89
|
-
}
|
|
90
|
-
.switch>input:checked + label>span{
|
|
91
|
-
@apply ml-[1.3rem] border-base bg-white
|
|
92
|
-
}
|
|
93
|
-
.switch>input:checked:disabled + label{
|
|
94
|
-
@apply bg-text-50;
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
.switch>input:checked + label + *,
|
|
98
|
-
.switch>input:not(:checked) + label + * + *{
|
|
99
|
-
@apply hidden;
|
|
100
|
-
}
|
|
101
|
-
</style>
|
|
@@ -1,105 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.tabView">
|
|
3
|
-
<div :class="computedHeadClass">
|
|
4
|
-
<div v-for="(name, idx) in slotNames" :class="idx === selectedIndex ? $style['tabViewHeaderActive'] : ''"
|
|
5
|
-
@click="selectedIndex = idx">
|
|
6
|
-
<slot v-if="$slots['title__' + name]" :name="'title__' + name"></slot>
|
|
7
|
-
<span v-else :class="headItemClass">{{ titles[idx] ?? 'Untitled' }}</span>
|
|
8
|
-
</div>
|
|
9
|
-
</div>
|
|
10
|
-
<div :class="bodyClass">
|
|
11
|
-
<div v-for="(name, idx) in slotNames" v-show="idx === selectedIndex">
|
|
12
|
-
<slot v-if="name.substring(0, 7) !== 'title__'" :name="name"></slot>
|
|
13
|
-
</div>
|
|
14
|
-
</div>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
export default{
|
|
20
|
-
|
|
21
|
-
props:{
|
|
22
|
-
|
|
23
|
-
title:{
|
|
24
|
-
type: String
|
|
25
|
-
},
|
|
26
|
-
|
|
27
|
-
headClass:{
|
|
28
|
-
type: String,
|
|
29
|
-
default: "bg-white"
|
|
30
|
-
},
|
|
31
|
-
|
|
32
|
-
headItemClass:{
|
|
33
|
-
type: String,
|
|
34
|
-
default: ""
|
|
35
|
-
},
|
|
36
|
-
|
|
37
|
-
bodyClass:{
|
|
38
|
-
type: String,
|
|
39
|
-
default: "bg-white"
|
|
40
|
-
},
|
|
41
|
-
|
|
42
|
-
defaultIndex:{
|
|
43
|
-
type: String,
|
|
44
|
-
default: "0"
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
modelValue:{
|
|
48
|
-
type: Number,
|
|
49
|
-
default: 0
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
mounted(){
|
|
55
|
-
},
|
|
56
|
-
|
|
57
|
-
data(){
|
|
58
|
-
|
|
59
|
-
const selectedIndex = parseInt(this.defaultIndex)
|
|
60
|
-
return {
|
|
61
|
-
selectedIndex
|
|
62
|
-
}
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
computed:{
|
|
66
|
-
|
|
67
|
-
computedHeadClass(){
|
|
68
|
-
return [
|
|
69
|
-
this.$style['tabViewHeader'],
|
|
70
|
-
this.headClass
|
|
71
|
-
]
|
|
72
|
-
.join(' ')
|
|
73
|
-
.trim()
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
slotNames(){
|
|
77
|
-
return Object.keys(this.$slots).filter((key) => key.substring(0, 7) !== 'title__')
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
titles(){
|
|
81
|
-
return this.title.split(',')
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
}
|
|
87
|
-
</script>
|
|
88
|
-
|
|
89
|
-
<style module>
|
|
90
|
-
|
|
91
|
-
.tabView{
|
|
92
|
-
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
.tabViewHeader{
|
|
96
|
-
@apply overflow-x-auto whitespace-nowrap;
|
|
97
|
-
}
|
|
98
|
-
.tabViewHeader>*{
|
|
99
|
-
@apply inline-block p-2 px-4 border-b-[1px] border-transparent bg-white cursor-pointer align-middle
|
|
100
|
-
}
|
|
101
|
-
.tabViewHeaderActive{
|
|
102
|
-
@apply border-red-500;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
</style>
|
package/src/components/Table.vue
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
<table>
|
|
4
|
-
<thead>
|
|
5
|
-
<tr>
|
|
6
|
-
<th v-for="header in headers">{{ header.text }}</th>
|
|
7
|
-
</tr>
|
|
8
|
-
</thead>
|
|
9
|
-
<tbody>
|
|
10
|
-
<tr v-for="content in contents">
|
|
11
|
-
<td v-for="header in headers">{{ content[header.key] ?? '' }}</td>
|
|
12
|
-
</tr>
|
|
13
|
-
</tbody>
|
|
14
|
-
</table>
|
|
15
|
-
</div>
|
|
16
|
-
</template>
|
|
17
|
-
|
|
18
|
-
<script>
|
|
19
|
-
|
|
20
|
-
import {componentMixin} from "../mixin/component";
|
|
21
|
-
|
|
22
|
-
export default{
|
|
23
|
-
|
|
24
|
-
mixins: [ componentMixin ],
|
|
25
|
-
|
|
26
|
-
props:{
|
|
27
|
-
|
|
28
|
-
headers: Array,
|
|
29
|
-
contents: Array,
|
|
30
|
-
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
}
|
|
34
|
-
|
|
35
|
-
</script>
|
|
36
|
-
|
|
37
|
-
<style module>
|
|
38
|
-
|
|
39
|
-
.comp{
|
|
40
|
-
@apply overflow-auto;
|
|
41
|
-
}
|
|
42
|
-
|
|
43
|
-
.comp table{
|
|
44
|
-
@apply border-[1px] border-border-200 border-collapse;
|
|
45
|
-
table-layout: fixed;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
.comp th{
|
|
49
|
-
@apply whitespace-nowrap bg-text-50 text-left;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
.comp th, .comp td{
|
|
53
|
-
@apply border-[1px] border-border-200 p-3;
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
</style>
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="computedClass">
|
|
3
|
-
|
|
4
|
-
<TableViewHead v-if="header" :columns="columns" @resize="(idx, d) => $emit('resize', idx, d)"></TableViewHead>
|
|
5
|
-
|
|
6
|
-
<table cellpadding="0" cellspacing="0">
|
|
7
|
-
|
|
8
|
-
<thead>
|
|
9
|
-
<tr>
|
|
10
|
-
<th v-for="column in columns" :style="columnStyle(column)"></th>
|
|
11
|
-
<th :class="$style.spacer"></th>
|
|
12
|
-
</tr>
|
|
13
|
-
</thead>
|
|
14
|
-
|
|
15
|
-
<tbody>
|
|
16
|
-
<tr v-for="item in items" @click="activate($event.target.closest('tr'))">
|
|
17
|
-
<td v-for="column in columns" :style="tdStyle(column)">
|
|
18
|
-
<slot v-if="$slots[column.key]" :name="column.key" :column="column" :item="item"></slot>
|
|
19
|
-
<label v-else>{{ formatText(item[column.key], column) }}</label>
|
|
20
|
-
</td>
|
|
21
|
-
<td :class="$style.spacer">
|
|
22
|
-
<slot name="mobile" :item="item"></slot>
|
|
23
|
-
</td>
|
|
24
|
-
</tr>
|
|
25
|
-
</tbody>
|
|
26
|
-
|
|
27
|
-
</table>
|
|
28
|
-
|
|
29
|
-
<div v-if="hasNext" ref="loadNext" class="p-2 text-center">Load...</div>
|
|
30
|
-
|
|
31
|
-
</div>
|
|
32
|
-
</template>
|
|
33
|
-
|
|
34
|
-
<script>
|
|
35
|
-
|
|
36
|
-
import TableViewHead from "./TableViewHead.vue";
|
|
37
|
-
import dayjs from "dayjs";
|
|
38
|
-
|
|
39
|
-
const DEFAULT_COLUMN_WIDTH = 125
|
|
40
|
-
|
|
41
|
-
export default{
|
|
42
|
-
|
|
43
|
-
components: {
|
|
44
|
-
TableViewHead
|
|
45
|
-
},
|
|
46
|
-
|
|
47
|
-
props:{
|
|
48
|
-
columns: Array,
|
|
49
|
-
items: Array,
|
|
50
|
-
header: {
|
|
51
|
-
type: Boolean,
|
|
52
|
-
default: true
|
|
53
|
-
},
|
|
54
|
-
hasNext: {
|
|
55
|
-
type: Boolean,
|
|
56
|
-
default: false
|
|
57
|
-
},
|
|
58
|
-
mobileView: {
|
|
59
|
-
type: [ Boolean, String ],
|
|
60
|
-
default: false
|
|
61
|
-
}
|
|
62
|
-
},
|
|
63
|
-
|
|
64
|
-
computed:{
|
|
65
|
-
|
|
66
|
-
computedClass(){
|
|
67
|
-
|
|
68
|
-
return [
|
|
69
|
-
this.$style.comp,
|
|
70
|
-
Boolean(this.mobileView) ? this.$style.mobileView : ''
|
|
71
|
-
]
|
|
72
|
-
.join(' ')
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
data(){
|
|
78
|
-
return {
|
|
79
|
-
activeTr: null
|
|
80
|
-
}
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
methods:{
|
|
84
|
-
|
|
85
|
-
activate(tr){
|
|
86
|
-
if(this.activeTr){
|
|
87
|
-
this.activeTr.classList.remove(this.$style.activeTr)
|
|
88
|
-
}
|
|
89
|
-
tr.classList.add(this.$style.activeTr)
|
|
90
|
-
this.activeTr = tr
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
columnStyle(column){
|
|
94
|
-
|
|
95
|
-
const width = parseInt(column.width)
|
|
96
|
-
|
|
97
|
-
return {
|
|
98
|
-
width: (!isNaN(width) ? width : DEFAULT_COLUMN_WIDTH) + 'px'
|
|
99
|
-
}
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
onNext(){
|
|
103
|
-
this.$emit('next')
|
|
104
|
-
},
|
|
105
|
-
|
|
106
|
-
formatText(text, column){
|
|
107
|
-
|
|
108
|
-
if(column.format){
|
|
109
|
-
const [ type, params ] = column.format.toString().split('|')
|
|
110
|
-
|
|
111
|
-
switch(type){
|
|
112
|
-
|
|
113
|
-
case 'currency':
|
|
114
|
-
text = parseInt(text)
|
|
115
|
-
if(isNaN(text)) text = '-'
|
|
116
|
-
text = text.toLocaleString()
|
|
117
|
-
break
|
|
118
|
-
|
|
119
|
-
case 'date':
|
|
120
|
-
const dateFormat = params ?? 'YYYY-MM-DD'
|
|
121
|
-
text = dayjs(text).format(dateFormat)
|
|
122
|
-
break
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
return text
|
|
127
|
-
},
|
|
128
|
-
|
|
129
|
-
tdStyle(column){
|
|
130
|
-
|
|
131
|
-
const style = {}
|
|
132
|
-
|
|
133
|
-
if(column.align){
|
|
134
|
-
style['textAlign'] = column.align
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
return style
|
|
138
|
-
},
|
|
139
|
-
|
|
140
|
-
},
|
|
141
|
-
|
|
142
|
-
watch:{
|
|
143
|
-
|
|
144
|
-
hasNext(to){
|
|
145
|
-
if(to){
|
|
146
|
-
this.$nextTick(() => {
|
|
147
|
-
if(this.$refs.loadNext){
|
|
148
|
-
this.$observe.always(this.$refs.loadNext, this.onNext)
|
|
149
|
-
}
|
|
150
|
-
})
|
|
151
|
-
}
|
|
152
|
-
}
|
|
153
|
-
|
|
154
|
-
}
|
|
155
|
-
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
</script>
|
|
159
|
-
|
|
160
|
-
<style module>
|
|
161
|
-
|
|
162
|
-
.comp{
|
|
163
|
-
@apply bg-base
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
.comp table{
|
|
167
|
-
@apply border-collapse bg-base;
|
|
168
|
-
table-layout: fixed;
|
|
169
|
-
width: 100%;
|
|
170
|
-
}
|
|
171
|
-
|
|
172
|
-
.comp tbody td{
|
|
173
|
-
@apply relative border-b-[1px] border-border-50;
|
|
174
|
-
}
|
|
175
|
-
|
|
176
|
-
.comp td,
|
|
177
|
-
.comp th{
|
|
178
|
-
vertical-align: top;
|
|
179
|
-
@apply hidden md:table-cell
|
|
180
|
-
}
|
|
181
|
-
.comp td.spacer{
|
|
182
|
-
@apply table-cell w-full md:hidden
|
|
183
|
-
}
|
|
184
|
-
.comp.mobileView td,
|
|
185
|
-
.comp.mobileView th{
|
|
186
|
-
@apply hidden
|
|
187
|
-
}
|
|
188
|
-
.comp.mobileView td.spacer{
|
|
189
|
-
@apply table-cell w-full
|
|
190
|
-
}
|
|
191
|
-
|
|
192
|
-
.comp td>label{
|
|
193
|
-
@apply p-2 block
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
.activeTr{
|
|
197
|
-
@apply bg-text-50
|
|
198
|
-
}
|
|
199
|
-
|
|
200
|
-
</style>
|