File tree Expand file tree Collapse file tree 3 files changed +41
-13
lines changed Expand file tree Collapse file tree 3 files changed +41
-13
lines changed Original file line number Diff line number Diff line change @@ -63,7 +63,25 @@ select {
63
63
@extend .form-select ;
64
64
@extend .select-sm ;
65
65
}
66
-
67
- .g-active {
66
+ .layer {
67
+ & :hover {
68
+ outline : 1px solid #ddd !important ;
69
+ }
70
+ }
71
+ .g-active {
68
72
outline : 1px solid #2196f3 !important ;
73
+ & :hover {
74
+ outline : 1px solid #2196f3 !important ;
75
+ }
76
+ & ::after {
77
+ content : attr (data-title );
78
+ background : #2196f3 ;
79
+ color : #fff ;
80
+ position : absolute ;
81
+ top : 0 ;
82
+ right : 0 ;
83
+ padding : 0 5px ;
84
+ font-size : 12px ;
85
+ border-radius : 0 0 0 4px ;
86
+ }
69
87
}
Original file line number Diff line number Diff line change 12
12
<component
13
13
:is =" val.type"
14
14
class =" layer"
15
+ :data-title =" val.type"
15
16
:class =" {'g-active': id === val.uuid}"
16
17
v-for =" val in widgetStore"
17
18
:key =" val.uuid"
18
19
:val =" val"
19
20
:h =" height"
20
21
:w =" 750"
21
22
:playState =" playState" >
23
+ <component
24
+ v-if =" val.type === 'braid-container'"
25
+ :is =" child.type"
26
+ class =" layer layer-child"
27
+ :class =" {'g-active': id === child.uuid}"
28
+ v-for =" child in getChilds(val.name)"
29
+ :key =" child.uuid"
30
+ :val =" child"
31
+ :h =" height"
32
+ :w =" 750"
33
+ :playState =" playState" />
22
34
</component >
23
35
24
36
<!-- 参考线 -->
@@ -123,6 +135,13 @@ export default {
123
135
this .$store .commit (' replaceImage' , payload)
124
136
})
125
137
}
138
+ },
139
+
140
+ // 获取子组件
141
+ getChilds (name ) {
142
+ return this .$store .state .widgets .filter (
143
+ item => item .belong === name
144
+ )
126
145
}
127
146
},
128
147
Original file line number Diff line number Diff line change 24
24
}" >
25
25
26
26
<!-- 子组件 -->
27
- <component
28
- :is =" val.type"
29
- class =" layer layer-child"
30
- :class =" {'g-active': current === val.uuid}"
31
- v-for =" val in childs"
32
- :key =" val.uuid"
33
- :val =" val"
34
- :h =" val.height"
35
- :w =" val.width"
36
- :playState =" playState" >
37
- </component >
27
+ <!-- TODO: 改用 slot 实现 -->
28
+ <slot ></slot >
38
29
</div >
39
30
</template >
40
31
You can’t perform that action at this time.
0 commit comments