@mixd-id/web-scaffold 0.2.240705 → 0.2.250801009
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/Dashboard.md +56 -0
- package/log.txt +7 -0
- package/package.json +27 -19
- package/src/components/404.vue +61 -0
- package/src/components/AccountIcon.vue +19 -0
- package/src/components/Ahref.vue +1 -1
- package/src/components/Alert.vue +4 -13
- package/src/components/ArrayList.vue +49 -0
- package/src/components/Article.vue +24 -30
- package/src/components/Button.vue +79 -167
- package/src/components/Card.vue +235 -0
- package/src/components/Carousel.vue +61 -60
- package/src/components/Cart.vue +192 -0
- package/src/components/CartIcon.vue +89 -0
- package/src/components/ChartBar.vue +2 -3
- package/src/components/Checkbox.vue +20 -11
- package/src/components/Checkout.vue +373 -0
- package/src/components/CheckoutDelivery.vue +267 -0
- package/src/components/CodeEditor.vue +5 -16
- package/src/components/CollapsiblePanel.vue +70 -0
- package/src/components/ColorPicker.vue +8 -3
- package/src/components/ColorPicker2.vue +41 -19
- package/src/components/ColorPicker3.vue +100 -0
- package/src/components/Confirm.vue +9 -7
- package/src/components/ContextMenu.vue +122 -206
- package/src/components/ContextMenuItem.vue +53 -0
- package/src/components/Dashboard.vue +243 -0
- package/src/components/Dashboard2.vue +118 -0
- package/src/components/DashboardComponentSelector.vue +96 -0
- package/src/components/DashboardConfigs.vue +202 -0
- package/src/components/Datepicker.vue +102 -41
- package/src/components/DayTimeRange.vue +3 -2
- package/src/components/Dropdown.vue +7 -4
- package/src/components/Flex.vue +14 -40
- package/src/components/GHeatMaps.vue +2 -2
- package/src/components/Grid.vue +6 -6
- package/src/components/HTMLEditor.vue +27 -14
- package/src/components/Image.vue +62 -108
- package/src/components/ImagePreview.vue +14 -4
- package/src/components/ImageUploader.vue +114 -0
- package/src/components/ImportModal.vue +3 -3
- package/src/components/Link.vue +62 -6
- package/src/components/List.vue +524 -402
- package/src/components/ListContextMenu.vue +88 -0
- package/src/components/ListItem.vue +5 -3
- package/src/components/ListPage1.vue +14 -15
- package/src/components/ListView.vue +5 -6
- package/src/components/ListViewSettings.vue +2 -2
- package/src/components/LogViewerItem.vue +1 -1
- package/src/components/MarkdownEdit.vue +128 -0
- package/src/components/MarkdownPreview.vue +102 -0
- package/src/components/MenuItem1.vue +36 -0
- package/src/components/Modal.vue +95 -43
- package/src/components/MultiDropdown.vue +124 -0
- package/src/components/MultilineText.vue +1 -4
- package/src/components/OTPField.vue +11 -17
- package/src/components/ObjectTree.vue +1 -1
- package/src/components/PageBuilder.vue +3 -3
- package/src/components/Paragraph.vue +1 -2
- package/src/components/PresetSelectorFilterItem.vue +107 -95
- package/src/components/Radio.vue +1 -1
- package/src/components/SearchModal.vue +153 -0
- package/src/components/Slider.vue +1 -1
- package/src/components/Svg.vue +1 -1
- package/src/components/SvgEditor.vue +173 -0
- package/src/components/Switch.vue +4 -5
- package/src/components/Table.vue +2 -2
- package/src/components/TableView.vue +2 -3
- package/src/components/TableViewHead.vue +2 -2
- package/src/components/Tabs.vue +1 -1
- package/src/components/Testimonial.vue +2 -2
- package/src/components/Text.vue +7 -22
- package/src/components/TextEditor.vue +3 -3
- package/src/components/TextWithTag.vue +61 -30
- package/src/components/Textarea.vue +11 -16
- package/src/components/Textbox.vue +9 -19
- package/src/components/Timepicker.vue +25 -15
- package/src/components/Toast.vue +5 -3
- package/src/components/TreeMenu.vue +122 -0
- package/src/components/TreeView.vue +15 -10
- package/src/components/TreeView2.vue +38 -0
- package/src/components/TreeViewItem.vue +58 -29
- package/src/components/TreeViewItem2.vue +55 -0
- package/src/components/Uploader.vue +45 -0
- package/src/components/Video.vue +119 -0
- package/src/components/VirtualGrid.vue +24 -7
- package/src/components/VirtualTable.vue +363 -128
- package/src/configs/dashboard/data-table.js +9 -0
- package/src/configs/web-page-builder.js +118 -0
- package/src/directives/intersect.js +26 -0
- package/src/hooks/device.js +14 -0
- package/src/index.js +62 -107
- package/src/mixin/component.js +147 -67
- package/src/themes/default/index.js +83 -155
- package/src/utils/dashboard.js +22 -962
- package/src/utils/helpers.cjs +635 -0
- package/src/utils/helpers.js +91 -60
- package/src/utils/helpers.mjs +245 -12
- package/src/utils/importer.js +22 -3
- package/src/utils/list.mjs +1509 -0
- package/src/utils/preset-selector.cjs +1455 -0
- package/src/utils/preset-selector.js +489 -95
- package/src/utils/preset-selector.mjs +59 -20
- package/src/utils/queue.js +63 -0
- package/src/utils/web.mjs +120 -0
- package/src/utils/wss.js +37 -29
- package/src/utils/wss.mjs +24 -19
- package/src/widgets/AhrefSetting.vue +16 -13
- package/src/widgets/ArticleSetting.vue +15 -27
- package/src/widgets/BackgroundColorSetting.vue +153 -0
- package/src/widgets/BorderColorSetting.vue +57 -0
- package/src/widgets/BotEditor/BotEditorActions.vue +3 -2
- package/src/widgets/BotEditor/BotEditorSettings.vue +21 -0
- package/src/widgets/BotEditor.vue +35 -15
- package/src/widgets/ButtonSetting.vue +12 -13
- package/src/widgets/CarouselSetting.vue +33 -45
- package/src/widgets/CartSetting.vue +46 -0
- package/src/widgets/CheckoutSetting.vue +46 -0
- package/src/widgets/CollapsiblePanelSetting.vue +46 -0
- package/src/widgets/ColumnSelector.vue +29 -5
- package/src/widgets/ComponentSetting.vue +1 -1
- package/src/widgets/ComponentSetting2.vue +112 -234
- package/src/widgets/ComponentSetting3.vue +1 -1
- package/src/widgets/ContactForm.vue +3 -3
- package/src/widgets/ContactFormSetting.vue +41 -30
- package/src/widgets/Dashboard/BarChart.vue +47 -11
- package/src/widgets/Dashboard/BarChartSetting.vue +1 -1
- package/src/widgets/Dashboard/DataTable.vue +125 -0
- package/src/widgets/Dashboard/DataTableSetting.vue +243 -0
- package/src/widgets/Dashboard/DatasourceSelector.vue +1 -1
- package/src/widgets/Dashboard/Doughnut.vue +49 -7
- package/src/widgets/Dashboard/DoughnutSetting.vue +2 -2
- package/src/widgets/Dashboard/Metric.vue +78 -19
- package/src/widgets/Dashboard/MetricSetting.vue +81 -28
- package/src/widgets/Dashboard/Pie.vue +55 -6
- package/src/widgets/Dashboard/PieSetting.vue +1 -1
- package/src/widgets/Dashboard/PolarArea.vue +49 -7
- package/src/widgets/Dashboard/PolarAreaSetting.vue +1 -1
- package/src/widgets/Dashboard/SharingModal.vue +4 -5
- package/src/widgets/Dashboard/ViewSelector.vue +2 -2
- package/src/widgets/Dashboard/VirtualTableSetting.vue +121 -184
- package/src/widgets/{Dashboard.vue → Dashboard0.vue} +426 -343
- package/src/widgets/EmbeddedVideoSetting.vue +7 -5
- package/src/widgets/FAQ.vue +16 -3
- package/src/widgets/FAQSetting.vue +53 -47
- package/src/widgets/FeatureList.vue +3 -0
- package/src/widgets/FeatureListSetting.vue +112 -102
- package/src/widgets/FlexSetting.vue +83 -106
- package/src/widgets/GridSetting.vue +71 -196
- package/src/widgets/Header2.vue +34 -71
- package/src/widgets/Header2Setting.vue +95 -179
- package/src/widgets/HeaderSetting.vue +16 -18
- package/src/widgets/IconListSetting.vue +69 -65
- package/src/widgets/ImageSetting.vue +33 -60
- package/src/widgets/LinkSetting.vue +60 -37
- package/src/widgets/LinkSettingModal.vue +173 -0
- package/src/widgets/LogViewer.vue +1 -1
- package/src/widgets/MarginSetting.vue +2 -2
- package/src/widgets/MenuEditor.vue +1 -1
- package/src/widgets/MenuItem1Setting.vue +78 -0
- package/src/widgets/ModalSetting.vue +42 -44
- package/src/widgets/MultiValueSetting.vue +2 -2
- package/src/widgets/MultiValueSetting2.vue +78 -45
- package/src/widgets/OGSettingModal.vue +103 -0
- package/src/widgets/PaddingSetting.vue +2 -2
- package/src/widgets/ParagraphSetting.vue +16 -13
- package/src/widgets/PositionSetting.vue +209 -0
- package/src/widgets/PresetBar.vue +359 -210
- package/src/widgets/PresetBarPivot.vue +31 -19
- package/src/widgets/PresetSelector.vue +29 -17
- package/src/widgets/SearchModalSetting.vue +70 -0
- package/src/widgets/Share.vue +1 -2
- package/src/widgets/ShareSetting.vue +67 -60
- package/src/widgets/StyleSetting.vue +227 -116
- package/src/widgets/TestimonialSetting.vue +97 -88
- package/src/widgets/TextBlockSetting.vue +16 -13
- package/src/widgets/UserActionBuilder/UserActionConsole.vue +30 -10
- package/src/widgets/UserActionBuilder/UserActionOutput.vue +2 -2
- package/src/widgets/UserActionBuilder/UserActionOutputReply.vue +64 -87
- package/src/widgets/UserActionBuilder/UserActionProps.vue +3 -3
- package/src/widgets/UserActionBuilder.vue +4 -16
- package/src/widgets/WebComponentSelector.vue +15 -11
- package/src/widgets/WebLayoutSelector.vue +41 -270
- package/src/widgets/WebPageBuilder.vue +693 -704
- package/src/widgets/WebPageBuilder2.vue +7 -7
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +0 -8
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +63 -7
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +3 -3
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +1 -10
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +2 -2
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +0 -7
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +1 -7
- package/src/widgets/WebPageBuilder4.vue +289 -575
- package/src/widgets/WebPageSelector.vue +1 -1
- package/src/widgets/YoutubeVideoSetting.vue +16 -13
- package/tailwind.config.js +3 -35
- package/docs/schema/user-action.json +0 -266
- package/src/App.vue +0 -25
- package/src/components/SearchButton.vue +0 -57
- package/src/entry-client.js +0 -27
- package/src/entry-server.js +0 -73
- package/src/events/event.js +0 -2
- package/src/main.js +0 -29
- package/src/mixin/website.js +0 -121
- package/src/router.js +0 -57
- package/src/widgets/MobileMenu.vue +0 -182
- package/src/widgets/WebPageBuilder4/ActionSetting.vue +0 -158
- package/src/widgets/WebPageBuilder4/ColorSetting.vue +0 -63
- package/src/widgets/WebPageBuilder4/DataSetting.vue +0 -92
- package/src/widgets/WebPageBuilder4/FontSizeSetting.vue +0 -76
- package/src/widgets/WebPageBuilder4/LinkSetting.vue +0 -68
- package/src/widgets/WebPageBuilder4/MobileMenuSetting.vue +0 -106
- package/src/widgets/WebPageBuilder4/Setting.vue +0 -73
- package/src/widgets/WebPageBuilder4/StyleSetting.vue +0 -77
- package/src/widgets/WebPageBuilder4/SvgSetting.vue +0 -207
- package/src/widgets/WebPageBuilder4/TextTransformSetting.vue +0 -70
- package/src/widgets/WebPageBuilder4/WebPageDataEdit.vue +0 -121
- package/test.json +0 -22
- /package/src/widgets/{Header1.vue → Header0.vue} +0 -0
- /package/src/widgets/{Header1Setting.vue → Header0Setting.vue} +0 -0
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<Modal ref="modal" width="480" height="420">
|
|
3
|
+
<template #head>
|
|
4
|
+
<div class="relative p-5">
|
|
5
|
+
<h3>{{ $t('Set OG')}}</h3>
|
|
6
|
+
<div class="absolute top-0 right-0 p-2">
|
|
7
|
+
<button type="button" class="p-2" @click="$refs.modal.close()">
|
|
8
|
+
<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">
|
|
9
|
+
<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"/>
|
|
10
|
+
</svg>
|
|
11
|
+
</button>
|
|
12
|
+
</div>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<template #default>
|
|
17
|
+
<div class="flex-1 p-5 flex flex-col gap-6">
|
|
18
|
+
|
|
19
|
+
<div>
|
|
20
|
+
<small class="text-text-400">Image & Text</small>
|
|
21
|
+
<div class="flex flex-row gap-2 mt-1">
|
|
22
|
+
<div>
|
|
23
|
+
<Image ref="image"
|
|
24
|
+
class="w-[90px] aspect-square bg-base-300 rounded-lg border-[1px] border-border-200"
|
|
25
|
+
:editable="true"
|
|
26
|
+
:src="instance.image"
|
|
27
|
+
@click="$refs.image.edit()"
|
|
28
|
+
@change="(_, file) => instance.image = file" />
|
|
29
|
+
</div>
|
|
30
|
+
<div class="flex-1 flex flex-col gap-2">
|
|
31
|
+
<Textbox v-model="instance.title" placeholder="Title" maxlength="100" />
|
|
32
|
+
<Textarea v-model="instance.description" class="mt-1" rows="3" maxlength="255" placeholder="Description" />
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
|
|
37
|
+
<div class="flex flex-row gap-4">
|
|
38
|
+
<div>
|
|
39
|
+
<small class="text-text-400">Type</small>
|
|
40
|
+
<Dropdown v-model="instance.type" class="mt-1 w-[150px]">
|
|
41
|
+
<option value="website">Website</option>
|
|
42
|
+
<option value="article">Article</option>
|
|
43
|
+
</Dropdown>
|
|
44
|
+
</div>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
</div>
|
|
48
|
+
</template>
|
|
49
|
+
|
|
50
|
+
<template #foot>
|
|
51
|
+
<div class="p-5">
|
|
52
|
+
<Button type="button" class="w-[100px]" @click="save">
|
|
53
|
+
OK
|
|
54
|
+
</Button>
|
|
55
|
+
</div>
|
|
56
|
+
</template>
|
|
57
|
+
</Modal>
|
|
58
|
+
</template>
|
|
59
|
+
|
|
60
|
+
<script setup>
|
|
61
|
+
|
|
62
|
+
import {inject, ref, useTemplateRef} from "vue";
|
|
63
|
+
|
|
64
|
+
const modal = useTemplateRef('modal')
|
|
65
|
+
const imageSrc = inject('imageSrc')
|
|
66
|
+
const getPage = inject('getPage')
|
|
67
|
+
const instance = ref(null)
|
|
68
|
+
const callback = ref(null)
|
|
69
|
+
|
|
70
|
+
function open(obj = {}, cb){
|
|
71
|
+
const page = getPage()
|
|
72
|
+
|
|
73
|
+
instance.value = Object.assign({
|
|
74
|
+
title: page?.title ?? '',
|
|
75
|
+
description: page?.description ?? '',
|
|
76
|
+
type: 'website'
|
|
77
|
+
}, obj)
|
|
78
|
+
|
|
79
|
+
callback.value = cb
|
|
80
|
+
modal.value.open()
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
function save(){
|
|
84
|
+
if(typeof callback.value === 'function'){
|
|
85
|
+
callback.value(instance.value)
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
modal.value.close()
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
defineExpose({
|
|
92
|
+
open
|
|
93
|
+
})
|
|
94
|
+
|
|
95
|
+
</script>
|
|
96
|
+
|
|
97
|
+
<style module>
|
|
98
|
+
|
|
99
|
+
.comp{
|
|
100
|
+
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
</style>
|
|
@@ -131,12 +131,12 @@ export default{
|
|
|
131
131
|
}
|
|
132
132
|
|
|
133
133
|
.comp button{
|
|
134
|
-
@apply border-[1px] border-
|
|
134
|
+
@apply border-[1px] border-border-200 bg-text-100 rounded-lg p-1 px-3;
|
|
135
135
|
}
|
|
136
136
|
|
|
137
137
|
.comp select{
|
|
138
138
|
@apply appearance-none outline-none p-1 px-2 bg-transparent cursor-pointer w-full;
|
|
139
|
-
@apply border-[1px] border-
|
|
139
|
+
@apply border-[1px] border-border-200 rounded-lg;
|
|
140
140
|
}
|
|
141
141
|
|
|
142
142
|
</style>
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
3
|
|
|
4
|
-
<div class="flex flex-col gap-4">
|
|
4
|
+
<div class="p-6 py-4 flex flex-col gap-4">
|
|
5
5
|
<div>
|
|
6
6
|
<strong class="flex-1 text-text-400">Paragraph</strong>
|
|
7
7
|
<div class="h-[1px] bg-text-100 mt-2"></div>
|
|
@@ -26,11 +26,12 @@
|
|
|
26
26
|
</div>
|
|
27
27
|
</div>
|
|
28
28
|
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
29
|
+
<ComponentSetting2 :item="item"
|
|
30
|
+
:view-type="viewType"
|
|
31
|
+
:view-types="viewTypes"
|
|
32
|
+
:view-index="viewIndex"
|
|
33
|
+
defaultDisplay="block"
|
|
34
|
+
@change="$emit('change')" />
|
|
34
35
|
|
|
35
36
|
</div>
|
|
36
37
|
</template>
|
|
@@ -46,14 +47,16 @@ export default{
|
|
|
46
47
|
|
|
47
48
|
props: {
|
|
48
49
|
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
50
|
+
item: {
|
|
51
|
+
type: Object,
|
|
52
|
+
required: true
|
|
53
|
+
},
|
|
53
54
|
|
|
54
|
-
|
|
55
|
+
viewType: String,
|
|
55
56
|
|
|
56
|
-
|
|
57
|
+
viewIndex: Number,
|
|
58
|
+
|
|
59
|
+
viewTypes: Array,
|
|
57
60
|
|
|
58
61
|
},
|
|
59
62
|
|
|
@@ -80,7 +83,7 @@ export default{
|
|
|
80
83
|
<style module>
|
|
81
84
|
|
|
82
85
|
.comp{
|
|
83
|
-
|
|
86
|
+
@apply flex flex-col divide-y divide-border-50;
|
|
84
87
|
}
|
|
85
88
|
|
|
86
89
|
</style>
|
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div class="flex flex-row gap-4">
|
|
5
|
+
<div class="flex-1">
|
|
6
|
+
<small class="text-text-400">Position</small>
|
|
7
|
+
<Dropdown class="flex-1 w-full" v-model="position[viewIndex]">
|
|
8
|
+
<option value="">Default</option>
|
|
9
|
+
<option v-for="position in positions" :value="position[0]">{{ position[1] }}</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<div v-if="[ '' ].includes('')" class="w-[80px]">
|
|
14
|
+
<small class="text-text-400">Z Index</small>
|
|
15
|
+
<Dropdown v-model="zIndex[viewIndex]">
|
|
16
|
+
<option value="">-</option>
|
|
17
|
+
<option v-for="_ in zIndexes" :value="_[0]">{{ _[1] }}</option>
|
|
18
|
+
</Dropdown>
|
|
19
|
+
</div>
|
|
20
|
+
</div>
|
|
21
|
+
|
|
22
|
+
<div class="grid grid-cols-4 gap-4">
|
|
23
|
+
<div>
|
|
24
|
+
<small class="text-text-400">Left</small>
|
|
25
|
+
<Dropdown v-model="left[viewIndex]">
|
|
26
|
+
<option value="">-</option>
|
|
27
|
+
<option v-for="_ in lefts" :value="_[0]">{{ _[1] }}</option>
|
|
28
|
+
</Dropdown>
|
|
29
|
+
</div>
|
|
30
|
+
|
|
31
|
+
<div>
|
|
32
|
+
<small class="text-text-400">Top</small>
|
|
33
|
+
<Dropdown v-model="top[viewIndex]">
|
|
34
|
+
<option value="">-</option>
|
|
35
|
+
<option v-for="_ in tops" :value="_[0]">{{ _[1] }}</option>
|
|
36
|
+
</Dropdown>
|
|
37
|
+
</div>
|
|
38
|
+
|
|
39
|
+
<div>
|
|
40
|
+
<small class="text-text-400">Right</small>
|
|
41
|
+
<Dropdown v-model="right[viewIndex]">
|
|
42
|
+
<option value="">-</option>
|
|
43
|
+
<option v-for="_ in rights" :value="_[0]">{{ _[1] }}</option>
|
|
44
|
+
</Dropdown>
|
|
45
|
+
</div>
|
|
46
|
+
|
|
47
|
+
<div>
|
|
48
|
+
<small class="text-text-400">Bottom</small>
|
|
49
|
+
<Dropdown v-model="bottom[viewIndex]">
|
|
50
|
+
<option value="">-</option>
|
|
51
|
+
<option v-for="_ in bottoms" :value="_[0]">{{ _[1] }}</option>
|
|
52
|
+
</Dropdown>
|
|
53
|
+
</div>
|
|
54
|
+
</div>
|
|
55
|
+
|
|
56
|
+
</div>
|
|
57
|
+
</template>
|
|
58
|
+
|
|
59
|
+
<script>
|
|
60
|
+
|
|
61
|
+
export default{
|
|
62
|
+
|
|
63
|
+
computed: {
|
|
64
|
+
|
|
65
|
+
left(){
|
|
66
|
+
if(!Array.isArray(this.item.props.left) || this.item.props.left.length < 1)
|
|
67
|
+
this.item.props.left = []
|
|
68
|
+
return this.item.props.left
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
top(){
|
|
72
|
+
if(!Array.isArray(this.item.props.top) || this.item.props.top.length < 1)
|
|
73
|
+
this.item.props.top = []
|
|
74
|
+
return this.item.props.top
|
|
75
|
+
},
|
|
76
|
+
|
|
77
|
+
right(){
|
|
78
|
+
if(!Array.isArray(this.item.props.right) || this.item.props.right.length < 1)
|
|
79
|
+
this.item.props.right = []
|
|
80
|
+
return this.item.props.right
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
bottom(){
|
|
84
|
+
if(!Array.isArray(this.item.props.bottom) || this.item.props.bottom.length < 1)
|
|
85
|
+
this.item.props.bottom = []
|
|
86
|
+
return this.item.props.bottom
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
zIndex(){
|
|
90
|
+
if(!Array.isArray(this.item.props.zIndex) || this.item.props.zIndex.length < 1)
|
|
91
|
+
this.item.props.zIndex = []
|
|
92
|
+
return this.item.props.zIndex
|
|
93
|
+
},
|
|
94
|
+
|
|
95
|
+
position(){
|
|
96
|
+
if(!Array.isArray(this.item.props.position) || this.item.props.position.length < 1)
|
|
97
|
+
this.item.props.position = []
|
|
98
|
+
return this.item.props.position
|
|
99
|
+
},
|
|
100
|
+
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
data(){
|
|
104
|
+
return {
|
|
105
|
+
positions: [
|
|
106
|
+
[ 'static', 'Static' ],
|
|
107
|
+
[ 'fixed', 'Fixed' ],
|
|
108
|
+
[ 'absolute', 'Absolute' ],
|
|
109
|
+
[ 'relative', 'Relative' ],
|
|
110
|
+
[ 'sticky', 'Sticky' ],
|
|
111
|
+
],
|
|
112
|
+
|
|
113
|
+
lefts: [
|
|
114
|
+
[ 'left-0', '0' ],
|
|
115
|
+
[ 'left-4', '4' ],
|
|
116
|
+
[ 'left-6', '6' ],
|
|
117
|
+
[ 'left-8', '8' ],
|
|
118
|
+
[ 'left-12', '12' ],
|
|
119
|
+
[ 'left-16', '16' ],
|
|
120
|
+
[ 'left-20', '20' ],
|
|
121
|
+
[ 'left-24', '24' ],
|
|
122
|
+
[ 'left-28', '28' ],
|
|
123
|
+
[ 'left-32', '32' ],
|
|
124
|
+
[ 'left-36', '36' ],
|
|
125
|
+
[ 'left-48', '48' ],
|
|
126
|
+
],
|
|
127
|
+
|
|
128
|
+
tops: [
|
|
129
|
+
[ 'top-0', '0' ],
|
|
130
|
+
[ 'top-4', '4' ],
|
|
131
|
+
[ 'top-6', '6' ],
|
|
132
|
+
[ 'top-8', '8' ],
|
|
133
|
+
[ 'top-12', '12' ],
|
|
134
|
+
[ 'top-16', '16' ],
|
|
135
|
+
[ 'top-20', '20' ],
|
|
136
|
+
[ 'top-24', '24' ],
|
|
137
|
+
[ 'top-28', '28' ],
|
|
138
|
+
[ 'top-32', '32' ],
|
|
139
|
+
[ 'top-36', '36' ],
|
|
140
|
+
[ 'top-48', '48' ],
|
|
141
|
+
],
|
|
142
|
+
|
|
143
|
+
rights: [
|
|
144
|
+
[ 'right-0', '0' ],
|
|
145
|
+
[ 'right-4', '4' ],
|
|
146
|
+
[ 'right-6', '6' ],
|
|
147
|
+
[ 'right-8', '8' ],
|
|
148
|
+
[ 'right-12', '12' ],
|
|
149
|
+
[ 'right-16', '16' ],
|
|
150
|
+
[ 'right-20', '20' ],
|
|
151
|
+
[ 'right-24', '24' ],
|
|
152
|
+
[ 'right-28', '28' ],
|
|
153
|
+
[ 'right-32', '32' ],
|
|
154
|
+
[ 'right-36', '36' ],
|
|
155
|
+
[ 'right-48', '48' ],
|
|
156
|
+
],
|
|
157
|
+
|
|
158
|
+
bottoms: [
|
|
159
|
+
[ 'bottom-0', '0' ],
|
|
160
|
+
[ 'bottom-4', '4' ],
|
|
161
|
+
[ 'bottom-6', '6' ],
|
|
162
|
+
[ 'bottom-8', '8' ],
|
|
163
|
+
[ 'bottom-12', '12' ],
|
|
164
|
+
[ 'bottom-16', '16' ],
|
|
165
|
+
[ 'bottom-20', '20' ],
|
|
166
|
+
[ 'bottom-24', '24' ],
|
|
167
|
+
[ 'bottom-28', '28' ],
|
|
168
|
+
[ 'bottom-32', '32' ],
|
|
169
|
+
[ 'bottom-36', '36' ],
|
|
170
|
+
[ 'bottom-48', '48' ],
|
|
171
|
+
],
|
|
172
|
+
|
|
173
|
+
zIndexes: [
|
|
174
|
+
[ 'z-0', '0' ],
|
|
175
|
+
[ 'z-10', '10' ],
|
|
176
|
+
[ 'z-20', '20' ],
|
|
177
|
+
[ 'z-30', '30' ],
|
|
178
|
+
[ 'z-40', '40' ],
|
|
179
|
+
[ 'z-50', '50' ],
|
|
180
|
+
]
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
|
|
184
|
+
props: {
|
|
185
|
+
|
|
186
|
+
item: {
|
|
187
|
+
type: Object,
|
|
188
|
+
required: true
|
|
189
|
+
},
|
|
190
|
+
|
|
191
|
+
viewType: String,
|
|
192
|
+
|
|
193
|
+
viewIndex: Number,
|
|
194
|
+
|
|
195
|
+
viewTypes: Array,
|
|
196
|
+
|
|
197
|
+
},
|
|
198
|
+
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
</script>
|
|
202
|
+
|
|
203
|
+
<style module>
|
|
204
|
+
|
|
205
|
+
.comp{
|
|
206
|
+
@apply flex-1 flex flex-col gap-4;
|
|
207
|
+
}
|
|
208
|
+
|
|
209
|
+
</style>
|