Skip to content

Commit 5420a71

Browse files
committed
Formatting
1 parent 90734fe commit 5420a71

File tree

1 file changed

+17
-18
lines changed

1 file changed

+17
-18
lines changed

sandbox/App.vue

Lines changed: 17 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@
3030
deselect-label="Remove me"
3131
placeholder="Select events to log"
3232
select-label="Select me"
33-
style="width: 50%" @update="updateSelected">
33+
style="width: 50%"
34+
@change="updateSelected">
3435
</VueMultiselect>
3536
</div>
3637
<hr/>
@@ -110,13 +111,13 @@
110111
</DragItem> -->
111112
</div>
112113
<div
113-
v-if="!hideLayout"
114-
class="col-sm-6">
114+
v-if="!hideLayout"
115+
class="col-sm-6">
115116
<div class="layoutJSON">
116117
Displayed as <code>[x, y, w, h]</code>:
117118
<div class="columns">
118119
<div v-for="item in testLayout">
119-
<b>{{ item.i }}</b>: [{{ item.x }}, {{ item.y }}, {{ item.w }}, {{ item.h }}]
120+
<b>{{ item.i }}</b>: [{{ item }}]
120121
</div>
121122
</div>
122123
</div>
@@ -215,7 +216,7 @@
215216
</div>
216217
<footer>
217218
<p style="text-align: center">
218-
Copyright © 2022-{{getCurrentDate()}} Geirr Winnem
219+
Copyright © 2022-{{ getCurrentDate() }} Geirr Winnem
219220
</p>
220221
<p style="text-align: center">
221222
<a href="https://winnem.tech" target="_blank">winnem.tech</a>
@@ -224,14 +225,11 @@
224225
</template>
225226

226227
<script lang="ts" setup>
227-
import {ref, onMounted, nextTick, onBeforeUnmount, computed, Ref, UnwrapRef} from 'vue';
228+
import {computed, nextTick, onBeforeUnmount, onMounted, ref, Ref, UnwrapRef} from 'vue';
228229
import {testData} from './test';
229230
import GridLayout from '../src/components/Grid/GridLayout.vue';
230231
import GridItem from '../src/components/Grid/GridItem.vue';
231-
import {
232-
getStatics,
233-
getFirstCollision,
234-
} from '@/core/helpers/utils';
232+
import {getFirstCollision, getStatics,} from '@/core/helpers/utils';
235233
import {ILayoutItem, TLayout} from "@/components/Grid/layout-definition";
236234
import VueMultiselect from 'vue-multiselect';
237235
// import {EGridLayoutEvent} from "@/core/enums/EGridLayoutEvents";
@@ -247,7 +245,9 @@ import VueMultiselect from 'vue-multiselect';
247245
*/
248246
249247
// Model for select dropdown.
250-
const updateSelected = (val: any): void => {
248+
const updateSelected = (val: string[]): void => {
249+
debugger;
250+
console.error(val);
251251
if (val.length > 0 && val.includes('All')) {
252252
selected.value = ['All'];
253253
}
@@ -285,31 +285,31 @@ const verticalCompact = ref(true);
285285
const testLayout = ref([...testData]);
286286
287287
const onRowHeightChange = (): void => {
288-
if(rowHeight.value < 1) {
288+
if (rowHeight.value < 1) {
289289
rowHeight.value = 1;
290290
}
291291
};
292292
293293
const onColNumChange = (): void => {
294-
if(colNum.value < 1) {
294+
if (colNum.value < 1) {
295295
colNum.value = 1;
296296
}
297297
};
298298
299299
const onMaxRowsChange = (): void => {
300-
if(maxRows.value < 1) {
300+
if (maxRows.value < 1) {
301301
maxRows.value = 1;
302302
}
303303
};
304304
305305
const onMarginTopBottomChange = (): void => {
306-
if(marginTopBottom.value < 1) {
306+
if (marginTopBottom.value < 1) {
307307
marginTopBottom.value = 1;
308308
}
309309
};
310310
311311
const onMarginLeftRightChange = (): void => {
312-
if(marginLeftRight.value < 1) {
312+
if (marginLeftRight.value < 1) {
313313
marginLeftRight.value = 1;
314314
}
315315
};
@@ -372,7 +372,7 @@ const publishToEventLog = (i: number | string, msg: string, newX: number, newY:
372372
eventsDiv.value.scrollTop = eventsDiv.value.scrollHeight;
373373
}
374374
const publishStringToEventLog = (message: string, insertNewLine: boolean = false): void => {
375-
if(insertNewLine) {
375+
if (insertNewLine) {
376376
eventsLog.value.push('');
377377
}
378378
@@ -474,7 +474,6 @@ const onLayoutUpdate = (value: TLayout[]): void => {
474474
};
475475
476476
477-
478477
const removeGridItem = (id: string | number): void => {
479478
testLayout.value = testLayout.value.filter((item) => {
480479
return item.i !== id;

0 commit comments

Comments
 (0)