gctGenerator/docs/.vuepress/components/FormatSelect.vue
Matteias Collet b7bea697be init vuepress
2020-06-29 23:31:44 +02:00

29 lines
552 B
Vue

<template>
<SelectComponent :options="options" :onChange="onChange" />
</template>
<script>
import SelectComponent from "./SelectComponent";
import downloadFormats from "../data/downloadFormats.json";
export default {
props: {
selectedValue: { type: String },
onChange: { type: Function },
},
mounted() {
this.onChange(downloadFormats[0].target);
},
data() {
return {
options: downloadFormats.map((v) => ({
value: v.target,
label: v.name,
})),
};
},
};
</script>
<style scoped></style>