Skip to content

Instantly share code, notes, and snippets.

@196Ikuchil
Created February 28, 2022 13:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save 196Ikuchil/8e6f65665d3eede3b6791fe2076e3f23 to your computer and use it in GitHub Desktop.
Save 196Ikuchil/8e6f65665d3eede3b6791fe2076e3f23 to your computer and use it in GitHub Desktop.
for uve2.0
<template>
<v-container fluid>
<v-radio-group v-model="viewTypeComputed" row>
<v-radio
v-for="(_, i) in radioLabels.length"
:key="i"
:label="radioLabels[i]"
:value="i"
></v-radio>
</v-radio-group>
</v-container>
</template>
<script lang="ts">
import { defineComponent, computed } from "@nuxtjs/composition-api";
export default defineComponent({
props: {
radioLabels: {
type: Array,
default: () => [],
},
selectedViewType: {
type: Number,
default: 0,
},
},
emits: ["input"],
setup(props, { emit }) {
const viewTypeComputed = computed({
get: () => props.selectedViewType,
set: (newValue) => emit("input", newValue),
});
return {
viewTypeComputed,
};
},
});
</script>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment