3. Vue countdown

앵이·2022년 9월 3일
  1. app.vue
<template>
  <div id="app">
    <img width="25%" src="./assets/logo.png">
    <Countdown :date="end" @onFinish="finish()"></Countdown>
    <HelloWorld/>
  </div>
</template>

<script>
import Countdown from './components/Countdown';
import HelloWorld from "./components/HelloWorld";

export default {
  name: "App",
  components: {
    HelloWorld,
    Countdown
  },
  data () {
    return {
      end: new Date('2019-05-02T16:37:00')
    };
  },
  methods: {
    finish() {
      console.log('finish');
    }
  }
};
</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>
  1. main
import Vue from "vue";
import App from "./App";

Vue.config.productionTip = false;

/* eslint-disable no-new */
new Vue({
  el: "#app",
  components: { App },
  template: "<App/>"
});
profile
애기 개발자의 성장 벨로그

0개의 댓글