Commit 42f644a31c525d45b78f29f1cd3ae6ddaf09f814

Authored by 梁灏
1 parent 492f652b

add CSS

examples/routers/time.vue
1 1 <template>
2 2 <div>
3   - <Time />
  3 + <Time :time="1526552777" />
4 4 </div>
5 5 </template>
6 6 <script>
... ...
src/components/time/time.vue
1 1 <template>
2   - <span :class="classes" @click="handleClick">time</span>
  2 + <span :class="classes" @click="handleClick">{{ date }}</span>
3 3 </template>
4 4 <script>
5 5 import Vue from 'vue';
... ... @@ -51,7 +51,7 @@
51 51 if (this.hash !== '') window.location.hash = this.hash;
52 52 },
53 53 setTime () {
54   -
  54 + this.date = this.time;
55 55 }
56 56 },
57 57 mounted () {
... ...
src/styles/components/index.less
... ... @@ -44,3 +44,4 @@
44 44 @import "avatar";
45 45 @import "color-picker";
46 46 @import "auto-complete";
  47 +@import "time";
47 48 \ No newline at end of file
... ...
src/styles/components/time.less 0 → 100644
  1 +@time-prefix-cls: ~"@{css-prefix}time";
  2 +
  3 +.@{time-prefix-cls} {
  4 + &-with-hash{
  5 + cursor: pointer;
  6 + &:hover{
  7 + text-decoration: underline;
  8 + }
  9 + }
  10 +}
0 11 \ No newline at end of file
... ...