From 42d7bfe42fe0978e4f51d385994f25f14b1333fd Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Mon, 16 May 2022 19:42:40 +0800 Subject: [PATCH 01/17] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A03.0=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E5=85=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/configs/navbar/zh.ts | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/.vuepress/configs/navbar/zh.ts b/docs/.vuepress/configs/navbar/zh.ts index 4708e3e79..fb855120c 100644 --- a/docs/.vuepress/configs/navbar/zh.ts +++ b/docs/.vuepress/configs/navbar/zh.ts @@ -22,17 +22,27 @@ export const zh: NavbarConfig = [ link: '/reference/cli/', }, { - text: '了解更多', + text: '版本', children: [ { - text: '更新日志', + text: '3.0', link: - 'https://github.com/WeBankFinTech/fes.js/blob/master/CHANGELOG.md', + 'http://fesjs.mumblefe.cn/next', }, { - text: 'v1 文档', + text: '1.0', link: 'https://webank.gitee.io/fes.js/', }, + ], + }, + { + text: '了解更多', + children: [ + { + text: '更新日志', + link: + 'https://github.com/WeBankFinTech/fes.js/blob/master/CHANGELOG.md', + }, { text: 'fes-design', link: From db0cad223281209286d29c7d14ef0ac856e4efd0 Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Mon, 16 May 2022 19:49:28 +0800 Subject: [PATCH 02/17] =?UTF-8?q?docs:=20=E5=A4=84=E7=90=86=E6=96=87?= =?UTF-8?q?=E6=A1=A3=E6=9E=84=E5=BB=BA=E9=94=99=E8=AF=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/reference/plugin/plugins/access.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/reference/plugin/plugins/access.md b/docs/reference/plugin/plugins/access.md index c57070552..c7450f49d 100644 --- a/docs/reference/plugin/plugins/access.md +++ b/docs/reference/plugin/plugins/access.md @@ -163,7 +163,7 @@ import { access } from '@fesjs/fes' ``` #### access.hasAccess -- **类型**:( accessId: string | number ) => Promise +- **类型**:( accessId: string | number ) => Promise\ - **详情**: 判断某个资源是否可见。 - **参数**: From b0af285e122157db08f8f0889a85c457515dc39f Mon Sep 17 00:00:00 2001 From: harrywan <445436867@qq.com> Date: Wed, 25 May 2022 11:02:55 +0800 Subject: [PATCH 03/17] =?UTF-8?q?docs:=20=E6=B7=BB=E5=8A=A01.0=20=E5=9C=B0?= =?UTF-8?q?=E5=9D=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/.vuepress/configs/navbar/zh.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/docs/.vuepress/configs/navbar/zh.ts b/docs/.vuepress/configs/navbar/zh.ts index fb855120c..a83602e12 100644 --- a/docs/.vuepress/configs/navbar/zh.ts +++ b/docs/.vuepress/configs/navbar/zh.ts @@ -25,13 +25,13 @@ export const zh: NavbarConfig = [ text: '版本', children: [ { - text: '3.0', + text: 'next(3.0)', link: - 'http://fesjs.mumblefe.cn/next', + 'https://fesjs.mumblefe.cn/next', }, { text: '1.0', - link: 'https://webank.gitee.io/fes.js/', + link: 'https://fesjs.mumblefe.cn/1.0', }, ], }, From 024a8feff5f728ecb91ca5b0205430b255630a46 Mon Sep 17 00:00:00 2001 From: harrywan <445436867@qq.com> Date: Wed, 25 May 2022 11:08:55 +0800 Subject: [PATCH 04/17] =?UTF-8?q?docs:=20pages=E5=8F=91=E5=B8=83master?= =?UTF-8?q?=E7=89=88=E6=9C=AC=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 12 ++++++++++++ docs/README.md | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 7b111d262..17716aa74 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,3 +29,15 @@ jobs: REMOTE_USER: root # 目标目录 TARGET: /data/web-packages/p/fesjs + build-and-deploy-pages: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@master + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@master + env: + ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} + BRANCH: gh-pages + FOLDER: docs/.vuepress/dist + BUILD_SCRIPT: yarn && yarn docs:build diff --git a/docs/README.md b/docs/README.md index 7158f58a7..fe0299970 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ features: - title: Fast details: Fes.js 内置路由、构建、插件管理,提供测试、布局、权限、国际化、状态管理、请求、数据字典、Svg等插件,可以满足大部分日常开发需求。 - title: Easy - details: 基于Vue.js 3.0,上手简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 + details: 基于Vue.js 3.0,上手非常简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 - title: Strong details: 仅仅需要关心页面内容,减少犯错的机会!提供单元测试、覆盖测试的能力保障项目质量。 - title: 可扩展 From c6cfcbbd0fe7a777f9af105895a05a8027d18d53 Mon Sep 17 00:00:00 2001 From: harrywan <445436867@qq.com> Date: Wed, 25 May 2022 11:14:06 +0800 Subject: [PATCH 05/17] =?UTF-8?q?docs:=20=E4=BF=AE=E5=A4=8Ddocs=20action?= =?UTF-8?q?=20=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 26 +++++++++++++++++--------- docs/README.md | 2 +- 2 files changed, 18 insertions(+), 10 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 17716aa74..8d9a25c62 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,15 +29,23 @@ jobs: REMOTE_USER: root # 目标目录 TARGET: /data/web-packages/p/fesjs + build-and-deploy-pages: + concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. runs-on: ubuntu-latest steps: - - name: Checkout - uses: actions/checkout@master - - name: Build and Deploy - uses: JamesIves/github-pages-deploy-action@master - env: - ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }} - BRANCH: gh-pages - FOLDER: docs/.vuepress/dist - BUILD_SCRIPT: yarn && yarn docs:build + - name: Checkout 🛎️ + uses: actions/checkout@v3 + + - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. + run: | + yarn + yarn docs:build + + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@v4.3.3 + with: + branch: gh-pages # The branch the action should deploy to. + folder: build # The folder the action should deploy. + folder: docs/.vuepress/dist + token: ${{ secrets.ACCESS_TOKEN }} diff --git a/docs/README.md b/docs/README.md index fe0299970..7158f58a7 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ features: - title: Fast details: Fes.js 内置路由、构建、插件管理,提供测试、布局、权限、国际化、状态管理、请求、数据字典、Svg等插件,可以满足大部分日常开发需求。 - title: Easy - details: 基于Vue.js 3.0,上手非常简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 + details: 基于Vue.js 3.0,上手简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 - title: Strong details: 仅仅需要关心页面内容,减少犯错的机会!提供单元测试、覆盖测试的能力保障项目质量。 - title: 可扩展 From 927ed4840811cb538ee79fb3b0999078c1ce1c97 Mon Sep 17 00:00:00 2001 From: harrywan <445436867@qq.com> Date: Wed, 25 May 2022 11:15:18 +0800 Subject: [PATCH 06/17] =?UTF-8?q?docs:=20=E4=BF=AE=E5=A4=8Ddocs=20action?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 8d9a25c62..a05bc36f0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -29,7 +29,7 @@ jobs: REMOTE_USER: root # 目标目录 TARGET: /data/web-packages/p/fesjs - + build-and-deploy-pages: concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession. runs-on: ubuntu-latest @@ -46,6 +46,5 @@ jobs: uses: JamesIves/github-pages-deploy-action@v4.3.3 with: branch: gh-pages # The branch the action should deploy to. - folder: build # The folder the action should deploy. folder: docs/.vuepress/dist token: ${{ secrets.ACCESS_TOKEN }} From 6c32ed50516939ea2de2e0b70067dc0760481350 Mon Sep 17 00:00:00 2001 From: harrywan <445436867@qq.com> Date: Wed, 25 May 2022 11:16:44 +0800 Subject: [PATCH 07/17] =?UTF-8?q?docs:=20=E8=A7=A6=E5=8F=91=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E6=96=87=E6=A1=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- docs/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/README.md b/docs/README.md index 7158f58a7..fe0299970 100644 --- a/docs/README.md +++ b/docs/README.md @@ -13,7 +13,7 @@ features: - title: Fast details: Fes.js 内置路由、构建、插件管理,提供测试、布局、权限、国际化、状态管理、请求、数据字典、Svg等插件,可以满足大部分日常开发需求。 - title: Easy - details: 基于Vue.js 3.0,上手简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 + details: 基于Vue.js 3.0,上手非常简单。贯彻 “约定优于配置” 思想,在设计插件上尽可能用约定替代配置,依然提供统一的插件配置入口,简单简洁又不失灵活。提供一致性的API入口,一致化的体验,学习起来更轻松。 - title: Strong details: 仅仅需要关心页面内容,减少犯错的机会!提供单元测试、覆盖测试的能力保障项目质量。 - title: 可扩展 From 85c6bb652b9c7c1457cf9db40da2523ea497d5b2 Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Wed, 25 May 2022 11:34:10 +0800 Subject: [PATCH 08/17] =?UTF-8?q?docs:=20=E5=8F=91=E5=B8=83=E5=88=B0pages?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/docs.yml | 2 +- docs/.vuepress/config.ts | 2 +- package.json | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a05bc36f0..88cb7b9a6 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -40,7 +40,7 @@ jobs: - name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built. run: | yarn - yarn docs:build + yarn docs:build-pages - name: Deploy 🚀 uses: JamesIves/github-pages-deploy-action@v4.3.3 diff --git a/docs/.vuepress/config.ts b/docs/.vuepress/config.ts index 7fe65c08f..67ab9867f 100644 --- a/docs/.vuepress/config.ts +++ b/docs/.vuepress/config.ts @@ -6,7 +6,7 @@ const config: UserConfig = { bundler: '@vuepress/webpack', - base: '/', + base: process.env.BASE ? process.env.BASE : '/', // evergreen: process.env.NODE_ENV !== 'production', diff --git a/package.json b/package.json index f33e79e0d..bbcdc15ad 100644 --- a/package.json +++ b/package.json @@ -16,6 +16,7 @@ "release": "node scripts/build.js && lerna publish from-git", "docs:dev": "vuepress dev docs --clean-cache", "docs:build": "vuepress build docs --clean-cache", + "docs:build-pages": "BASE=fes.js vuepress build docs --clean-cache", "test": "fes test", "lint": "eslint -c ./.eslintrc.js --ext .js,.jsx,.vue,.ts" }, From b618a534aac2b98543c0cc3ef817a554706d0b81 Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Wed, 25 May 2022 11:44:10 +0800 Subject: [PATCH 09/17] =?UTF-8?q?docs:=20=E4=BF=AE=E5=A4=8D=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=96=87=E6=A1=A3action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bbcdc15ad..68fceb8df 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "release": "node scripts/build.js && lerna publish from-git", "docs:dev": "vuepress dev docs --clean-cache", "docs:build": "vuepress build docs --clean-cache", - "docs:build-pages": "BASE=fes.js vuepress build docs --clean-cache", + "docs:build-pages": "BASE=fes.js/ vuepress build docs --clean-cache", "test": "fes test", "lint": "eslint -c ./.eslintrc.js --ext .js,.jsx,.vue,.ts" }, From 5846e484803a35406f0c7cd2aadf182a012413a2 Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Wed, 25 May 2022 11:49:22 +0800 Subject: [PATCH 10/17] =?UTF-8?q?docs:=20=E4=BF=AE=E5=A4=8D=E5=8F=91?= =?UTF-8?q?=E5=B8=83=E6=96=87=E6=A1=A3action?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 68fceb8df..7b7c95623 100644 --- a/package.json +++ b/package.json @@ -16,7 +16,7 @@ "release": "node scripts/build.js && lerna publish from-git", "docs:dev": "vuepress dev docs --clean-cache", "docs:build": "vuepress build docs --clean-cache", - "docs:build-pages": "BASE=fes.js/ vuepress build docs --clean-cache", + "docs:build-pages": "BASE=/fes.js/ vuepress build docs --clean-cache", "test": "fes test", "lint": "eslint -c ./.eslintrc.js --ext .js,.jsx,.vue,.ts" }, From 26b48558d11015d9b21c65bff35c1ecb4bd1afa7 Mon Sep 17 00:00:00 2001 From: wanchun <445436867@qq.com> Date: Mon, 30 May 2022 16:48:13 +0800 Subject: [PATCH 11/17] =?UTF-8?q?feat:=20plugin-layout=20=E5=A4=9A?= =?UTF-8?q?=E9=A1=B5=E7=AD=BE=E5=8F=AF=E4=BB=A5=E5=88=A0=E9=99=A4=E5=BD=93?= =?UTF-8?q?=E5=89=8D=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/runtime/views/MultiTabProvider.vue | 21 +++++--- packages/fes-template/.fes.js | 2 +- yarn.lock | 54 ++++++++++++++++++- 3 files changed, 69 insertions(+), 8 deletions(-) diff --git a/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue b/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue index 2dff56e8f..128e4bd7d 100644 --- a/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue +++ b/packages/fes-plugin-layout/src/runtime/views/MultiTabProvider.vue @@ -13,7 +13,7 @@ v-for="page in pageList" :key="page.path" :value="page.path" - :closable="route.path !== page.path" + :closable="pageList.length > 1" > - - + + @@ -68,11 +71,12 @@ export default { return { path: _route.path, route: _route, - name: _route.meta.name, + name: _route.meta.name ?? _route.name, title: computed(() => transTitle(title)), key: getKey() }; }; + const keepAlivePages = ref([]); const route = useRoute(); const router = useRouter(); @@ -122,6 +126,12 @@ export default { } list.splice(index, 1); pageList.value = list; + const _keepAlivePages = [...keepAlivePages.value]; + const keepIndex = _keepAlivePages.indexOf(selectedPage.name); + if (keepIndex !== -1) { + _keepAlivePages.splice(keepIndex, 1); + } + keepAlivePages.value = _keepAlivePages; }; const reloadPage = (path) => { const selectedPage = findPage(path || unref(route.path)); @@ -132,6 +142,7 @@ export default { const closeOtherPage = (path) => { const selectedPage = findPage(path || unref(route.path)); pageList.value = [selectedPage]; + keepAlivePages.value = [selectedPage.name]; }; const getPageKey = (_route) => { const selectedPage = findPage(_route.path); @@ -151,10 +162,10 @@ export default { default: } }; - const keepAlivePages = ref([]); - const getComponent = (Component, _route) => { - if (_route.meta['keep-alive']) { - const name = _route.meta?.name || _route.name; + + const getComponent = (Component, _route, isKeep = false) => { + if (isKeep || _route.meta['keep-alive']) { + const name = _route.meta?.name ?? _route.name; if (name) { // 修改组件的 name Component.type.name = name; diff --git a/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/index.vue b/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/index.vue index ef9b20050..5dbfb5b93 100644 --- a/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/index.vue +++ b/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/index.vue @@ -1,6 +1,7 @@ diff --git a/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/test.vue b/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/test.vue index f20e10fd9..746abb88e 100644 --- a/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/test.vue +++ b/packages/fes-plugin-qiankun/examples/app1/src/pages/app1/test.vue @@ -1,6 +1,7 @@ diff --git a/packages/fes-plugin-qiankun/examples/main/src/pages/index.vue b/packages/fes-plugin-qiankun/examples/main/src/pages/index.vue index 7e91d6fbe..39dde730a 100644 --- a/packages/fes-plugin-qiankun/examples/main/src/pages/index.vue +++ b/packages/fes-plugin-qiankun/examples/main/src/pages/index.vue @@ -1,9 +1,10 @@