1.0.96 • Published 7 years ago
signcalendar v1.0.96
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 pubFor a detailed explanation on how things work, check out the guide and docs for vue-loader.
1.0.96
7 years ago
1.0.95
7 years ago
1.0.94
7 years ago
1.0.93
7 years ago
1.0.9-2.1
7 years ago
1.0.91
7 years ago
1.0.9
7 years ago
1.0.89
7 years ago
1.0.88
7 years ago
1.0.87
7 years ago
1.0.86
7 years ago
1.0.85
7 years ago
1.0.84
7 years ago
1.0.83
7 years ago
1.0.82
7 years ago
1.0.81
7 years ago
1.0.8
7 years ago
1.0.7
7 years ago
1.0.6
7 years ago
1.0.5
7 years ago
1.0.2
7 years ago
1.0.1
7 years ago
1.0.0
7 years ago