2018-02-14 04:51:17 -08:00
|
|
|
<template>
|
|
|
|
<div class="mk-special-message">
|
2018-04-14 09:04:40 -07:00
|
|
|
<p v-if="m == 1 && d == 1">%i18n:@new-year%</p>
|
|
|
|
<p v-if="m == 12 && d == 25">%i18n:@christmas%</p>
|
2018-02-14 04:51:17 -08:00
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
<script lang="ts">
|
|
|
|
import Vue from 'vue';
|
|
|
|
export default Vue.extend({
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
now: new Date()
|
|
|
|
};
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
d(): number {
|
2018-02-16 09:24:10 -08:00
|
|
|
return this.now.getDate();
|
2018-02-14 04:51:17 -08:00
|
|
|
},
|
|
|
|
m(): number {
|
2018-02-16 09:24:10 -08:00
|
|
|
return this.now.getMonth() + 1;
|
2018-02-14 04:51:17 -08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
});
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="stylus" scoped>
|
|
|
|
.mk-special-message
|
|
|
|
&:empty
|
|
|
|
display none
|
|
|
|
|
|
|
|
> p
|
|
|
|
margin 0
|
|
|
|
padding 4px
|
|
|
|
text-align center
|
|
|
|
font-size 14px
|
|
|
|
font-weight bold
|
|
|
|
text-transform uppercase
|
|
|
|
color #fff
|
|
|
|
background #ff1036
|
|
|
|
|
|
|
|
</style>
|