GithubHelp home page GithubHelp logo

aimuc / vue-flip-clock Goto Github PK

View Code? Open in Web Editor NEW

This project forked from zj-197/vue-flip-clock

0.0 0.0 0.0 223 KB

时钟翻牌倒计时,参考兔子先生

License: MIT License

JavaScript 31.88% HTML 7.33% Vue 60.79%

vue-flip-clock's Introduction

zj-vue-flip-clock

时钟翻牌倒计时,参考兔子先生

[ 更新日志 ]

一、安装使用

1. 安装

# npm 安装
npm install zj-vue-flip-clock -S

服务器渲染 nuxt 解决方案 设置为 ssr: false

module.exports = {
  ...
  build: {
    vendor: [
      'zj-vue-flip-clock
    ...
    plugins: [
      { src: '~/plugins/zj-vue-flip-clock', ssr: false }
    ]
  }
}

Vue2 组件内引入

import { FlipClock }  from 'zj-vue-flip-clock' 
import 'zj-vue-flip-clock/dist/index.css'
components: {
    FlipClock
}

Vue2 全局引入

import FlipClock from 'zj-vue-flip-clock'
import 'zj-vue-flip-clock/dist/index.css'
Vue.use(FlipClock)

nuxt 引入方式

import 'zj-vue-flip-clock/dist/index.css'
if(process.browser) {
    flipClock = require('zj-vue-flip-clock')
  Vue.use(flipClock.default)
}

3. 代码中使用

<zj-vue-flip-clock
  ref="cropper"
  mode="time"
></zj-vue-flip-clock>

二、文档

1. props

名称 功能 默认值 可选值
mode 模式 time time {h}{i}{s}, {i}{s}, {s}
initValue 默认的倒计时时间 -- 90i, 1h , 30s, 任意分钟,任意小时,任意秒
flipperClass 翻牌器的自定义class可用于修改背景,字体颜色等 --
flipperContainerClass 翻牌器容器的自定义class可用于修改字体颜色等 --

2. 效果图

img.png

vue-flip-clock's People

Contributors

zj-197 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.