<template>
  <div class="demo-radio-disabled">
    <div>
      <ui-radio
        v-model="value"
        :disabled="disabled"
        name="disabled-test"
        value="1">
        Radio
      </ui-radio>
    </div>
    <div>
      <ui-radio
        v-model="value"
        :disabled="disabled"
        name="disabled-test"
        value="2">
        Radio
      </ui-radio>
    </div>
    <div>
      <div>
        当前选中的值: {{ value }}
      </div>
      <ui-button
        type="primary"
        @click="disabled = !disabled">
        {{ disabled ? "不禁用" : "禁用" }}
      </ui-button>
    </div>
  </div>
</template>
<script>
import { Radio, Button } from "amumu-ui"
export default {
  components: {
    "ui-radio": Radio,
    "ui-button": Button,
  },
  data() {
    return {
      disabled: true,
      value: "",
    }
  },
}
</script>
<style lang="scss">
.demo-radio-disabled {
  & > div {
    margin: 10px 0;
  }
}
</style>
