naive-ui/demo/documentation/components/date-picker/zhCN/disabled.demo.md
2020-10-05 03:50:59 +08:00

635 B

禁用

<n-date-picker
  v-model:value="date"
  type="date"
  :disabled="disabled"
/>
<n-date-picker
  v-model:value="datetime"
  type="datetime"
  :disabled="disabled"
/>
<n-date-picker
  v-model:value="daterange"
  :disabled="disabled"
  type="daterange"
/>
<n-date-picker
  v-model:value="datetimerange"
  :disabled="disabled"
  type="datetimerange"
/>
<n-switch v-model:value="disabled" />
export default {
  data () {
    return {
      datetime: null,
      date: null,
      datetimerange: null,
      daterange: null,
      disabled: true
    }
  }
}
.n-date-picker {
  margin: 0 12px 8px 0;
}