vue-year-picker

1.1.1 • Public • Published

vue-year-picker

仿ant风格年份选择器

image

使用方法

1. 安装

npm install --save vue-year-picker
import Vue from 'vue';
import yearPicker from 'vue-year-picker'

Vue.use(yearPicker);

2. 组件中使用

<year-picker
             dark 
             v-model="year" 
             :year-disable="'no'"
             @input="handlerInput" 
             />
export default {
  name: 'demo',
  data() {
    return {
      year: ''
    }
  },
  methods: {
    handlerInput(v) {
      console.log('选中的年份',v)
    }
  }
}

3.Attributes

参数 类型 描述
dark Boolean 默认false,设置为true时开启深色模式
year-disable String 'after'=禁用今年以后,'before'=禁用今年以前

4.Events

事件名 说明 参数
input 当用户选中年份时触发 value

Readme

Keywords

Package Sidebar

Install

npm i vue-year-picker

Weekly Downloads

8

Version

1.1.1

License

MIT

Unpacked Size

91.1 kB

Total Files

14

Last publish

Collaborators

  • wjune211