@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.
Files changed (62) hide show
  1. package/package.json +1 -1
  2. package/src/App.vue +9 -1
  3. package/src/components/Carousel.vue +3 -3
  4. package/src/components/ColorPicker2.vue +1 -1
  5. package/src/components/Image.vue +5 -3
  6. package/src/components/List.vue +48 -13
  7. package/src/components/Modal.vue +2 -2
  8. package/src/components/Text.vue +34 -0
  9. package/src/components/Textbox.vue +1 -1
  10. package/src/components/VirtualTable.vue +124 -95
  11. package/src/index.js +22 -38
  12. package/src/main.js +0 -9
  13. package/src/mixin/component.js +2 -1
  14. package/src/utils/preset-selector.js +53 -24
  15. package/src/utils/preset-selector.mjs +21 -1
  16. package/src/utils/wss.js +6 -1
  17. package/src/utils/wss.mjs +2 -2
  18. package/src/widgets/PresetBar.vue +6 -0
  19. package/src/widgets/WebPageBuilder3.vue +3 -218
  20. package/src/widgets/WebPageBuilder4/BackgroundColorSetting.vue +54 -0
  21. package/src/widgets/WebPageBuilder4/BackgroundPositionSetting.vue +75 -0
  22. package/src/widgets/WebPageBuilder4/BackgroundRepeatSetting.vue +72 -0
  23. package/src/widgets/WebPageBuilder4/BackgroundSizeSetting.vue +72 -0
  24. package/src/widgets/WebPageBuilder4/BlurSetting.vue +72 -0
  25. package/src/widgets/WebPageBuilder4/BorderColorSetting.vue +64 -0
  26. package/src/widgets/WebPageBuilder4/BorderRadiusSetting.vue +75 -0
  27. package/src/widgets/WebPageBuilder4/BorderSizeSetting.vue +69 -0
  28. package/src/widgets/WebPageBuilder4/BorderStyleSetting.vue +72 -0
  29. package/src/widgets/WebPageBuilder4/BoxShadowSetting.vue +73 -0
  30. package/src/widgets/WebPageBuilder4/ButtonSetting.vue +65 -0
  31. package/src/widgets/WebPageBuilder4/CarouselSetting.vue +178 -0
  32. package/src/widgets/WebPageBuilder4/DisplaySetting.vue +76 -0
  33. package/src/widgets/WebPageBuilder4/FlexAlignSetting.vue +71 -0
  34. package/src/widgets/WebPageBuilder4/FlexDirectionSetting.vue +70 -0
  35. package/src/widgets/WebPageBuilder4/FlexJustifySetting.vue +74 -0
  36. package/src/widgets/WebPageBuilder4/FlexPropertySetting.vue +71 -0
  37. package/src/widgets/WebPageBuilder4/FlexSetting.vue +96 -0
  38. package/src/widgets/WebPageBuilder4/FlexWrapSetting.vue +69 -0
  39. package/src/widgets/WebPageBuilder4/GapSetting.vue +75 -0
  40. package/src/widgets/WebPageBuilder4/GrayscaleSetting.vue +68 -0
  41. package/src/widgets/WebPageBuilder4/GridSetting.vue +166 -0
  42. package/src/widgets/WebPageBuilder4/HeightSetting.vue +95 -0
  43. package/src/widgets/WebPageBuilder4/ImageSetting.vue +102 -0
  44. package/src/widgets/WebPageBuilder4/MarginSetting.vue +64 -0
  45. package/src/widgets/WebPageBuilder4/MaxHeightSetting.vue +82 -0
  46. package/src/widgets/WebPageBuilder4/MaxWidthSetting.vue +90 -0
  47. package/src/widgets/WebPageBuilder4/MinHeightSetting.vue +81 -0
  48. package/src/widgets/WebPageBuilder4/MinWidthSetting.vue +101 -0
  49. package/src/widgets/WebPageBuilder4/MultiValueSetting.vue +155 -0
  50. package/src/widgets/WebPageBuilder4/OpacitySetting.vue +77 -0
  51. package/src/widgets/WebPageBuilder4/OverflowSetting.vue +81 -0
  52. package/src/widgets/WebPageBuilder4/PaddingSetting.vue +53 -0
  53. package/src/widgets/WebPageBuilder4/PositionSetting.vue +191 -0
  54. package/src/widgets/WebPageBuilder4/PropertySetting.vue +176 -0
  55. package/src/widgets/WebPageBuilder4/TextSetting.vue +72 -0
  56. package/src/widgets/WebPageBuilder4/TreeView.vue +43 -0
  57. package/src/widgets/WebPageBuilder4/TreeViewItem.vue +298 -0
  58. package/src/widgets/WebPageBuilder4/WebPageComponentSelector.vue +141 -0
  59. package/src/widgets/WebPageBuilder4/WebPagePropertySelector.vue +172 -0
  60. package/src/widgets/WebPageBuilder4/WidthSetting.vue +105 -0
  61. package/src/widgets/WebPageBuilder4/ZIndexSetting.vue +72 -0
  62. package/src/widgets/WebPageBuilder4.vue +798 -0
