add: iteration 1 finished
Finished simple calculator iteration
This commit is contained in:
parent
e4ff2ba229
commit
85e6035a9a
12 changed files with 293 additions and 34 deletions
25
app/components/Pp/ButtonGroup.vue
Normal file
25
app/components/Pp/ButtonGroup.vue
Normal file
|
@ -0,0 +1,25 @@
|
|||
<template>
|
||||
<div class="ButtonGroup">
|
||||
<button
|
||||
v-for="(button, index) in buttons"
|
||||
@click="click(index)"
|
||||
:class="{ 'active': button.active}"
|
||||
>
|
||||
<Icon :name="button.icon" mode="svg" />
|
||||
<span>{{ button.label }}</span>
|
||||
</button>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import type { Button } from '../../../shared/ButtonGroup'
|
||||
|
||||
type Props = {
|
||||
buttons: Button[]
|
||||
}
|
||||
|
||||
defineProps<Props>()
|
||||
const emit = defineEmits(['click'])
|
||||
|
||||
const click = (index : number) => emit('click', index)
|
||||
</script>
|
Loading…
Add table
Add a link
Reference in a new issue