1.0.9 • Published 1 year ago
qlleaveduration v1.0.9
Standard Readme
Table of Contents
- Install
- Usage
- Other
Install
This project uses node and npm. Go check them out if you don't have them locally installed.
npm install qlleaveduration
Usage
// 导入 leaveDurationMtoS 计算请假时间的函数
// 该函数计算时间是周一到周六的请假时间,周一到周五的上班时间为早上八点半到中午十二点,下午两点到晚上的十八点半,周六的上班时间为早上八点半到中午十二点。并且排除了节假日,算上了调休时间。
import { leaveDurationMtoS } from "qlleaveduration";
// 使用
this.leaveDuration = leaveDurationMtoS(this.leaveStartTime, this.leaveEndTime);
// 该函数计算时间是周一到周五的请假时间,早上八点半到中午十二点,下午两点到晚上的十八点半,并且排除了节假日,算上了调休时间
import { leaveDurationMtoF } from "qlleaveduration";
this.leaveDuration = leaveDurationMtoF(this.leaveStartTime, this.leaveEndTime);
Other
特别说明:需要配合 ElementUI
的 el-date-picker
组件使用,或者传入两个时间格式为 el-date-picker
的两个参数即可。