Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F83470068
ElemTypeToggle.vue
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Tue, Sep 17, 07:46
Size
751 B
Mime Type
text/html
Expires
Thu, Sep 19, 07:46 (2 d)
Engine
blob
Format
Raw Data
Handle
20823163
Attached To
R12546 Sesame - Configurator
ElemTypeToggle.vue
View Options
<script setup>
import { ref, watch } from 'vue';
import { useRouter } from 'vue-router';
defineProps({
types: Array
});
const emit = defineEmits(['onTypeChange']);
const router = useRouter();
const type = ref(router.currentRoute.value.params.type);
emit('onTypeChange', type.value);
watch(type, (n, o) => emit('onTypeChange', n));
</script>
<template>
<v-container>
<v-row class="ma-4" justify="center">
<v-btn-toggle
v-model="type"
color="primary"
mandatory
variant="outlined"
divided
>
<v-btn
v-for="({ value, name }, i) in types"
:key="i"
:value="value"
>{{ name }}</v-btn>
</v-btn-toggle>
</v-row>
</v-container>
</template>
Event Timeline
Log In to Comment