@@ -0,0 +1,75 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Gap</label>
5
+ <Dropdown v-model="gap[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
+ gap(){
43
+ if(!Array.isArray(this.value.props.gap))
44
+ this.value.props.gap = this.viewTypes.map(_ => '')
45
+ return this.value.props.gap
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'gap-0', '0' ],
54
+ [ 'gap-1', '1' ],
55
+ [ 'gap-2', '2' ],
56
+ [ 'gap-3', '3' ],
57
+ [ 'gap-4', '4' ],
58
+ [ 'gap-5', '5' ],
59
+ [ 'gap-6', '6' ],
60
+ [ 'gap-7', '7' ],
61
+ [ 'gap-8', '8'],
62
+ ]
63
+ }
64
+ }
65
+
66
+ }
67
+
68
+ </script>
69
+
70
+ <style module>
71
+
72
+ .comp{
73
+ }
74
+
75
+ </style>
@@ -0,0 +1,68 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Grayscale</label>
5
+ <Dropdown v-model="grayscale[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
+ grayscale(){
43
+ if(!Array.isArray(this.value.props.grayscale))
44
+ this.value.props.grayscale = this.viewTypes.map(_ => '')
45
+ return this.value.props.grayscale
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'grayscale-0', 'Not Grayscale' ],
54
+ [ 'grayscale', 'Grayscale' ],
55
+ ]
56
+ }
57
+ }
58
+
59
+ }
60
+
61
+ </script>
62
+
63
+ <style module>
64
+
65
+ .comp{
66
+ }
67
+
68
+ </style>
@@ -0,0 +1,166 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <strong>Grid Setting</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 class="flex flex-row items-center">
11
+ <label class="flex-1">Columns</label>
12
+ <Dropdown v-for="(_, idx) in viewTypes"
13
+ v-show="viewType === _.value"
14
+ v-model="columns[idx]"
15
+ class="w-[100px]">
16
+ <option value="">Default</option>
17
+ <option v-for="i in 12" :value="`${viewType}grid-cols-${i}`">{{ i }}</option>
18
+ <option :value="`${viewType}grid-cols-none`">None</option>
19
+ </Dropdown>
20
+ </div>
21
+
22
+ <div class="flex flex-row items-center">
23
+ <label class="flex-1">Rows</label>
24
+ <Dropdown v-for="(_, idx) in viewTypes"
25
+ v-show="viewType === _.value"
26
+ v-model="rows[idx]"
27
+ class="w-[100px]">
28
+ <option value="">Default</option>
29
+ <option v-for="i in 12" :value="`${viewType}grid-rows-${i}`">{{ i }}</option>
30
+ <option :value="`${viewType}grid-rows-none`">None</option>
31
+ </Dropdown>
32
+ </div>
33
+
34
+ <div class="flex flex-row items-center">
35
+ <label class="flex-1">Gap</label>
36
+ <Dropdown v-for="(_, idx) in viewTypes"
37
+ v-show="viewType === _.value"
38
+ v-model="gap[idx]">
39
+ <option value="">Not Set</option>
40
+ <option :value="`${viewType}gap-0`">0</option>
41
+ <option :value="`${viewType}gap-1`">1</option>
42
+ <option :value="`${viewType}gap-2`">2</option>
43
+ <option :value="`${viewType}gap-3`">3</option>
44
+ <option :value="`${viewType}gap-4`">4</option>
45
+ <option :value="`${viewType}gap-5`">5</option>
46
+ <option :value="`${viewType}gap-6`">6</option>
47
+ <option :value="`${viewType}gap-7`">7</option>
48
+ <option :value="`${viewType}gap-8`">8</option>
49
+ </Dropdown>
50
+ </div>
51
+
52
+ <div class="flex flex-row items-center">
53
+ <label class="flex-1">Align Items</label>
54
+ <Dropdown v-for="(_, idx) in viewTypes"
55
+ v-show="viewType === _.value"
56
+ v-model="alignItems[idx]">
57
+ <option value="">Default</option>
58
+ <option :value="`${viewType}items-start`">Start</option>
59
+ <option :value="`${viewType}items-end`">End</option>
60
+ <option :value="`${viewType}items-center`">Center</option>
61
+ <option :value="`${viewType}items-baseline`">Baseline</option>
62
+ <option :value="`${viewType}items-stretch`">Stretch</option>
63
+ </Dropdown>
64
+ </div>
65
+
66
+ <div class="flex flex-row items-center">
67
+ <label class="flex-1">Justify Content</label>
68
+ <Dropdown v-for="(_, idx) in viewTypes"
69
+ v-show="viewType === _.value"
70
+ v-model="justifyContent[idx]">
71
+ <option value="">Default</option>
72
+ <option :value="`${viewType}justify-normal`">Normal</option>
73
+ <option :value="`${viewType}justify-start`">Start</option>
74
+ <option :value="`${viewType}justify-end`">End</option>
75
+ <option :value="`${viewType}justify-center`">Center</option>
76
+ <option :value="`${viewType}justify-between`">Between</option>
77
+ <option :value="`${viewType}justify-around`">Around</option>
78
+ <option :value="`${viewType}justify-evenly`">Evenly</option>
79
+ <option :value="`${viewType}justify-stretch`">Stretch</option>
80
+ </Dropdown>
81
+ </div>
82
+
83
+ <PaddingSetting :value="value" :index="index" />
84
+
85
+ <MarginSetting :value="value" :index="index" />
86
+
87
+ </div>
88
+ </template>
89
+
90
+ <script>
91
+
92
+ import {defineAsyncComponent} from "vue";
93
+
94
+ export default{
95
+ components: {
96
+ MarginSetting: defineAsyncComponent(() => import('./MarginSetting.vue')),
97
+ PaddingSetting: defineAsyncComponent(() => import('./PaddingSetting.vue'))
98
+ },
99
+
100
+ inject: [ 'uploadImage', 'viewTypes' ],
101
+
102
+ props: {
103
+
104
+ value: {
105
+ type: Object,
106
+ required: true
107
+ },
108
+
109
+ index: Number,
110
+
111
+ viewType: String,
112
+
113
+ },
114
+
115
+ computed: {
116
+
117
+ columns(){
118
+ if(!Array.isArray(this.value.props.columns) || this.value.props.columns.length < 1)
119
+ this.value.props.columns = [ '' ]
120
+ return this.value.props.columns
121
+ },
122
+
123
+ gap(){
124
+ if(!Array.isArray(this.value.props.gap))
125
+ this.value.props.gap = [ 'gap-2' ]
126
+
127
+ return this.value.props.gap
128
+ },
129
+
130
+ rows(){
131
+ if(!Array.isArray(this.value.props.rows) || this.value.props.rows.length < 1)
132
+ this.value.props.rows = [ '' ]
133
+ return this.value.props.rows
134
+ },
135
+
136
+ alignItems(){
137
+ if(!Array.isArray(this.value.props.alignItems) || this.value.props.alignItems.length < 1)
138
+ this.value.props.alignItems = [ '' ]
139
+ return this.value.props.alignItems
140
+ },
141
+
142
+ justifyContent(){
143
+ if(!Array.isArray(this.value.props.justifyContent) || this.value.props.justifyContent.length < 1)
144
+ this.value.props.justifyContent = [ '' ]
145
+ return this.value.props.justifyContent
146
+ },
147
+
148
+ },
149
+
150
+ data(){
151
+ return {
152
+ image: null
153
+ }
154
+ }
155
+
156
+ }
157
+
158
+ </script>
159
+
160
+ <style module>
161
+
162
+ .comp{
163
+ @apply flex flex-col gap-5;
164
+ }
165
+
166
+ </style>
@@ -0,0 +1,95 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Height</label>
5
+ <Dropdown v-model="height[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
+ height(){
43
+ if(!Array.isArray(this.value.props.height))
44
+ this.value.props.height = this.viewTypes.map(_ => '')
45
+ return this.value.props.height
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'h-1', '1' ],
54
+ [ 'h-2', '2' ],
55
+ [ 'h-3', '3' ],
56
+ [ 'h-4', '4' ],
57
+ [ 'h-5', '5' ],
58
+ [ 'h-6', '6' ],
59
+ [ 'h-7', '7' ],
60
+ [ 'h-8', '8' ],
61
+ [ 'h-9', '9' ],
62
+ [ 'h-10', '10' ],
63
+ [ 'h-11', '11' ],
64
+ [ 'h-12', '12' ],
65
+ [ 'h-14', '14' ],
66
+ [ 'h-16', '16' ],
67
+ [ 'h-20', '20' ],
68
+ [ 'h-24', '24' ],
69
+ [ 'h-32', '32' ],
70
+ [ 'h-36', '36' ],
71
+ [ 'h-48', '48' ],
72
+ [ 'h-10vh', '10vh' ],
73
+ [ 'h-20vh', '20vh' ],
74
+ [ 'h-30vh', '30vh' ],
75
+ [ 'h-40vh', '40vh' ],
76
+ [ 'h-50vh', '50vh' ],
77
+ [ 'h-60vh', '60vh' ],
78
+ [ 'h-70vh', '70vh' ],
79
+ [ 'h-80vh', '80vh' ],
80
+ [ 'h-90vh', '90vh' ],
81
+ [ 'h-100vh', '100vh' ]
82
+ ]
83
+ }
84
+ }
85
+
86
+ }
87
+
88
+ </script>
89
+
90
+ <style module>
91
+
92
+ .comp{
93
+ }
94
+
95
+ </style>
@@ -0,0 +1,102 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <strong>Image Setting</strong>
4
+
5
+ <div>
6
+ <div class="flex flex-row items-center gap-2">
7
+ <label class="flex-1">Src</label>
8
+ <button v-if="src[index]"
9
+ type="button"
10
+ class="text-primary"
11
+ @click="$refs.image.edit()">
12
+ Change
13
+ </button>
14
+ </div>
15
+ <Image class="mt-1 w-full max-w-[120px] min-h-[100px] bg-text-50 rounded-lg flex"
16
+ :src="src[index]"
17
+ :editable="true"
18
+ ref="image"
19
+ @change="(_, file) => uploadImage(file).then(res => src[index] = res.url)">
20
+ <template #empty>
21
+ <div class="flex-1 flex items-center justify-center">
22
+ <button type="button"
23
+ @click="$refs.image.edit()">
24
+ <svg width="19" height="19" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M447.1 32h-384C28.64 32-.0091 60.65-.0091 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96C511.1 60.65 483.3 32 447.1 32zM111.1 96c26.51 0 48 21.49 48 48S138.5 192 111.1 192s-48-21.49-48-48S85.48 96 111.1 96zM446.1 407.6C443.3 412.8 437.9 416 432 416H82.01c-6.021 0-11.53-3.379-14.26-8.75c-2.73-5.367-2.215-11.81 1.334-16.68l70-96C142.1 290.4 146.9 288 152 288s9.916 2.441 12.93 6.574l32.46 44.51l93.3-139.1C293.7 194.7 298.7 192 304 192s10.35 2.672 13.31 7.125l128 192C448.6 396 448.9 402.3 446.1 407.6z"/></svg>
25
+ </button>
26
+ </div>
27
+ </template>
28
+
29
+ <template #error>
30
+ <div class="flex-1 flex items-center justify-center">
31
+ <button type="button"
32
+ @click="$refs.image.edit()">
33
+ <svg width="19" height="19" class="fill-text-300 hover:fill-primary" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--! Font Awesome Pro 6.0.0-alpha3 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license (Commercial License) --><path d="M447.1 32h-384C28.64 32-.0091 60.65-.0091 96v320c0 35.35 28.65 64 63.1 64h384c35.35 0 64-28.65 64-64V96C511.1 60.65 483.3 32 447.1 32zM111.1 96c26.51 0 48 21.49 48 48S138.5 192 111.1 192s-48-21.49-48-48S85.48 96 111.1 96zM446.1 407.6C443.3 412.8 437.9 416 432 416H82.01c-6.021 0-11.53-3.379-14.26-8.75c-2.73-5.367-2.215-11.81 1.334-16.68l70-96C142.1 290.4 146.9 288 152 288s9.916 2.441 12.93 6.574l32.46 44.51l93.3-139.1C293.7 194.7 298.7 192 304 192s10.35 2.672 13.31 7.125l128 192C448.6 396 448.9 402.3 446.1 407.6z"/></svg>
34
+ </button>
35
+ </div>
36
+ </template>
37
+ </Image>
38
+ </div>
39
+
40
+ <div>
41
+ <label>Alt</label>
42
+ <Textbox v-model="value.props.alt" rows="3" ref="alt" />
43
+ </div>
44
+
45
+ <PropertySetting :value="value" :index="index" :viewType="viewType" />
46
+
47
+ </div>
48
+ </template>
49
+
50
+ <script>
51
+
52
+ import {defineAsyncComponent} from "vue";
53
+
54
+ export default{
55
+ components: {
56
+ PropertySetting: defineAsyncComponent(() => import('./PropertySetting.vue'))
57
+ },
58
+
59
+ computed: {
60
+
61
+ src(){
62
+ if(!Array.isArray(this.value.props.src))
63
+ this.value.props.src = this.viewTypes.map(_ => '')
64
+ return this.value.props.src
65
+ }
66
+
67
+ },
68
+
69
+ data(){
70
+ return {
71
+ image: null
72
+ }
73
+ },
74
+
75
+ inject: [ 'uploadImage', 'viewTypes' ],
76
+
77
+ name: 'ImageSetting',
78
+
79
+ props: {
80
+
81
+ index: Number,
82
+
83
+ value: {
84
+ type: Object,
85
+ required: true
86
+ },
87
+
88
+ viewType: String,
89
+
90
+ },
91
+
92
+ }
93
+
94
+ </script>
95
+
96
+ <style module>
97
+
98
+ .comp{
99
+ @apply flex flex-col gap-8;
100
+ }
101
+
102
+ </style>
@@ -0,0 +1,64 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row">
4
+ <label class="flex-1">Margin</label>
5
+ <MultiValueSetting :keys="keys"
6
+ class="items-end"
7
+ item-class="max-w-[40px]"
8
+ v-model="margin[index]"
9
+ :prefix="viewType" />
10
+ </div>
11
+ </div>
12
+ </template>
13
+
14
+ <script>
15
+
16
+ import MultiValueSetting from "./MultiValueSetting.vue";
17
+
18
+ export default{
19
+ components: {MultiValueSetting},
20
+
21
+ inject: [ 'viewTypes' ],
22
+
23
+ props: {
24
+
25
+ value: {
26
+ type: Object,
27
+ required: true
28
+ },
29
+
30
+ index: Number,
31
+ viewType: String,
32
+
33
+ },
34
+
35
+ computed: {
36
+
37
+ margin(){
38
+ if(!Array.isArray(this.value.props.margin))
39
+ this.value.props.margin = this.viewTypes.map(_ => '')
40
+ return this.value.props.margin
41
+ }
42
+
43
+ },
44
+
45
+ data(){
46
+ return {
47
+ keys: [
48
+ [ 'm-' ],
49
+ [ 'mx-', 'my-' ],
50
+ [ 'ml-', 'mt-', 'mr-', 'mb-' ]
51
+ ]
52
+ }
53
+ }
54
+
55
+ }
56
+
57
+ </script>
58
+
59
+ <style module>
60
+
61
+ .comp{
62
+ }
63
+
64
+ </style>
@@ -0,0 +1,82 @@
1
+ <template>
2
+ <div :class="$style.comp">
3
+ <div class="flex flex-row items-center">
4
+ <label class="flex-1">Max Height</label>
5
+ <Dropdown v-model="maxHeight[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
+ maxHeight(){
43
+ if(!Array.isArray(this.value.props.maxHeight))
44
+ this.value.props.maxHeight = this.viewTypes.map(_ => '')
45
+ return this.value.props.maxHeight
46
+ }
47
+
48
+ },
49
+
50
+ data(){
51
+ return {
52
+ values: [
53
+ [ 'max-h-0', '0' ],
54
+ [ 'max-h-1', '1' ],
55
+ [ 'max-h-2', '2' ],
56
+ [ 'max-h-3', '3' ],
57
+ [ 'max-h-4', '4' ],
58
+ [ 'max-h-5', '5' ],
59
+ [ 'max-h-[10vh]', '10vh' ],
60
+ [ 'max-h-[20vh]', '20vh' ],
61
+ [ 'max-h-[30vh]', '30vh' ],
62
+ [ 'max-h-[40vh]', '40vh' ],
63
+ [ 'max-h-[50vh]', '50vh' ],
64
+ [ 'max-h-[60vh]', '60vh' ],
65
+ [ 'max-h-[70vh]', '70vh' ],
66
+ [ 'max-h-[80vh]', '80vh' ],
67
+ [ 'max-h-[90vh]', '90vh' ],
68
+ [ 'max-h-screen', 'Full' ],
69
+ ]
70
+ }
71
+ }
72
+
73
+ }
74
+
75
+ </script>
76
+
77
+ <style module>
78
+
79
+ .comp{
80
+ }
81
+
82
+ </style>