Security News
Research
Data Theft Repackaged: A Case Study in Malicious Wrapper Packages on npm
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
vue-awesome-countdown
Advanced tools
Countdown plug-in with high performance and high accuracy for Vue2.5.0+.
Install via NPM...
$ npm install vue-awesome-countdown --save
...and import and use the plugin like so:
import vueAwesomeCountdown from 'vue-awesome-countdown'
Vue.use(vueAwesomeCountdown)
<countdown :end-time="new Date().getTime() + 60000">
<span
slot="process"
slot-scope="anyYouWantedScopName">{{ `Lefttime: ${anyYouWantedScopName.timeObj.ceil.m}:${anyYouWantedScopName.timeObj.ceil.s}` }}</span>
<span slot="finish">Done!</span>
</countdown>
<countdown :end-time="new Date().getTime() + 60000">
<span
slot="process"
slot-scope="{ timeObj }">{{ `Lefttime: ${timeObj.ceil.m}:${timeObj.ceil.s}` }}</span>
<span slot="finish">Done!</span>
</countdown>
<no-ssr>
<countdown :end-time="new Date().getTime() + 60000">
<span
slot="process"
slot-scope="{ timeObj }">{{ `Lefttime: ${timeObj.ceil.m}:${timeObj.ceil.s}` }}</span>
<span slot="finish">Done!</span>
</countdown>
</no-ssr>
http://linquan.me/vue-awesome-countdown
Prop | Required | Explain | Type | Default |
---|---|---|---|---|
endTime | when leftTime undefined | Time stamp of countdown end | [String, Number, Date] | null |
leftTime | when endTime undefined | Unit: millisecond | Number | 0 |
autoStart | false | Remaining milliseconds of countdown end | Boolean | true |
speed | false | Unit: millisecond | Number | 1000 |
tag | false | The wrap tag name | String | span |
The data can get it through slot-scop
or methods
.
Data | Explain | Default |
---|---|---|
state | The countdown run state, the states are beforeStart , stoped , process and finised | beforeStart |
attrs | The countdown component tag attributes | {} |
actualEndTime | Actual countdown end time | null |
timeObj | a | {} |
countdownTimer | The countdown timer function, Do not use as much as possible. | null |
startTime | The countdown start time. | null |
runTimes | Countdown run times (The onProcess methods run times) | 0 |
usedTime | The total time consuming from the countdown to the end. | 0 |
Slot process
and slot finish
will not display at the same time.
name | slot-scop | Position | Display condition |
---|---|---|---|
before | component _self | 1 | Defined, Controllable display |
process | component _self | 2 | On process |
finish | component _self | 2 | On finish |
default | component _self | 3 | Defined, Controllable display |
The methods can be accesse through slot-scop
or $refs
.
Method | Explain | Parameters |
---|---|---|
startCountdown | restart | |
stopCountdown | no | |
switchCountdown | no | |
finishCountdown | no | |
doCountdown | no |
Event | Explain | Parameters |
---|---|---|
onStart | Functions executed at the beginning of countdown | vm |
onProcess | Function executed when countdown is performed | vm |
onStop | Function executed when countdown stops | vm |
onFinish | Function executed when countdown finished | vm |
FAQs
Vue countdown plugin.
The npm package vue-awesome-countdown receives a total of 2,114 weekly downloads. As such, vue-awesome-countdown popularity was classified as popular.
We found that vue-awesome-countdown 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.
Security News
Research
The Socket Research Team breaks down a malicious wrapper package that uses obfuscation to harvest credentials and exfiltrate sensitive data.
Research
Security News
Attackers used a malicious npm package typosquatting a popular ESLint plugin to steal sensitive data, execute commands, and exploit developer systems.
Security News
The Ultralytics' PyPI Package was compromised four times in one weekend through GitHub Actions cache poisoning and failure to rotate previously compromised API tokens.