Skip to content

Commit 240a1ef

Browse files
committed
feat: emit button events
1 parent 5982182 commit 240a1ef

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

Diff for: src/components/VueCommand.vue

+12-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,15 @@
66
<div
77
v-if="!hideBar"
88
class="vue-command__bar">
9-
<!-- TODO Emit unique event per button -->
10-
<span class="vue-command__bar__button vue-command__bar__button--close"></span>
11-
<span class="vue-command__bar__button vue-command__bar__button--minimize"></span>
12-
<span class="vue-command__bar__button vue-command__bar__button--fullscreen"></span>
9+
<span
10+
class="vue-command__bar__button vue-command__bar__button--close"
11+
@click="emits('click-close')"></span>
12+
<span
13+
class="vue-command__bar__button vue-command__bar__button--minimize"
14+
@click="emits('click-minimize')"></span>
15+
<span
16+
class="vue-command__bar__button vue-command__bar__button--fullscreen"
17+
@click="emits('click-fullscreen')"></span>
1318
</div>
1419
</slot>
1520

@@ -175,6 +180,9 @@ const props = defineProps({
175180
176181
// Update user given properties
177182
const emits = defineEmits([
183+
'click-close',
184+
'click-minimize',
185+
'click-fullscreen',
178186
'update:cursorPosition',
179187
'update:dispatchedQueries',
180188
'update:history',

0 commit comments

Comments
 (0)