diff --git a/console/.prettierignore b/console/.prettierignore index 6a6649f237..bd5535a603 100644 --- a/console/.prettierignore +++ b/console/.prettierignore @@ -1,2 +1 @@ -# 排除 pnpm-lock.yaml,防止被 prettier 影响导致不必要的 diff pnpm-lock.yaml diff --git a/console/package.json b/console/package.json index 50226db8dc..3643f3c78f 100644 --- a/console/package.json +++ b/console/package.json @@ -68,6 +68,7 @@ "fastq": "^1.15.0", "floating-vue": "2.0.0-beta.20", "fuse.js": "^6.6.2", + "jsencrypt": "^3.3.2", "lodash.clonedeep": "^4.5.0", "lodash.debounce": "^4.0.8", "lodash.isequal": "^4.5.0", @@ -83,13 +84,13 @@ "vue-grid-layout": "3.0.0-beta1", "vue-i18n": "^9.2.2", "vue-router": "^4.1.6", - "vuedraggable": "^4.1.0", - "jsencrypt": "^3.3.2" + "vuedraggable": "^4.1.0" }, "devDependencies": { "@changesets/cli": "^2.25.2", "@iconify-json/mdi": "^1.1.36", "@iconify-json/vscode-icons": "^1.1.16", + "@intlify/unplugin-vue-i18n": "^0.9.1", "@rushstack/eslint-patch": "^1.2.0", "@tailwindcss/aspect-ratio": "^0.4.2", "@tailwindcss/container-queries": "^0.1.0", diff --git a/console/packages/components/src/components/pagination/Pagination.vue b/console/packages/components/src/components/pagination/Pagination.vue index b9e39ebfce..5d615aa98d 100644 --- a/console/packages/components/src/components/pagination/Pagination.vue +++ b/console/packages/components/src/components/pagination/Pagination.vue @@ -9,12 +9,16 @@ const props = withDefaults( size?: number; total?: number; sizeOptions?: number[]; + pageLabel?: string; + sizeLabel?: string; }>(), { page: 1, size: 10, total: 0, sizeOptions: () => [10], + pageLabel: "页", + sizeLabel: "条 / 页", } ); @@ -115,7 +119,7 @@ const { {{ i }} / {{ pageCount }} - 页 + {{ pageLabel }}
{{ dashboardStats?.approvedComments }}
diff --git a/console/src/modules/contents/pages/DeletedSinglePageList.vue b/console/src/modules/contents/pages/DeletedSinglePageList.vue index 7da5ef9485..266c37aea9 100644 --- a/console/src/modules/contents/pages/DeletedSinglePageList.vue +++ b/console/src/modules/contents/pages/DeletedSinglePageList.vue @@ -27,8 +27,10 @@ import { usePermission } from "@/utils/permission"; import { getNode } from "@formkit/core"; import FilterTag from "@/components/filter/FilterTag.vue"; import { useQuery } from "@tanstack/vue-query"; +import { useI18n } from "vue-i18n"; const { currentUserHasPermission } = usePermission(); +const { t } = useI18n(); const selectedPageNames = ref{{ singlePageTotal || 0 }}
diff --git a/console/src/modules/contents/posts/DeletedPostList.vue b/console/src/modules/contents/posts/DeletedPostList.vue index 26795d80c0..5dd767b441 100644 --- a/console/src/modules/contents/posts/DeletedPostList.vue +++ b/console/src/modules/contents/posts/DeletedPostList.vue @@ -27,8 +27,10 @@ import cloneDeep from "lodash.clonedeep"; import { getNode } from "@formkit/core"; import FilterTag from "@/components/filter/FilterTag.vue"; import { useQuery } from "@tanstack/vue-query"; +import { useI18n } from "vue-i18n"; const { currentUserHasPermission } = usePermission(); +const { t } = useI18n(); const checkedAll = ref(false); const selectedPostNames = ref{{ dashboardStats?.posts || 0 }}
diff --git a/console/src/modules/contents/posts/widgets/RecentPublishedWidget.vue b/console/src/modules/contents/posts/widgets/RecentPublishedWidget.vue index ec98eee27a..526f053282 100644 --- a/console/src/modules/contents/posts/widgets/RecentPublishedWidget.vue +++ b/console/src/modules/contents/posts/widgets/RecentPublishedWidget.vue @@ -34,7 +34,7 @@ const { data } = useQuery{{ dashboardStats?.visits || 0 }}
diff --git a/console/src/modules/interface/menus/Menus.vue b/console/src/modules/interface/menus/Menus.vue index 216457a1bc..c8e6f12916 100644 --- a/console/src/modules/interface/menus/Menus.vue +++ b/console/src/modules/interface/menus/Menus.vue @@ -28,6 +28,9 @@ import { } from "./utils"; import { useDebounceFn } from "@vueuse/core"; import { onBeforeRouteLeave } from "vue-router"; +import { useI18n } from "vue-i18n"; + +const { t } = useI18n(); const menuItems = ref
- {{
- plugin?.spec.version
- }}
+
+ {{ plugin?.spec.version }}
+
@@ -129,7 +134,9 @@ onMounted(() => {
{{ dashboardStats?.users }}
diff --git a/console/src/router/routes.config.ts b/console/src/router/routes.config.ts index 84dc7ca4e2..7e8a7b53a3 100644 --- a/console/src/router/routes.config.ts +++ b/console/src/router/routes.config.ts @@ -27,7 +27,7 @@ export const routes: Array