diff --git a/examples/sites/demos/pc/webdoc/develop-demo-en.md b/examples/sites/demos/pc/webdoc/develop-demo-en.md index dc6bc05fd4..9f389282f3 100644 --- a/examples/sites/demos/pc/webdoc/develop-demo-en.md +++ b/examples/sites/demos/pc/webdoc/develop-demo-en.md @@ -43,16 +43,13 @@ npm install @opentiny/vue@3 Then modify the`vite.config.js`, add the following code highlighted section: ```js {8-10} -//vite.config.js +// vite.config.js import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ - plugins: [vue()], - define: { - 'process.env': { ...process.env } - } + plugins: [vue()] }) ``` diff --git a/examples/sites/demos/pc/webdoc/develop-demo.md b/examples/sites/demos/pc/webdoc/develop-demo.md index 3b718b489b..72190c5e7d 100644 --- a/examples/sites/demos/pc/webdoc/develop-demo.md +++ b/examples/sites/demos/pc/webdoc/develop-demo.md @@ -49,10 +49,7 @@ import { defineConfig } from 'vite' import vue from '@vitejs/plugin-vue' export default defineConfig({ - plugins: [vue()], - define: { - 'process.env': { ...process.env } - } + plugins: [vue()] }) ``` diff --git a/examples/sites/demos/pc/webdoc/installation-en.md b/examples/sites/demos/pc/webdoc/installation-en.md index 7f7bc3e129..68838ac7b1 100644 --- a/examples/sites/demos/pc/webdoc/installation-en.md +++ b/examples/sites/demos/pc/webdoc/installation-en.md @@ -31,7 +31,7 @@ yarn add @opentiny/vue@2 npm install @opentiny/vue@2 ``` -If it's`Vite`After the dependency is installed, modify the project.`vite.config.js`, add the following code highlighted section: +@opentiny/vueSupports multiple modes. If you are a `Vite` project and not a mobile client, you can modify the `vite.config.js` of the project by adding the highlighted parts of the following code, so that the project can shake off the mobile mode code during construction and optimize the volume of the packaged product: ```js {8-10} // vite.config.js @@ -42,15 +42,14 @@ import vue from '@vitejs/plugin-vue' export default defineConfig({ plugins: [vue()], define: { - 'process.env': { ...process.env } + 'process.env': { TINY_MODE: 'pc' } } }) ```
-

To avoid the uncertainty associated with monthly (minor) upgrades of @opentiny/vue , it is recommended to use ~ before relying on the version number of the package in package.json in your project. -For example, "@opentiny/vue": "~3.12.0.

-

@opentiny/vue supports multiple modes. If your project is not a mobile project, you can declare the value of TINY_MODE in process.env in the above configuration code. In order to make the project during construction, the mobile side code can be shaken off and the volume of the packaged product can be optimized. For example, 'process.env': {... env,TINY_MODE:'pc'}.

+

To avoid the uncertainty caused by monthly minor upgrades of@opentiny/vue, it is recommended to use ~ before the version number of the dependent package in package.json in your project, + For example,"@opentiny/vue": "~3.12.0".

## Import through CDN diff --git a/examples/sites/demos/pc/webdoc/installation.md b/examples/sites/demos/pc/webdoc/installation.md index 7d1e17761d..e195fb9066 100644 --- a/examples/sites/demos/pc/webdoc/installation.md +++ b/examples/sites/demos/pc/webdoc/installation.md @@ -31,7 +31,7 @@ yarn add @opentiny/vue@2 npm install @opentiny/vue@2 ``` -如果是`Vite` 工程,安装完依赖后,修改项目的 `vite.config.js` ,添加以下代码突出显示的部分: + @opentiny/vue 支持多种模式。如果您是 `Vite` 工程且非移动端,可以修改项目的 `vite.config.js`,添加以下代码突出显示的部分,以使工程在构建时,能将移动端模式的代码摇掉,优化打包产物的体积: ```js {8-10} // vite.config.js @@ -42,15 +42,14 @@ import vue from '@vitejs/plugin-vue' export default defineConfig({ plugins: [vue()], define: { - 'process.env': { ...process.env } + 'process.env': { TINY_MODE: 'pc' } } }) ```

为了避免 @opentiny/vue 的月度版本 (minor) 升级带来的不确定因素,因此推荐在您的工程中的 package.json 中依赖包的版本号前使用 ~, - 比如 "@opentiny/vue": "~3.12.0

