signcalendar
signCalendar
简单的打卡项目附属组件
A check-in component with a calendar
安装
npm i -S signcalendar
使用
import { Calendar, Player } from 'signcalendar'
Vue.use(Calendar)
Vue.use(Player)
在模板中
<sign-calendar v-on:tap-day="tapday" :qd="qd" :noqd="noqd"></sign-calendar>
<sign-player @load="load" @on-timeupdate="timeupdate" @on-prev="prev" @on-next="next" :url="url">
<template v-slot:prev>
<span @click="prev">上一个</span>
</template>
<template v-slot:next>
<span @click="next">下一个</span>
</template>
</sign-player>
load需绑定一个函式,传回一个值,为是否加载的状态
v-on:tap-day 传入一个函式,当点击日历中某一天的时候,会触发
qd为已经签到的时间戳
noqd是漏签的时间戳
data () {
return {
qd: [
"1558803661"
],
noqd: [
"1558544461",
"1558458061",
]
}
},
methods: {
signIn () {
this.qd.push(Date.parse(new Date()) / 1000)
console.log('点击签到', this.qd);
}
}
Build Setup
# install dependencies
npm install
# serve with hot reload at localhost:8080
npm run dev
# build for production with minification
npm run build
# 打包发布(npmjs)
npm run prod
# 打包并发布
npm run pub
For a detailed explanation on how things work, check out the guide and docs for vue-loader.
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.96 | ^2.5.2 | MIT | |
| 1.0.95 | ^2.5.2 | MIT | |
| 1.0.94 | ^2.5.2 | MIT | |
| 1.0.93 | ^2.5.2 | MIT | |
| 1.0.91 | ^2.5.2 | MIT | |
| 1.0.89 | ^2.5.2 | MIT | |
| 1.0.88 | ^2.5.2 | MIT | |
| 1.0.87 | ^2.5.2 | MIT | |
| 1.0.86 | ^2.5.2 | MIT | |
| 1.0.85 | ^2.5.2 | MIT | |
| 1.0.84 | ^2.5.2 | MIT | |
| 1.0.83 | ^2.5.2 | MIT | |
| 1.0.82 | ^2.5.2 | MIT | |
| 1.0.81 | ^2.5.2 | MIT | |
| 1.0.9 | ^2.5.2 | MIT | |
| 1.0.8 | ^2.5.2 | MIT | |
| 1.0.7 | ^2.5.2 | MIT | |
| 1.0.6 | ^2.5.2 | MIT | |
| 1.0.5 | ^2.5.2 | MIT | |
| 1.0.2 | ^2.5.2 | MIT | |
| 1.0.1 | ^2.5.2 | MIT | |
| 1.0.0 | ^2.5.2 | MIT |
Pre-releases (1)
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.9-2.1 | ^2.5.2 | MIT |