10
10
<a target =" _blank" href =" https://hammerjs.github.io/" >Hammer.js</a >
11
11
</p >
12
12
<h3 class =" mb-3" >Settings</h3 >
13
-
13
+ < hr style = " opacity : 0.1 " >
14
14
<div class =" row" >
15
- <div class =" col-sm -4 col-12" >
15
+ <div class =" col-md -4 col-12" >
16
16
<div class =" form-check form-switch mb-3" >
17
17
<input
18
18
class =" form-check-input"
49
49
>Rounded top corners</label
50
50
>
51
51
</div >
52
+ <div class =" form-check form-switch mb-3" >
53
+ <input
54
+ class =" form-check-input"
55
+ type =" checkbox"
56
+ id =" swipeSwitchCheckChecked"
57
+ v-model =" swipeAble"
58
+ checked
59
+ />
60
+ <label class =" form-check-label" for =" swipeSwitchCheckChecked"
61
+ >Swipe Able</label
62
+ >
63
+ </div >
64
+ <div class =" form-check form-switch mb-3" >
65
+ <input
66
+ class =" form-check-input"
67
+ type =" checkbox"
68
+ id =" fullscreenSwitchCheckChecked"
69
+ v-model =" isFullScreen"
70
+ />
71
+ <label class =" form-check-label" for =" fullscreenSwitchCheckChecked"
72
+ >Full Screen</label
73
+ >
74
+ </div >
75
+ </div >
76
+ <div class =" col-md-4 col-12" >
77
+ <div class =" mb-3" >
78
+ <h6 > Overlay Color</h6 >
79
+ <sketch-picker v-model =" overlayColorSelect" />
80
+ </div >
81
+ </div >
82
+ <div class =" col-md-4 col-12" >
83
+
52
84
<div class =" form-group mb-3" >
53
85
<label for =" maxWidthInput" class =" form-label" >Max width:</label >
54
86
<input
80
112
<option selected value =" fx-default" >fx-default</option >
81
113
<option selected value =" fx-fadein-scale" >fx-fadein-scale</option >
82
114
<option selected value =" fx-slide-from-right"
83
- >fx-slide-from-right</option
115
+ >fx-slide-from-right
116
+ </option
84
117
>
85
118
<option selected value =" fx-slide-from-left"
86
- >fx-slide-from-left</option
119
+ >fx-slide-from-left
120
+ </option
87
121
>
88
122
</select >
89
123
</div >
99
133
:click-to-close =" clickToClose"
100
134
:effect =" effect"
101
135
:rounded =" rounded"
136
+ :swipeAble =" swipeAble"
137
+ :overlayColor =" overlyHexColor"
138
+ :isFullScreen =" isFullScreen"
102
139
ref =" myBottomSheet"
103
140
>
104
141
<div class =" sheet-content" >
130
167
<script >
131
168
import Vue from ' vue' ;
132
169
import VueBottomSheet from ' @/vue-bottom-sheet.vue' ;
170
+ import sketch from ' vue-color/src/components/Chrome'
133
171
134
172
export default Vue .extend ({
135
173
name: ' ServeDev' ,
174
+
136
175
data () {
137
176
return {
138
177
overlay: true ,
139
178
maxWidth: " 640px" ,
140
179
maxHeight: " 90%" ,
141
180
clickToClose: true ,
142
181
effect: " fx-default" ,
143
- rounded: true
182
+ rounded: true ,
183
+ swipeAble: true ,
184
+ isFullScreen: false ,
185
+ overlayColorSelect: " #0000004D"
144
186
};
145
187
},
146
188
components: {
147
- VueBottomSheet
189
+ VueBottomSheet,
190
+ ' sketch-picker' : sketch,
148
191
},
149
192
methods: {
150
193
open () {
@@ -153,12 +196,19 @@ export default Vue.extend({
153
196
close () {
154
197
this .$refs .myBottomSheet .close ();
155
198
}
199
+ },
200
+ computed: {
201
+ overlyHexColor () {
202
+ if (this .overlayColorSelect != null )
203
+ return this .overlayColorSelect .hex8 ;
204
+ }
156
205
}
157
206
});
158
207
</script >
159
208
160
209
<style >
161
210
@import " https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css" ;
211
+
162
212
.sheet-content {
163
213
padding : 20px ;
164
214
}
0 commit comments