@mixd-id/web-scaffold 0.2.240706 → 0.2.250801010
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 +83 -169
- package/src/components/Card.vue +257 -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 +12 -5
- 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 +528 -403
- package/src/components/ListContextMenu.vue +88 -0
- package/src/components/ListItem.vue +6 -4
- 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 +40 -26
- 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 +16 -22
- 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 +151 -67
- package/src/themes/default/index.js +118 -159
- 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 +38 -36
- 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 +145 -236
- 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 +365 -150
- 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 +1019 -707
- 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
|
@@ -69,13 +69,11 @@
|
|
|
69
69
|
|
|
70
70
|
<script>
|
|
71
71
|
|
|
72
|
-
import groupBy from "
|
|
72
|
+
import {groupBy} from "../utils/helpers.mjs";
|
|
73
73
|
|
|
74
74
|
export default{
|
|
75
75
|
|
|
76
|
-
inject: [ 'confirm', 'imageSrc', '
|
|
77
|
-
|
|
78
|
-
emits: [ 'apply' ],
|
|
76
|
+
inject: [ 'confirm', 'imageSrc', 'useSocket', 'setUid' ],
|
|
79
77
|
|
|
80
78
|
props: {
|
|
81
79
|
|
|
@@ -88,10 +86,16 @@ export default{
|
|
|
88
86
|
methods: {
|
|
89
87
|
|
|
90
88
|
apply(){
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
89
|
+
|
|
90
|
+
const component = JSON.parse(JSON.stringify(this.component))
|
|
91
|
+
Object.assign(component.props, {
|
|
92
|
+
enabled: true
|
|
93
|
+
})
|
|
94
|
+
this.setUid(component)
|
|
95
|
+
|
|
96
|
+
if(typeof this.params?.callback === 'function')
|
|
97
|
+
this.params.callback(component)
|
|
98
|
+
|
|
95
99
|
this.close()
|
|
96
100
|
},
|
|
97
101
|
|
|
@@ -109,7 +113,7 @@ export default{
|
|
|
109
113
|
load(){
|
|
110
114
|
if(!this.componentSrc) return
|
|
111
115
|
|
|
112
|
-
this.
|
|
116
|
+
this.useSocket().send(this.componentSrc, { type: 2 })
|
|
113
117
|
.then((res) => {
|
|
114
118
|
const { items } = res ?? {}
|
|
115
119
|
|
|
@@ -128,7 +132,7 @@ export default{
|
|
|
128
132
|
remove(template){
|
|
129
133
|
this.confirm('Remove this template?', {
|
|
130
134
|
onConfirm: () => {
|
|
131
|
-
this.
|
|
135
|
+
this.useSocket().send('template.remove', template)
|
|
132
136
|
.then(_ => this.load())
|
|
133
137
|
.catch(err => this.alert(err))
|
|
134
138
|
}
|
|
@@ -171,7 +175,7 @@ export default{
|
|
|
171
175
|
data(){
|
|
172
176
|
return {
|
|
173
177
|
isOpen: false,
|
|
174
|
-
|
|
178
|
+
params: null,
|
|
175
179
|
types: 'All',
|
|
176
180
|
search: '',
|
|
177
181
|
component: null,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<Modal
|
|
2
|
+
<Modal ref="modal" width="420" height="480">
|
|
3
3
|
<template v-slot:head>
|
|
4
4
|
<div class="relative p-6">
|
|
5
|
-
<h3>{{ $t('
|
|
5
|
+
<h3>{{ $t('Create Layout') }}</h3>
|
|
6
6
|
<div class="absolute top-0 right-0 p-2">
|
|
7
7
|
<button type="button" class="p-2" @click="close">
|
|
8
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">
|
|
@@ -12,51 +12,35 @@
|
|
|
12
12
|
</div>
|
|
13
13
|
</div>
|
|
14
14
|
</template>
|
|
15
|
-
<template v-slot:foot>
|
|
16
|
-
<div class="p-5 flex justify-end" v-if="viewMode === 2">
|
|
17
|
-
<Button class="w-[100px]"
|
|
18
|
-
ref="applyBtn"
|
|
19
|
-
:state="!canAdd ? -1 : 1"
|
|
20
|
-
@click="save">{{ $t('Apply') }}</Button>
|
|
21
|
-
</div>
|
|
22
|
-
</template>
|
|
23
|
-
<template #default>
|
|
24
|
-
<div v-if="viewMode === 1" class="flex-1 flex flex-col gap-4 p-6">
|
|
25
|
-
|
|
26
|
-
<div class="flex flex-col">
|
|
27
|
-
<div v-for="layout in layouts"
|
|
28
|
-
:class="$style.layoutItem + (this.layoutId === layout.id ? ' ' + $style.active : '')">
|
|
29
|
-
<div class="flex-1" @click="apply(layout)">
|
|
30
|
-
{{ layout.name }}
|
|
31
|
-
</div>
|
|
32
|
-
<button type="button" class="px-2 bg-red-100" @click="remove(layout)">
|
|
33
|
-
<svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><g class="nc-icon-wrapper"><path d="M268 416h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12zM432 80h-82.41l-34-56.7A48 48 0 0 0 274.41 0H173.59a48 48 0 0 0-41.16 23.3L98.41 80H16A16 16 0 0 0 0 96v16a16 16 0 0 0 16 16h16v336a48 48 0 0 0 48 48h288a48 48 0 0 0 48-48V128h16a16 16 0 0 0 16-16V96a16 16 0 0 0-16-16zM171.84 50.91A6 6 0 0 1 177 48h94a6 6 0 0 1 5.15 2.91L293.61 80H154.39zM368 464H80V128h288zm-212-48h24a12 12 0 0 0 12-12V188a12 12 0 0 0-12-12h-24a12 12 0 0 0-12 12v216a12 12 0 0 0 12 12z"></path></g></svg>
|
|
34
|
-
</button>
|
|
35
|
-
</div>
|
|
36
|
-
</div>
|
|
37
15
|
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
</div>
|
|
55
|
-
</div>
|
|
56
|
-
</div>
|
|
16
|
+
<template #default>
|
|
17
|
+
<div class="flex-1 p-6 flex flex-col gap-6">
|
|
18
|
+
|
|
19
|
+
<div>
|
|
20
|
+
<label class="text-text-400">Name</label>
|
|
21
|
+
<Textbox v-model="instance.title" />
|
|
22
|
+
</div>
|
|
23
|
+
|
|
24
|
+
<div>
|
|
25
|
+
<label class="text-text-400">Layouts</label>
|
|
26
|
+
<div class="grid grid-cols-4 gap-2 mt-3">
|
|
27
|
+
<Radio v-for="(template, index) in templates" v-model="instance.templateIndex" :value="index">
|
|
28
|
+
{{ template.layout.name }}
|
|
29
|
+
</Radio>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
57
32
|
|
|
58
33
|
</div>
|
|
59
34
|
</template>
|
|
35
|
+
|
|
36
|
+
<template v-slot:foot>
|
|
37
|
+
<div class="p-5 flex">
|
|
38
|
+
<Button class="w-[100px]"
|
|
39
|
+
ref="applyBtn"
|
|
40
|
+
:state="canApply ? 1 : -1"
|
|
41
|
+
@click="apply">{{ $t('Create') }}</Button>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
60
44
|
</Modal>
|
|
61
45
|
</template>
|
|
62
46
|
|
|
@@ -66,12 +50,10 @@ export default{
|
|
|
66
50
|
|
|
67
51
|
emits: [ 'apply' ],
|
|
68
52
|
|
|
69
|
-
inject: [ 'alert', 'confirm'
|
|
53
|
+
inject: [ 'alert', 'confirm' ],
|
|
70
54
|
|
|
71
55
|
props: {
|
|
72
56
|
|
|
73
|
-
layouts: Array,
|
|
74
|
-
|
|
75
57
|
templates: {
|
|
76
58
|
type: Array,
|
|
77
59
|
default: [
|
|
@@ -83,182 +65,6 @@ export default{
|
|
|
83
65
|
footers: []
|
|
84
66
|
}
|
|
85
67
|
},
|
|
86
|
-
{
|
|
87
|
-
imageUrl: '/assets/templates/layout1.png',
|
|
88
|
-
layout: {
|
|
89
|
-
name: 'Nike',
|
|
90
|
-
headers: [
|
|
91
|
-
{
|
|
92
|
-
"type": "Flex",
|
|
93
|
-
"name": "Flex",
|
|
94
|
-
"group": "Layouts",
|
|
95
|
-
"items": [
|
|
96
|
-
{
|
|
97
|
-
"type": "Image",
|
|
98
|
-
"name": "Image",
|
|
99
|
-
"group": "Components",
|
|
100
|
-
"props": {
|
|
101
|
-
"src": [
|
|
102
|
-
"66aafad893b123b69dfcf4ef0f850537.png"
|
|
103
|
-
],
|
|
104
|
-
"enabled": true,
|
|
105
|
-
"aspectRatio": [],
|
|
106
|
-
"display": [],
|
|
107
|
-
"opacity": [],
|
|
108
|
-
"padding": [],
|
|
109
|
-
"margin": [],
|
|
110
|
-
"width": [],
|
|
111
|
-
"minWidth": [],
|
|
112
|
-
"maxWidth": [],
|
|
113
|
-
"height": [
|
|
114
|
-
"h-10vh"
|
|
115
|
-
],
|
|
116
|
-
"minHeight": [],
|
|
117
|
-
"maxHeight": [],
|
|
118
|
-
"overflow": [],
|
|
119
|
-
"colSpan": [],
|
|
120
|
-
"bgColors": [],
|
|
121
|
-
"bgImage": [
|
|
122
|
-
{},
|
|
123
|
-
{}
|
|
124
|
-
],
|
|
125
|
-
"bgSize": [],
|
|
126
|
-
"bgPosition": [],
|
|
127
|
-
"bgRepeat": [],
|
|
128
|
-
"bdSize": [],
|
|
129
|
-
"bdColor": [],
|
|
130
|
-
"bdRadius": [],
|
|
131
|
-
"bdStyle": [],
|
|
132
|
-
"boxShadow": []
|
|
133
|
-
},
|
|
134
|
-
"uid": "e9431764daac79e6d12eaaffb6db048b",
|
|
135
|
-
"instance": {
|
|
136
|
-
"type": "Image",
|
|
137
|
-
"uid": "e9431764daac79e6d12eaaffb6db048b",
|
|
138
|
-
"class": "h-10vh",
|
|
139
|
-
"src": [
|
|
140
|
-
"66aafad893b123b69dfcf4ef0f850537.png"
|
|
141
|
-
],
|
|
142
|
-
"bgImage": [
|
|
143
|
-
{},
|
|
144
|
-
{}
|
|
145
|
-
]
|
|
146
|
-
}
|
|
147
|
-
}
|
|
148
|
-
],
|
|
149
|
-
"props": {
|
|
150
|
-
"flexColumns": [],
|
|
151
|
-
"direction": [
|
|
152
|
-
"flex-col"
|
|
153
|
-
],
|
|
154
|
-
"gap": [],
|
|
155
|
-
"enabled": true,
|
|
156
|
-
"display": [],
|
|
157
|
-
"opacity": [],
|
|
158
|
-
"padding": [],
|
|
159
|
-
"margin": [],
|
|
160
|
-
"width": [],
|
|
161
|
-
"minWidth": [],
|
|
162
|
-
"maxWidth": [],
|
|
163
|
-
"height": [],
|
|
164
|
-
"minHeight": [],
|
|
165
|
-
"maxHeight": [],
|
|
166
|
-
"overflow": [],
|
|
167
|
-
"colSpan": [],
|
|
168
|
-
"bgColors": [
|
|
169
|
-
"bg-white"
|
|
170
|
-
],
|
|
171
|
-
"bgImage": [
|
|
172
|
-
{},
|
|
173
|
-
{}
|
|
174
|
-
],
|
|
175
|
-
"bgSize": [],
|
|
176
|
-
"bgPosition": [],
|
|
177
|
-
"bgRepeat": [],
|
|
178
|
-
"bdSize": [],
|
|
179
|
-
"bdColor": [],
|
|
180
|
-
"bdRadius": [],
|
|
181
|
-
"bdStyle": [],
|
|
182
|
-
"boxShadow": []
|
|
183
|
-
},
|
|
184
|
-
"uid": "f121447f5dbb20f624b2cc1c45508005",
|
|
185
|
-
"instance": {
|
|
186
|
-
"type": "Flex",
|
|
187
|
-
"uid": "f121447f5dbb20f624b2cc1c45508005",
|
|
188
|
-
"class": "bg-white flex-col",
|
|
189
|
-
"flexColumns": [],
|
|
190
|
-
"bgImage": [
|
|
191
|
-
{},
|
|
192
|
-
{}
|
|
193
|
-
],
|
|
194
|
-
"items": [
|
|
195
|
-
{
|
|
196
|
-
"type": "Image",
|
|
197
|
-
"name": "Image",
|
|
198
|
-
"group": "Components",
|
|
199
|
-
"props": {
|
|
200
|
-
"src": [
|
|
201
|
-
"66aafad893b123b69dfcf4ef0f850537.png"
|
|
202
|
-
],
|
|
203
|
-
"enabled": true,
|
|
204
|
-
"aspectRatio": [],
|
|
205
|
-
"display": [],
|
|
206
|
-
"opacity": [],
|
|
207
|
-
"padding": [],
|
|
208
|
-
"margin": [],
|
|
209
|
-
"width": [],
|
|
210
|
-
"minWidth": [],
|
|
211
|
-
"maxWidth": [],
|
|
212
|
-
"height": [
|
|
213
|
-
"h-10vh"
|
|
214
|
-
],
|
|
215
|
-
"minHeight": [],
|
|
216
|
-
"maxHeight": [],
|
|
217
|
-
"overflow": [],
|
|
218
|
-
"colSpan": [],
|
|
219
|
-
"bgColors": [],
|
|
220
|
-
"bgImage": [
|
|
221
|
-
{},
|
|
222
|
-
{}
|
|
223
|
-
],
|
|
224
|
-
"bgSize": [],
|
|
225
|
-
"bgPosition": [],
|
|
226
|
-
"bgRepeat": [],
|
|
227
|
-
"bdSize": [],
|
|
228
|
-
"bdColor": [],
|
|
229
|
-
"bdRadius": [],
|
|
230
|
-
"bdStyle": [],
|
|
231
|
-
"boxShadow": []
|
|
232
|
-
},
|
|
233
|
-
"uid": "e9431764daac79e6d12eaaffb6db048b",
|
|
234
|
-
"instance": {
|
|
235
|
-
"type": "Image",
|
|
236
|
-
"uid": "e9431764daac79e6d12eaaffb6db048b",
|
|
237
|
-
"class": "h-10vh",
|
|
238
|
-
"src": [
|
|
239
|
-
"66aafad893b123b69dfcf4ef0f850537.png"
|
|
240
|
-
],
|
|
241
|
-
"bgImage": [
|
|
242
|
-
{},
|
|
243
|
-
{}
|
|
244
|
-
]
|
|
245
|
-
}
|
|
246
|
-
}
|
|
247
|
-
]
|
|
248
|
-
}
|
|
249
|
-
}
|
|
250
|
-
],
|
|
251
|
-
footers: []
|
|
252
|
-
}
|
|
253
|
-
},
|
|
254
|
-
{
|
|
255
|
-
imageUrl: '/assets/templates/layout2.png',
|
|
256
|
-
layout: {
|
|
257
|
-
name: 'Apple',
|
|
258
|
-
headers: [],
|
|
259
|
-
footers: []
|
|
260
|
-
}
|
|
261
|
-
},
|
|
262
68
|
]
|
|
263
69
|
}
|
|
264
70
|
|
|
@@ -266,73 +72,38 @@ export default{
|
|
|
266
72
|
|
|
267
73
|
data(){
|
|
268
74
|
return {
|
|
269
|
-
|
|
270
|
-
selectedTemplate: null,
|
|
271
|
-
_templates: null,
|
|
272
|
-
viewMode: 1,
|
|
273
|
-
layoutId: null
|
|
75
|
+
instance: null,
|
|
274
76
|
}
|
|
275
77
|
},
|
|
276
78
|
|
|
277
79
|
methods: {
|
|
278
80
|
|
|
279
|
-
create(){
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
},
|
|
283
|
-
|
|
284
|
-
open(layoutId){
|
|
285
|
-
this.viewMode = 1
|
|
286
|
-
this.isOpen = true
|
|
287
|
-
this.layoutId = layoutId
|
|
288
|
-
},
|
|
289
|
-
|
|
290
|
-
remove(layout){
|
|
291
|
-
this.confirm(this.$t('Remove this?'), {
|
|
292
|
-
onConfirm: () => {
|
|
293
|
-
this.socketEmit2('layout.remove', { id: layout.id })
|
|
294
|
-
.then(() => {
|
|
295
|
-
this.layouts.splice(this.layouts.indexOf(layout), 1)
|
|
296
|
-
})
|
|
297
|
-
.catch(err => this.alert(err))
|
|
298
|
-
}
|
|
299
|
-
})
|
|
81
|
+
create(obj = {}){
|
|
82
|
+
this.instance = obj
|
|
83
|
+
this.$refs.modal.open()
|
|
300
84
|
},
|
|
301
85
|
|
|
302
86
|
close(){
|
|
303
|
-
|
|
304
|
-
},
|
|
305
|
-
|
|
306
|
-
resetState(){
|
|
307
|
-
if(this.$refs.applyBtn)
|
|
308
|
-
this.$refs.applyBtn.resetState()
|
|
309
|
-
},
|
|
310
|
-
|
|
311
|
-
apply(layout){
|
|
312
|
-
this.$emit('apply', layout)
|
|
313
|
-
this.close()
|
|
87
|
+
this.$refs.modal.close()
|
|
314
88
|
},
|
|
315
89
|
|
|
316
|
-
|
|
317
|
-
this.$
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
this.apply(layout)
|
|
322
|
-
})
|
|
323
|
-
.catch(err => this.alert(err))
|
|
90
|
+
apply(){
|
|
91
|
+
this.$emit('apply', {
|
|
92
|
+
title: this.instance.title,
|
|
93
|
+
...(this.templates[this.instance.templateIndex].layout)
|
|
94
|
+
})
|
|
324
95
|
}
|
|
325
96
|
|
|
326
97
|
},
|
|
327
98
|
|
|
328
99
|
computed: {
|
|
329
100
|
|
|
330
|
-
|
|
331
|
-
return this.
|
|
101
|
+
canApply(){
|
|
102
|
+
return this.instance
|
|
332
103
|
},
|
|
333
104
|
|
|
334
105
|
computedWidth(){
|
|
335
|
-
return
|
|
106
|
+
return 520;
|
|
336
107
|
}
|
|
337
108
|
|
|
338
109
|
},
|