1.0.1 • Published 6 years ago

vue-time-editor v1.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
6 years ago

vue-time-editor

this is vue components

Build Setup

# install dependencies
npm install

# serve with hot reload at localhost:8080
npm run dev

# build for production with minification
npm run build

For detailed explanation on how things work, consult the docs for vue-loader.

vue-time-editor

仿照新浪微博写的一个时间选择器

Alt text

Alt text

##Getting Started

npm install vue-time-editor --save-dev

Quick Start

import TimeEditor from 'vue-time-editor';
Vue.use(TimeEditor);

<TimeEditor v-model="timeEditor" @change="change"></TimeEditor>
export default {
    name: 'app',
    components: {},
    data() {
        return {
            timeEditor: []
        }
    },
    methods: {
        change(value) {
            console.log(value);
        }
    }
}
参数类型默认值描述
hourNumber24时间刻度默认值24小时,可以设置其他值
intervalNumber60每一个单位格代表多少分钟,默认60,可以设置其他值,值越小控件占据的控件越宽
事件描述
change返回选中的时间Array,格式[0,0,0,0,0,0,0],7个数组对应星期一到星期日,数组中0-23对应小时