npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@mvpleung/flipclock

v0.0.6

Published

flipclock for vue, 删除 jquery 依赖

Downloads

317

Readme

FlipClock

flipclock for Vue,Rejecting jQuery dependency

Installation

FlipClock.js can be installed in the following ways:

Node (NPM)

npm install @mvpleung/flipclock -S

Script (Vue)

<script src="path/dist/index.js"></script>

Script (window)

<script src="path/src/flipclock.min.js"></script>

Demo & Documentation

Example

Vue Script Example

Website and documentation at http://flipclockjs.com/


Vue Demo

import { FlipClock } from '@mvpleung/flipclock';
export default {
  ...
  components: {
    FlipClock
  }
}

...

<flip-clock :options="{}" />

Documentation

| Field | Type | Description | | ----------- | -------- | --------------------------------------------------------------------------------- | | digit | Number | deprecated, An integer used to start the clock(Use Options.digit instead) | | options | Object | flipclock configuration, Support dynamic modification options to change flipclock |


Options

Website and documentation at http://flipclockjs.com/

| Field | Type | Description | | ----------- | --------- | ------------------------------------------------------------------------- | | time | Number | Source of time | | digit | Number | An integer used to start the clock(For Example: countdown-to-new-years) | | label | Boolean | Whether or not a time label is displayed | | dot | Boolean | Whether the time division dots are displayed | | divider | Object | Time partition configuration, See below Divider Options | | clockFace | String | This is the name of the clock that is used to build the clock display. The default value is HourlyCounter | | showSeconds | Boolean | Display seconds. The default value is true | | ... | ... | More configuration to see here http://flipclockjs.com |


Divider Options

| Field | Type | Description | Example | | ----------- | -------- | ---------------------------------------------------------- | ----------------------------------------------- | | days | String | Segmentation between day and hour nodes, support HTML | ,<span class='custom-days'>天</span> | | hours | String | Segmentation between hourly and minute nodes, support HTML | 小时,<span class='custom-hours'>小时</span> | | minutes | String | Segmentation between minute and second nodes, support HTML | 分钟,<span class='custom-minutes'>分</span> | | seconds | String | Second unit | ,<span class='custom-seconds'>秒</span> |


Instance Methods

this.$refs.flipclcok.start();

| Method | Params | Description | | ----------------- | -------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | | trigger | event,params | Trigger FlipClock Method | | start | callback | Start the clock | | stop | callback | Stop the clock | | reset | options,callback | Reset the clock, If the options is present, the clock will be reset by the options | | loadClockFace | name, options | This method allows you to load a clock face. The first argument is the name of the clock face, and the second is an object of options used to override the default properties. | | loadLanguage | name | This method allows you to load a language file. The argument is the name of the language file. | | setCountdown | countdown | This method set the clockdown property to true or false. In addition to setting the property, this method will also change the direction the clock is flipping. | | getTime | | This method will get the current FlipFactory.Time object. | | setTime | time | This method will set the time on the clock by passing a value which will be passed to the FlipFactory.Time object. | | instance | | This method will get the current FlipClock object. |


License


LICENSE