@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,191 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<div class="flex flex-row items-center">
|
|
4
|
+
<label class="flex-1">Position</label>
|
|
5
|
+
<Dropdown v-model="position[index]">
|
|
6
|
+
<option value="">Unset</option>
|
|
7
|
+
<option v-for="value in values.position" :value="`${viewType}${value[0]}`">
|
|
8
|
+
{{ value[1] }}
|
|
9
|
+
</option>
|
|
10
|
+
</Dropdown>
|
|
11
|
+
</div>
|
|
12
|
+
<div class="flex flex-row gap-4"
|
|
13
|
+
v-if="[ 'absolute', 'relative', 'fixed', 'sticky' ].includes(position[index])">
|
|
14
|
+
<div>
|
|
15
|
+
<label>Top</label>
|
|
16
|
+
<Dropdown v-model="top[index]">
|
|
17
|
+
<option value="">Unset</option>
|
|
18
|
+
<option v-for="value in values.top" :value="`${viewType}${value[0]}`">
|
|
19
|
+
{{ value[1] }}
|
|
20
|
+
</option>
|
|
21
|
+
</Dropdown>
|
|
22
|
+
</div>
|
|
23
|
+
<div>
|
|
24
|
+
<label>Right</label>
|
|
25
|
+
<Dropdown v-model="right[index]">
|
|
26
|
+
<option value="">Unset</option>
|
|
27
|
+
<option v-for="value in values.right" :value="`${viewType}${value[0]}`">
|
|
28
|
+
{{ value[1] }}
|
|
29
|
+
</option>
|
|
30
|
+
</Dropdown>
|
|
31
|
+
</div>
|
|
32
|
+
<div>
|
|
33
|
+
<label>Bottom</label>
|
|
34
|
+
<Dropdown v-model="bottom[index]">
|
|
35
|
+
<option value="">Unset</option>
|
|
36
|
+
<option v-for="value in values.bottom" :value="`${viewType}${value[0]}`">
|
|
37
|
+
{{ value[1] }}
|
|
38
|
+
</option>
|
|
39
|
+
</Dropdown>
|
|
40
|
+
</div>
|
|
41
|
+
</div>
|
|
42
|
+
</div>
|
|
43
|
+
</template>
|
|
44
|
+
|
|
45
|
+
<script>
|
|
46
|
+
|
|
47
|
+
export default{
|
|
48
|
+
|
|
49
|
+
inject: [ 'viewTypes' ],
|
|
50
|
+
|
|
51
|
+
props: {
|
|
52
|
+
|
|
53
|
+
index: {
|
|
54
|
+
type: Number,
|
|
55
|
+
required: true
|
|
56
|
+
},
|
|
57
|
+
|
|
58
|
+
value: {
|
|
59
|
+
type: Object,
|
|
60
|
+
required: true
|
|
61
|
+
},
|
|
62
|
+
|
|
63
|
+
viewType: {
|
|
64
|
+
type: String,
|
|
65
|
+
required: true
|
|
66
|
+
},
|
|
67
|
+
|
|
68
|
+
},
|
|
69
|
+
|
|
70
|
+
computed: {
|
|
71
|
+
|
|
72
|
+
bottom(){
|
|
73
|
+
if(!Array.isArray(this.value.props.bottom))
|
|
74
|
+
this.value.props.bottom = this.viewTypes.map(_ => '')
|
|
75
|
+
return this.value.props.bottom
|
|
76
|
+
},
|
|
77
|
+
|
|
78
|
+
left(){
|
|
79
|
+
if(!Array.isArray(this.value.props.left))
|
|
80
|
+
this.value.props.left = this.viewTypes.map(_ => '')
|
|
81
|
+
return this.value.props.left
|
|
82
|
+
},
|
|
83
|
+
|
|
84
|
+
position(){
|
|
85
|
+
if(!Array.isArray(this.value.props.position))
|
|
86
|
+
this.value.props.position = this.viewTypes.map(_ => '')
|
|
87
|
+
return this.value.props.position
|
|
88
|
+
},
|
|
89
|
+
|
|
90
|
+
right(){
|
|
91
|
+
if(!Array.isArray(this.value.props.right))
|
|
92
|
+
this.value.props.right = this.viewTypes.map(_ => '')
|
|
93
|
+
return this.value.props.right
|
|
94
|
+
},
|
|
95
|
+
|
|
96
|
+
top(){
|
|
97
|
+
if(!Array.isArray(this.value.props.top))
|
|
98
|
+
this.value.props.top = this.viewTypes.map(_ => '')
|
|
99
|
+
return this.value.props.top
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
},
|
|
103
|
+
|
|
104
|
+
data(){
|
|
105
|
+
return {
|
|
106
|
+
values: {
|
|
107
|
+
position: [
|
|
108
|
+
[ 'static', 'Static' ],
|
|
109
|
+
[ 'fixed', 'Fixed' ],
|
|
110
|
+
[ 'absolute', 'Absolute' ],
|
|
111
|
+
[ 'relative', 'Relative' ],
|
|
112
|
+
[ 'sticky', 'Sticky' ],
|
|
113
|
+
],
|
|
114
|
+
top: [
|
|
115
|
+
[ 'top-0', '0' ],
|
|
116
|
+
[ 'top-4', '4' ],
|
|
117
|
+
[ 'top-6', '6' ],
|
|
118
|
+
[ 'top-8', '8' ],
|
|
119
|
+
[ 'top-12', '12' ],
|
|
120
|
+
[ 'top-16', '16' ],
|
|
121
|
+
[ 'top-20', '20' ],
|
|
122
|
+
[ 'top-24', '24' ],
|
|
123
|
+
[ 'top-28', '28' ],
|
|
124
|
+
[ 'top-32', '32' ],
|
|
125
|
+
[ 'top-36', '36' ],
|
|
126
|
+
[ 'top-48', '48' ],
|
|
127
|
+
],
|
|
128
|
+
left: [
|
|
129
|
+
[ 'left-0', '0' ],
|
|
130
|
+
[ 'left-4', '4' ],
|
|
131
|
+
[ 'left-6', '6' ],
|
|
132
|
+
[ 'left-8', '8' ],
|
|
133
|
+
[ 'left-12', '12' ],
|
|
134
|
+
[ 'left-16', '16' ],
|
|
135
|
+
[ 'left-20', '20' ],
|
|
136
|
+
[ 'left-24', '24' ],
|
|
137
|
+
[ 'left-28', '28' ],
|
|
138
|
+
[ 'left-32', '32' ],
|
|
139
|
+
[ 'left-36', '36' ],
|
|
140
|
+
[ 'left-48', '48' ],
|
|
141
|
+
],
|
|
142
|
+
right: [
|
|
143
|
+
[ 'right-0', '0' ],
|
|
144
|
+
[ 'right-4', '4' ],
|
|
145
|
+
[ 'right-6', '6' ],
|
|
146
|
+
[ 'right-8', '8' ],
|
|
147
|
+
[ 'right-12', '12' ],
|
|
148
|
+
[ 'right-16', '16' ],
|
|
149
|
+
[ 'right-20', '20' ],
|
|
150
|
+
[ 'right-24', '24' ],
|
|
151
|
+
[ 'right-28', '28' ],
|
|
152
|
+
[ 'right-32', '32' ],
|
|
153
|
+
[ 'right-36', '36' ],
|
|
154
|
+
[ 'right-48', '48' ],
|
|
155
|
+
],
|
|
156
|
+
bottom: [
|
|
157
|
+
[ 'bottom-0', '0' ],
|
|
158
|
+
[ 'bottom-4', '4' ],
|
|
159
|
+
[ 'bottom-6', '6' ],
|
|
160
|
+
[ 'bottom-8', '8' ],
|
|
161
|
+
[ 'bottom-12', '12' ],
|
|
162
|
+
[ 'bottom-16', '16' ],
|
|
163
|
+
[ 'bottom-20', '20' ],
|
|
164
|
+
[ 'bottom-24', '24' ],
|
|
165
|
+
[ 'bottom-28', '28' ],
|
|
166
|
+
[ 'bottom-32', '32' ],
|
|
167
|
+
[ 'bottom-36', '36' ],
|
|
168
|
+
[ 'bottom-48', '48' ],
|
|
169
|
+
]
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
},
|
|
173
|
+
|
|
174
|
+
watch: {
|
|
175
|
+
|
|
176
|
+
position(to){
|
|
177
|
+
|
|
178
|
+
}
|
|
179
|
+
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
</script>
|
|
185
|
+
|
|
186
|
+
<style module>
|
|
187
|
+
|
|
188
|
+
.comp{
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
</style>
|
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<component v-for="setting in definedProperties"
|
|
5
|
+
:is="setting.component"
|
|
6
|
+
:value="value"
|
|
7
|
+
:index="index"
|
|
8
|
+
:viewType="viewType" />
|
|
9
|
+
|
|
10
|
+
<div class="flex justify-center mt-8">
|
|
11
|
+
<button type="button" class="text-primary" @click="$refs.selector.open()">
|
|
12
|
+
<svg width="14" height="14" class="fill-primary inline mr-1" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M432 256c0 17.69-14.33 32.01-32 32.01H256v144c0 17.69-14.33 31.99-32 31.99s-32-14.3-32-31.99v-144H48c-17.67 0-32-14.32-32-32.01s14.33-31.99 32-31.99H192v-144c0-17.69 14.33-32.01 32-32.01s32 14.32 32 32.01v144h144C417.7 224 432 238.3 432 256z"/></svg>
|
|
13
|
+
{{ $t('Add Property') }}
|
|
14
|
+
</button>
|
|
15
|
+
|
|
16
|
+
<WebPagePropertySelector ref="selector"
|
|
17
|
+
:value="value.props"
|
|
18
|
+
:properties="properties" />
|
|
19
|
+
</div>
|
|
20
|
+
|
|
21
|
+
</div>
|
|
22
|
+
</template>
|
|
23
|
+
|
|
24
|
+
<script>
|
|
25
|
+
|
|
26
|
+
import {defineAsyncComponent} from "vue";
|
|
27
|
+
import WebPagePropertySelector from "./WebPagePropertySelector.vue";
|
|
28
|
+
|
|
29
|
+
export default{
|
|
30
|
+
|
|
31
|
+
components: {
|
|
32
|
+
WebPagePropertySelector,
|
|
33
|
+
BackgroundColorSetting: defineAsyncComponent(() => import('./BackgroundColorSetting.vue')),
|
|
34
|
+
BackgroundPositionSetting: defineAsyncComponent(() => import('./BackgroundPositionSetting.vue')),
|
|
35
|
+
BackgroundRepeatSetting: defineAsyncComponent(() => import('./BackgroundRepeatSetting.vue')),
|
|
36
|
+
BackgroundSizeSetting: defineAsyncComponent(() => import('./BackgroundSizeSetting.vue')),
|
|
37
|
+
BlurSetting: defineAsyncComponent(() => import('./BlurSetting.vue')),
|
|
38
|
+
BorderColorSetting: defineAsyncComponent(() => import('./BorderColorSetting.vue')),
|
|
39
|
+
BorderRadiusSetting: defineAsyncComponent(() => import('./BorderRadiusSetting.vue')),
|
|
40
|
+
BorderSizeSetting: defineAsyncComponent(() => import('./BorderSizeSetting.vue')),
|
|
41
|
+
BorderStyleSetting: defineAsyncComponent(() => import('./BorderStyleSetting.vue')),
|
|
42
|
+
BoxShadowSetting: defineAsyncComponent(() => import('./BoxShadowSetting.vue')),
|
|
43
|
+
DisplaySetting: defineAsyncComponent(() => import('./DisplaySetting.vue')),
|
|
44
|
+
FlexAlignSetting: defineAsyncComponent(() => import('./FlexAlignSetting.vue')),
|
|
45
|
+
FlexDirectionSetting: defineAsyncComponent(() => import('./FlexDirectionSetting.vue')),
|
|
46
|
+
FlexJustifySetting: defineAsyncComponent(() => import('./FlexJustifySetting.vue')),
|
|
47
|
+
FlexPropertySetting: defineAsyncComponent(() => import('./FlexPropertySetting.vue')),
|
|
48
|
+
FlexWrapSetting: defineAsyncComponent(() => import('./FlexWrapSetting.vue')),
|
|
49
|
+
GapSetting: defineAsyncComponent(() => import('./GapSetting.vue')),
|
|
50
|
+
GrayscaleSetting: defineAsyncComponent(() => import('./GrayscaleSetting.vue')),
|
|
51
|
+
HeightSetting: defineAsyncComponent(() => import('./HeightSetting.vue')),
|
|
52
|
+
MarginSetting: defineAsyncComponent(() => import('./MarginSetting.vue')),
|
|
53
|
+
MaxHeightSetting: defineAsyncComponent(() => import('./MaxHeightSetting.vue')),
|
|
54
|
+
MaxWidthSetting: defineAsyncComponent(() => import('./MaxWidthSetting.vue')),
|
|
55
|
+
MinHeightSetting: defineAsyncComponent(() => import('./MinHeightSetting.vue')),
|
|
56
|
+
MinWidthSetting: defineAsyncComponent(() => import('./MinWidthSetting.vue')),
|
|
57
|
+
OpacitySetting: defineAsyncComponent(() => import('./OpacitySetting.vue')),
|
|
58
|
+
OverflowSetting: defineAsyncComponent(() => import('./OverflowSetting.vue')),
|
|
59
|
+
PaddingSetting: defineAsyncComponent(() => import('./PaddingSetting.vue')),
|
|
60
|
+
PositionSetting: defineAsyncComponent(() => import('./PositionSetting.vue')),
|
|
61
|
+
WidthSetting: defineAsyncComponent(() => import('./WidthSetting.vue')),
|
|
62
|
+
ZIndexSetting: defineAsyncComponent(() => import('./ZIndexSetting.vue')),
|
|
63
|
+
},
|
|
64
|
+
|
|
65
|
+
computed: {
|
|
66
|
+
|
|
67
|
+
definedProperties(){
|
|
68
|
+
const settings = []
|
|
69
|
+
|
|
70
|
+
for(let key in this.properties){
|
|
71
|
+
if(key in this.value.props){
|
|
72
|
+
settings.push(this.properties[key])
|
|
73
|
+
}
|
|
74
|
+
}
|
|
75
|
+
|
|
76
|
+
return settings
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
},
|
|
80
|
+
|
|
81
|
+
data(){
|
|
82
|
+
return {
|
|
83
|
+
properties: {
|
|
84
|
+
'bgColors': { component:"BackgroundColorSetting", text:'Background Color', group:'Background' },
|
|
85
|
+
'bgPosition': { component:"BackgroundPositionSetting", text:'Background Position', group:'Background' },
|
|
86
|
+
'bgRepeat': { component:"BackgroundRepeatSetting", text:'Background Repeat', group:'Background' },
|
|
87
|
+
'bgSize': { component:"BackgroundSizeSetting", text:'Background Size', group:'Background' },
|
|
88
|
+
|
|
89
|
+
'bdColor': { component:"BorderColorSetting", text:'Border Color', group:'Border' },
|
|
90
|
+
'bdRadius': { component:"BorderRadiusSetting", text:'Border Radius', group:'Border' },
|
|
91
|
+
'bdSize': { component:"BorderSizeSetting", text:'Border Size', group:'Border' },
|
|
92
|
+
'bdStyle': { component:"BorderStyleSetting", text:'Border Style', group:'Border' },
|
|
93
|
+
|
|
94
|
+
'boxShadow': { component:"BoxShadowSetting", text:'Box Shadow', group:'Effects' },
|
|
95
|
+
'opacity': { component:"OpacitySetting", text:'Opacity', group:'Effects' },
|
|
96
|
+
|
|
97
|
+
'flex': { component:"FlexPropertySetting", text:'Flex', group:'Flex' },
|
|
98
|
+
'flexAlign': { component:"FlexAlignSetting", text:'Flex Align', group:'Flex' },
|
|
99
|
+
'flexDirection': { component:"FlexDirectionSetting", text:'Flex Direction', group:'Flex' },
|
|
100
|
+
'flexJustify': { component:"FlexJustifySetting", text:'Flex Justify', group:'Flex' },
|
|
101
|
+
'flexWrap': { component:"FlexWrapSetting", text:'Flex Wrap', group:'Flex' },
|
|
102
|
+
'gap': { component:"GapSetting", text:'Gap', group:'Flex' },
|
|
103
|
+
|
|
104
|
+
'blur': { component:"BlurSetting", text:'Grayscale', group:'Filters' },
|
|
105
|
+
'grayscale': { component:"GrayscaleSetting", text:'Grayscale', group:'Filters' },
|
|
106
|
+
|
|
107
|
+
'display': { component:"DisplaySetting", text:'Display', group:'Layout' },
|
|
108
|
+
'height': { component:"HeightSetting", text:'Height', group:'Layout' },
|
|
109
|
+
'margin': { component:"MarginSetting", text:'Margin', group:'Layout' },
|
|
110
|
+
'maxHeight': { component:"MaxHeightSetting", text:'Max Height', group:'Layout' },
|
|
111
|
+
'maxWidth': { component:"MaxWidthSetting", text:'Max Width', group:'Layout' },
|
|
112
|
+
'minHeight': { component:"MinHeightSetting", text:'Min Height', group:'Layout' },
|
|
113
|
+
'minWidth': { component:"MinWidthSetting", text:'Min Width', group:'Layout' },
|
|
114
|
+
'overflow': { component:"OverflowSetting", text:'Overflow', group:'Layout' },
|
|
115
|
+
'position': { component:"PositionSetting", text:'Position', group:'Layout' },
|
|
116
|
+
'padding': { component:"PaddingSetting", text:'Padding', group:'Layout' },
|
|
117
|
+
'width': { component:"WidthSetting", text:'Width', group:'Layout' },
|
|
118
|
+
'zIndex': { component:"ZIndexSetting", text:'Z Index', group:'Layout' },
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
},
|
|
122
|
+
|
|
123
|
+
inject: [ 'viewTypes' ],
|
|
124
|
+
|
|
125
|
+
methods: {
|
|
126
|
+
|
|
127
|
+
setDefaultKeys(){
|
|
128
|
+
if(Array.isArray(this.keys)){
|
|
129
|
+
for(let propName of this.keys){
|
|
130
|
+
if(!(propName in this.value.props) && propName in this.properties){
|
|
131
|
+
this.value.props[propName] = this.viewTypes.map(_ => '')
|
|
132
|
+
}
|
|
133
|
+
}
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
},
|
|
138
|
+
|
|
139
|
+
mounted() {
|
|
140
|
+
this.setDefaultKeys()
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
props: {
|
|
144
|
+
|
|
145
|
+
index: Number,
|
|
146
|
+
|
|
147
|
+
keys: Array,
|
|
148
|
+
|
|
149
|
+
value: {
|
|
150
|
+
type: Object,
|
|
151
|
+
required: true
|
|
152
|
+
},
|
|
153
|
+
|
|
154
|
+
viewType: String,
|
|
155
|
+
|
|
156
|
+
},
|
|
157
|
+
|
|
158
|
+
watch: {
|
|
159
|
+
|
|
160
|
+
value(){
|
|
161
|
+
this.setDefaultKeys()
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
}
|
|
167
|
+
|
|
168
|
+
</script>
|
|
169
|
+
|
|
170
|
+
<style module>
|
|
171
|
+
|
|
172
|
+
.comp{
|
|
173
|
+
@apply flex flex-col gap-5;
|
|
174
|
+
}
|
|
175
|
+
|
|
176
|
+
</style>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
|
|
4
|
+
<strong>Text Setting</strong>
|
|
5
|
+
|
|
6
|
+
<div class="flex flex-row items-center">
|
|
7
|
+
<label class="flex-1">Enabled</label>
|
|
8
|
+
<Switch v-model="value.props.enabled" />
|
|
9
|
+
</div>
|
|
10
|
+
|
|
11
|
+
<div class="flex flex-col gap-1">
|
|
12
|
+
<label class="flex-1">Text</label>
|
|
13
|
+
<HTMLEditor v-model="htmlText2[index]" />
|
|
14
|
+
</div>
|
|
15
|
+
|
|
16
|
+
<PropertySetting :value="value" :index="index" :viewType="viewType" />
|
|
17
|
+
|
|
18
|
+
</div>
|
|
19
|
+
</template>
|
|
20
|
+
|
|
21
|
+
<script>
|
|
22
|
+
|
|
23
|
+
import {defineAsyncComponent} from "vue";
|
|
24
|
+
|
|
25
|
+
export default{
|
|
26
|
+
components: {
|
|
27
|
+
PropertySetting: defineAsyncComponent(() => import('./PropertySetting.vue'))
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
inject: [ 'viewTypes' ],
|
|
31
|
+
|
|
32
|
+
props: {
|
|
33
|
+
|
|
34
|
+
index: Number,
|
|
35
|
+
|
|
36
|
+
value: {
|
|
37
|
+
type: Object,
|
|
38
|
+
required: true
|
|
39
|
+
},
|
|
40
|
+
|
|
41
|
+
viewType: String,
|
|
42
|
+
|
|
43
|
+
},
|
|
44
|
+
|
|
45
|
+
computed: {
|
|
46
|
+
|
|
47
|
+
htmlText2(){
|
|
48
|
+
if(!Array.isArray(this.value.props.htmlText2))
|
|
49
|
+
this.value.props.htmlText2 = this.viewTypes.map(_ => '')
|
|
50
|
+
|
|
51
|
+
return this.value.props.htmlText2
|
|
52
|
+
},
|
|
53
|
+
|
|
54
|
+
},
|
|
55
|
+
|
|
56
|
+
data(){
|
|
57
|
+
return {
|
|
58
|
+
image: null
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
</script>
|
|
65
|
+
|
|
66
|
+
<style module>
|
|
67
|
+
|
|
68
|
+
.comp{
|
|
69
|
+
@apply flex flex-col gap-5;
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
</style>
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="$style.comp">
|
|
3
|
+
<TreeViewItem v-for="item in items"
|
|
4
|
+
:parent="items"
|
|
5
|
+
:config="config"
|
|
6
|
+
:item="item"
|
|
7
|
+
:value="modelValue"
|
|
8
|
+
@change="uid => $emit('update:modelValue', uid)">
|
|
9
|
+
<template #item="{ item, parent }">
|
|
10
|
+
<slot name="item" :item="item" :parent="parent"></slot>
|
|
11
|
+
</template>
|
|
12
|
+
</TreeViewItem>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
|
|
16
|
+
<script>
|
|
17
|
+
import TreeViewItem from "./TreeViewItem.vue";
|
|
18
|
+
|
|
19
|
+
export default{
|
|
20
|
+
|
|
21
|
+
components: {
|
|
22
|
+
TreeViewItem
|
|
23
|
+
},
|
|
24
|
+
|
|
25
|
+
name: 'TreeView',
|
|
26
|
+
|
|
27
|
+
props:{
|
|
28
|
+
items: Array,
|
|
29
|
+
config: Object,
|
|
30
|
+
modelValue: String,
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style module>
|
|
38
|
+
|
|
39
|
+
.comp{
|
|
40
|
+
@apply flex flex-col gap-1;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
</style>
|