1.1.2 • Published 2 years ago
countdown-f v1.1.2
countdown
Project setup
npm install countdown-f //下载包文件
Reference and register
import Countdown from "countdown-f";
import "../node_modules/countdown-f/count-down.css";
Vue.use(Countdown);
use components
<template>
<div id="app">
<CountDown :time="8439" v-slot="timeObj">
<div class="count-down">
<div class="icon"></div>
{{ timeObj.d }}天{{ timeObj.hh }}小时{{ timeObj.mm }}分钟{{
timeObj.ss
}}秒
</div>
</CountDown>
</div>
</template>
<script>
export default {
name: "App",
};
</script>
<style>
#app {
font-family: Avenir, Helvetica, Arial, sans-serif;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
text-align: center;
color: #2c3e50;
margin-top: 60px;
}
</style>