ant-design-vue/components/radio/demo/disabled.md

39 lines
651 B
Markdown
Raw Normal View History

2018-04-11 05:32:18 +00:00
<cn>
#### 不可用
Radio 不可用。
</cn>
<us>
#### disabled
Radio unavailable.
</us>
2019-10-09 10:32:23 +00:00
```tpl
2017-11-07 03:58:47 +00:00
<template>
<div>
2018-04-11 05:32:18 +00:00
<a-radio :defaultChecked="false" :disabled="disabled">Disabled</a-radio>
2017-11-07 03:58:47 +00:00
<br />
2018-04-11 05:32:18 +00:00
<a-radio defaultChecked :disabled="disabled">Disabled</a-radio>
2017-11-07 03:58:47 +00:00
<div :style="{ marginTop: 20 }">
2018-01-23 10:55:39 +00:00
<a-button type="primary" @click="toggleDisabled">
2017-11-07 03:58:47 +00:00
Toggle disabled
2018-01-23 10:55:39 +00:00
</a-button>
2017-11-07 03:58:47 +00:00
</div>
</div>
</template>
<script>
2019-09-28 12:45:07 +00:00
export default {
data() {
return {
disabled: true,
};
2017-11-07 03:58:47 +00:00
},
2019-09-28 12:45:07 +00:00
methods: {
toggleDisabled() {
this.disabled = !this.disabled;
},
},
};
2017-11-07 03:58:47 +00:00
</script>
2018-04-11 05:32:18 +00:00
```