-

@opentiny/vue 支持多种模式。如果您的工程非移动端工程,可以在上面配置代码中的process.env中,声明TINY_MODE的值,以使工程在构建时,能将移动端模式的代码摇掉,优化打包产物的体积。比如 'process.env': { ...process.env,TINY_MODE:'pc' }

+ 比如 "@opentiny/vue": "~3.12.0"

## 通过 CDN 方式引入 (v3.16.0 及之前的版本可用) diff --git a/examples/sites/package.json b/examples/sites/package.json index f23ac78cb2..2b5abb02dc 100644 --- a/examples/sites/package.json +++ b/examples/sites/package.json @@ -1,6 +1,6 @@ { "name": "@opentiny/vue-docs", - "version": "3.21.0", + "version": "3.21.4", "license": "MIT", "scripts": { "start": "vite", diff --git a/examples/sites/src/i18n/en.json b/examples/sites/src/i18n/en.json index b4e15c681b..5f6a7a3b16 100644 --- a/examples/sites/src/i18n/en.json +++ b/examples/sites/src/i18n/en.json @@ -32,6 +32,7 @@ "backTop": "Back To Top", "overview": "Components Overview", "overviewDesc": "TinyVue provides a wealth of basic UI components for web applications, and we will continue to explore the best UI practices for enterprise-level applications. Welcome to try TinyVue.", + "overviewDescPlus": "TinyVuePlus is a component library for Cloud business scenarios based on TinyVue, following the new design specifications of Cloud CloudDesign and utilizing Vite+Vue3+TypeScript technology stack.", "searchComponents": "search components", "apiType": "Components demos code style", "apiStyleOptions": "Options", @@ -41,4 +42,4 @@ "demoModeMultiple": "Multiple", "contributor": "Contributors", "noData": "No Data" -} \ No newline at end of file +} diff --git a/examples/sites/src/i18n/zh.json b/examples/sites/src/i18n/zh.json index 68ed387cce..4ba0cc8da1 100644 --- a/examples/sites/src/i18n/zh.json +++ b/examples/sites/src/i18n/zh.json @@ -32,6 +32,7 @@ "backTop": "返回顶部", "overview": "组件总览", "overviewDesc": "TinyVue 为 Web 应用提供了丰富的基础 UI 组件,我们还将持续探索企业级应用的最佳 UI 实践,欢迎尝试使用 TinyVue。", + "overviewDescPlus": "TinyVuePlus 是一款基于 TinyVue 的面向云业务场景的组件库,遵循 CloudDesign 新设计规范,基于 Vite + Vue3 + TypeScript 技术栈。", "searchComponents": "搜索组件", "apiType": "组件示例代码风格", "apiStyleOptions": "选项式", @@ -41,4 +42,4 @@ "demoModeMultiple": "多示例", "contributor": "贡献者", "noData": "暂无数据" -} \ No newline at end of file +} diff --git a/examples/sites/src/main.js b/examples/sites/src/main.js index 9f0672a1b8..6ae29233f6 100644 --- a/examples/sites/src/main.js +++ b/examples/sites/src/main.js @@ -41,13 +41,15 @@ hljs.registerLanguage('javascript', javascript) hljs.registerLanguage('css', css) hljs.registerLanguage('html', html) -docsearch({ - appId: 'AGPA5UXHMH', - apiKey: '5fa09fc20270efa61d68e2c2eb0f56df', - indexName: 'opentiny', - container: '.search-box', - debug: false -}) +if (!location.href.includes('tiny-vue-plus')) { + docsearch({ + appId: 'AGPA5UXHMH', + apiKey: '5fa09fc20270efa61d68e2c2eb0f56df', + indexName: 'opentiny', + container: '.search-box', + debug: false + }) +} if (envTarget !== 'open') { // 支持本地开发和内网使用全局搜索 diff --git a/examples/sites/src/views/components/components.vue b/examples/sites/src/views/components/components.vue index d1249adb60..45816ebd09 100644 --- a/examples/sites/src/views/components/components.vue +++ b/examples/sites/src/views/components/components.vue @@ -20,7 +20,84 @@
- +
+
+
+
+
+ {{ oneGroup.name }} +
+
+ {{ oneGroup.type }} +
+
+
+ +
+
+
+
+