you can refer to
title:
title
name:
the field name of the topic
type:
topic type, drop-down selection, scope selection or direct text filling. When circular rendering, select different components
data:
topic data according to this judgment. For example, range selection requires a start and end, and drop-down selection requires data to choose
value:
topic value. The value selected or filled by the user may be a string or an array of ranges.
topic data list
[
{
title: ''
name: 'area',
type: 'area',
data: [0,300],
value: []
},
{
title: '',
name: 'city',
type: 'select',
data: [
{
label: '',
value: '110000'
}
]
value: ''
},
{
title: '',
name: 'position'
type: 'input',
value: ''
}
]
render data
<ul>
<li v-for="(item, index) in list">
<div>{{index}}.{{ item.title}}</div>
<!-- -->
<template v-if="item.type === 'input'">
<input v-model="item.value" />
</template>
</li>
</ul>
get the selected data
let ajaxSendData = {}//ajax
//
//{
// area: [0, 100],
// city: '110000',
// position: ''
//}
for(let i = 0; i < list.length; iPP) {
ajaxSendData[list[i].name] = list[i].value
}