mirror of
https://gitee.com/ant-design-vue/ant-design-vue.git
synced 2024-12-02 12:07:54 +08:00
38 lines
603 B
Markdown
38 lines
603 B
Markdown
<cn>
|
|
#### 不可用
|
|
点击按钮切换可用状态。
|
|
</cn>
|
|
|
|
<us>
|
|
#### Disabled
|
|
Click the button to toggle between available and disabled states.
|
|
</us>
|
|
|
|
```html
|
|
<template>
|
|
<div>
|
|
<a-input-number :min="1" :max="10" :disabled="disabled" :defaultValue="3" />
|
|
<div style="marginTop:20px">
|
|
<a-button @click="toggle" type="primary">Toggle disabled</a-button>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script>
|
|
export default {
|
|
data () {
|
|
return {
|
|
disabled: true,
|
|
}
|
|
},
|
|
methods: {
|
|
toggle() {
|
|
this.disabled = !this.disabled
|
|
}
|
|
},
|
|
}
|
|
</script>
|
|
```
|
|
|
|
|
|
|