@mixd-id/web-scaffold 0.1.230406311 → 0.1.230406313
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/App.vue +9 -1
- package/src/components/Carousel.vue +3 -3
- package/src/components/ColorPicker2.vue +1 -1
- package/src/components/Image.vue +5 -3
- package/src/components/List.vue +48 -13
- package/src/components/Modal.vue +2 -2
- package/src/components/Text.vue +34 -0
- package/src/components/Textbox.vue +1 -1
- package/src/components/VirtualTable.vue +124 -95
- package/src/index.js +22 -38
- package/src/main.js +0 -9
- package/src/mixin/component.js +2 -1
- package/src/utils/preset-selector.js +53 -24
- package/src/utils/preset-selector.mjs +21 -1
- package/src/utils/wss.js +6 -1
- package/src/utils/wss.mjs +2 -2
- package/src/widgets/PresetBar.vue +6 -0
- package/src/widgets/WebPageBuilder3.vue +3 -218
- package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +54 -0
- package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +75 -0
- package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4/BlurSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +64 -0
- package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +75 -0
- package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +69 -0
- package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +73 -0
- package/src/widgets/WebPageBuilder4/ButtonSetting.vue +65 -0
- package/src/widgets/WebPageBuilder4/CarouselSetting.vue +178 -0
- package/src/widgets/WebPageBuilder4/DisplaySetting.vue +76 -0
- package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +71 -0
- package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +70 -0
- package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +74 -0
- package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +71 -0
- package/src/widgets/WebPageBuilder4/FlexSetting.vue +96 -0
- package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +69 -0
- package/src/widgets/WebPageBuilder4/GapSetting.vue +75 -0
- package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +68 -0
- package/src/widgets/WebPageBuilder4/GridSetting.vue +166 -0
- package/src/widgets/WebPageBuilder4/HeightSetting.vue +95 -0
- package/src/widgets/WebPageBuilder4/ImageSetting.vue +102 -0
- package/src/widgets/WebPageBuilder4/MarginSetting.vue +64 -0
- package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +82 -0
- package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +90 -0
- package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +81 -0
- package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +101 -0
- package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +155 -0
- package/src/widgets/WebPageBuilder4/OpacitySetting.vue +77 -0
- package/src/widgets/WebPageBuilder4/OverflowSetting.vue +81 -0
- package/src/widgets/WebPageBuilder4/PaddingSetting.vue +53 -0
- package/src/widgets/WebPageBuilder4/PositionSetting.vue +191 -0
- package/src/widgets/WebPageBuilder4/PropertySetting.vue +176 -0
- package/src/widgets/WebPageBuilder4/TextSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4/TreeView.vue +43 -0
- package/src/widgets/WebPageBuilder4/TreeViewItem.vue +298 -0
- package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +141 -0
- package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +172 -0
- package/src/widgets/WebPageBuilder4/WidthSetting.vue +105 -0
- package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +72 -0
- package/src/widgets/WebPageBuilder4.vue +798 -0
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<strong v-if="title">{{ title }}</strong>
|
|
4
|
+
|
|
5
|
+
<div class="flex flex-row items-center">
|
|
6
|
+
<label class="flex-1">Enabled</label>
|
|
7
|
+
<Switch v-model="value.props.enabled" />
|
|
8
|
+
</div>
|
|
9
|
+
|
|
10
|
+
<div>
|
|
11
|
+
<div class="flex flex-row items-center">
|
|
12
|
+
<label class="flex-1">Images</label>
|
|
13
|
+
<button type="button" class="text-primary"
|
|
14
|
+
@click="addImage">
|
|
15
|
+
Add Image
|
|
16
|
+
</button>
|
|
17
|
+
</div>
|
|
18
|
+
<div>
|
|
19
|
+
<TreeView :items="items"
|
|
20
|
+
v-model="currentConfig.selectedImageUid"
|
|
21
|
+
class="mt-2">
|
|
22
|
+
<template #item="{ item, parent }">
|
|
23
|
+
<div class="flex-1 flex flex-row items-center gap-3 px-3">
|
|
24
|
+
<div data-reorder>
|
|
25
|
+
<svg width="14" height="14" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path d="M496 288H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16zm0-128H16c-8.8 0-16 7.2-16 16v32c0 8.8 7.2 16 16 16h480c8.8 0 16-7.2 16-16v-32c0-8.8-7.2-16-16-16z"/></svg>
|
|
26
|
+
</div>
|
|
27
|
+
<div class="flex-1">
|
|
28
|
+
<Image :src="item.props.src[index]" class="w-[64px] min-h-[32px] bg-text-50" />
|
|
29
|
+
</div>
|
|
30
|
+
<div>
|
|
31
|
+
<button type="button" @click="items.splice(items.indexOf(item), 1)">
|
|
32
|
+
<svg width="16" height="16" class="fill-text-300 hover:fill-red-500" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M207.6 256l107.72-107.72c6.23-6.23 6.23-16.34 0-22.58l-25.03-25.03c-6.23-6.23-16.34-6.23-22.58 0L160 208.4 52.28 100.68c-6.23-6.23-16.34-6.23-22.58 0L4.68 125.7c-6.23 6.23-6.23 16.34 0 22.58L112.4 256 4.68 363.72c-6.23 6.23-6.23 16.34 0 22.58l25.03 25.03c6.23 6.23 16.34 6.23 22.58 0L160 303.6l107.72 107.72c6.23 6.23 16.34 6.23 22.58 0l25.03-25.03c6.23-6.23 6.23-16.34 0-22.58L207.6 256z"/></svg>
|
|
33
|
+
</button>
|
|
34
|
+
</div>
|
|
35
|
+
</div>
|
|
36
|
+
</template>
|
|
37
|
+
</TreeView>
|
|
38
|
+
|
|
39
|
+
<Modal ref="imageEdit" width="380" height="480">
|
|
40
|
+
<template v-slot:head>
|
|
41
|
+
<div class="relative p-5">
|
|
42
|
+
<h3>Add Image</h3>
|
|
43
|
+
<div class="absolute top-0 right-0 p-2">
|
|
44
|
+
<button type="button" class="p-2" @click="$refs.imageEdit.close()">
|
|
45
|
+
<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">
|
|
46
|
+
<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"/>
|
|
47
|
+
</svg>
|
|
48
|
+
</button>
|
|
49
|
+
</div>
|
|
50
|
+
</div>
|
|
51
|
+
</template>
|
|
52
|
+
<template #foot="{ context }">
|
|
53
|
+
<div class="p-5">
|
|
54
|
+
<Button class="w-[120px]"
|
|
55
|
+
@click="items.push(context.component);$refs.imageEdit.close()">
|
|
56
|
+
Add Image
|
|
57
|
+
</Button>
|
|
58
|
+
</div>
|
|
59
|
+
</template>
|
|
60
|
+
<template #default="{ context }">
|
|
61
|
+
<div class="flex-1 p-5">
|
|
62
|
+
<ImageSetting :value="context.component"
|
|
63
|
+
:index="index" />
|
|
64
|
+
</div>
|
|
65
|
+
</template>
|
|
66
|
+
</Modal>
|
|
67
|
+
</div>
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div class="flex flex-row items-center">
|
|
71
|
+
<label class="flex-1">Legend</label>
|
|
72
|
+
<Checkbox v-model="value.props.useLegend" />
|
|
73
|
+
</div>
|
|
74
|
+
|
|
75
|
+
<div class="flex flex-row items-center">
|
|
76
|
+
<label class="flex-1">Autoplay</label>
|
|
77
|
+
<Dropdown class="w-[80px]" v-model="value.props.autoPlay">
|
|
78
|
+
<option :value="0">Off</option>
|
|
79
|
+
<option :value="1000">1s</option>
|
|
80
|
+
<option :value="2000">2s</option>
|
|
81
|
+
<option :value="3000">3s</option>
|
|
82
|
+
<option :value="4000">4s</option>
|
|
83
|
+
<option :value="5000">5s</option>
|
|
84
|
+
<option :value="6000">6s</option>
|
|
85
|
+
<option :value="7000">7s</option>
|
|
86
|
+
<option :value="8000">8s</option>
|
|
87
|
+
<option :value="9000">9s</option>
|
|
88
|
+
<option :value="10000">10s</option>
|
|
89
|
+
</Dropdown>
|
|
90
|
+
</div>
|
|
91
|
+
|
|
92
|
+
<div class="flex flex-row items-center">
|
|
93
|
+
<label class="flex-1">Infinite</label>
|
|
94
|
+
<Checkbox v-model="value.props.infinite" />
|
|
95
|
+
</div>
|
|
96
|
+
|
|
97
|
+
</div>
|
|
98
|
+
</template>
|
|
99
|
+
|
|
100
|
+
<script>
|
|
101
|
+
|
|
102
|
+
import {defineAsyncComponent} from "vue";
|
|
103
|
+
import md5 from "md5";
|
|
104
|
+
import TreeView from "./TreeView.vue";
|
|
105
|
+
|
|
106
|
+
export default{
|
|
107
|
+
components: {
|
|
108
|
+
TreeView,
|
|
109
|
+
ImageSetting: defineAsyncComponent(() => import('./ImageSetting.vue'))
|
|
110
|
+
},
|
|
111
|
+
|
|
112
|
+
inject: [ 'uploadImage', 'viewTypes' ],
|
|
113
|
+
|
|
114
|
+
props: {
|
|
115
|
+
|
|
116
|
+
config: {
|
|
117
|
+
type: Object,
|
|
118
|
+
default: {}
|
|
119
|
+
},
|
|
120
|
+
|
|
121
|
+
title: {
|
|
122
|
+
type: String,
|
|
123
|
+
default: 'Carousel Setting'
|
|
124
|
+
},
|
|
125
|
+
|
|
126
|
+
value: {
|
|
127
|
+
type: Object,
|
|
128
|
+
required: true
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
index: Number,
|
|
132
|
+
|
|
133
|
+
},
|
|
134
|
+
|
|
135
|
+
computed: {
|
|
136
|
+
|
|
137
|
+
currentConfig(){
|
|
138
|
+
if(!this.config.components[this.value.uid])
|
|
139
|
+
this.config.components[this.value.uid] = {}
|
|
140
|
+
return this.config.components[this.value.uid]
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
items(){
|
|
144
|
+
if(!Array.isArray(this.value.items))
|
|
145
|
+
this.value.items = []
|
|
146
|
+
return this.value.items
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
},
|
|
150
|
+
|
|
151
|
+
data(){
|
|
152
|
+
return {
|
|
153
|
+
selectedUid: null,
|
|
154
|
+
}
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
methods: {
|
|
158
|
+
|
|
159
|
+
addImage(){
|
|
160
|
+
const component = { type:'Image', name:'Image', props:{ enabled:true } }
|
|
161
|
+
component.uid = md5(JSON.stringify(component) + new Date().getTime())
|
|
162
|
+
|
|
163
|
+
this.$refs.imageEdit.open({ component })
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
</script>
|
|
171
|
+
|
|
172
|
+
<style module>
|
|
173
|
+
|
|
174
|
+
.comp{
|
|
175
|
+
@apply flex flex-col gap-8;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
</style>
|
|
@@ -0,0 +1,76 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Display</label>
|
|
5
|
+
<Dropdown v-model="display[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
display(){
|
|
43
|
+
if(!Array.isArray(this.value.props.display))
|
|
44
|
+
this.value.props.display = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.display
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'hidden', 'Hidden' ],
|
|
54
|
+
[ 'block', 'Block' ],
|
|
55
|
+
[ 'inline-block', 'Inline Block' ],
|
|
56
|
+
[ 'inline', 'Inline' ],
|
|
57
|
+
[ 'flex', 'Flex' ],
|
|
58
|
+
[ 'inline-flex', 'Inline Flex' ],
|
|
59
|
+
[ 'table', 'Table' ],
|
|
60
|
+
[ 'inline-table', 'Inline Table' ],
|
|
61
|
+
[ 'grid', 'Grid' ],
|
|
62
|
+
[ 'inline-grid', 'Inline Grid' ],
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
</script>
|
|
70
|
+
|
|
71
|
+
<style module>
|
|
72
|
+
|
|
73
|
+
.comp{
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Flex Align</label>
|
|
5
|
+
<Dropdown v-model="flexAlign[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
flexAlign(){
|
|
43
|
+
if(!Array.isArray(this.value.props.flexAlign))
|
|
44
|
+
this.value.props.flexAlign = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.flexAlign
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'items-start', 'Start' ],
|
|
54
|
+
[ 'items-end', 'End' ],
|
|
55
|
+
[ 'Center', 'items-center' ],
|
|
56
|
+
[ 'Baseline', 'items-baseline' ],
|
|
57
|
+
[ 'Stretch', 'items-stretch' ],
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style module>
|
|
67
|
+
|
|
68
|
+
.comp{
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Flex Direction</label>
|
|
5
|
+
<Dropdown v-model="flexDirection[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
flexDirection(){
|
|
43
|
+
if(!Array.isArray(this.value.props.flexDirection))
|
|
44
|
+
this.value.props.flexDirection = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.flexDirection
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'flex-row', 'Row' ],
|
|
54
|
+
[ 'flex-col', 'Column' ],
|
|
55
|
+
[ 'flex-row-reverse', 'Row Reverse' ],
|
|
56
|
+
[ 'flex-col-reverse', 'Column Reverse' ],
|
|
57
|
+
]
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
</script>
|
|
64
|
+
|
|
65
|
+
<style module>
|
|
66
|
+
|
|
67
|
+
.comp{
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
</style>
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Flex Justify</label>
|
|
5
|
+
<Dropdown v-model="flexJustify[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
flexJustify(){
|
|
43
|
+
if(!Array.isArray(this.value.props.flexJustify))
|
|
44
|
+
this.value.props.flexJustify = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.flexJustify
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'justify-normal', 'Normal' ],
|
|
54
|
+
[ 'justify-start', 'Start' ],
|
|
55
|
+
[ 'justify-end', 'End' ],
|
|
56
|
+
[ 'justify-center', 'Center' ],
|
|
57
|
+
[ 'justify-between', 'Between' ],
|
|
58
|
+
[ 'justify-around', 'Around' ],
|
|
59
|
+
[ 'justify-evenly', 'Evenly' ],
|
|
60
|
+
[ 'justify-stretch', 'Stretch' ],
|
|
61
|
+
]
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
</script>
|
|
68
|
+
|
|
69
|
+
<style module>
|
|
70
|
+
|
|
71
|
+
.comp{
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
</style>
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Flex</label>
|
|
5
|
+
<Dropdown v-model="flex[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
flex(){
|
|
43
|
+
if(!Array.isArray(this.value.props.flex))
|
|
44
|
+
this.value.props.flex = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.flex
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'flex-1', 'Flex 1' ],
|
|
54
|
+
[ 'flex-0', 'Flex 0' ],
|
|
55
|
+
[ 'flex-auto', 'Auto' ],
|
|
56
|
+
[ 'flex-initial', 'Initial' ],
|
|
57
|
+
[ 'flex-none', 'None' ],
|
|
58
|
+
]
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style module>
|
|
67
|
+
|
|
68
|
+
.comp{
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
</style>
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<div class="flex flex-row items-center gap-3">
|
|
5
|
+
<Textbox v-model="value.name" class="flex-1 p-0 border-none" :placeholder="value.type" />
|
|
6
|
+
<Switch v-model="value.props.enabled" />
|
|
7
|
+
</div>
|
|
8
|
+
|
|
9
|
+
<PropertySetting :value="value"
|
|
10
|
+
:index="index"
|
|
11
|
+
:viewType="viewType"
|
|
12
|
+
:keys="keys" />
|
|
13
|
+
|
|
14
|
+
</div>
|
|
15
|
+
</template>
|
|
16
|
+
|
|
17
|
+
<script>
|
|
18
|
+
|
|
19
|
+
import {defineAsyncComponent} from "vue";
|
|
20
|
+
|
|
21
|
+
export default{
|
|
22
|
+
|
|
23
|
+
components: {
|
|
24
|
+
PropertySetting: defineAsyncComponent(() => import('./PropertySetting.vue')),
|
|
25
|
+
},
|
|
26
|
+
|
|
27
|
+
computed: {
|
|
28
|
+
|
|
29
|
+
flexAlign(){
|
|
30
|
+
if(!Array.isArray(this.value.props.flexAlign))
|
|
31
|
+
this.value.props.flexAlign = []
|
|
32
|
+
|
|
33
|
+
return this.value.props.flexAlign
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
flexJustify(){
|
|
37
|
+
if(!Array.isArray(this.value.props.flexJustify))
|
|
38
|
+
this.value.props.flexJustify = []
|
|
39
|
+
|
|
40
|
+
return this.value.props.flexJustify
|
|
41
|
+
},
|
|
42
|
+
|
|
43
|
+
gap(){
|
|
44
|
+
if(!Array.isArray(this.value.props.gap))
|
|
45
|
+
this.value.props.gap = [ 'gap-2' ]
|
|
46
|
+
|
|
47
|
+
return this.value.props.gap
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
wrap(){
|
|
51
|
+
if(!Array.isArray(this.value.props.wrap))
|
|
52
|
+
this.value.props.wrap = []
|
|
53
|
+
|
|
54
|
+
return this.value.props.wrap
|
|
55
|
+
},
|
|
56
|
+
|
|
57
|
+
},
|
|
58
|
+
|
|
59
|
+
data(){
|
|
60
|
+
return {
|
|
61
|
+
keys: [
|
|
62
|
+
'flexDirection',
|
|
63
|
+
'flexAlign',
|
|
64
|
+
'flexJustify',
|
|
65
|
+
'flexWrap',
|
|
66
|
+
'gap'
|
|
67
|
+
]
|
|
68
|
+
}
|
|
69
|
+
},
|
|
70
|
+
|
|
71
|
+
inject: [ 'uploadImage', 'viewTypes' ],
|
|
72
|
+
|
|
73
|
+
props: {
|
|
74
|
+
|
|
75
|
+
index: Number,
|
|
76
|
+
|
|
77
|
+
value: {
|
|
78
|
+
type: Object,
|
|
79
|
+
required: true
|
|
80
|
+
},
|
|
81
|
+
|
|
82
|
+
viewType: String,
|
|
83
|
+
|
|
84
|
+
},
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
</script>
|
|
89
|
+
|
|
90
|
+
<style module>
|
|
91
|
+
|
|
92
|
+
.comp{
|
|
93
|
+
@apply flex flex-col gap-5;
|
|
94
|
+
}
|
|
95
|
+
|
|
96
|
+
</style>
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Flex Wrap</label>
|
|
5
|
+
<Dropdown v-model="flexWrap[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
</div>
|
|
13
|
+
</template>
|
|
14
|
+
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
export default{
|
|
18
|
+
|
|
19
|
+
inject: [ 'viewTypes' ],
|
|
20
|
+
|
|
21
|
+
props: {
|
|
22
|
+
|
|
23
|
+
index: {
|
|
24
|
+
type: Number,
|
|
25
|
+
required: true
|
|
26
|
+
},
|
|
27
|
+
|
|
28
|
+
value: {
|
|
29
|
+
type: Object,
|
|
30
|
+
required: true
|
|
31
|
+
},
|
|
32
|
+
|
|
33
|
+
viewType: {
|
|
34
|
+
type: String,
|
|
35
|
+
required: true
|
|
36
|
+
},
|
|
37
|
+
|
|
38
|
+
},
|
|
39
|
+
|
|
40
|
+
computed: {
|
|
41
|
+
|
|
42
|
+
flexWrap(){
|
|
43
|
+
if(!Array.isArray(this.value.props.flexWrap))
|
|
44
|
+
this.value.props.flexWrap = this.viewTypes.map(_ => '')
|
|
45
|
+
return this.value.props.flexWrap
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
},
|
|
49
|
+
|
|
50
|
+
data(){
|
|
51
|
+
return {
|
|
52
|
+
values: [
|
|
53
|
+
[ 'Wrap', 'flex-wrap' ],
|
|
54
|
+
[ 'Wrap reverse', 'flex-wrap-reverse' ],
|
|
55
|
+
[ 'No wrap', 'flex-nowrap' ],
|
|
56
|
+
]
|
|
57
|
+
}
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
</script>
|
|
63
|
+
|
|
64
|
+
<style module>
|
|
65
|
+
|
|
66
|
+
.comp{
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
</style>
|