1

我正在通过 JSON 在 Select Component 上添加静态值。这里有一些属性..

 components: {
     address: {
         title: 'Address',
         key: 'address',
         icon: 'fa fa-th-list',
         schema: {
             label: 'Address',
             type: 'select',
             placeholder: 'Select Address',
             key: 'address', 
             dataPath:'hello',
             data:{
                 url: https://cdn.rawgit.com/mshafrir/2646763/raw/states_titlecase.json',
             },
             limit: 100,
             dataSrc: 'url',
         }
     }
 }

就像我必须在这里定义键和值属性一样,是否有任何属性名称?

4

1 回答 1

0

yes add this at the same level than label/type/key etc:

"data": {
  "values": [
    {
      "label": "label",
      "value": "the value
    },
    ...
  ]
},
于 2020-11-25T17:51:20.737 回答