gctGenerator/site/.vuepress/components/FormatSelect.vue

25 lines
471 B
Vue
Raw Normal View History

2020-06-27 23:33:20 +02:00
<template>
2020-07-10 00:57:16 +02:00
<SelectComponent :options="options" :selectedValue="selectedValue" :onChange="onChange" />
2020-06-27 23:33:20 +02:00
</template>
<script>
2020-06-28 17:35:18 +02:00
import downloadFormats from '../data/downloadFormats.json';
2020-06-27 23:33:20 +02:00
export default {
props: {
selectedValue: { type: String },
onChange: { type: Function },
},
data() {
return {
2020-07-01 07:26:48 +02:00
options: downloadFormats.map((v) => ({
2020-06-27 23:33:20 +02:00
value: v.target,
2020-07-10 00:57:16 +02:00
label: v.i18nKey,
2020-06-27 23:33:20 +02:00
})),
};
},
};
</script>
<style scoped></style>