mirror of
https://github.com/javaLuo/vue-flip-down.git
synced 2025-04-05 19:41:54 +08:00
33 lines
541 B
Vue
33 lines
541 B
Vue
<template>
|
|
<div>
|
|
<CountDown :endDate="endDate"
|
|
:type="type"
|
|
@timeUp="onTimeUp" />
|
|
|
|
<hr />
|
|
<input v-model="type">
|
|
<input v-model="endDate">
|
|
</div>
|
|
</template>
|
|
<script>
|
|
import CountDown from '../../dist/main.js';
|
|
export default {
|
|
data() {
|
|
return {
|
|
type: 4,
|
|
endDate: new Date().getTime(),
|
|
};
|
|
},
|
|
components: {
|
|
CountDown,
|
|
},
|
|
methods: {
|
|
onTypeChange(t) {
|
|
this.type = t;
|
|
},
|
|
onTimeUp() {
|
|
console.log('时间到了');
|
|
},
|
|
},
|
|
};
|
|
</script> |