gctGenerator/docs/.vuepress/components/FormatSelect.vue

34 lines
586 B
Vue
Raw Normal View History

2020-06-28 06:33:20 +09:00
<template>
2020-06-28 10:45:44 +09:00
<SelectComponent
placeholder="Choose Format"
:options="options"
:selectedValue="selectedValue"
:onChange="onChange"
/>
2020-06-28 06:33:20 +09:00
</template>
<script>
2020-06-28 10:45:44 +09:00
// Components
2020-06-28 06:33:20 +09:00
import SelectComponent from "./SelectComponent";
2020-06-28 10:45:44 +09:00
// Data
2020-06-28 06:33:20 +09:00
import downloadFormats from "../data/downloadFormats.json";
export default {
props: {
selectedValue: { type: String },
onChange: { type: Function },
},
data() {
return {
options: downloadFormats.map((v) => ({
value: v.target,
label: v.name,
})),
};
},
};
</script>
<style scoped></style>