Skip to content

Commit 00dd318

Browse files
authored
Merge pull request #14 from webzlodimir/dev
Dev
2 parents df31fd3 + 28633f4 commit 00dd318

File tree

6 files changed

+450
-1127
lines changed

6 files changed

+450
-1127
lines changed

README.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ Vue.use(VueBottomSheet);
7070
| max-height | String | Set max-height of component card | `max-height="90%"` |
7171
| effect | String | Set effect for component card | `effect="fx-fadein-scale"` |
7272
| rounded | Boolean | Round the top two corners of the sheet | `:rounded="false"` |
73+
| is-full-screen | Boolean | Enable or disable full-screen mode | `:is-full-screen="true"` |
74+
| swipe-able | Boolean | Enable or disable swipe to close | `:swipe-able="false"` |
75+
| overlay-color | Boolean | Set overlay color with opacity | `:overlay-color="#0000004D"` |
7376

7477
## Events
7578

README_RU.MD

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ Vue.use(VueBottomSheet);
6969
| max-height | String | Устанавливает максимальную высоту карточки компонента | `max-height="90%"` |
7070
| effect | String | Устанавливает эффект появление карточки компонента | `effect="fx-fadein-scale"` |
7171
| rounded | Boolean | Включает скругление 2 верхних углов компонента | `:rounded="false"` |
72+
| is-full-screen | Boolean | Включает и выключает полноэкранный режим | `:is-full-screen="true"` |
73+
| swipe-able | Boolean | Включает и выключает возможность закрытия окна свайпом | `:swipe-able="false"` |
74+
| overlay-color | Boolean | Задаёт цвет оверлея | `:overlay-color="#0000004D"` |
7275

7376
## События
7477

dev/serve.vue

Lines changed: 74 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@
1010
<a target="_blank" href="https://hammerjs.github.io/">Hammer.js</a>
1111
</p>
1212
<h3 class="mb-3">Settings</h3>
13-
13+
<hr style="opacity: 0.1">
1414
<div class="row">
15-
<div class="col-sm-4 col-12">
15+
<div class="col-md-4 col-12">
1616
<div class="form-check form-switch mb-3">
1717
<input
1818
class="form-check-input"
@@ -49,6 +49,38 @@
4949
>Rounded top corners</label
5050
>
5151
</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+
5284
<div class="form-group mb-3">
5385
<label for="maxWidthInput" class="form-label">Max width:</label>
5486
<input
@@ -80,10 +112,12 @@
80112
<option selected value="fx-default">fx-default</option>
81113
<option selected value="fx-fadein-scale">fx-fadein-scale</option>
82114
<option selected value="fx-slide-from-right"
83-
>fx-slide-from-right</option
115+
>fx-slide-from-right
116+
</option
84117
>
85118
<option selected value="fx-slide-from-left"
86-
>fx-slide-from-left</option
119+
>fx-slide-from-left
120+
</option
87121
>
88122
</select>
89123
</div>
@@ -99,6 +133,9 @@
99133
:click-to-close="clickToClose"
100134
:effect="effect"
101135
:rounded="rounded"
136+
:swipeAble="swipeAble"
137+
:overlayColor="overlyHexColor"
138+
:isFullScreen="isFullScreen"
102139
ref="myBottomSheet"
103140
>
104141
<div class="sheet-content">
@@ -109,6 +146,24 @@
109146
inventore iste minima, non quibusdam quisquam quos velit veritatis
110147
voluptatem?
111148
</p>
149+
<p>
150+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime
151+
neque sed tempore ullam. Accusamus animi at autem beatae est, hic
152+
inventore iste minima, non quibusdam quisquam quos velit veritatis
153+
voluptatem?
154+
</p>
155+
<p>
156+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime
157+
neque sed tempore ullam. Accusamus animi at autem beatae est, hic
158+
inventore iste minima, non quibusdam quisquam quos velit veritatis
159+
voluptatem?
160+
</p>
161+
<p>
162+
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Maxime
163+
neque sed tempore ullam. Accusamus animi at autem beatae est, hic
164+
inventore iste minima, non quibusdam quisquam quos velit veritatis
165+
voluptatem?
166+
</p>
112167
<h2>
113168
Lorem Ipsum
114169
</h2>
@@ -130,21 +185,27 @@
130185
<script>
131186
import Vue from 'vue';
132187
import VueBottomSheet from '@/vue-bottom-sheet.vue';
188+
import sketch from 'vue-color/src/components/Chrome'
133189
134190
export default Vue.extend({
135191
name: 'ServeDev',
192+
136193
data() {
137194
return {
138195
overlay: true,
139196
maxWidth: "640px",
140197
maxHeight: "90%",
141198
clickToClose: true,
142199
effect: "fx-default",
143-
rounded: true
200+
rounded: true,
201+
swipeAble: true,
202+
isFullScreen: false,
203+
overlayColorSelect: "#0000004D"
144204
};
145205
},
146206
components: {
147-
VueBottomSheet
207+
VueBottomSheet,
208+
'sketch-picker': sketch,
148209
},
149210
methods: {
150211
open() {
@@ -153,12 +214,19 @@ export default Vue.extend({
153214
close() {
154215
this.$refs.myBottomSheet.close();
155216
}
217+
},
218+
computed: {
219+
overlyHexColor() {
220+
if (this.overlayColorSelect != null)
221+
return this.overlayColorSelect.hex8;
222+
}
156223
}
157224
});
158225
</script>
159226

160227
<style>
161228
@import "https://cdn.jsdelivr.net/npm/bootstrap@5.0.0-beta2/dist/css/bootstrap.min.css";
229+
162230
.sheet-content {
163231
padding: 20px;
164232
}

0 commit comments

Comments
 (0)