2020-06-28 06:33:20 +09:00
|
|
|
<template>
|
|
|
|
<SelectComponent
|
2020-07-10 07:57:16 +09:00
|
|
|
:placeholder="getLabel('generatorconfig.gameversion.placeholder')"
|
2020-06-28 10:45:44 +09:00
|
|
|
:selectedValue="selectedValue"
|
2020-06-28 06:33:20 +09:00
|
|
|
:options="options"
|
|
|
|
:onChange="onChange"
|
|
|
|
/>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
2020-07-10 07:57:16 +09:00
|
|
|
// Data
|
2020-06-29 00:35:18 +09:00
|
|
|
import gameVersions from '../data/gameVersions.json';
|
2020-06-28 06:33:20 +09:00
|
|
|
|
2020-07-10 07:57:16 +09:00
|
|
|
// Util
|
|
|
|
import { translate } from '../i18n/localeHelper';
|
|
|
|
|
2020-06-28 06:33:20 +09:00
|
|
|
export default {
|
|
|
|
props: {
|
|
|
|
selectedValue: { type: String },
|
|
|
|
onChange: { type: Function },
|
|
|
|
},
|
|
|
|
data() {
|
|
|
|
return {
|
2020-07-01 14:26:48 +09:00
|
|
|
options: gameVersions.map((v) => ({
|
2020-06-28 06:33:20 +09:00
|
|
|
value: v.identifier,
|
2020-07-10 07:57:16 +09:00
|
|
|
label: `common.${v.identifier}`,
|
2020-06-28 06:33:20 +09:00
|
|
|
})),
|
|
|
|
};
|
|
|
|
},
|
2020-07-10 07:57:16 +09:00
|
|
|
methods: {
|
|
|
|
getLabel(key) {
|
|
|
|
return translate(key, this.$lang);
|
|
|
|
},
|
2020-07-10 07:59:26 +09:00
|
|
|
},
|
2020-06-28 06:33:20 +09:00
|
|
|
};
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped></style>
|