1.3.0 • Published 2 years ago

date-of-birth v1.3.0

Weekly downloads
-
License
MIT
Repository
github
Last release
2 years ago

date-of-birth

出生日期选择器

安装依赖前准备

1:需安装Vue;
2:需安装Element-UI;

安装依赖

# install dependencies
npm install date-of-birth --save
# or with yarn
yarn add date-of-birth

使用步骤

# 在main.js中引入并注册
import DateOfBirth from 'date-of-birth';
Vue.use(DateOfBirth);
# 在页面中使用
<date-of-birth ref="clear" width="100%" @change="getValue" :title="title"></date-of-birth>

data () {
  return {
    title: {
      year: 'Year',
      month: 'Month',
      day: 'Day',
    }
  }
}
methods: {
  getValue (value) {
    console.log(value); // 'YYYY-MM-DD'
  }
  // 清空选中的值
  clearValue () {
    this.$refs.clear.reset()
  }
}

参数说明

# width (required: false, type: String)
该组件的宽度
# title (required: true, type: Object)
该组件中的title,分别对应年月日,可自定义
# @change
该组件返回的值
1.3.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.3

2 years ago

1.2.2

2 years ago

1.2.1

2 years ago

1.2.0

2 years ago

1.1.9

2 years ago

1.1.8

2 years ago

1.1.7

2 years ago

1.1.6

2 years ago

1.1.5

2 years ago

1.1.4

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago

1.0.2

2 years ago

1.0.1

2 years ago

1.0.0

2 years ago