+
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 8bcca05..83bfe6c 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -100,6 +100,9 @@ devDependencies:
dayjs:
specifier: ^1.11.9
version: 1.11.9
+ echarts:
+ specifier: ^5.4.3
+ version: 5.4.3
eslint:
specifier: ^8.48.0
version: 8.48.0
@@ -211,6 +214,9 @@ devDependencies:
vite:
specifier: ^4.4.9
version: 4.4.9(@types/node@20.5.7)(sass@1.66.1)
+ vue-echarts:
+ specifier: ^6.6.1
+ version: 6.6.1(echarts@5.4.3)(vue@3.3.4)
vue-masonry:
specifier: ^0.16.0
version: 0.16.0(vue@3.3.4)
@@ -5922,6 +5928,13 @@ packages:
resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==}
dev: true
+ /echarts@5.4.3:
+ resolution: {integrity: sha512-mYKxLxhzy6zyTi/FaEbJMOZU1ULGEQHaeIeuMR5L+JnJTpz+YR03mnnpBhbR4+UYJAgiXgpyTVLffPAjOTLkZA==}
+ dependencies:
+ tslib: 2.3.0
+ zrender: 5.4.4
+ dev: true
+
/ee-first@1.1.1:
resolution: {integrity: sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==}
dev: true
@@ -10178,6 +10191,10 @@ packages:
engines: {node: '>=0.10.0'}
dev: true
+ /resize-detector@0.3.0:
+ resolution: {integrity: sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ==}
+ dev: true
+
/resize-observer-polyfill@1.5.1:
resolution: {integrity: sha512-LwZrotdHOo12nQuZlHEmtuXdqGoOD0OhaxopaNFxWzInpEgaLWoVuAMbTzixuosCx2nEG58ngzW3vxdWoxIgdg==}
dev: true
@@ -11314,6 +11331,10 @@ packages:
strip-bom: 3.0.0
dev: true
+ /tslib@2.3.0:
+ resolution: {integrity: sha512-N82ooyxVNm6h1riLCoyS9e3fuJ3AMG2zIZs2Gd1ATcSFjSA23Q0fzjjZeh0jbJvWVDZ0cJT8yaNNaaXHzueNjg==}
+ dev: true
+
/tslib@2.6.2:
resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==}
dev: true
@@ -12153,6 +12174,23 @@ packages:
resolution: {integrity: sha512-RutnB7X8c5hjq39NceArgXg28WZtZpGc3+J16ljMiYnFhKvd8hITxSWQSQ5bvldxMDU6gG5mkxl1MTQLXckVSQ==}
dev: true
+ /vue-echarts@6.6.1(echarts@5.4.3)(vue@3.3.4):
+ resolution: {integrity: sha512-EpreTzlNeJ+eaUn0AhXEmKJk98xJGecgTqAdyZovoXWnhTxnlW2HuBM0ei3y8rLw1JCUabf8/sYvxjlr8SzBKQ==}
+ requiresBuild: true
+ peerDependencies:
+ '@vue/composition-api': ^1.0.5
+ echarts: ^5.4.1
+ vue: ^2.6.12 || ^3.1.1
+ peerDependenciesMeta:
+ '@vue/composition-api':
+ optional: true
+ dependencies:
+ echarts: 5.4.3
+ resize-detector: 0.3.0
+ vue: 3.3.4
+ vue-demi: 0.13.11(vue@3.3.4)
+ dev: true
+
/vue-eslint-parser@9.3.1(eslint@8.48.0):
resolution: {integrity: sha512-Clr85iD2XFZ3lJ52/ppmUDG/spxQu6+MAeHXjjyI4I1NUYZ9xmenQp4N0oaHJhrA8OOxltCVxMRfANGa70vU0g==}
engines: {node: ^14.17.0 || >=16.0.0}
@@ -12663,6 +12701,12 @@ packages:
readable-stream: 3.6.2
dev: true
+ /zrender@5.4.4:
+ resolution: {integrity: sha512-0VxCNJ7AGOMCWeHVyTrGzUgrK4asT4ml9PEkeGirAkKNYXYzoPJCLvmyfdoOXcjTHPs10OZVMfD1Rwg16AZyYw==}
+ dependencies:
+ tslib: 2.3.0
+ dev: true
+
mirrors.tencent.com/cssfilter@0.0.10:
resolution: {integrity: sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4=, registry: https://registry.npmmirror.com/, tarball: https://mirrors.tencent.com/npm/cssfilter/-/cssfilter-0.0.10.tgz}
name: cssfilter
diff --git a/uno.config.ts b/uno.config.ts
index ea7d2ad..e753ef9 100644
--- a/uno.config.ts
+++ b/uno.config.ts
@@ -23,7 +23,7 @@ export default defineConfig({
[
'font-noto-serif',
{
- 'font-family': 'Noto Serif SC, serif'
+ 'font-family': '"Noto Serif SC", "Noto Serif TC", serif'
}
]
],
diff --git a/utils/converter.ts b/utils/converter.ts
index 6a6c380..1f7cd84 100644
--- a/utils/converter.ts
+++ b/utils/converter.ts
@@ -1,5 +1,6 @@
+import { PollStatus } from './../enums/poll'
import { HitokotoType } from '@/enums/hitokoto'
-const hitokotoTypeMap = {
+const HitokotoTypeMap = {
a: '动画',
b: '漫画',
c: '游戏',
@@ -15,10 +16,10 @@ const hitokotoTypeMap = {
} as Record
export function convertHitokotoType(input: string | HitokotoType): string {
- return hitokotoTypeMap[input] || '未知分类'
+ return HitokotoTypeMap[input] || '未知分类'
}
-const pollMethodMap = {
+const PollMethodMap = {
1: '赞同',
2: '驳回',
3: '需要修改',
@@ -26,5 +27,21 @@ const pollMethodMap = {
} as Record
export function convertPollMethod(input: number): string {
- return pollMethodMap[input] || '未知'
+ return PollMethodMap[input] || '未知'
+}
+
+const PollStatusMap = {
+ 0: '未开放',
+ 1: '进行中',
+ 2: '处理中',
+ 100: '暂停',
+ 101: '关闭',
+ 102: '普通用户投票',
+ 200: '通过',
+ 201: '驳回',
+ 202: '需要修改'
+} as Record
+
+export function convertPollStatus(input: PollStatus): string {
+ return PollStatusMap[input] || '未知'
}