[Vuejs]-Binding a Vue/Antd radio button group fails to apply styles

0👍

It isn’t perfect, but this got me most of the way there:

    <template>
      <div>
          <a-radio-group name="SourceSystem" default-value="XXX" @change="onChange" v-
    
        model="selectedSystem" button-style="solid">
                <a-radio-button
                   v-for="(item, index) in data"
                   :key="index"
                   :value="item.value"
                   v-on="{ defaultChecked: item.value==='XXX' ? true : false}"
                   :disabled="item.disabled">
                   {{ item.label }}
                </a-radio-button>
              </a-radio-group>
          </div>
        </template>

It’s a bit of a copout, since I’ve basically resorted to drawing the list almost by hand.

The default-value selection still doesn’t work perfectly (it doesn’t select a default at page-load time), but at least it renders the list the way I wanted it to.

Leave a comment