Commit 85a1de15 authored by liubinyu's avatar liubinyu

bug

parent 26edb3c7
Pipeline #916 failed with stages
<script setup> <script setup>
import { inject, ref } from 'vue'; import { inject, ref, computed } from 'vue';
const _const = inject('_const') const _const = inject('_const')
import * as api from '@/api' import * as api from '@/api'
import { dateFormat } from '@/utils' import { dateFormat } from '@/utils'
import { useI18n } from 'vue-i18n' import { useI18n } from 'vue-i18n'
const { locale } = useI18n() const { locale } = useI18n()
const monthList = ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December']
const today = computed(() => {
const date = new Date()
if (locale.value === 'En') {
return ` (${monthList[date.getMonth()]} ${date.getDate()} ${date.getFullYear()})`
} else {
return `(${dateFormat(date, 'YYYY年M月D日')})`
}
})
const active = ref() const active = ref()
const loading = ref(false) const loading = ref(false)
async function getInfo() { async function getInfo() {
...@@ -42,7 +52,7 @@ function getWordList(word) { ...@@ -42,7 +52,7 @@ function getWordList(word) {
<template> <template>
<div class="page"> <div class="page">
<div class="title1">{{ $t('Daily') }}{{ $t('Horoscope') }}</div> <div class="title1">{{ $t('Daily') }}{{ $t('Horoscope') }}{{ today }}</div>
<div class="title2">{{ $t('Come and check out') }}</div> <div class="title2">{{ $t('Come and check out') }}</div>
<div class="constellation-list"> <div class="constellation-list">
<div v-for="item in _const.ConstellationList" class="constellation" :class="{ active: active.key === item.key }" <div v-for="item in _const.ConstellationList" class="constellation" :class="{ active: active.key === item.key }"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment