
Research
Security News
The Growing Risk of Malicious Browser Extensions
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
sa-vue2-calendar
Advanced tools
 ``` npm install sa-vue2-calendar ``` ``` //main.js ... import savue2calendar from 'sa-vue2-calendar'; import 'sa-vue2-calendar/sa-vue2-calendar.css'; Vue.use(savue2calendar); ... ``` ## sa-calendar
npm install sa-vue2-calendar
//main.js
...
import savue2calendar from 'sa-vue2-calendar';
import 'sa-vue2-calendar/sa-vue2-calendar.css';
Vue.use(savue2calendar);
...
<template>
<sa-calendar
@handleClickDate="handleClick01"
ref="asC"
:data="testData"
:date="date">
</sa-calendar>
</template>
<script>
export default{
data(){
return {
testData:[
{date:'2022-10-11-30',text:'下面点击事件会返回了'},
{ //封装时使用的此数据
"id": 166455,
"staffName": "name",
"staffNumber": null,
"userId": "021406075729539388",
"content": "正常",
"attendanceDate": "2022-08-01",
"staffId": null,
"department": "不动产",
"type": null,
"departmentId": null,
"attendanceGroup": "考勤",
"position": null,
"isLate": false,
"isEarly": false,
"isAbsence": false,
"isVacation": false,
"valid": true,
"isHoliday": false
}
],
date:new Date()
}
},
methods:{
handleClick01(item){
console.log(item.detail) //每一条的内容
}
}
}
</script>
<tmeplate>
<sa-calendar
@handleClickDate="handleClick01"
ref="asC"
:data="testData"
:date="date">
<!--日历头的自定义展示-->
<template #header="{date}">
<div class="mdate">
{{date}}
</div>
</template>
<!--每天的自定义展示-->
<template #dayItem="{item}">
<div>
状态1当月的日期,0上月或上月的可以做高亮底亮
{{item.status}}
</div>
{{item.day}}
<div v-if="((item.day % 5) == 0)">
展示的详细内容想展示什么 属性 data 随意
{{item.detail && item.detail.content}}
</div>
</template>
</sa-calendar>
</tmeplate>
<script>
export default{
data(){
return {
testData:[
{date:'2022-10-11-30',text:'下面点击事件会返回了'},
{ //封装时使用的此数据
"id": 166455,
"staffName": "name",
"staffNumber": null,
"userId": "021406075729539388",
"content": "正常",
"attendanceDate": "2022-08-01",
"staffId": null,
"department": "不动产",
"type": null,
"departmentId": null,
"attendanceGroup": "考勤",
"position": null,
"isLate": false,
"isEarly": false,
"isAbsence": false,
"isVacation": false,
"valid": true,
"isHoliday": false
}
],
date:new Date()
}
},
methods:{
handleClick01(item){
console.log(item.detail) //每一条的内容
}
}
}
</script>
<template>
<sa-week-calendar @handleClickWeek="handleClick02" :date="date" >
</sa-week-calendar>
</template>
<script>
export default{
data(){
return {
date:new Date()
}
},
methods:{
handleClick02(item){
console.log(item)
}
}
}
</script>
<template>
<sa-week-calendar @handleClickWeek="handleClick02" :date="date" >
<template #weekItem="{item}">
<div>
<div>
星期{{item.date}}
</div>
<div>
{{item.day}}日
</div>
</div>
</template>
</sa-week-calendar>
</template>
export default{
data(){
return {
date:new Date()
}
},
methods:{
handleClick02(item){
console.log(item)
}
}
}
</script>
FAQs
 ``` npm install sa-vue2-calendar ``` ``` //main.js ... import savue2calendar from 'sa-vue2-calendar'; import 'sa-vue2-calendar/sa-vue2-calendar.css'; Vue.use(savue2calendar); ... ``` ## sa-calendar
The npm package sa-vue2-calendar receives a total of 12 weekly downloads. As such, sa-vue2-calendar popularity was classified as not popular.
We found that sa-vue2-calendar demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
Socket researchers uncover how browser extensions in trusted stores are used to hijack sessions, redirect traffic, and manipulate user behavior.
Research
Security News
An in-depth analysis of credential stealers, crypto drainers, cryptojackers, and clipboard hijackers abusing open source package registries to compromise Web3 development environments.
Security News
pnpm 10.12.1 introduces a global virtual store for faster installs and new options for managing dependencies with version catalogs.