@mixd-id/web-scaffold 0.1.230406080 → 0.1.230406082
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/components/Ahref.vue +1 -4
- package/src/components/Block.vue +13 -10
- package/src/components/Box.vue +8 -18
- package/src/components/Button.vue +2 -3
- package/src/components/Carousel.vue +3 -3
- package/src/components/ColorPicker.vue +50 -20
- package/src/components/ContextMenu.vue +2 -0
- package/src/components/Flex.vue +4 -31
- package/src/components/Grid.vue +6 -48
- package/src/components/HTMLEditor.vue +1 -0
- package/src/components/Image.vue +6 -8
- package/src/components/Paragraph.vue +51 -0
- package/src/components/TextBlock.vue +44 -0
- package/src/components/TreeViewItem.vue +2 -2
- package/src/index.js +7 -7
- package/src/mixin/component.js +39 -129
- package/src/utils/helpers.mjs +2 -65
- package/src/widgets/BoxSetting.vue +6 -0
- package/src/widgets/ButtonSetting.vue +17 -16
- package/src/widgets/CarouselSetting.vue +6 -0
- package/src/widgets/ComponentSetting.vue +400 -40
- package/src/widgets/ContactForm.vue +6 -8
- package/src/widgets/ContactFormSetting.vue +6 -0
- package/src/widgets/EmbeddedVideoSetting.vue +6 -0
- package/src/widgets/FAQ.vue +1 -2
- package/src/widgets/FAQSetting.vue +6 -0
- package/src/widgets/FeatureList.vue +1 -2
- package/src/widgets/FeatureListSetting.vue +6 -0
- package/src/widgets/FlexSetting.vue +6 -0
- package/src/widgets/Header.vue +9 -4
- package/src/widgets/HeaderSetting.vue +5 -0
- package/src/widgets/IconList.vue +3 -9
- package/src/widgets/IconListSetting.vue +6 -0
- package/src/widgets/ImageSetting.vue +6 -0
- package/src/widgets/{ButtonGroupItem.vue → ParagraphItem.vue} +1 -1
- package/src/widgets/ParagraphSetting.vue +149 -0
- package/src/widgets/Share.vue +1 -2
- package/src/widgets/ShareSetting.vue +6 -0
- package/src/widgets/StyleSetting.vue +2 -0
- package/src/widgets/{BannerItem.vue → TextBlockItem.vue} +2 -2
- package/src/widgets/TextBlockSetting.vue +139 -0
- package/src/widgets/WebPageBuilder.vue +94 -58
- package/src/components/ButtonGroup.vue +0 -101
- package/src/stores/WebPageBuilder.js +0 -37
- package/src/widgets/Banner.vue +0 -71
- package/src/widgets/BannerSetting.vue +0 -145
- package/src/widgets/ButtonGroup.vue +0 -86
- package/src/widgets/ButtonGroupSetting.vue +0 -126
package/package.json
CHANGED
package/src/components/Ahref.vue
CHANGED
package/src/components/Block.vue
CHANGED
|
@@ -7,26 +7,21 @@
|
|
|
7
7
|
:items="item.items"
|
|
8
8
|
:="item.props" />
|
|
9
9
|
|
|
10
|
-
Block
|
|
11
|
-
|
|
12
10
|
</div>
|
|
13
11
|
</template>
|
|
14
12
|
|
|
15
13
|
<script>
|
|
16
14
|
|
|
17
|
-
import {
|
|
15
|
+
import {componentMixin} from "../mixin/component";
|
|
18
16
|
|
|
19
17
|
export default{
|
|
20
18
|
|
|
19
|
+
mixins: [ componentMixin ],
|
|
20
|
+
|
|
21
21
|
props:{
|
|
22
22
|
class: String,
|
|
23
23
|
items: Array,
|
|
24
|
-
padding: Array,
|
|
25
|
-
margin: Array,
|
|
26
|
-
display: Array,
|
|
27
24
|
type: String,
|
|
28
|
-
enabled: undefined,
|
|
29
|
-
name: String
|
|
30
25
|
},
|
|
31
26
|
|
|
32
27
|
computed: {
|
|
@@ -38,8 +33,8 @@ export default{
|
|
|
38
33
|
compClass(){
|
|
39
34
|
return [
|
|
40
35
|
this.$style.comp,
|
|
41
|
-
this.
|
|
42
|
-
|
|
36
|
+
this.extClass,
|
|
37
|
+
this.class ?? ''
|
|
43
38
|
]
|
|
44
39
|
.filter(_ => _)
|
|
45
40
|
.join(' ')
|
|
@@ -54,6 +49,14 @@ export default{
|
|
|
54
49
|
<style module>
|
|
55
50
|
|
|
56
51
|
.comp{
|
|
52
|
+
@apply block;
|
|
53
|
+
background-image: v-bind(bgImages[0]);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@media screen(md){
|
|
57
|
+
.comp{
|
|
58
|
+
background-image: v-bind(bgImages[1]);
|
|
59
|
+
}
|
|
57
60
|
}
|
|
58
61
|
|
|
59
62
|
</style>
|
package/src/components/Box.vue
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="
|
|
3
|
-
<
|
|
2
|
+
<div :class="compClass">
|
|
3
|
+
<br />
|
|
4
|
+
<br />
|
|
4
5
|
</div>
|
|
5
6
|
</template>
|
|
6
7
|
|
|
7
8
|
<script>
|
|
8
9
|
|
|
9
|
-
import {_applyClass} from "../utils/helpers.mjs";
|
|
10
10
|
import { componentMixin } from '../mixin/component';
|
|
11
11
|
|
|
12
12
|
export default{
|
|
@@ -24,14 +24,12 @@ export default{
|
|
|
24
24
|
|
|
25
25
|
computed: {
|
|
26
26
|
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
this.$style.comp
|
|
27
|
+
compClass(){
|
|
28
|
+
return [
|
|
29
|
+
this.$style.comp,
|
|
30
|
+
this.extClass
|
|
30
31
|
]
|
|
31
|
-
|
|
32
|
-
classNames.push(..._applyClass(this.$props, { display:'flex' }))
|
|
33
|
-
|
|
34
|
-
return classNames.join(' ')
|
|
32
|
+
.join(' ')
|
|
35
33
|
},
|
|
36
34
|
|
|
37
35
|
}
|
|
@@ -44,20 +42,12 @@ export default{
|
|
|
44
42
|
|
|
45
43
|
.comp{
|
|
46
44
|
@apply flex items-center justify-center;
|
|
47
|
-
background-color: v-bind(bgColor[0]);
|
|
48
45
|
background-image: v-bind(bgImages[0]);
|
|
49
|
-
background-position: v-bind(bgPositions[0]);
|
|
50
|
-
background-size: v-bind(bgSizes[0]);
|
|
51
|
-
background-repeat: v-bind(bgRepeats[0]);
|
|
52
46
|
}
|
|
53
47
|
|
|
54
48
|
@media screen and (min-width: 768px){
|
|
55
49
|
.comp{
|
|
56
|
-
background-color: v-bind(bgColor[1]);
|
|
57
50
|
background-image: v-bind(bgImages[1]);
|
|
58
|
-
background-position: v-bind(bgPositions[1]);
|
|
59
|
-
background-size: v-bind(bgSizes[1]);
|
|
60
|
-
background-repeat: v-bind(bgRepeats[1]);
|
|
61
51
|
}
|
|
62
52
|
}
|
|
63
53
|
|
|
@@ -15,7 +15,6 @@
|
|
|
15
15
|
<script>
|
|
16
16
|
|
|
17
17
|
import {componentMixin} from "../mixin/component";
|
|
18
|
-
import {classFromProps} from "../utils/helpers.mjs";
|
|
19
18
|
|
|
20
19
|
export default{
|
|
21
20
|
|
|
@@ -50,9 +49,9 @@ export default{
|
|
|
50
49
|
return [
|
|
51
50
|
this.$style.button,
|
|
52
51
|
this.$style['button-' + this.variant],
|
|
53
|
-
this.class ?? '',
|
|
54
52
|
parseInt(this.computedState) === 2 ? this.$style.loading : '',
|
|
55
|
-
|
|
53
|
+
this.extClass,
|
|
54
|
+
this.class ?? '',
|
|
56
55
|
]
|
|
57
56
|
.filter(_ => _)
|
|
58
57
|
.join(' ')
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
|
|
33
33
|
<script>
|
|
34
34
|
|
|
35
|
-
import {
|
|
35
|
+
import {parseBoolean} from "../utils/helpers.mjs";
|
|
36
36
|
import {componentMixin} from "../mixin/component";
|
|
37
37
|
|
|
38
38
|
export default{
|
|
@@ -68,7 +68,7 @@ export default{
|
|
|
68
68
|
compClass(){
|
|
69
69
|
return [
|
|
70
70
|
this.$style.comp,
|
|
71
|
-
|
|
71
|
+
this.extClass
|
|
72
72
|
]
|
|
73
73
|
.filter(_ => _)
|
|
74
74
|
.join(' ')
|
|
@@ -336,7 +336,7 @@ export default{
|
|
|
336
336
|
@apply bg-primary;
|
|
337
337
|
}
|
|
338
338
|
|
|
339
|
-
@media screen
|
|
339
|
+
@media screen(md){
|
|
340
340
|
.comp{
|
|
341
341
|
background-image: v-bind(bgImages[1]);
|
|
342
342
|
}
|
|
@@ -1,24 +1,23 @@
|
|
|
1
1
|
<template>
|
|
2
2
|
<div :class="$style.comp">
|
|
3
|
-
<div :class="
|
|
3
|
+
<div :class="circleClass" :style="circleStyle"
|
|
4
|
+
@click="$refs.contextMenu.open($refs.btn)"
|
|
4
5
|
ref="btn"></div>
|
|
5
6
|
<input type="color" :class="$style.inputColor" ref="inputColor"
|
|
6
7
|
@change="select($refs.inputColor.value)"/>
|
|
7
8
|
|
|
8
9
|
<ContextMenu ref="contextMenu" :dismiss="false">
|
|
9
10
|
<div class="p-4 flex flex-col gap-4">
|
|
10
|
-
<div class="
|
|
11
|
-
<div v-for="color in colors"
|
|
12
|
-
<div v-
|
|
13
|
-
|
|
14
|
-
@click="select(`${color}-${step}`)"></div>
|
|
15
|
-
</div>
|
|
11
|
+
<div class="grid grid-cols-10 gap-4">
|
|
12
|
+
<div v-for="color in colors">
|
|
13
|
+
<div v-if="mode === 'class'" :class="`${$style.circle} bg-${color}`"
|
|
14
|
+
@click="select(`${color}`)"></div>
|
|
16
15
|
</div>
|
|
17
16
|
</div>
|
|
18
17
|
<div class="grid grid-cols-2 gap-4">
|
|
19
18
|
<button type="button" @click="select('transparent')"
|
|
20
19
|
class="w-full p-1 border-text-100 border-[1px] rounded-lg">None</button>
|
|
21
|
-
<button type="button" v-if="Boolean(customColor)"
|
|
20
|
+
<button type="button" v-if="mode !== 'class' && Boolean(customColor)"
|
|
22
21
|
class="w-full p-1 border-text-100 border-[1px] rounded-lg"
|
|
23
22
|
@click="$refs.inputColor.click()">Custom</button>
|
|
24
23
|
</div>
|
|
@@ -36,23 +35,30 @@ export default{
|
|
|
36
35
|
|
|
37
36
|
props: {
|
|
38
37
|
|
|
38
|
+
mode: {
|
|
39
|
+
type: String,
|
|
40
|
+
default: 'class' // class|hex
|
|
41
|
+
},
|
|
42
|
+
|
|
39
43
|
colors: {
|
|
40
44
|
type: Array,
|
|
41
45
|
default: [
|
|
42
|
-
'primary',
|
|
43
|
-
'
|
|
44
|
-
'
|
|
45
|
-
'
|
|
46
|
-
'
|
|
47
|
-
'
|
|
46
|
+
'primary-50', 'primary-100', 'primary-200', 'primary-300', 'primary-400', 'primary-500',
|
|
47
|
+
'primary-600', 'primary-700', 'primary-800', 'primary-900',
|
|
48
|
+
'gray-50', 'gray-100', 'gray-200', 'gray-300', 'gray-400', 'gray-500', 'gray-600', 'gray-700',
|
|
49
|
+
'gray-800', 'gray-900',
|
|
50
|
+
'red-50', 'red-100', 'red-200', 'red-300', 'red-400', 'red-500', 'red-600', 'red-700',
|
|
51
|
+
'red-800', 'red-900',
|
|
52
|
+
'amber-50', 'amber-100', 'amber-200', 'amber-300', 'amber-400', 'amber-500', 'amber-600',
|
|
53
|
+
'amber-700', 'amber-800', 'amber-900',
|
|
54
|
+
'lime-50', 'lime-100', 'lime-200','lime-300', 'lime-400', 'lime-500', 'lime-600', 'lime-700',
|
|
55
|
+
'lime-800', 'lime-900',
|
|
56
|
+
'blue-50', 'blue-100', 'blue-200', 'blue-300', 'blue-400', 'blue-500', 'blue-600', 'blue-700',
|
|
57
|
+
'blue-800', 'blue-900',
|
|
58
|
+
'black', 'white', 'transparent',
|
|
48
59
|
]
|
|
49
60
|
},
|
|
50
61
|
|
|
51
|
-
steps: {
|
|
52
|
-
type: Array,
|
|
53
|
-
default: [ 50, 100, 200, 300, 400, 500, 600, 700, 800, 900 ]
|
|
54
|
-
},
|
|
55
|
-
|
|
56
62
|
customColor: undefined,
|
|
57
63
|
|
|
58
64
|
modelValue: String,
|
|
@@ -64,7 +70,12 @@ export default{
|
|
|
64
70
|
methods: {
|
|
65
71
|
|
|
66
72
|
select(color){
|
|
67
|
-
|
|
73
|
+
if(this.mode === 'class'){
|
|
74
|
+
this.$emit('update:modelValue', this.prefix + color)
|
|
75
|
+
}
|
|
76
|
+
else{
|
|
77
|
+
this.$emit('update:modelValue', color)
|
|
78
|
+
}
|
|
68
79
|
this.$emit('change')
|
|
69
80
|
this.$refs.contextMenu.close()
|
|
70
81
|
}
|
|
@@ -76,6 +87,25 @@ export default{
|
|
|
76
87
|
customColorCount(){
|
|
77
88
|
const count = parseInt(this.customColor)
|
|
78
89
|
return isNaN(count) ? 0 : count
|
|
90
|
+
},
|
|
91
|
+
|
|
92
|
+
circleClass(){
|
|
93
|
+
return [
|
|
94
|
+
this.$style.circle,
|
|
95
|
+
this.mode === 'class' ?
|
|
96
|
+
(this.modelValue ?? '').replace('text-', 'bg-').replace('border-', 'bg-') :
|
|
97
|
+
''
|
|
98
|
+
]
|
|
99
|
+
.filter(_=>_)
|
|
100
|
+
.join(' ')
|
|
101
|
+
},
|
|
102
|
+
|
|
103
|
+
circleStyle(){
|
|
104
|
+
if(this.mode !== 'class'){
|
|
105
|
+
return {
|
|
106
|
+
'background-color': this.modelValue ?? ''
|
|
107
|
+
}
|
|
108
|
+
}
|
|
79
109
|
}
|
|
80
110
|
|
|
81
111
|
},
|
package/src/components/Flex.vue
CHANGED
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div :class="computedClass">
|
|
2
|
+
<div :class="computedClass" :style="computedStyle">
|
|
3
3
|
|
|
4
4
|
<component v-for="(item, idx) in computedItems"
|
|
5
5
|
:is="item.type"
|
|
6
6
|
:uid="item.uid"
|
|
7
7
|
:items="item.items"
|
|
8
8
|
:="item.props"
|
|
9
|
+
:ext-class="item.extClass"
|
|
9
10
|
:class="itemClass(idx)" />
|
|
10
11
|
|
|
11
12
|
</div>
|
|
@@ -14,7 +15,6 @@
|
|
|
14
15
|
|
|
15
16
|
<script>
|
|
16
17
|
|
|
17
|
-
import {_applyClass, classFromProps, mediaPrefixes} from "../utils/helpers.mjs";
|
|
18
18
|
import {componentMixin} from "../mixin/component";
|
|
19
19
|
|
|
20
20
|
export default{
|
|
@@ -24,15 +24,7 @@ export default{
|
|
|
24
24
|
props:{
|
|
25
25
|
items: Array,
|
|
26
26
|
flexColumns: Array,
|
|
27
|
-
type: Array,
|
|
28
27
|
columnType: Array,
|
|
29
|
-
columns: Array,
|
|
30
|
-
gap: Array,
|
|
31
|
-
padding: Array,
|
|
32
|
-
margin: Array,
|
|
33
|
-
display: Array,
|
|
34
|
-
enabled: undefined,
|
|
35
|
-
name: String
|
|
36
28
|
},
|
|
37
29
|
|
|
38
30
|
computed: {
|
|
@@ -44,17 +36,10 @@ export default{
|
|
|
44
36
|
computedClass(){
|
|
45
37
|
|
|
46
38
|
const classNames = [
|
|
47
|
-
this.$style.comp
|
|
39
|
+
this.$style.comp,
|
|
40
|
+
this.extClass
|
|
48
41
|
]
|
|
49
42
|
|
|
50
|
-
if(Array.isArray(this.type)){
|
|
51
|
-
for(let i in this.type){
|
|
52
|
-
classNames.push(mediaPrefixes[i] + 'flex-' + this.type[i])
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
|
|
56
|
-
classNames.push(..._applyClass(this.$props))
|
|
57
|
-
|
|
58
43
|
return classNames.join(' ')
|
|
59
44
|
}
|
|
60
45
|
|
|
@@ -65,11 +50,6 @@ export default{
|
|
|
65
50
|
itemClass(idx){
|
|
66
51
|
return (this.flexColumns[idx] ?? []).join(' ')
|
|
67
52
|
},
|
|
68
|
-
},
|
|
69
|
-
|
|
70
|
-
data(){
|
|
71
|
-
return {
|
|
72
|
-
}
|
|
73
53
|
}
|
|
74
54
|
|
|
75
55
|
}
|
|
@@ -80,13 +60,6 @@ export default{
|
|
|
80
60
|
|
|
81
61
|
.comp{
|
|
82
62
|
@apply flex;
|
|
83
|
-
background-image: v-bind(bgImages[0]);
|
|
84
|
-
}
|
|
85
|
-
|
|
86
|
-
@media screen and (min-width: 768px){
|
|
87
|
-
.comp{
|
|
88
|
-
background-image: v-bind(bgImages[1]);
|
|
89
|
-
}
|
|
90
63
|
}
|
|
91
64
|
|
|
92
65
|
</style>
|
package/src/components/Grid.vue
CHANGED
|
@@ -5,14 +5,14 @@
|
|
|
5
5
|
:is="item.type"
|
|
6
6
|
:uid="item.uid"
|
|
7
7
|
:items="item.items"
|
|
8
|
-
:="item.props"
|
|
8
|
+
:="item.props"
|
|
9
|
+
:ext-class="item.extClass" />
|
|
9
10
|
|
|
10
11
|
</div>
|
|
11
12
|
</template>
|
|
12
13
|
|
|
13
14
|
<script>
|
|
14
15
|
|
|
15
|
-
import {_applyClass} from "../utils/helpers.mjs";
|
|
16
16
|
import {componentMixin} from "../mixin/component";
|
|
17
17
|
|
|
18
18
|
export default{
|
|
@@ -20,15 +20,7 @@ export default{
|
|
|
20
20
|
mixins: [ componentMixin ],
|
|
21
21
|
|
|
22
22
|
props:{
|
|
23
|
-
items: Array
|
|
24
|
-
columns: Array,
|
|
25
|
-
gap: Array,
|
|
26
|
-
padding: Array,
|
|
27
|
-
margin: Array,
|
|
28
|
-
display: Array,
|
|
29
|
-
type: String,
|
|
30
|
-
enabled: undefined,
|
|
31
|
-
name: String
|
|
23
|
+
items: Array
|
|
32
24
|
},
|
|
33
25
|
|
|
34
26
|
computed:{
|
|
@@ -40,8 +32,9 @@ export default{
|
|
|
40
32
|
compClass(){
|
|
41
33
|
return [
|
|
42
34
|
this.$style.comp,
|
|
43
|
-
|
|
35
|
+
this.extClass
|
|
44
36
|
]
|
|
37
|
+
.filter(_=>_)
|
|
45
38
|
.join(' ')
|
|
46
39
|
}
|
|
47
40
|
|
|
@@ -59,47 +52,12 @@ export default{
|
|
|
59
52
|
|
|
60
53
|
.comp{
|
|
61
54
|
@apply grid w-full;
|
|
62
|
-
|
|
63
|
-
background-color: v-bind(bgColor[0]);
|
|
64
55
|
background-image: v-bind(bgImages[0]);
|
|
65
|
-
background-position: v-bind(bgPositions[0]);
|
|
66
|
-
background-size: v-bind(bgSizes[0]);
|
|
67
|
-
background-repeat: v-bind(bgRepeats[0]);
|
|
68
|
-
|
|
69
|
-
border-left-width: v-bind(bdSizes[0][0]);
|
|
70
|
-
border-top-width: v-bind(bdSizes[0][1]);
|
|
71
|
-
border-right-width: v-bind(bdSizes[0][2]);
|
|
72
|
-
border-bottom-width: v-bind(bdSizes[0][3]);
|
|
73
|
-
border-color: v-bind(bdColors[0]);
|
|
74
|
-
border-top-left-radius: v-bind(bdRadiuses[0][0]);
|
|
75
|
-
border-top-right-radius: v-bind(bdRadiuses[0][1]);
|
|
76
|
-
border-bottom-right-radius: v-bind(bdRadiuses[0][2]);
|
|
77
|
-
border-bottom-left-radius: v-bind(bdRadiuses[0][3]);
|
|
78
|
-
border-style: v-bind(bdStyles[0]);
|
|
79
|
-
|
|
80
|
-
max-width: v-bind(maxWidths[0]);
|
|
81
56
|
}
|
|
82
57
|
|
|
83
|
-
@media screen
|
|
58
|
+
@media screen(md){
|
|
84
59
|
.comp{
|
|
85
|
-
background-color: v-bind(bgColor[1]);
|
|
86
60
|
background-image: v-bind(bgImages[1]);
|
|
87
|
-
background-position: v-bind(bgPositions[1]);
|
|
88
|
-
background-size: v-bind(bgSizes[1]);
|
|
89
|
-
background-repeat: v-bind(bgRepeats[1]);
|
|
90
|
-
|
|
91
|
-
border-left-width: v-bind(bdSizes[1][0]);
|
|
92
|
-
border-top-width: v-bind(bdSizes[1][1]);
|
|
93
|
-
border-right-width: v-bind(bdSizes[1][2]);
|
|
94
|
-
border-bottom-width: v-bind(bdSizes[1][3]);
|
|
95
|
-
border-color: v-bind(bdColors[1]);
|
|
96
|
-
border-top-left-radius: v-bind(bdRadiuses[1][0]);
|
|
97
|
-
border-top-right-radius: v-bind(bdRadiuses[1][1]);
|
|
98
|
-
border-bottom-right-radius: v-bind(bdRadiuses[1][2]);
|
|
99
|
-
border-bottom-left-radius: v-bind(bdRadiuses[1][3]);
|
|
100
|
-
border-style: v-bind(bdStyles[1]);
|
|
101
|
-
|
|
102
|
-
max-width: v-bind(maxWidths[1]);
|
|
103
61
|
}
|
|
104
62
|
}
|
|
105
63
|
|
package/src/components/Image.vue
CHANGED
|
@@ -19,7 +19,6 @@
|
|
|
19
19
|
<script>
|
|
20
20
|
|
|
21
21
|
import {componentMixin} from "../mixin/component";
|
|
22
|
-
import {_applyClass} from "../utils/helpers.mjs";
|
|
23
22
|
|
|
24
23
|
const screens = {
|
|
25
24
|
0: 'all',
|
|
@@ -69,16 +68,15 @@ export default{
|
|
|
69
68
|
computed:{
|
|
70
69
|
|
|
71
70
|
compClass(){
|
|
72
|
-
|
|
71
|
+
return [
|
|
73
72
|
this.$style.comp,
|
|
74
|
-
this.class,
|
|
75
73
|
this.status === 1 && this.spinnerType === 'shimmer' && !this.$slots['loading'] ?
|
|
76
|
-
this.$style.shimmer : ''
|
|
74
|
+
this.$style.shimmer : '',
|
|
75
|
+
this.extClass,
|
|
76
|
+
this.class ?? ''
|
|
77
77
|
]
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
return classNames.join(' ')
|
|
78
|
+
.filter(_=>_)
|
|
79
|
+
.join(' ')
|
|
82
80
|
},
|
|
83
81
|
|
|
84
82
|
imgClass(){
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div :class="compClass" v-html="htmlText"></div>
|
|
3
|
+
</template>
|
|
4
|
+
|
|
5
|
+
<script>
|
|
6
|
+
|
|
7
|
+
import { componentMixin } from '../mixin/component';
|
|
8
|
+
|
|
9
|
+
export default{
|
|
10
|
+
|
|
11
|
+
mixins: [ componentMixin ],
|
|
12
|
+
|
|
13
|
+
props: {
|
|
14
|
+
|
|
15
|
+
htmlText: String
|
|
16
|
+
|
|
17
|
+
},
|
|
18
|
+
|
|
19
|
+
computed: {
|
|
20
|
+
|
|
21
|
+
compClass(){
|
|
22
|
+
return [
|
|
23
|
+
this.$style.comp,
|
|
24
|
+
this.extClass,
|
|
25
|
+
'text-xl'
|
|
26
|
+
]
|
|
27
|
+
.join(' ')
|
|
28
|
+
},
|
|
29
|
+
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
</script>
|
|
36
|
+
|
|
37
|
+
<style module>
|
|
38
|
+
|
|
39
|
+
.comp{
|
|
40
|
+
background-image: v-bind(bgImages[0]);
|
|
41
|
+
}
|
|
42
|
+
.comp *{
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
@media screen(md){
|
|
46
|
+
.comp{
|
|
47
|
+
background-image: v-bind(bgImages[1]);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
</style>
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<span :class="compClass">
|
|
3
|
+
{{ text }}
|
|
4
|
+
</span>
|
|
5
|
+
</template>
|
|
6
|
+
|
|
7
|
+
<script>
|
|
8
|
+
|
|
9
|
+
import {componentMixin} from "../mixin/component";
|
|
10
|
+
|
|
11
|
+
export default{
|
|
12
|
+
|
|
13
|
+
mixins: [ componentMixin ],
|
|
14
|
+
|
|
15
|
+
props: {
|
|
16
|
+
|
|
17
|
+
text: String
|
|
18
|
+
|
|
19
|
+
},
|
|
20
|
+
|
|
21
|
+
computed: {
|
|
22
|
+
|
|
23
|
+
compClass(){
|
|
24
|
+
return [
|
|
25
|
+
this.$style.comp,
|
|
26
|
+
this.extClass
|
|
27
|
+
]
|
|
28
|
+
.filter(_=>_)
|
|
29
|
+
.join()
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
</script>
|
|
37
|
+
|
|
38
|
+
<style module>
|
|
39
|
+
|
|
40
|
+
.comp{
|
|
41
|
+
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
</style>
|
|
@@ -14,10 +14,10 @@
|
|
|
14
14
|
</button>
|
|
15
15
|
</div>
|
|
16
16
|
<slot :item="item"></slot>
|
|
17
|
-
<button type="button" class="py-
|
|
17
|
+
<button type="button" class="py-2" @click="$emit('remove')">
|
|
18
18
|
<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="M193.94 256L296.5 153.44l21.15-21.15c3.12-3.12 3.12-8.19 0-11.31l-22.63-22.63c-3.12-3.12-8.19-3.12-11.31 0L160 222.06 36.29 98.34c-3.12-3.12-8.19-3.12-11.31 0L2.34 120.97c-3.12 3.12-3.12 8.19 0 11.31L126.06 256 2.34 379.71c-3.12 3.12-3.12 8.19 0 11.31l22.63 22.63c3.12 3.12 8.19 3.12 11.31 0L160 289.94 262.56 392.5l21.15 21.15c3.12 3.12 8.19 3.12 11.31 0l22.63-22.63c3.12-3.12 3.12-8.19 0-11.31L193.94 256z"/></svg>
|
|
19
19
|
</button>
|
|
20
|
-
<button type="button" class="py-
|
|
20
|
+
<button type="button" class="py-2" v-if="Array.isArray((item ?? {}).items) && item.items.length > 0"
|
|
21
21
|
@click="childCollapsed = !childCollapsed">
|
|
22
22
|
<svg v-if="!childCollapsed" width="16" height="16" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 320 512"><path d="M31.3 192h257.3c17.8 0 26.7 21.5 14.1 34.1L174.1 354.8c-7.8 7.8-20.5 7.8-28.3 0L17.2 226.1C4.6 213.5 13.5 192 31.3 192z"/></svg>
|
|
23
23
|
<svg v-else width="16" height="16" class="fill-text-300" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 192 512"><path d="M0 384.662V127.338c0-17.818 21.543-26.741 34.142-14.142l128.662 128.662c7.81 7.81 7.81 20.474 0 28.284L34.142 398.804C21.543 411.404 0 402.48 0 384.662z"/></svg>
|