This commit is contained in:
梁灏 2018-05-17 18:27:34 +08:00
parent 492f652bab
commit 42f644a31c
4 changed files with 14 additions and 3 deletions

View file

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<Time /> <Time :time="1526552777" />
</div> </div>
</template> </template>
<script> <script>

View file

@ -1,5 +1,5 @@
<template> <template>
<span :class="classes" @click="handleClick">time</span> <span :class="classes" @click="handleClick">{{ date }}</span>
</template> </template>
<script> <script>
import Vue from 'vue'; import Vue from 'vue';
@ -51,7 +51,7 @@
if (this.hash !== '') window.location.hash = this.hash; if (this.hash !== '') window.location.hash = this.hash;
}, },
setTime () { setTime () {
this.date = this.time;
} }
}, },
mounted () { mounted () {

View file

@ -44,3 +44,4 @@
@import "avatar"; @import "avatar";
@import "color-picker"; @import "color-picker";
@import "auto-complete"; @import "auto-complete";
@import "time";

View file

@ -0,0 +1,10 @@
@time-prefix-cls: ~"@{css-prefix}time";
.@{time-prefix-cls} {
&-with-hash{
cursor: pointer;
&:hover{
text-decoration: underline;
}
}
}