calendar-creek
v1.0.4
Published
* 基于 Vue 开发的轻量级、多作用的日历组件 * 占用内存小,性能高,作用强,可扩展 * 全部由Vue实现,没有引入第三方库 * 不仅可以获取日期,还可以根据需求来获取时间 * 可以获取年 - 月 - 日 时 : 分 : 秒 ,可以单独获取其中几个,也可以获取全部,使用起来十分方便
Downloads
11
Readme
calendar-creek
- 基于 Vue 开发的轻量级、多作用的日历组件
- 占用内存小,性能高,作用强,可扩展
- 全部由Vue实现,没有引入第三方库
- 不仅可以获取日期,还可以根据需求来获取时间
- 可以获取年 - 月 - 日 时 : 分 : 秒 ,可以单独获取其中几个,也可以获取全部,使用起来十分方便
Install
npm i calendar-creek --save
cnpm i calendar-creek --save //国内镜像
#Use
//全局导入模块,并进行使用
import Calendar from 'calendar-creek'
Vue.use(Calendar);
//template 模板引用组件
<template>
<div>
<calendar text='提交时间' v-model="time" type="" ></calendar>
</div>
</template>
<script>
export default {
data (){
return {
time:'2019-12-16 15:12:39'
}
}
}
</script>
API
| 属性 | 说明 | 默认 | 是否必传 | | :------------- | :-------------------------------------------------------------------------------------------| :----------: | :------: | | type | 时间类型: time(时分秒<00:00:00>)、date(日期<2019-12-12>)、month(月份<2019-12>)、 | 无 | 否 | | | year(年份<2019>)、hour(小时<12>)、minute(分钟<12:12>)、default(默认<2019-12-12 12:12:12>) | | | | text | 设置输入框标题 | 无 | 否 | | disabled | 设置是否禁用 | false | 否 | | readonly | 设置是否只读 | false | 否 | | value | 父组件v-model传过来的值,两种形式:字符串(单日期)与 数组(区间日期) | 无 | 是 | | minYear | 年份最小可用值 | 1900 | 否 | | maxYear | 年份最大可用值 | 2100 | 否 | | section | 是否为区间时间,区间代码:region | 无 | 否 | | format | 时间格式:默认格式"yyyy-MM-dd HH:mm:ss" | 无 | 否 |
Other
- 如果有什么兼容问题或者报错问题,可以直接通过邮件方式联系我:[email protected]
Version Update Notice
- Version: 1.0.4 -- 2019-12-17 10:40:57
- 修复输入时无法改变父组件的v-model的绑定值问题