vue-birthday-input

0.8.6 • Public • Published

vue-birthday-input

vue 生日输入组件

npm install vue-birthday-input --save

npm npm npm Build Status Codecov npm

加入模块

import Vue from 'vue'
import birthdayInput from 'vue-birthday-input'
 
export default {
  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

Package Sidebar

Install

npm i vue-birthday-input

Weekly Downloads

2

Version

0.8.6

License

MIT

Last publish

Collaborators

  • xank