feat: Feature/pro docs (#70)

* chore: merge main

* feat: update docs

* feat: remove coze-assistant

* feat: add watermark plugin

* feat: update preferences

* feat: update docs

---------

Co-authored-by: vince <vince292007@gmail.com>
This commit is contained in:
Vben
2024-07-28 14:29:05 +08:00
committed by GitHub
parent 14538f7ed5
commit 376fd17a61
225 changed files with 7731 additions and 1784 deletions

View File

@@ -42,8 +42,7 @@
},
"dependencies": {
"@intlify/core-base": "^9.13.1",
"@vben-core/typings": "workspace:*",
"vue": "^3.4.33",
"vue": "^3.4.34",
"vue-i18n": "^9.13.1"
}
}

View File

@@ -1,7 +1,6 @@
import type { SupportedLanguagesType } from '@vben-core/typings';
import type { Locale } from 'vue-i18n';
import type { ImportLocaleFn } from './typing';
import type { ImportLocaleFn, SupportedLanguagesType } from './typing';
import { unref } from 'vue';
import { createI18n } from 'vue-i18n';
@@ -15,10 +14,7 @@ const i18n = createI18n({
messages: {},
});
const modules = {
'./langs/en-US.json': async () => import('./langs/en-US.json'),
'./langs/zh-CN.json': async () => import('./langs/zh-CN.json'),
};
const modules = import.meta.glob('./langs/*.json');
const localesMap = loadLocalesMap(modules);

View File

@@ -39,5 +39,5 @@ async function setupI18n(app: App, options: LocaleSetupOptions = {}) {
export { $t, i18n, loadLocaleMessages, loadLocalesMap, setupI18n };
export type { CompileError } from '@intlify/core-base';
export { useI18n } from 'vue-i18n';
export type { ImportLocaleFn };
export type { ImportLocaleFn, LocaleSetupOptions, SupportedLanguagesType };
export type { Locale } from 'vue-i18n';

View File

@@ -165,6 +165,7 @@
"general": "General",
"language": "Language",
"dynamicTitle": "Dynamic Title",
"watermark": "Watermark",
"sidebar": {
"title": "Sidebar",
"width": "Width",
@@ -176,6 +177,9 @@
"title": "Tabbar",
"enable": "Enable Tab Bar",
"icon": "Show Tabbar Icon",
"showMore": "Show More Button",
"showRefresh": "Show Refresh Button",
"showMaximize": "Show Maximize Button",
"persist": "Persist Tabs",
"dragable": "Enable Dragable Sort",
"styleType": {
@@ -285,7 +289,6 @@
"languageToggle": "Enable Language Toggle",
"notification": "Enable Notification",
"sidebarToggle": "Enable Sidebar Toggle",
"aiAssistant": "Enable AI Assistant",
"lockScreen": "Enable Lock Screen"
}
}

View File

@@ -165,6 +165,7 @@
"general": "通用",
"language": "语言",
"dynamicTitle": "动态标题",
"watermark": "水印",
"sidebar": {
"title": "侧边栏",
"width": "宽度",
@@ -176,6 +177,9 @@
"title": "标签栏",
"enable": "启用标签栏",
"icon": "显示标签栏图标",
"showMore": "显示更多按钮",
"showRefresh": "显示刷新按钮",
"showMaximize": "显示最大化按钮",
"persist": "持久化标签页",
"dragable": "启动拖拽排序",
"styleType": {
@@ -285,7 +289,6 @@
"languageToggle": "启用语言切换",
"notification": "启用通知",
"sidebarToggle": "启用侧边栏切换",
"aiAssistant": "启用 AI 助手",
"lockScreen": "启用锁屏"
}
}

View File

@@ -1,12 +1,12 @@
import type { SupportedLanguagesType } from '@vben-core/typings';
export type SupportedLanguagesType = 'en-US' | 'zh-CN';
type ImportLocaleFn = () => Promise<{ default: Record<string, string> }>;
export type ImportLocaleFn = () => Promise<{ default: Record<string, string> }>;
type LoadMessageFn = (
export type LoadMessageFn = (
lang: SupportedLanguagesType,
) => Promise<Record<string, string>>;
interface LocaleSetupOptions {
export interface LocaleSetupOptions {
/**
* Default language
* @default zh-CN
@@ -23,10 +23,3 @@ interface LocaleSetupOptions {
*/
missingWarn?: boolean;
}
export type {
ImportLocaleFn,
LoadMessageFn,
LocaleSetupOptions,
SupportedLanguagesType,
};