@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
|
@@ -1,256 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Modal :state="state"
|
|
3
|
-
:hash="hash"
|
|
4
|
-
ref="modal"
|
|
5
|
-
width="480"
|
|
6
|
-
height="480">
|
|
7
|
-
|
|
8
|
-
<template v-slot:head>
|
|
9
|
-
<div class="relative p-6">
|
|
10
|
-
<h3>{{ $t('Edit Menu') }}</h3>
|
|
11
|
-
<div class="absolute top-0 right-0 p-2">
|
|
12
|
-
<button type="button" class="p-2" @click="close">
|
|
13
|
-
<svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
14
|
-
<path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
|
|
15
|
-
</svg>
|
|
16
|
-
</button>
|
|
17
|
-
</div>
|
|
18
|
-
</div>
|
|
19
|
-
</template>
|
|
20
|
-
|
|
21
|
-
<template v-slot:foot>
|
|
22
|
-
<div class="p-6">
|
|
23
|
-
<Button class="w-[100px]" @click="add">
|
|
24
|
-
{{ $t(isCreate ? 'Add Menu' : 'Update') }}
|
|
25
|
-
</Button>
|
|
26
|
-
</div>
|
|
27
|
-
</template>
|
|
28
|
-
|
|
29
|
-
<div class="flex-1 p-6 flex flex-col gap-6">
|
|
30
|
-
<div v-if="keys.includes('icon')">
|
|
31
|
-
|
|
32
|
-
<div class="flex flex-row gap-2">
|
|
33
|
-
<label class="text-text-400 flex-1">Icons</label>
|
|
34
|
-
<button type="button"
|
|
35
|
-
class="text-primary"
|
|
36
|
-
@click="$refs.customIcon.open({ cb:icon => instance.icon = icon })">
|
|
37
|
-
{{ $t('Add Custom Icon') }}
|
|
38
|
-
</button>
|
|
39
|
-
</div>
|
|
40
|
-
<div class="flex flex-row flex-wrap gap-3 mt-2">
|
|
41
|
-
<button v-for="(svg, name) in packages['faPro']"
|
|
42
|
-
type="button"
|
|
43
|
-
@click="instance.icon = svg"
|
|
44
|
-
class="border-[1px] rounded-lg flex items-center justify-center p-4 bg-base-500"
|
|
45
|
-
:class="instance.icon === svg ? 'border-primary' : 'border-border-200'"
|
|
46
|
-
v-html="$util.addHTMLAttribute(svg, { width:21, height:21, class:'fill-text-500' })">
|
|
47
|
-
</button>
|
|
48
|
-
<button v-if="isCustomIcon"
|
|
49
|
-
type="button"
|
|
50
|
-
class="border-[1px] rounded-lg flex items-center justify-center p-4 bg-base-500 border-primary"
|
|
51
|
-
v-html="$util.addHTMLAttribute(instance.icon, { width:21, height:21, class:'fill-text-500' })">
|
|
52
|
-
</button>
|
|
53
|
-
</div>
|
|
54
|
-
</div>
|
|
55
|
-
|
|
56
|
-
<div v-if="keys.includes('text')">
|
|
57
|
-
<label class="text-text-400">Text</label>
|
|
58
|
-
<Textbox v-model="instance.text" class="mt-2"/>
|
|
59
|
-
</div>
|
|
60
|
-
|
|
61
|
-
<div v-if="keys.includes('target')">
|
|
62
|
-
<label class="text-text-400">Target</label>
|
|
63
|
-
<div class="flex flex-row gap-2 mt-2">
|
|
64
|
-
<Dropdown v-model="targetType"
|
|
65
|
-
class="w-[120px]"
|
|
66
|
-
@change="targetTypeChanged">
|
|
67
|
-
<option v-for="(arr, key) in targets" :value="key">{{ arr[0] }}</option>
|
|
68
|
-
<option value="custom">{{ $t('Custom')}}</option>
|
|
69
|
-
</Dropdown>
|
|
70
|
-
<Textbox v-if="targetType === 'custom'" v-model="target" class="flex-1" />
|
|
71
|
-
</div>
|
|
72
|
-
</div>
|
|
73
|
-
|
|
74
|
-
<div v-if="keys.includes('items') && instanceItems"></div>
|
|
75
|
-
|
|
76
|
-
<pre>
|
|
77
|
-
{{ instance }}
|
|
78
|
-
</pre>
|
|
79
|
-
|
|
80
|
-
<Modal ref="customIcon" width="360" height="280">
|
|
81
|
-
<template v-slot:head>
|
|
82
|
-
<div class="relative p-5">
|
|
83
|
-
<h3>Custom Icon</h3>
|
|
84
|
-
<div class="absolute top-0 right-0 p-2">
|
|
85
|
-
<button type="button" class="p-2" @click="$refs.customIcon.close()">
|
|
86
|
-
<svg width="24" height="24" viewBox="0 0 24 24" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg">
|
|
87
|
-
<path d="M6.53034 5.46965C6.23745 5.17676 5.76257 5.17676 5.46968 5.46965C5.17679 5.76255 5.17679 6.23742 5.46968 6.53031L10.9393 12L5.46967 17.4697C5.17678 17.7626 5.17678 18.2374 5.46967 18.5303C5.76256 18.8232 6.23744 18.8232 6.53033 18.5303L12 13.0606L17.4697 18.5303C17.7626 18.8232 18.2375 18.8232 18.5303 18.5303C18.8232 18.2374 18.8232 17.7626 18.5303 17.4697L13.0607 12L18.5303 6.53032C18.8232 6.23743 18.8232 5.76256 18.5303 5.46966C18.2374 5.17677 17.7626 5.17677 17.4697 5.46966L12 10.9393L6.53034 5.46965Z"/>
|
|
88
|
-
</svg>
|
|
89
|
-
</button>
|
|
90
|
-
</div>
|
|
91
|
-
</div>
|
|
92
|
-
</template>
|
|
93
|
-
|
|
94
|
-
<template v-slot:foot="{ context }">
|
|
95
|
-
<div class="p-5">
|
|
96
|
-
<Button type="button" class="w-[100px]"
|
|
97
|
-
@click="context.cb(context.icon);$refs.customIcon.close()">
|
|
98
|
-
{{ $t('Add Icon') }}
|
|
99
|
-
</Button>
|
|
100
|
-
</div>
|
|
101
|
-
</template>
|
|
102
|
-
|
|
103
|
-
<template #default="{ context }">
|
|
104
|
-
<div class="flex-1 p-5">
|
|
105
|
-
<Textarea rows="5" v-model="context.icon"/>
|
|
106
|
-
</div>
|
|
107
|
-
</template>
|
|
108
|
-
</Modal>
|
|
109
|
-
</div>
|
|
110
|
-
|
|
111
|
-
</Modal>
|
|
112
|
-
</template>
|
|
113
|
-
|
|
114
|
-
<script>
|
|
115
|
-
|
|
116
|
-
import Modal from "../components/Modal.vue"
|
|
117
|
-
import faPro from "../configs/icons-fa.json"
|
|
118
|
-
|
|
119
|
-
export default{
|
|
120
|
-
|
|
121
|
-
components: { Modal },
|
|
122
|
-
|
|
123
|
-
emits: [ 'add' ],
|
|
124
|
-
|
|
125
|
-
inject: [ 'socketEmit2' ],
|
|
126
|
-
|
|
127
|
-
props: {
|
|
128
|
-
state: Boolean,
|
|
129
|
-
hash: String,
|
|
130
|
-
|
|
131
|
-
keys: {
|
|
132
|
-
type: Array,
|
|
133
|
-
default: [ 'icon', 'text', 'target', 'items' ]
|
|
134
|
-
}
|
|
135
|
-
},
|
|
136
|
-
|
|
137
|
-
data(){
|
|
138
|
-
return {
|
|
139
|
-
instance: {},
|
|
140
|
-
cb: null,
|
|
141
|
-
isCreate: false,
|
|
142
|
-
|
|
143
|
-
icon: null,
|
|
144
|
-
targetType: null,
|
|
145
|
-
target: null,
|
|
146
|
-
|
|
147
|
-
targets: {
|
|
148
|
-
home: [ this.$t('Home'), { name:"home" } ],
|
|
149
|
-
category: [ this.$t('Category'), { name:"category" } ],
|
|
150
|
-
cart: [ this.$t('Cart'), { name:"cart" } ],
|
|
151
|
-
profile: [ this.$t('Profile'), { name:"profile" } ],
|
|
152
|
-
orders: [ this.$t('Orders'), { name:"orders" } ],
|
|
153
|
-
menu: [ this.$t('Menu'), { type:"menu" } ],
|
|
154
|
-
search: [ this.$t('Search'), { type:"search" } ],
|
|
155
|
-
},
|
|
156
|
-
|
|
157
|
-
packages: {
|
|
158
|
-
faPro
|
|
159
|
-
}
|
|
160
|
-
}
|
|
161
|
-
},
|
|
162
|
-
|
|
163
|
-
computed: {
|
|
164
|
-
|
|
165
|
-
instanceItems(){
|
|
166
|
-
if(!Array.isArray(this.instance.items))
|
|
167
|
-
this.instance.items = []
|
|
168
|
-
return this.instance.items
|
|
169
|
-
},
|
|
170
|
-
|
|
171
|
-
isCustomIcon(){
|
|
172
|
-
if(!this.instance.icon) return false
|
|
173
|
-
|
|
174
|
-
for(let vendor in this.packages){
|
|
175
|
-
for(let name in this.packages[vendor]){
|
|
176
|
-
if(this.instance.icon === this.packages[vendor][name]){
|
|
177
|
-
return false
|
|
178
|
-
}
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
return true
|
|
182
|
-
},
|
|
183
|
-
|
|
184
|
-
},
|
|
185
|
-
|
|
186
|
-
methods: {
|
|
187
|
-
|
|
188
|
-
add(){
|
|
189
|
-
if(typeof this.cb === 'function'){
|
|
190
|
-
this.cb(this.instance)
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
this.$emit('add', this.instance)
|
|
194
|
-
this.close()
|
|
195
|
-
},
|
|
196
|
-
|
|
197
|
-
create(cb){
|
|
198
|
-
this.instance = {}
|
|
199
|
-
this.cb = cb
|
|
200
|
-
this.isCreate = true
|
|
201
|
-
this.setData()
|
|
202
|
-
this.$refs.modal.open()
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
open(instance, cb){
|
|
206
|
-
this.instance = JSON.parse(JSON.stringify(instance))
|
|
207
|
-
this.cb = cb
|
|
208
|
-
this.isCreate = false
|
|
209
|
-
this.setData()
|
|
210
|
-
this.$refs.modal.open()
|
|
211
|
-
},
|
|
212
|
-
|
|
213
|
-
close(){
|
|
214
|
-
this.$refs.modal.close()
|
|
215
|
-
},
|
|
216
|
-
|
|
217
|
-
targetTypeChanged(){
|
|
218
|
-
this.instance.target = this.targetType in this.targets ? this.targets[this.targetType][1] : { path:this.target }
|
|
219
|
-
},
|
|
220
|
-
|
|
221
|
-
setData(){
|
|
222
|
-
|
|
223
|
-
},
|
|
224
|
-
|
|
225
|
-
},
|
|
226
|
-
|
|
227
|
-
watch: {
|
|
228
|
-
|
|
229
|
-
'instance.target': {
|
|
230
|
-
handler(to){
|
|
231
|
-
if(to){
|
|
232
|
-
if('name' in to)
|
|
233
|
-
this.targetType = to.name
|
|
234
|
-
else if('type' in to){
|
|
235
|
-
this.targetType = to.type
|
|
236
|
-
}
|
|
237
|
-
}
|
|
238
|
-
else{
|
|
239
|
-
this.targetType = 'custom'
|
|
240
|
-
}
|
|
241
|
-
},
|
|
242
|
-
},
|
|
243
|
-
|
|
244
|
-
}
|
|
245
|
-
|
|
246
|
-
}
|
|
247
|
-
|
|
248
|
-
</script>
|
|
249
|
-
|
|
250
|
-
<style module>
|
|
251
|
-
|
|
252
|
-
.comp{
|
|
253
|
-
|
|
254
|
-
}
|
|
255
|
-
|
|
256
|
-
</style>
|
|
@@ -1,78 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div class="p-6 px-4 flex flex-col gap-4">
|
|
5
|
-
|
|
6
|
-
<div>
|
|
7
|
-
<div class="flex flex-row gap-2 items-center">
|
|
8
|
-
<small class="flex-1 text-text-400">Menu</small>
|
|
9
|
-
<button type="button"
|
|
10
|
-
class="text-primary text-sm"
|
|
11
|
-
@click="$refs.modal.open({}, item => menu.push(item))">
|
|
12
|
-
Add Menu
|
|
13
|
-
</button>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<TreeView class="mt-2"
|
|
17
|
-
v-model="menu"
|
|
18
|
-
@add="(items) => openComponentSelector({ callback:(component) => items.push(component) })"
|
|
19
|
-
@duplicate="duplicate">
|
|
20
|
-
<template #default="{ item }">
|
|
21
|
-
<div class="flex-1 text-ellipsis whitespace-nowrap overflow-hidden"
|
|
22
|
-
@click="$refs.modal.open(item, updatedItem => Object.assign(item, updatedItem))">
|
|
23
|
-
{{ item.text }}
|
|
24
|
-
</div>
|
|
25
|
-
</template>
|
|
26
|
-
</TreeView>
|
|
27
|
-
</div>
|
|
28
|
-
|
|
29
|
-
</div>
|
|
30
|
-
|
|
31
|
-
<ComponentSetting2 :item="item"
|
|
32
|
-
:view-type="viewType"
|
|
33
|
-
:view-types="viewTypes"
|
|
34
|
-
:view-index="viewIndex"
|
|
35
|
-
defaultDisplay="block"
|
|
36
|
-
@change="$emit('change')" />
|
|
37
|
-
|
|
38
|
-
<LinkSettingModal ref="modal" />
|
|
39
|
-
|
|
40
|
-
</div>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script setup>
|
|
44
|
-
|
|
45
|
-
import {computed, inject} from "vue";
|
|
46
|
-
import LinkSettingModal from "./LinkSettingModal.vue";
|
|
47
|
-
|
|
48
|
-
const { item } = defineProps({
|
|
49
|
-
item: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: true
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
viewType: String,
|
|
55
|
-
|
|
56
|
-
viewIndex: Number,
|
|
57
|
-
|
|
58
|
-
viewTypes: Array,
|
|
59
|
-
})
|
|
60
|
-
|
|
61
|
-
const duplicate = inject('duplicate')
|
|
62
|
-
const openComponentSelector = inject('openComponentSelector')
|
|
63
|
-
|
|
64
|
-
const menu = computed(() => {
|
|
65
|
-
if(!Array.isArray(item.props.menu))
|
|
66
|
-
item.props.menu = []
|
|
67
|
-
return item.props.menu
|
|
68
|
-
})
|
|
69
|
-
|
|
70
|
-
</script>
|
|
71
|
-
|
|
72
|
-
<style module>
|
|
73
|
-
|
|
74
|
-
.comp {
|
|
75
|
-
@apply flex flex-col divide-y divide-border-50;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
</style>
|
|
@@ -1,94 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div class="p-6 py-4">
|
|
5
|
-
|
|
6
|
-
<div class="flex flex-col">
|
|
7
|
-
<small class="text-text-400">Open</small>
|
|
8
|
-
<Switch v-model="item.props.debugState" />
|
|
9
|
-
</div>
|
|
10
|
-
|
|
11
|
-
</div>
|
|
12
|
-
|
|
13
|
-
<div class="p-6 py-4 flex flex-col gap-4">
|
|
14
|
-
|
|
15
|
-
<div>
|
|
16
|
-
<small class="text-text-400">Hash</small>
|
|
17
|
-
<Textbox v-model="item.props.hash" placeholder="With hash # prefix" />
|
|
18
|
-
</div>
|
|
19
|
-
|
|
20
|
-
<div>
|
|
21
|
-
<small class="text-text-400">Position</small>
|
|
22
|
-
<Dropdown v-model="item.props.dock">
|
|
23
|
-
<option disabled selected>Choose Position</option>
|
|
24
|
-
<option value="center">Center</option>
|
|
25
|
-
<option value="top">Top</option>
|
|
26
|
-
<option value="bottom">Bottom</option>
|
|
27
|
-
<option value="left">Left</option>
|
|
28
|
-
<option value="right">Right</option>
|
|
29
|
-
</Dropdown>
|
|
30
|
-
</div>
|
|
31
|
-
|
|
32
|
-
<div>
|
|
33
|
-
<small class="text-text-400">Dismissable</small>
|
|
34
|
-
<Checkbox v-model="item.props.dismissable" />
|
|
35
|
-
</div>
|
|
36
|
-
|
|
37
|
-
</div>
|
|
38
|
-
|
|
39
|
-
<ComponentSetting2 :item="item"
|
|
40
|
-
:view-type="viewType"
|
|
41
|
-
:view-types="viewTypes"
|
|
42
|
-
:view-index="viewIndex"
|
|
43
|
-
defaultDisplay="block"
|
|
44
|
-
@change="$emit('change')" />
|
|
45
|
-
</div>
|
|
46
|
-
</template>
|
|
47
|
-
|
|
48
|
-
<script>
|
|
49
|
-
|
|
50
|
-
export default{
|
|
51
|
-
|
|
52
|
-
emits: [ 'save' ],
|
|
53
|
-
|
|
54
|
-
inject: [ 'socketEmit2' ],
|
|
55
|
-
|
|
56
|
-
methods: {
|
|
57
|
-
|
|
58
|
-
save(){
|
|
59
|
-
this.$emit('save')
|
|
60
|
-
this.close()
|
|
61
|
-
}
|
|
62
|
-
|
|
63
|
-
},
|
|
64
|
-
|
|
65
|
-
props: {
|
|
66
|
-
|
|
67
|
-
item: {
|
|
68
|
-
type: Object,
|
|
69
|
-
required: true
|
|
70
|
-
},
|
|
71
|
-
|
|
72
|
-
viewType: String,
|
|
73
|
-
|
|
74
|
-
viewIndex: Number,
|
|
75
|
-
|
|
76
|
-
viewTypes: Array,
|
|
77
|
-
|
|
78
|
-
},
|
|
79
|
-
|
|
80
|
-
computed: {
|
|
81
|
-
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
</script>
|
|
87
|
-
|
|
88
|
-
<style module>
|
|
89
|
-
|
|
90
|
-
.comp{
|
|
91
|
-
@apply flex flex-col divide-y divide-border-50;
|
|
92
|
-
}
|
|
93
|
-
|
|
94
|
-
</style>
|
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<div v-for="(_, viewIndex) in viewTypes"
|
|
5
|
-
v-show="_.value === viewType">
|
|
6
|
-
<div class="flex flex-row gap-1">
|
|
7
|
-
<button v-for="_type in types" type="button" @click="setType(viewIndex, _type)">
|
|
8
|
-
<slot :name="`icon${_type}`">
|
|
9
|
-
<svg v-if="_type === 1" width="12" height="12" :class="_type === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm16 400c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V80c0-8.8 7.2-16 16-16h352c8.8 0 16 7.2 16 16v352z"/></svg>
|
|
10
|
-
<svg v-else-if="_type === 2" width="12" height="12" :class="_type === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M120 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h72a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H48a16 16 0 0 1-16-16V80a16 16 0 0 1 16-16h72a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8zm280 0h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a16 16 0 0 1 16 16v352a16 16 0 0 1-16 16h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"/></svg>
|
|
11
|
-
<svg v-else-if="_type === 4" width="12" height="12" :class="_type === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80zm240-16v176H32V80c0-8.837 7.163-16 16-16h192zM32 432V272h208v176H48c-8.837 0-16-7.163-16-16zm240 16V272h208v160c0 8.837-7.163 16-16 16H272zm208-208H272V64h192c8.837 0 16 7.163 16 16v160z"/></svg>
|
|
12
|
-
</slot>
|
|
13
|
-
</button>
|
|
14
|
-
</div>
|
|
15
|
-
|
|
16
|
-
<div class="grid gap-1 mt-2" :class="`grid-cols-${type}`">
|
|
17
|
-
<select v-for="(__, _index) in type" @change="setValue(viewIndex)"
|
|
18
|
-
:ref="`value[${viewIndex}]`"
|
|
19
|
-
:value="`${value[viewIndex][_index]}`" class="max-w-[100px]">
|
|
20
|
-
<option value="">-</option>
|
|
21
|
-
<option v-for="_value in values"
|
|
22
|
-
:value="`${_.value}${keys[types.indexOf(type)][_index]}${Array.isArray(_value) ? _value[0] : _value}`">
|
|
23
|
-
{{ `${Array.isArray(_value) ? _value[1] : _value}` }}
|
|
24
|
-
</option>
|
|
25
|
-
</select>
|
|
26
|
-
</div>
|
|
27
|
-
</div>
|
|
28
|
-
</div>
|
|
29
|
-
</template>
|
|
30
|
-
|
|
31
|
-
<script>
|
|
32
|
-
|
|
33
|
-
export default{
|
|
34
|
-
|
|
35
|
-
emits: [ 'change', 'update:modelValue' ],
|
|
36
|
-
|
|
37
|
-
props: {
|
|
38
|
-
|
|
39
|
-
modelValue: Array,
|
|
40
|
-
|
|
41
|
-
keys: {
|
|
42
|
-
type: Array,
|
|
43
|
-
default: [
|
|
44
|
-
[ 'p-' ],
|
|
45
|
-
[ 'px-', 'py-' ],
|
|
46
|
-
[ 'pl-', 'pt-', 'pr-', 'pb-' ]
|
|
47
|
-
]
|
|
48
|
-
},
|
|
49
|
-
|
|
50
|
-
values: {
|
|
51
|
-
type: Array,
|
|
52
|
-
default: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 ]
|
|
53
|
-
},
|
|
54
|
-
|
|
55
|
-
viewType: String,
|
|
56
|
-
|
|
57
|
-
viewTypes: Array,
|
|
58
|
-
|
|
59
|
-
},
|
|
60
|
-
|
|
61
|
-
methods: {
|
|
62
|
-
|
|
63
|
-
setType(viewIndex, type){
|
|
64
|
-
let val = []
|
|
65
|
-
for(let i = 0; i < type - 1; i++)
|
|
66
|
-
val.push(' ')
|
|
67
|
-
|
|
68
|
-
this.modelValue[viewIndex] = val.join('')
|
|
69
|
-
},
|
|
70
|
-
|
|
71
|
-
setValue(viewIndex){
|
|
72
|
-
this.modelValue[viewIndex] = this.$refs[`value[${viewIndex}]`].map(_ => _.value).join(' ')
|
|
73
|
-
}
|
|
74
|
-
|
|
75
|
-
},
|
|
76
|
-
|
|
77
|
-
computed: {
|
|
78
|
-
|
|
79
|
-
viewIndex(){
|
|
80
|
-
return this.viewTypes.findIndex(_ => _.value === this.viewType)
|
|
81
|
-
},
|
|
82
|
-
|
|
83
|
-
types(){
|
|
84
|
-
return this.keys.map(_ => _.length)
|
|
85
|
-
},
|
|
86
|
-
|
|
87
|
-
type(){
|
|
88
|
-
return this.value[this.viewIndex].length
|
|
89
|
-
},
|
|
90
|
-
|
|
91
|
-
value(){
|
|
92
|
-
for(let i in this.viewTypes){
|
|
93
|
-
if(!(i in this.modelValue) || typeof this.modelValue[i] !== 'string')
|
|
94
|
-
this.modelValue[i] = ''
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
return this.modelValue.map(_ => _.split(' '))
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
</script>
|
|
105
|
-
|
|
106
|
-
<style module>
|
|
107
|
-
|
|
108
|
-
.comp{
|
|
109
|
-
@apply flex flex-col gap-1 max-w-[160px];
|
|
110
|
-
}
|
|
111
|
-
|
|
112
|
-
.comp button{
|
|
113
|
-
@apply border-[1px] border-border-200 bg-text-100 rounded-lg p-1 px-3;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
.comp select{
|
|
117
|
-
@apply appearance-none outline-none p-1 px-2 bg-transparent cursor-pointer w-full;
|
|
118
|
-
@apply border-[1px] border-border-200 rounded-lg;
|
|
119
|
-
}
|
|
120
|
-
|
|
121
|
-
</style>
|
|
@@ -1,147 +0,0 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div :class="$style.comp">
|
|
3
|
-
|
|
4
|
-
<small class="text-text-400">
|
|
5
|
-
{{ text }}
|
|
6
|
-
</small>
|
|
7
|
-
|
|
8
|
-
<div class="flex flex-row gap-1">
|
|
9
|
-
<Radio v-for="(_, index) in keys.length"
|
|
10
|
-
:custom="true"
|
|
11
|
-
:value="index"
|
|
12
|
-
v-model.number="type" @change="resetValue">
|
|
13
|
-
<button type="button">
|
|
14
|
-
<svg v-if="index === 0" width="12" height="12" :class="index === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M400 32H48C21.5 32 0 53.5 0 80v352c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48V80c0-26.5-21.5-48-48-48zm16 400c0 8.8-7.2 16-16 16H48c-8.8 0-16-7.2-16-16V80c0-8.8 7.2-16 16-16h352c8.8 0 16 7.2 16 16v352z"/></svg>
|
|
15
|
-
<svg v-else-if="index === 1" width="12" height="12" :class="index === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M120 32H48A48 48 0 0 0 0 80v352a48 48 0 0 0 48 48h72a8 8 0 0 0 8-8v-16a8 8 0 0 0-8-8H48a16 16 0 0 1-16-16V80a16 16 0 0 1 16-16h72a8 8 0 0 0 8-8V40a8 8 0 0 0-8-8zm280 0h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a16 16 0 0 1 16 16v352a16 16 0 0 1-16 16h-72a8 8 0 0 0-8 8v16a8 8 0 0 0 8 8h72a48 48 0 0 0 48-48V80a48 48 0 0 0-48-48z"/></svg>
|
|
16
|
-
<svg v-else-if="index === 2" width="12" height="12" :class="index === type ? 'fill-primary-500' : 'fill-text'" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M0 80v352c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V80c0-26.51-21.49-48-48-48H48C21.49 32 0 53.49 0 80zm240-16v176H32V80c0-8.837 7.163-16 16-16h192zM32 432V272h208v176H48c-8.837 0-16-7.163-16-16zm240 16V272h208v160c0 8.837-7.163 16-16 16H272zm208-208H272V64h192c8.837 0 16 7.163 16 16v160z"/></svg>
|
|
17
|
-
</button>
|
|
18
|
-
</Radio>
|
|
19
|
-
</div>
|
|
20
|
-
|
|
21
|
-
<div class="grid gap-1 mt-1" :class="`grid-cols-${gridCols[type]}`">
|
|
22
|
-
<div v-for="(_key, _index) in keys[type]">
|
|
23
|
-
<small class="text-text-400">{{ texts[type][_index] }}</small>
|
|
24
|
-
<select v-model="value[_index]">
|
|
25
|
-
<option value="">-</option>
|
|
26
|
-
<option v-for="_value in values"
|
|
27
|
-
:value="`${viewType}${_key}${Array.isArray(_value) ? _value[0] : _value}`">
|
|
28
|
-
{{ Array.isArray(_value) ? _value[1] : _value }}
|
|
29
|
-
</option>
|
|
30
|
-
</select>
|
|
31
|
-
</div>
|
|
32
|
-
</div>
|
|
33
|
-
|
|
34
|
-
</div>
|
|
35
|
-
</template>
|
|
36
|
-
|
|
37
|
-
<script>
|
|
38
|
-
|
|
39
|
-
export default{
|
|
40
|
-
|
|
41
|
-
emits: [ 'change' ],
|
|
42
|
-
|
|
43
|
-
props: {
|
|
44
|
-
|
|
45
|
-
name: String,
|
|
46
|
-
|
|
47
|
-
text: String,
|
|
48
|
-
|
|
49
|
-
item: {
|
|
50
|
-
type: Object,
|
|
51
|
-
required: true
|
|
52
|
-
},
|
|
53
|
-
|
|
54
|
-
keys: {
|
|
55
|
-
type: Array,
|
|
56
|
-
default: [
|
|
57
|
-
[ 'p-' ],
|
|
58
|
-
[ 'px-', 'py-' ],
|
|
59
|
-
[ 'pl-', 'pt-', 'pr-', 'pb-' ]
|
|
60
|
-
]
|
|
61
|
-
},
|
|
62
|
-
|
|
63
|
-
values: {
|
|
64
|
-
type: Array,
|
|
65
|
-
default: [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 'auto' ]
|
|
66
|
-
},
|
|
67
|
-
|
|
68
|
-
viewType: String,
|
|
69
|
-
|
|
70
|
-
viewIndex: Number,
|
|
71
|
-
|
|
72
|
-
viewTypes: Array,
|
|
73
|
-
|
|
74
|
-
},
|
|
75
|
-
|
|
76
|
-
data(){
|
|
77
|
-
return {
|
|
78
|
-
value: [],
|
|
79
|
-
type: 0,
|
|
80
|
-
gridCols: {
|
|
81
|
-
0: 1,
|
|
82
|
-
1: 2,
|
|
83
|
-
2: 4
|
|
84
|
-
},
|
|
85
|
-
texts: {
|
|
86
|
-
0: [ 'All' ],
|
|
87
|
-
1: [ 'X', 'Y' ],
|
|
88
|
-
2: [ 'Left', 'Top', 'Right', 'Bottom' ]
|
|
89
|
-
}
|
|
90
|
-
}
|
|
91
|
-
},
|
|
92
|
-
|
|
93
|
-
methods: {
|
|
94
|
-
|
|
95
|
-
resetValue(){
|
|
96
|
-
const value = []
|
|
97
|
-
for(let i = 0 ; i < this.gridCols[this.type] ; i++)
|
|
98
|
-
value.push('')
|
|
99
|
-
this.value = value
|
|
100
|
-
},
|
|
101
|
-
|
|
102
|
-
setValue(){
|
|
103
|
-
this.value = (this.item.props[this.name][this.viewIndex] ?? '').split(' ')
|
|
104
|
-
this.type = Object.values(this.gridCols).indexOf(this.value.length)
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
},
|
|
108
|
-
|
|
109
|
-
mounted() {
|
|
110
|
-
this.setValue()
|
|
111
|
-
},
|
|
112
|
-
|
|
113
|
-
watch: {
|
|
114
|
-
|
|
115
|
-
value: {
|
|
116
|
-
deep: true,
|
|
117
|
-
handler(){
|
|
118
|
-
this.item.props[this.name][this.viewIndex] = this.value.join(' ')
|
|
119
|
-
}
|
|
120
|
-
},
|
|
121
|
-
|
|
122
|
-
viewIndex(){
|
|
123
|
-
this.setValue()
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
}
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
</script>
|
|
131
|
-
|
|
132
|
-
<style module>
|
|
133
|
-
|
|
134
|
-
.comp{
|
|
135
|
-
@apply flex flex-col gap-1 max-w-[160px];
|
|
136
|
-
}
|
|
137
|
-
|
|
138
|
-
.comp button{
|
|
139
|
-
@apply border-[1px] border-border-200 bg-text-100 rounded-lg p-1 px-3;
|
|
140
|
-
}
|
|
141
|
-
|
|
142
|
-
.comp select{
|
|
143
|
-
@apply appearance-none outline-none p-1 px-2 bg-transparent cursor-pointer w-full;
|
|
144
|
-
@apply border-[1px] border-border-200 rounded-lg;
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
</style>
|