Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <v-text-field
- v-model="field.model"
- :label=field.placeholderText
- outline
- clearable
- />
- export default {
- data() {
- return {
- defaultConfig: null,
- items: [
- {
- header: 'Параметры генетического алгоритма',
- fields: [
- {
- placeholderText: 'Семя генератора случ. чисел',
- type: 'text',
- model: '155557555'
- },
- {
- placeholderText: 'Вероятность мутации',
- type: 'text',
- model: '2'
- },
- ]
- },
- {
- header: 'Настройки нишинга',
- fields: [
- {
- placeholderText: 'Коэф-нт дополнительных генов (c1)',
- type: 'text',
- model: '2'
- },
- {
- placeholderText: 'Коэф-нт непересекающихся генов (c2)',
- type: 'text',
- model: '2'
- },
- ]
- },
- ],
- }
- },
- methods:{
- getDefaultConfig(){
- this.$resource("/trainer/default-config").get().then(res => {
- if(res.ok){
- res.json().then(data => {
- this.defaultConfig = data
- })
- }
- })
- },
- },
- created() {
- this.getDefaultConfig();
- }
- }
- items: [
- {
- header: 'Параметры генетического алгоритма',
- fields: [
- {
- placeholderText: 'Семя генератора случ. чисел',
- type: 'text',
- model: defaultConfig.GENERATOR_SEED
- },
- {
- placeholderText: 'Вероятность мутации',
- type: 'text',
- model: defaultConfig.MUTATION_PROBABILITY
- },
- ]
- },
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement