1.0.4 • Published 4 years ago

calendar-creek v1.0.4

Weekly downloads
-
License
ISC
Repository
-
Last release
4 years ago

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

  • 如果有什么兼容问题或者报错问题,可以直接通过邮件方式联系我:asd503262217@sina.com

Version Update Notice

  • Version: 1.0.4 -- 2019-12-17 10:40:57
    • 修复输入时无法改变父组件的v-model的绑定值问题
1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago