Sfoglia il codice sorgente

docs(架构调整): 初步配置locale本地与设置

gemercheung 2 anni fa
parent
commit
45a5e3bdb4
44 ha cambiato i file con 791 aggiunte e 557 eliminazioni
  1. 0 1
      docs/.gitignore
  2. 16 11
      docs/.vitepress/config.mts
  3. 0 5
      docs/.vitepress/crowdin/en-US/component/changelog.json
  4. 0 12
      docs/.vitepress/crowdin/en-US/component/demo-block.json
  5. 0 4
      docs/.vitepress/crowdin/en-US/component/edit-link.json
  6. 0 6
      docs/.vitepress/crowdin/en-US/component/footer.json
  7. 0 4
      docs/.vitepress/crowdin/en-US/component/icons.json
  8. 0 3
      docs/.vitepress/crowdin/en-US/component/last-update-at.json
  9. 0 6
      docs/.vitepress/crowdin/en-US/component/pwa.json
  10. 0 5
      docs/.vitepress/crowdin/en-US/component/search.json
  11. 0 6
      docs/.vitepress/crowdin/en-US/component/sponsor.json
  12. 0 3
      docs/.vitepress/crowdin/en-US/component/translation.json
  13. 0 320
      docs/.vitepress/crowdin/en-US/pages/component.json
  14. 0 79
      docs/.vitepress/crowdin/en-US/pages/guide.json
  15. 0 28
      docs/.vitepress/crowdin/en-US/pages/home.json
  16. 0 5
      docs/.vitepress/crowdin/en-US/pages/not-found.json
  17. 0 12
      docs/.vitepress/crowdin/en-US/pages/resource.json
  18. 0 17
      docs/.vitepress/crowdin/en-US/pages/sidebar.json
  19. 12 0
      docs/.vitepress/i18n/component/changelog.json
  20. 26 0
      docs/.vitepress/i18n/component/demo-block.json
  21. 10 0
      docs/.vitepress/i18n/component/edit-link.json
  22. 14 0
      docs/.vitepress/i18n/component/footer.json
  23. 10 0
      docs/.vitepress/i18n/component/icons.json
  24. 8 0
      docs/.vitepress/i18n/component/last-update-at.json
  25. 14 0
      docs/.vitepress/i18n/component/pwa.json
  26. 12 0
      docs/.vitepress/i18n/component/search.json
  27. 14 0
      docs/.vitepress/i18n/component/sponsor.json
  28. 8 0
      docs/.vitepress/i18n/component/translation.json
  29. 1 0
      docs/.vitepress/i18n/lang.json
  30. 332 0
      docs/.vitepress/i18n/pages/component.json
  31. 160 0
      docs/.vitepress/i18n/pages/guide.json
  32. 58 0
      docs/.vitepress/i18n/pages/home.json
  33. 12 0
      docs/.vitepress/i18n/pages/not-found.json
  34. 26 0
      docs/.vitepress/i18n/pages/resource.json
  35. 26 0
      docs/.vitepress/i18n/pages/sidebar.json
  36. 1 0
      docs/.vitepress/lang.js
  37. 3 2
      docs/.vitepress/utils/lang.ts
  38. 4 4
      docs/.vitepress/vitepress/components/doc-content/vp-table-of-content.vue
  39. 4 4
      docs/.vitepress/vitepress/components/globals/vp-footer.vue
  40. 2 2
      docs/.vitepress/vitepress/components/navbar/vp-translation.vue
  41. 2 2
      docs/.vitepress/vitepress/components/vp-demo.vue
  42. 12 12
      docs/vite.config.ts
  43. 3 3
      docs/zh-CN/component/button.md
  44. 1 1
      docs/zh-CN/index.md

+ 0 - 1
docs/.gitignore

@@ -1,4 +1,3 @@
-.vitepress/i18n/*
 .vitepress/crowdin/*
 !.vitepress/crowdin/en-US
 

+ 16 - 11
docs/.vitepress/config.mts

@@ -1,7 +1,7 @@
 import consola from 'consola'
 import { REPO_BRANCH, REPO_PATH } from '@kankan/build-constants'
 import { docsDirName } from '@kankan/build-utils'
-import { languages } from './utils/lang'
+// import { languages } from './utils/lang'
 import { features, head, mdPlugin, nav, sidebars } from './config'
 import type { UserConfig } from 'vitepress'
 
@@ -24,24 +24,29 @@ const buildTransformers = () => {
 
 consola.debug(`DOC_ENV: ${process.env.DOC_ENV}`)
 
-const locales = {}
-languages.forEach(lang => {
-    locales[`/${lang}`] = {
-        label: lang,
-        lang,
-    }
-})
+const languages = ['zh-CN']
+const locales = {
+    // '/en-US': { label: 'en-US', lang: 'en-US' },
+    '/zh-CN': { label: 'zh-CN', lang: 'zh-CN' },
+}
+
+// languages.forEach(lang => {
+//     locales[`/${lang}`] = {
+//         label: lang,
+//         lang,
+//     }
+// })
 
 // consola.log('locales', locales)
 // consola.log('sidebars', sidebars)
 
 export const config: UserConfig = {
-    title: 'kankan component 看看组件公共文档',
-    description: 'a Vue 3 based component library for designers and developers',
+    title: '看看公共组件',
+    description: '看看组件公共文档中心',
     lastUpdated: true,
     head,
     themeConfig: {
-        repo: REPO_PATH,
+        repo: 'http://192.168.0.115:3000/4dkankan/4dkankan-components',
         docsBranch: REPO_BRANCH,
         docsDir: docsDirName,
 

+ 0 - 5
docs/.vitepress/crowdin/en-US/component/changelog.json

@@ -1,5 +0,0 @@
-{
-    "published-by": "Published by",
-    "open-link": "Open link",
-    "select-version": "Select a version"
-}

+ 0 - 12
docs/.vitepress/crowdin/en-US/component/demo-block.json

@@ -1,12 +0,0 @@
-{
-    "view-source": "View source",
-    "hide-source": "Hide source",
-    "edit-in-editor": "Edit in Playground",
-    "edit-on-github": "Edit on GitHub",
-    "edit-in-codepen": "Edit in Codepen.io",
-    "copy-code": "Copy code",
-    "switch-button-option-text": "Switch to Options API",
-    "switch-button-setup-text": "Switch to Composition API",
-    "copy-success": "Copied!",
-    "copy-error": "This browser does not support automatic copy!"
-}

+ 0 - 4
docs/.vitepress/crowdin/en-US/component/edit-link.json

@@ -1,4 +0,0 @@
-{
-    "edit-on-github": "Edit this page on GitHub",
-    "edit-on-crowdin": "Edit this page on Crowdin"
-}

+ 0 - 6
docs/.vitepress/crowdin/en-US/component/footer.json

@@ -1,6 +0,0 @@
-{
-    "source": "Source",
-    "contributors": "Contributors",
-    "component": "Component",
-    "docs": "Docs"
-}

+ 0 - 4
docs/.vitepress/crowdin/en-US/component/icons.json

@@ -1,4 +0,0 @@
-{
-    "copy-success": "Copied!",
-    "copy-error": "Your browser does not support copy :("
-}

+ 0 - 3
docs/.vitepress/crowdin/en-US/component/last-update-at.json

@@ -1,3 +0,0 @@
-{
-    "title": "Last Updated"
-}

+ 0 - 6
docs/.vitepress/crowdin/en-US/component/pwa.json

@@ -1,6 +0,0 @@
-{
-    "message": "New content available, click on refresh button to update.",
-    "refresh": "Refresh",
-    "always-refresh": "Always Refresh",
-    "close": "Close"
-}

+ 0 - 5
docs/.vitepress/crowdin/en-US/component/search.json

@@ -1,5 +0,0 @@
-{
-    "search": "Search",
-    "empty": "No results",
-    "index": "en"
-}

+ 0 - 6
docs/.vitepress/crowdin/en-US/component/sponsor.json

@@ -1,6 +0,0 @@
-{
-    "title": "Sponsors",
-    "sponsoredBy": "Sponsored by",
-    "platinumSponsor": "Platinum Sponsors",
-    "goldSponsor": "Gold Sponsors"
-}

+ 0 - 3
docs/.vitepress/crowdin/en-US/component/translation.json

@@ -1,3 +0,0 @@
-{
-    "help": "Help Translate 😉"
-}

+ 0 - 320
docs/.vitepress/crowdin/en-US/pages/component.json

@@ -1,320 +0,0 @@
-{
-    "basic": {
-        "text": "Basic",
-        "children": [
-            {
-                "link": "/button",
-                "text": "Button"
-            },
-            {
-                "link": "/border",
-                "text": "Border"
-            },
-            {
-                "link": "/color",
-                "text": "Color"
-            },
-            {
-                "link": "/container",
-                "text": "Layout Container"
-            },
-            {
-                "link": "/icon",
-                "text": "Icon"
-            },
-            {
-                "link": "/layout",
-                "text": "Layout"
-            },
-            {
-                "link": "/link",
-                "text": "Link"
-            },
-            {
-                "link": "/scrollbar",
-                "text": "Scrollbar"
-            },
-            {
-                "link": "/space",
-                "text": "Space"
-            },
-            {
-                "link": "/typography",
-                "text": "Typography"
-            }
-        ]
-    },
-    "configuration": {
-        "text": "Configuration",
-        "children": [
-            {
-                "link": "/config-provider",
-                "text": "Config Provider"
-            }
-        ]
-    },
-    "form": {
-        "text": "Form",
-        "children": [
-            {
-                "link": "/autocomplete",
-                "text": "Autocomplete"
-            },
-            {
-                "link": "/cascader",
-                "text": "Cascader"
-            },
-            {
-                "link": "/checkbox",
-                "text": "Checkbox"
-            },
-            {
-                "link": "/color-picker",
-                "text": "Color Picker"
-            },
-            {
-                "link": "/date-picker",
-                "text": "Date Picker"
-            },
-            {
-                "link": "/datetime-picker",
-                "text": "DateTime Picker"
-            },
-            {
-                "link": "/form",
-                "text": "Form"
-            },
-            {
-                "link": "/input",
-                "text": "Input"
-            },
-            {
-                "link": "/input-number",
-                "text": "Input Number"
-            },
-            {
-                "link": "/radio",
-                "text": "Radio"
-            },
-            {
-                "link": "/rate",
-                "text": "Rate"
-            },
-            {
-                "link": "/select",
-                "text": "Select"
-            },
-            {
-                "link": "/select-v2",
-                "text": "Virtualized Select"
-            },
-            {
-                "link": "/slider",
-                "text": "Slider"
-            },
-            {
-                "link": "/switch",
-                "text": "Switch"
-            },
-            {
-                "link": "/time-picker",
-                "text": "Time Picker"
-            },
-            {
-                "link": "/time-select",
-                "text": "Time Select"
-            },
-            {
-                "link": "/transfer",
-                "text": "Transfer"
-            },
-            {
-                "link": "/upload",
-                "text": "Upload"
-            }
-        ]
-    },
-
-    "data": {
-        "text": "Data",
-        "children": [
-            {
-                "link": "/avatar",
-                "text": "Avatar"
-            },
-            {
-                "link": "/badge",
-                "text": "Badge"
-            },
-            {
-                "link": "/calendar",
-                "text": "Calendar"
-            },
-            {
-                "link": "/card",
-                "text": "Card"
-            },
-            {
-                "link": "/carousel",
-                "text": "Carousel"
-            },
-            {
-                "link": "/collapse",
-                "text": "Collapse"
-            },
-            {
-                "link": "/descriptions",
-                "text": "Descriptions"
-            },
-            {
-                "link": "/empty",
-                "text": "Empty"
-            },
-            {
-                "link": "/image",
-                "text": "Image"
-            },
-            {
-                "link": "/infinite-scroll",
-                "text": "Infinite Scroll"
-            },
-            {
-                "link": "/pagination",
-                "text": "Pagination"
-            },
-            {
-                "link": "/progress",
-                "text": "Progress"
-            },
-            {
-                "link": "/result",
-                "text": "Result"
-            },
-            {
-                "link": "/skeleton",
-                "text": "Skeleton"
-            },
-            {
-                "link": "/table",
-                "text": "Table"
-            },
-            {
-                "link": "/table-v2",
-                "text": "Virtualized Table",
-                "promotion": "2.2.0"
-            },
-            {
-                "link": "/tag",
-                "text": "Tag"
-            },
-            {
-                "link": "/timeline",
-                "text": "Timeline"
-            },
-            {
-                "link": "/tree",
-                "text": "Tree"
-            },
-            {
-                "link": "/tree-select",
-                "text": "TreeSelect",
-                "promotion": "2.1.8"
-            },
-            {
-                "link": "/tree-v2",
-                "text": "Virtualized Tree"
-            }
-        ]
-    },
-    "navigation": {
-        "text": "Navigation",
-        "children": [
-            {
-                "link": "/affix",
-                "text": "Affix"
-            },
-            {
-                "link": "/backtop",
-                "text": "Backtop"
-            },
-            {
-                "link": "/breadcrumb",
-                "text": "Breadcrumb"
-            },
-            {
-                "link": "/dropdown",
-                "text": "Dropdown"
-            },
-            {
-                "link": "/menu",
-                "text": "Menu"
-            },
-            {
-                "link": "/page-header",
-                "text": "Page Header"
-            },
-            {
-                "link": "/steps",
-                "text": "Steps"
-            },
-            {
-                "link": "/tabs",
-                "text": "Tabs"
-            }
-        ]
-    },
-    "feedback": {
-        "text": "Feedback",
-        "children": [
-            {
-                "link": "/alert",
-                "text": "Alert"
-            },
-            {
-                "link": "/dialog",
-                "text": "Dialog"
-            },
-            {
-                "link": "/drawer",
-                "text": "Drawer"
-            },
-            {
-                "link": "/loading",
-                "text": "Loading"
-            },
-            {
-                "link": "/message",
-                "text": "Message"
-            },
-            {
-                "link": "/message-box",
-                "text": "Message Box"
-            },
-            {
-                "link": "/notification",
-                "text": "Notification"
-            },
-            {
-                "link": "/popconfirm",
-                "text": "Popconfirm"
-            },
-            {
-                "link": "/popover",
-                "text": "Popover"
-            },
-            {
-                "link": "/tooltip",
-                "text": "Tooltip"
-            }
-        ]
-    },
-    "others": {
-        "text": "Others",
-        "children": [
-            {
-                "link": "/divider",
-                "text": "Divider"
-            }
-        ]
-    }
-}

+ 0 - 79
docs/.vitepress/crowdin/en-US/pages/guide.json

@@ -1,79 +0,0 @@
-{
-    "intro": {
-        "text": "Basics",
-        "children": [
-            {
-                "text": "Design",
-                "link": "/guide/design"
-            },
-            {
-                "text": "Navigation",
-                "link": "/guide/nav"
-            },
-            {
-                "text": "Installation",
-                "link": "/guide/installation"
-            },
-            {
-                "text": "Quick Start",
-                "link": "/guide/quickstart"
-            }
-        ]
-    },
-    "advanced": {
-        "text": "Advanced",
-        "children": [
-            {
-                "text": "i18n",
-                "link": "/guide/i18n"
-            },
-            {
-                "text": "Migration from ElementUI",
-                "link": "/guide/migration"
-            },
-            {
-                "text": "Theming",
-                "link": "/guide/theming"
-            },
-            {
-                "text": "Dark Mode",
-                "link": "/guide/dark-mode",
-                "promotion": "2.2.0"
-            },
-            {
-                "text": "Custom Namespace",
-                "link": "/guide/namespace",
-                "promotion": "2.2.0"
-            },
-            {
-                "text": "Built-in Transitions",
-                "link": "/guide/transitions"
-            },
-            {
-                "text": "Changelog",
-                "link": "/guide/changelog"
-            }
-        ]
-    },
-    "development": {
-        "text": "Development",
-        "children": [
-            {
-                "text": "Development Guide",
-                "link": "/guide/dev-guide"
-            },
-            {
-                "text": "Development FAQ",
-                "link": "/guide/dev-faq"
-            },
-            {
-                "text": "Commit Examples",
-                "link": "/guide/commit-examples"
-            },
-            {
-                "text": "Translation",
-                "link": "/guide/translation"
-            }
-        ]
-    }
-}

+ 0 - 28
docs/.vitepress/crowdin/en-US/pages/home.json

@@ -1,28 +0,0 @@
-{
-    "1": "",
-    "2": "",
-    "3": "Guide",
-    "4": "Understand the design guidelines, helping designers build product that's logically sound, reasonably structured and easy to use.",
-    "5": "View Detail",
-    "6": "Component",
-    "7": "Experience interaction details by strolling through component demos. Use encapsulated code to improve developing efficiency.",
-    "8": "Resource",
-    "9": "Download relevant design resources for shaping page prototype or visual draft, increasing design efficiency.",
-    "10": "Links",
-    "11": "GitHub",
-    "12": "Changelog",
-    "13": "Element UI for Vue 2",
-    "14": "Online Theme Roller",
-    "15": "Gitter",
-    "16": "Feedback",
-    "17": "Contribution",
-    "18": "SegmentFault",
-    "19": "Community",
-    "20": "Become a Sponsor!",
-    "21": "Please contact us via",
-    "title_release": "Element Plus stable release is coming",
-    "title": "Element Plus",
-    "title_sub": "a Vue 3 based component library for designers and developers",
-    "china_mirror": "China Mirror 🇨🇳",
-    "discord": "Discord"
-}

+ 0 - 5
docs/.vitepress/crowdin/en-US/pages/not-found.json

@@ -1,5 +0,0 @@
-{
-    "title": "Resource not found",
-    "button-title": "Back to Home",
-    "desc": "The page you requested does not exist"
-}

+ 0 - 12
docs/.vitepress/crowdin/en-US/pages/resource.json

@@ -1,12 +0,0 @@
-{
-    "title": "Resources",
-    "lineOne": "More resources are still under development. ",
-    "lineTwo": "If you are interested in participating in the design of Element Plus, be our guest to contact us via <span><a href=\"mailto:element-plus@outlook.com\" target=\"_blank\">element-plus@outlook.com</a></span>.",
-    "download": "Download",
-    "axure": "Axure Components",
-    "axureIntro": "By importing Element Plus in Axure, you can easily apply all the components we provide during interaction design.",
-    "sketch": "Sketch Template",
-    "sketchIntro": "Newly designed Sketch component library in 2022 with full components for Element Plus to improve design efficiency while keeping a unified visual style.",
-    "figma": "Figma Template",
-    "figmaIntro": "Newly designed Figma component library in 2022 with new features such as Auto-layout and Variants."
-}

+ 0 - 17
docs/.vitepress/crowdin/en-US/pages/sidebar.json

@@ -1,17 +0,0 @@
-[
-    {
-        "text": "Guide",
-        "link": "/guide/design",
-        "activeMatch": "/guide/"
-    },
-    {
-        "text": "Component",
-        "link": "/component/button",
-        "activeMatch": "/component/"
-    },
-    {
-        "text": "Resource",
-        "link": "/resource/index",
-        "activeMatch": "/resource/"
-    }
-]

+ 12 - 0
docs/.vitepress/i18n/component/changelog.json

@@ -0,0 +1,12 @@
+{
+    "zh-CN": {
+        "published-by": "Published by",
+        "open-link": "Open link",
+        "select-version": "Select a version"
+    },
+    "en-US": {
+        "published-by": "Published by",
+        "open-link": "Open link",
+        "select-version": "Select a version"
+    }
+}

+ 26 - 0
docs/.vitepress/i18n/component/demo-block.json

@@ -0,0 +1,26 @@
+{
+    "zh-CN": {
+        "view-source": "查看代码",
+        "hide-source": "Hide source",
+        "edit-in-editor": "Edit in Playground",
+        "edit-on-github": "在Gogs编辑",
+        "edit-in-codepen": "Edit in Codepen.io",
+        "copy-code": "复制代码",
+        "switch-button-option-text": "Switch to Options API",
+        "switch-button-setup-text": "Switch to Composition API",
+        "copy-success": "Copied!",
+        "copy-error": "This browser does not support automatic copy!"
+    },
+    "en-US": {
+        "view-source": "View source",
+        "hide-source": "Hide source",
+        "edit-in-editor": "Edit in Playground",
+        "edit-on-github": "Edit on GitHub",
+        "edit-in-codepen": "Edit in Codepen.io",
+        "copy-code": "Copy code",
+        "switch-button-option-text": "Switch to Options API",
+        "switch-button-setup-text": "Switch to Composition API",
+        "copy-success": "Copied!",
+        "copy-error": "This browser does not support automatic copy!"
+    }
+}

+ 10 - 0
docs/.vitepress/i18n/component/edit-link.json

@@ -0,0 +1,10 @@
+{
+    "zh-CN": {
+        "edit-on-github": "Edit this page on GitHub",
+        "edit-on-crowdin": "Edit this page on Crowdin"
+    },
+    "en-US": {
+        "edit-on-github": "Edit this page on GitHub",
+        "edit-on-crowdin": "Edit this page on Crowdin"
+    }
+}

+ 14 - 0
docs/.vitepress/i18n/component/footer.json

@@ -0,0 +1,14 @@
+{
+    "zh-CN": {
+        "source": "Source",
+        "contributors": "Contributors",
+        "component": "Component",
+        "docs": "Docs"
+    },
+    "en-US": {
+        "source": "Source",
+        "contributors": "Contributors",
+        "component": "Component",
+        "docs": "Docs"
+    }
+}

+ 10 - 0
docs/.vitepress/i18n/component/icons.json

@@ -0,0 +1,10 @@
+{
+    "zh-CN": {
+        "copy-success": "Copied!",
+        "copy-error": "Your browser does not support copy :("
+    },
+    "en-US": {
+        "copy-success": "Copied!",
+        "copy-error": "Your browser does not support copy :("
+    }
+}

+ 8 - 0
docs/.vitepress/i18n/component/last-update-at.json

@@ -0,0 +1,8 @@
+{
+    "zh-CN": {
+        "title": "Last Updated"
+    },
+    "en-US": {
+        "title": "Last Updated"
+    }
+}

+ 14 - 0
docs/.vitepress/i18n/component/pwa.json

@@ -0,0 +1,14 @@
+{
+    "zh-CN": {
+        "message": "New content available, click on refresh button to update.",
+        "refresh": "Refresh",
+        "always-refresh": "Always Refresh",
+        "close": "Close"
+    },
+    "en-US": {
+        "message": "New content available, click on refresh button to update.",
+        "refresh": "Refresh",
+        "always-refresh": "Always Refresh",
+        "close": "Close"
+    }
+}

+ 12 - 0
docs/.vitepress/i18n/component/search.json

@@ -0,0 +1,12 @@
+{
+    "zh-CN": {
+        "search": "搜索",
+        "empty": "搜索为空",
+        "index": "cn"
+    },
+    "en-US": {
+        "search": "Search",
+        "empty": "No results",
+        "index": "en"
+    }
+}

+ 14 - 0
docs/.vitepress/i18n/component/sponsor.json

@@ -0,0 +1,14 @@
+{
+    "zh-CN": {
+        "title": "Sponsors",
+        "sponsoredBy": "Sponsored by",
+        "platinumSponsor": "Platinum Sponsors",
+        "goldSponsor": "Gold Sponsors"
+    },
+    "en-US": {
+        "title": "Sponsors",
+        "sponsoredBy": "Sponsored by",
+        "platinumSponsor": "Platinum Sponsors",
+        "goldSponsor": "Gold Sponsors"
+    }
+}

+ 8 - 0
docs/.vitepress/i18n/component/translation.json

@@ -0,0 +1,8 @@
+{
+    "zh-CN": {
+        "help": "Help Translate 😉"
+    },
+    "en-US": {
+        "help": "Help Translate 😉"
+    }
+}

+ 1 - 0
docs/.vitepress/i18n/lang.json

@@ -0,0 +1 @@
+["zh-CN"]

+ 332 - 0
docs/.vitepress/i18n/pages/component.json

@@ -0,0 +1,332 @@
+{
+    "zh-CN": {
+        "basic": {
+            "text": "基础组件",
+            "children": [
+                {
+                    "link": "/button",
+                    "text": "按钮"
+                }
+            ]
+        }
+    },
+    "en-US": {
+        "basic": {
+            "text": "Basic",
+            "children": [
+                {
+                    "link": "/button",
+                    "text": "Button"
+                },
+                {
+                    "link": "/border",
+                    "text": "Border"
+                },
+                {
+                    "link": "/color",
+                    "text": "Color"
+                },
+                {
+                    "link": "/container",
+                    "text": "Layout Container"
+                },
+                {
+                    "link": "/icon",
+                    "text": "Icon"
+                },
+                {
+                    "link": "/layout",
+                    "text": "Layout"
+                },
+                {
+                    "link": "/link",
+                    "text": "Link"
+                },
+                {
+                    "link": "/scrollbar",
+                    "text": "Scrollbar"
+                },
+                {
+                    "link": "/space",
+                    "text": "Space"
+                },
+                {
+                    "link": "/typography",
+                    "text": "Typography"
+                }
+            ]
+        },
+        "configuration": {
+            "text": "Configuration",
+            "children": [
+                {
+                    "link": "/config-provider",
+                    "text": "Config Provider"
+                }
+            ]
+        },
+        "form": {
+            "text": "Form",
+            "children": [
+                {
+                    "link": "/autocomplete",
+                    "text": "Autocomplete"
+                },
+                {
+                    "link": "/cascader",
+                    "text": "Cascader"
+                },
+                {
+                    "link": "/checkbox",
+                    "text": "Checkbox"
+                },
+                {
+                    "link": "/color-picker",
+                    "text": "Color Picker"
+                },
+                {
+                    "link": "/date-picker",
+                    "text": "Date Picker"
+                },
+                {
+                    "link": "/datetime-picker",
+                    "text": "DateTime Picker"
+                },
+                {
+                    "link": "/form",
+                    "text": "Form"
+                },
+                {
+                    "link": "/input",
+                    "text": "Input"
+                },
+                {
+                    "link": "/input-number",
+                    "text": "Input Number"
+                },
+                {
+                    "link": "/radio",
+                    "text": "Radio"
+                },
+                {
+                    "link": "/rate",
+                    "text": "Rate"
+                },
+                {
+                    "link": "/select",
+                    "text": "Select"
+                },
+                {
+                    "link": "/select-v2",
+                    "text": "Virtualized Select"
+                },
+                {
+                    "link": "/slider",
+                    "text": "Slider"
+                },
+                {
+                    "link": "/switch",
+                    "text": "Switch"
+                },
+                {
+                    "link": "/time-picker",
+                    "text": "Time Picker"
+                },
+                {
+                    "link": "/time-select",
+                    "text": "Time Select"
+                },
+                {
+                    "link": "/transfer",
+                    "text": "Transfer"
+                },
+                {
+                    "link": "/upload",
+                    "text": "Upload"
+                }
+            ]
+        },
+        "data": {
+            "text": "Data",
+            "children": [
+                {
+                    "link": "/avatar",
+                    "text": "Avatar"
+                },
+                {
+                    "link": "/badge",
+                    "text": "Badge"
+                },
+                {
+                    "link": "/calendar",
+                    "text": "Calendar"
+                },
+                {
+                    "link": "/card",
+                    "text": "Card"
+                },
+                {
+                    "link": "/carousel",
+                    "text": "Carousel"
+                },
+                {
+                    "link": "/collapse",
+                    "text": "Collapse"
+                },
+                {
+                    "link": "/descriptions",
+                    "text": "Descriptions"
+                },
+                {
+                    "link": "/empty",
+                    "text": "Empty"
+                },
+                {
+                    "link": "/image",
+                    "text": "Image"
+                },
+                {
+                    "link": "/infinite-scroll",
+                    "text": "Infinite Scroll"
+                },
+                {
+                    "link": "/pagination",
+                    "text": "Pagination"
+                },
+                {
+                    "link": "/progress",
+                    "text": "Progress"
+                },
+                {
+                    "link": "/result",
+                    "text": "Result"
+                },
+                {
+                    "link": "/skeleton",
+                    "text": "Skeleton"
+                },
+                {
+                    "link": "/table",
+                    "text": "Table"
+                },
+                {
+                    "link": "/table-v2",
+                    "text": "Virtualized Table",
+                    "promotion": "2.2.0"
+                },
+                {
+                    "link": "/tag",
+                    "text": "Tag"
+                },
+                {
+                    "link": "/timeline",
+                    "text": "Timeline"
+                },
+                {
+                    "link": "/tree",
+                    "text": "Tree"
+                },
+                {
+                    "link": "/tree-select",
+                    "text": "TreeSelect",
+                    "promotion": "2.1.8"
+                },
+                {
+                    "link": "/tree-v2",
+                    "text": "Virtualized Tree"
+                }
+            ]
+        },
+        "navigation": {
+            "text": "Navigation",
+            "children": [
+                {
+                    "link": "/affix",
+                    "text": "Affix"
+                },
+                {
+                    "link": "/backtop",
+                    "text": "Backtop"
+                },
+                {
+                    "link": "/breadcrumb",
+                    "text": "Breadcrumb"
+                },
+                {
+                    "link": "/dropdown",
+                    "text": "Dropdown"
+                },
+                {
+                    "link": "/menu",
+                    "text": "Menu"
+                },
+                {
+                    "link": "/page-header",
+                    "text": "Page Header"
+                },
+                {
+                    "link": "/steps",
+                    "text": "Steps"
+                },
+                {
+                    "link": "/tabs",
+                    "text": "Tabs"
+                }
+            ]
+        },
+        "feedback": {
+            "text": "Feedback",
+            "children": [
+                {
+                    "link": "/alert",
+                    "text": "Alert"
+                },
+                {
+                    "link": "/dialog",
+                    "text": "Dialog"
+                },
+                {
+                    "link": "/drawer",
+                    "text": "Drawer"
+                },
+                {
+                    "link": "/loading",
+                    "text": "Loading"
+                },
+                {
+                    "link": "/message",
+                    "text": "Message"
+                },
+                {
+                    "link": "/message-box",
+                    "text": "Message Box"
+                },
+                {
+                    "link": "/notification",
+                    "text": "Notification"
+                },
+                {
+                    "link": "/popconfirm",
+                    "text": "Popconfirm"
+                },
+                {
+                    "link": "/popover",
+                    "text": "Popover"
+                },
+                {
+                    "link": "/tooltip",
+                    "text": "Tooltip"
+                }
+            ]
+        },
+        "others": {
+            "text": "Others",
+            "children": [
+                {
+                    "link": "/divider",
+                    "text": "Divider"
+                }
+            ]
+        }
+    }
+}

+ 160 - 0
docs/.vitepress/i18n/pages/guide.json

@@ -0,0 +1,160 @@
+{
+    "zh-CN": {
+        "intro": {
+            "text": "Basics",
+            "children": [
+                {
+                    "text": "Design",
+                    "link": "/guide/design"
+                },
+                {
+                    "text": "Navigation",
+                    "link": "/guide/nav"
+                },
+                {
+                    "text": "Installation",
+                    "link": "/guide/installation"
+                },
+                {
+                    "text": "Quick Start",
+                    "link": "/guide/quickstart"
+                }
+            ]
+        },
+        "advanced": {
+            "text": "Advanced",
+            "children": [
+                {
+                    "text": "i18n",
+                    "link": "/guide/i18n"
+                },
+                {
+                    "text": "Migration from ElementUI",
+                    "link": "/guide/migration"
+                },
+                {
+                    "text": "Theming",
+                    "link": "/guide/theming"
+                },
+                {
+                    "text": "Dark Mode",
+                    "link": "/guide/dark-mode",
+                    "promotion": "2.2.0"
+                },
+                {
+                    "text": "Custom Namespace",
+                    "link": "/guide/namespace",
+                    "promotion": "2.2.0"
+                },
+                {
+                    "text": "Built-in Transitions",
+                    "link": "/guide/transitions"
+                },
+                {
+                    "text": "Changelog",
+                    "link": "/guide/changelog"
+                }
+            ]
+        },
+        "development": {
+            "text": "Development",
+            "children": [
+                {
+                    "text": "Development Guide",
+                    "link": "/guide/dev-guide"
+                },
+                {
+                    "text": "Development FAQ",
+                    "link": "/guide/dev-faq"
+                },
+                {
+                    "text": "Commit Examples",
+                    "link": "/guide/commit-examples"
+                },
+                {
+                    "text": "Translation",
+                    "link": "/guide/translation"
+                }
+            ]
+        }
+    },
+    "en-US": {
+        "intro": {
+            "text": "Basics",
+            "children": [
+                {
+                    "text": "Design",
+                    "link": "/guide/design"
+                },
+                {
+                    "text": "Navigation",
+                    "link": "/guide/nav"
+                },
+                {
+                    "text": "Installation",
+                    "link": "/guide/installation"
+                },
+                {
+                    "text": "Quick Start",
+                    "link": "/guide/quickstart"
+                }
+            ]
+        },
+        "advanced": {
+            "text": "Advanced",
+            "children": [
+                {
+                    "text": "i18n",
+                    "link": "/guide/i18n"
+                },
+                {
+                    "text": "Migration from ElementUI",
+                    "link": "/guide/migration"
+                },
+                {
+                    "text": "Theming",
+                    "link": "/guide/theming"
+                },
+                {
+                    "text": "Dark Mode",
+                    "link": "/guide/dark-mode",
+                    "promotion": "2.2.0"
+                },
+                {
+                    "text": "Custom Namespace",
+                    "link": "/guide/namespace",
+                    "promotion": "2.2.0"
+                },
+                {
+                    "text": "Built-in Transitions",
+                    "link": "/guide/transitions"
+                },
+                {
+                    "text": "Changelog",
+                    "link": "/guide/changelog"
+                }
+            ]
+        },
+        "development": {
+            "text": "Development",
+            "children": [
+                {
+                    "text": "Development Guide",
+                    "link": "/guide/dev-guide"
+                },
+                {
+                    "text": "Development FAQ",
+                    "link": "/guide/dev-faq"
+                },
+                {
+                    "text": "Commit Examples",
+                    "link": "/guide/commit-examples"
+                },
+                {
+                    "text": "Translation",
+                    "link": "/guide/translation"
+                }
+            ]
+        }
+    }
+}

+ 58 - 0
docs/.vitepress/i18n/pages/home.json

@@ -0,0 +1,58 @@
+{
+    "zh-CN": {
+        "1": "",
+        "2": "",
+        "3": "Guide",
+        "4": "Understand the design guidelines, helping designers build product that's logically sound, reasonably structured and easy to use.",
+        "5": "View Detail",
+        "6": "Component",
+        "7": "Experience interaction details by strolling through component demos. Use encapsulated code to improve developing efficiency.",
+        "8": "Resource",
+        "9": "Download relevant design resources for shaping page prototype or visual draft, increasing design efficiency.",
+        "10": "Links",
+        "11": "GitHub",
+        "12": "Changelog",
+        "13": "Element UI for Vue 2",
+        "14": "Online Theme Roller",
+        "15": "Gitter",
+        "16": "Feedback",
+        "17": "Contribution",
+        "18": "SegmentFault",
+        "19": "Community",
+        "20": "Become a Sponsor!",
+        "21": "Please contact us via",
+        "title_release": "Element Plus stable release is coming",
+        "title": "Element Plus",
+        "title_sub": "a Vue 3 based component library for designers and developers",
+        "china_mirror": "China Mirror 🇨🇳",
+        "discord": "Discord"
+    },
+    "en-US": {
+        "1": "",
+        "2": "",
+        "3": "Guide",
+        "4": "Understand the design guidelines, helping designers build product that's logically sound, reasonably structured and easy to use.",
+        "5": "View Detail",
+        "6": "Component",
+        "7": "Experience interaction details by strolling through component demos. Use encapsulated code to improve developing efficiency.",
+        "8": "Resource",
+        "9": "Download relevant design resources for shaping page prototype or visual draft, increasing design efficiency.",
+        "10": "Links",
+        "11": "GitHub",
+        "12": "Changelog",
+        "13": "Element UI for Vue 2",
+        "14": "Online Theme Roller",
+        "15": "Gitter",
+        "16": "Feedback",
+        "17": "Contribution",
+        "18": "SegmentFault",
+        "19": "Community",
+        "20": "Become a Sponsor!",
+        "21": "Please contact us via",
+        "title_release": "Element Plus stable release is coming",
+        "title": "Element Plus",
+        "title_sub": "a Vue 3 based component library for designers and developers",
+        "china_mirror": "China Mirror 🇨🇳",
+        "discord": "Discord"
+    }
+}

+ 12 - 0
docs/.vitepress/i18n/pages/not-found.json

@@ -0,0 +1,12 @@
+{
+    "zh-CN": {
+        "title": "Resource not found",
+        "button-title": "Back to Home",
+        "desc": "The page you requested does not exist"
+    },
+    "en-US": {
+        "title": "Resource not found",
+        "button-title": "Back to Home",
+        "desc": "The page you requested does not exist"
+    }
+}

+ 26 - 0
docs/.vitepress/i18n/pages/resource.json

@@ -0,0 +1,26 @@
+{
+    "zh-CN": {
+        "title": "Resources",
+        "lineOne": "More resources are still under development. ",
+        "lineTwo": "If you are interested in participating in the design of Element Plus, be our guest to contact us via <span><a href=\"mailto:element-plus@outlook.com\" target=\"_blank\">element-plus@outlook.com</a></span>.",
+        "download": "Download",
+        "axure": "Axure Components",
+        "axureIntro": "By importing Element Plus in Axure, you can easily apply all the components we provide during interaction design.",
+        "sketch": "Sketch Template",
+        "sketchIntro": "Newly designed Sketch component library in 2022 with full components for Element Plus to improve design efficiency while keeping a unified visual style.",
+        "figma": "Figma Template",
+        "figmaIntro": "Newly designed Figma component library in 2022 with new features such as Auto-layout and Variants."
+    },
+    "en-US": {
+        "title": "Resources",
+        "lineOne": "More resources are still under development. ",
+        "lineTwo": "If you are interested in participating in the design of Element Plus, be our guest to contact us via <span><a href=\"mailto:element-plus@outlook.com\" target=\"_blank\">element-plus@outlook.com</a></span>.",
+        "download": "Download",
+        "axure": "Axure Components",
+        "axureIntro": "By importing Element Plus in Axure, you can easily apply all the components we provide during interaction design.",
+        "sketch": "Sketch Template",
+        "sketchIntro": "Newly designed Sketch component library in 2022 with full components for Element Plus to improve design efficiency while keeping a unified visual style.",
+        "figma": "Figma Template",
+        "figmaIntro": "Newly designed Figma component library in 2022 with new features such as Auto-layout and Variants."
+    }
+}

+ 26 - 0
docs/.vitepress/i18n/pages/sidebar.json

@@ -0,0 +1,26 @@
+{
+    "zh-CN": [
+        {
+            "text": "组件",
+            "link": "/component/button",
+            "activeMatch": "/component/"
+        }
+    ],
+    "en-US": [
+        {
+            "text": "Guide",
+            "link": "/guide/design",
+            "activeMatch": "/guide/"
+        },
+        {
+            "text": "Component",
+            "link": "/component/button",
+            "activeMatch": "/component/"
+        },
+        {
+            "text": "Resource",
+            "link": "/resource/index",
+            "activeMatch": "/resource/"
+        }
+    ]
+}

+ 1 - 0
docs/.vitepress/lang.js

@@ -4,6 +4,7 @@
     const defaultLang = 'zh-CN'
     // docs supported languages
     const langAlias = {
+        cn: 'zh-CN',
         en: 'en-US',
         fr: 'fr-FR',
         es: 'es-ES',

+ 3 - 2
docs/.vitepress/utils/lang.ts

@@ -1,8 +1,9 @@
-import fs from 'fs'
+// import fs from 'fs'
 import path from 'path'
 import { docRoot } from '@kankan/build-utils'
 
-export const languages = fs.readdirSync(path.resolve(__dirname, '../crowdin'))
+// export const languages = fs.readdirSync(path.resolve(__dirname, '../crowdin'))
+export const languages = ['zh-CN']
 
 export const ensureLang = (lang: string) => `/${lang}`
 

+ 4 - 4
docs/.vitepress/vitepress/components/doc-content/vp-table-of-content.vue

@@ -37,12 +37,12 @@ const sponsor = computed(() => sponsorLocale[lang.value])
         class="mt-8 toc-ads flex flex-col"
         item-style="width: 180px; height: 55px;"
       /> -->
-            <p class="text-14px font-300 color-$text-color-secondary">
+            <!-- <p class="text-14px font-300 color-$text-color-secondary">
                 {{ sponsor.sponsoredBy }}
-            </p>
-            <sponsors-button class="sponsors-button mt-4 w-100%" />
+            </p> -->
+            <!-- <sponsors-button class="sponsors-button mt-4 w-100%" />
             <sponsor-right-logo-small-list />
-            <sponsor-right-text-list />
+            <sponsor-right-text-list /> -->
         </nav>
     </aside>
 </template>

+ 4 - 4
docs/.vitepress/vitepress/components/globals/vp-footer.vue

@@ -14,7 +14,7 @@ const homeLang = computed(() => homeLocale[lang.value])
 <template>
     <footer class="footer" :class="{ 'is-home': isHome }">
         <div class="footer-main">
-            <h4>{{ homeLang['10'] }}</h4>
+            <!-- <h4>{{ homeLang['10'] }}</h4>
             <a href="https://github.com/element-plus/element-plus" class="footer-main-link" target="_blank">
                 {{ homeLang['11'] }}
             </a>
@@ -26,11 +26,11 @@ const homeLang = computed(() => homeLocale[lang.value])
             </a>
             <a href="https://element.eleme.io/" class="footer-main-link" target="_blank">
                 {{ homeLang['13'] }}
-            </a>
+            </a> -->
         </div>
 
         <div class="footer-main">
-            <h4>{{ homeLang['19'] }}</h4>
+            <!-- <h4>{{ homeLang['19'] }}</h4>
             <a href="https://discord.link/ElementPlus" class="footer-main-link" target="_blank">
                 {{ homeLang['discord'] }}
             </a>
@@ -42,7 +42,7 @@ const homeLang = computed(() => homeLocale[lang.value])
             </a>
             <a href="https://segmentfault.com/t/element-plus" class="footer-main-link" target="_blank">
                 {{ homeLang['18'] }}
-            </a>
+            </a> -->
         </div>
     </footer>
 </template>

+ 2 - 2
docs/.vitepress/vitepress/components/navbar/vp-translation.vue

@@ -17,11 +17,11 @@ const { switchLang, languageMap, langs, lang, helpTranslate } = useTranslation()
                 <div v-for="l in langs" :key="l" :class="{ language: true, selected: l === lang }" @click="switchLang(l)">
                     {{ languageMap[l] }}
                 </div>
-                <div class="language">
+                <!-- <div class="language">
                     <VPLink :href="`/${lang}/guide/translation`">
                         {{ helpTranslate }}
                     </VPLink>
-                </div>
+                </div> -->
             </ElPopover>
         </ClientOnly>
     </div>

+ 2 - 2
docs/.vitepress/vitepress/components/vp-demo.vue

@@ -74,11 +74,11 @@ const copyCode = async () => {
             <ElDivider class="m-0" />
 
             <div class="op-btns">
-                <ElTooltip :content="locale['edit-in-editor']" :show-arrow="false">
+                <!-- <ElTooltip :content="locale['edit-in-editor']" :show-arrow="false">
                     <ElIcon :size="16" class="op-btn">
                         <i-ri-flask-line @click="onPlaygroundClick" />
                     </ElIcon>
-                </ElTooltip>
+                </ElTooltip> -->
                 <ElTooltip :content="locale['edit-on-github']" :show-arrow="false">
                     <ElIcon :size="16" class="op-btn github" style="color: var(--text-color-light)">
                         <a :href="demoSourceUrl" rel="noreferrer noopener" target="_blank">

+ 12 - 12
docs/vite.config.ts

@@ -36,17 +36,17 @@ const alias: Alias[] = [
 export default defineConfig(async ({ mode }) => {
     const env = loadEnv(mode, process.cwd(), '')
 
-    const { dependencies: epDeps } = getPackageDependencies(epPackage)
-    const { dependencies: docsDeps } = getPackageDependencies(docPackage)
+    // const { dependencies: epDeps } = getPackageDependencies(epPackage)
+    // const { dependencies: docsDeps } = getPackageDependencies(docPackage)
 
-    const optimizeDeps = [...new Set([...epDeps, ...docsDeps])].filter(dep => !dep.startsWith('@types/') && !['@kankan/metadata', 'kankan'].includes(dep))
+    // const optimizeDeps = [...new Set([...epDeps, ...docsDeps])].filter(dep => !dep.startsWith('@types/') && !['@element-plus/metadata', 'element-plus'].includes(dep))
 
-    optimizeDeps.push(
-        ...(await glob(['dayjs/plugin/*.js'], {
-            cwd: path.resolve(projRoot, 'node_modules'),
-            onlyFiles: true,
-        }))
-    )
+    // optimizeDeps.push(
+    //     ...(await glob(['dayjs/plugin/*.js'], {
+    //         cwd: path.resolve(projRoot, 'node_modules'),
+    //         onlyFiles: true,
+    //     }))
+    // )
 
     return {
         server: {
@@ -94,8 +94,8 @@ export default defineConfig(async ({ mode }) => {
             Inspect(),
             mkcert(),
         ],
-        optimizeDeps: {
-            include: optimizeDeps,
-        },
+        // optimizeDeps: {
+        //     include: optimizeDeps,
+        // },
     }
 })

+ 3 - 3
docs/zh-CN/component/button.md

@@ -3,11 +3,11 @@ title: Button
 lang: zh-CN
 ---
 
-# Button
+# 按钮
 
-Commonly used button.
+一般按钮使用如下。
 
-## Basic usage
+## 基本用法
 
 :::demo Use `type`, `plain`, `round` and `circle` to define Button's style.
 

+ 1 - 1
docs/zh-CN/index.md

@@ -1,5 +1,5 @@
 ---
-title: A Vue 3 UI Framework
+title: 四维看看VU3公共组件库
 page: true
 lang: zh-CN
 ---