vue-birthday-input
vue 生日输入组件
npm install vue-birthday-input --save
加入模块
name: 'App' components: birthdayInput
快速开始
<template> <birthday-input v-model="birthday"></birthday-input></template> <script>import birthdayInput from 'vue-birthday-input' export default { name: 'App', components: { birthdayInput }, data: () => ({ birthday: '' }),}</script>
Props
参数 | 说明 | 必须 | 类型 | 可选值 | 默认值 |
---|---|---|---|---|---|
placeholder | 占位符 | 否 | String | — | 出生日期 |
formatView | 显示格式 | 否 | String | yyyy/mm/dd / yyyy-mm-dd / mm/dd/yyyy | yyyy年mm月dd日 |
format | 输出格式 | 否 | String | 符合moment.format即可 | YYYYMMDD |
License
Vue-birthday-input is open-sourced software licensed under the MIT license