From cd380272a9423e43a3186dfcd70ba8ad4bbc48eb Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 19:18:54 +0800 Subject: [PATCH 01/18] Update index.less correct format , There is a conflict between namespace and other naming --- src/design/var/index.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/design/var/index.less b/src/design/var/index.less index 1689f76d2..3e2d92b8f 100644 --- a/src/design/var/index.less +++ b/src/design/var/index.less @@ -2,7 +2,7 @@ @import 'easing'; @import 'breakpoint'; -@namespace: vben; +@name-space: vben; // tabs @multiple-height: 30px; @@ -33,7 +33,7 @@ @page-footer-z-index: 99; .bem(@n; @content) { - @{namespace}-@{n} { + @{name-space}-@{n}: { @content(); } } From afc4be861071faa528e2ae77cae16c46e873cbb7 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 19:20:37 +0800 Subject: [PATCH 02/18] Update routeChange.ts The mitt library reported an error message indicating that no overloaded function matching the provided parameters was found. --- src/logics/mitt/routeChange.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/logics/mitt/routeChange.ts b/src/logics/mitt/routeChange.ts index a985fe2f5..96bdaa01e 100644 --- a/src/logics/mitt/routeChange.ts +++ b/src/logics/mitt/routeChange.ts @@ -2,7 +2,7 @@ * Used to monitor routing changes to change the status of menus and tabs. There is no need to monitor the route, because the route status change is affected by the page rendering time, which will be slow */ -import { mitt } from '/@/utils/mitt'; +import {Handler, mitt} from '/@/utils/mitt'; import type { RouteLocationNormalized } from 'vue-router'; import { getRawRoute } from '/@/utils'; @@ -22,7 +22,7 @@ export function listenerRouteChange( callback: (route: RouteLocationNormalized) => void, immediate = true, ) { - emitter.on(key, callback); + emitter.on(key, callback as Handler); immediate && lastChangeTab && callback(lastChangeTab); } From c84d1e1b74db7d05f1e6aa084841ab5fd9cf68ff Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 19:25:19 +0800 Subject: [PATCH 03/18] Create node.js.yml --- .github/workflows/node.js.yml | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 .github/workflows/node.js.yml diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml new file mode 100644 index 000000000..b1ce32d71 --- /dev/null +++ b/.github/workflows/node.js.yml @@ -0,0 +1,31 @@ +# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs + +name: Node.js CI + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +jobs: + build: + + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14.x, 16.x, 18.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ + + steps: + - uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm ci + - run: npm run build --if-present + - run: npm test From d37906e7e77bf310617b6090fe44f473a1d47687 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 19:26:41 +0800 Subject: [PATCH 04/18] Create eslint.yml --- .github/workflows/eslint.yml | 50 ++++++++++++++++++++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 .github/workflows/eslint.yml diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml new file mode 100644 index 000000000..6f5291ba4 --- /dev/null +++ b/.github/workflows/eslint.yml @@ -0,0 +1,50 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +# ESLint is a tool for identifying and reporting on patterns +# found in ECMAScript/JavaScript code. +# More details at https://github.com/eslint/eslint +# and https://eslint.org + +name: ESLint + +on: + push: + branches: [ "master" ] + pull_request: + # The branches below must be a subset of the branches above + branches: [ "master" ] + schedule: + - cron: '28 1 * * 0' + +jobs: + eslint: + name: Run eslint scanning + runs-on: ubuntu-latest + permissions: + contents: read + security-events: write + actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + steps: + - name: Checkout code + uses: actions/checkout@v3 + + - name: Install ESLint + run: | + npm install eslint@8.10.0 + npm install @microsoft/eslint-formatter-sarif@2.1.7 + + - name: Run ESLint + run: npx eslint . + --config .eslintrc.js + --ext .js,.jsx,.ts,.tsx + --format @microsoft/eslint-formatter-sarif + --output-file eslint-results.sarif + continue-on-error: true + + - name: Upload analysis results to GitHub + uses: github/codeql-action/upload-sarif@v2 + with: + sarif_file: eslint-results.sarif + wait-for-processing: true From 5b4824ae4e059bd6d700ca8bb7b2df10a3130674 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:10:51 +0800 Subject: [PATCH 05/18] Update node.js.yml --- .github/workflows/node.js.yml | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index b1ce32d71..f38172e56 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -1,31 +1,36 @@ -# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node -# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs - name: Node.js CI on: push: - branches: [ "master" ] + branches: [master, dev] pull_request: - branches: [ "master" ] + branches: [master, dev] jobs: build: - runs-on: ubuntu-latest strategy: matrix: node-version: [14.x, 16.x, 18.x] - # See supported Node.js release schedule at https://nodejs.org/en/about/releases/ steps: - - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 + - name: Use Node.js ${{ matrix.node-version }} uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: 'npm' - - run: npm ci - - run: npm run build --if-present - - run: npm test + + - name: Install pnpm + run: npm install -g pnpm + + - name: Install dependencies + run: pnpm install + + - name: Run tests + run: pnpm test + + - name: Build and deploy + run: pnpm build && pnpm deploy From c445aa4bfa0167e1a4c913333f83d84e093e8035 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:16:11 +0800 Subject: [PATCH 06/18] Update node.js.yml --- .github/workflows/node.js.yml | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index f38172e56..6cfacabe2 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,25 +12,25 @@ jobs: strategy: matrix: - node-version: [14.x, 16.x, 18.x] + node-version: [16.x, 18.x] steps: - - name: Checkout code - uses: actions/checkout@v3 + - name: Checkout code + uses: actions/checkout@v3 - - name: Use Node.js ${{ matrix.node-version }} - uses: actions/setup-node@v3 - with: - node-version: ${{ matrix.node-version }} + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} - - name: Install pnpm - run: npm install -g pnpm + - name: Install pnpm + run: npm install -g pnpm - - name: Install dependencies - run: pnpm install + - name: Install dependencies + run: pnpm install - - name: Run tests - run: pnpm test + - name: Run tests + run: pnpm run test:gzip - - name: Build and deploy - run: pnpm build && pnpm deploy + - name: Build and deploy + run: pnpm build && pnpm deploy From d8644d318ac1c8883d14c35910711e8b4ddce0b3 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:22:18 +0800 Subject: [PATCH 07/18] Update eslint.yml --- .github/workflows/eslint.yml | 38 +++++++++++++++--------------------- 1 file changed, 16 insertions(+), 22 deletions(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index 6f5291ba4..a97afaf58 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -1,22 +1,12 @@ -# This workflow uses actions that are not certified by GitHub. -# They are provided by a third-party and are governed by -# separate terms of service, privacy policy, and support -# documentation. -# ESLint is a tool for identifying and reporting on patterns -# found in ECMAScript/JavaScript code. -# More details at https://github.com/eslint/eslint -# and https://eslint.org - name: ESLint on: push: - branches: [ "master" ] + branches: [master] pull_request: - # The branches below must be a subset of the branches above - branches: [ "master" ] + branches: [master] schedule: - - cron: '28 1 * * 0' + - cron: '28 1 * * * 0' jobs: eslint: @@ -25,26 +15,30 @@ jobs: permissions: contents: read security-events: write - actions: read # only required for a private repository by github/codeql-action/upload-sarif to get the Action run status + actions: read + steps: - name: Checkout code uses: actions/checkout@v3 - name: Install ESLint run: | - npm install eslint@8.10.0 - npm install @microsoft/eslint-formatter-sarif@2.1.7 + pnpm install eslint@8.10.0 + pnpm install @microsoft/eslint-formatter-sarif@2.1.7 - name: Run ESLint - run: npx eslint . - --config .eslintrc.js - --ext .js,.jsx,.ts,.tsx - --format @microsoft/eslint-formatter-sarif - --output-file eslint-results.sarif + run: | + pnpx eslint . + --config .eslintrc.js + --ext .js,.jsx,.ts,.tsx + --format @microsoft/eslint-formatter-sarif + --output-file eslint-results.sarif continue-on-error: true - name: Upload analysis results to GitHub uses: github/codeql-action/upload-sarif@v2 with: sarif_file: eslint-results.sarif - wait-for-processing: true + + - name: Wait for processing + run: echo "Waiting for analysis results to be processed..." From 0d1f827cf9f0ad66cb255838dfe6b18cb882f56a Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:24:50 +0800 Subject: [PATCH 08/18] Update eslint.yml --- .github/workflows/eslint.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/eslint.yml b/.github/workflows/eslint.yml index a97afaf58..38f939d4b 100644 --- a/.github/workflows/eslint.yml +++ b/.github/workflows/eslint.yml @@ -2,9 +2,9 @@ name: ESLint on: push: - branches: [master] + branches: ["master", "dev"] pull_request: - branches: [master] + branches: ["master", "dev"] schedule: - cron: '28 1 * * * 0' From 13023def22dd1949d537d2d7fd38c00179ce7d54 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:27:06 +0800 Subject: [PATCH 09/18] Update node.js.yml --- .github/workflows/node.js.yml | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 6cfacabe2..74efa66d6 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -29,8 +29,5 @@ jobs: - name: Install dependencies run: pnpm install - - name: Run tests - run: pnpm run test:gzip - - - name: Build and deploy - run: pnpm build && pnpm deploy + - name: Build + run: pnpm build From 40f2c5e5795234ea799fb523e0fb534c8741ca95 Mon Sep 17 00:00:00 2001 From: James Zow Date: Sun, 10 Sep 2023 22:51:27 +0800 Subject: [PATCH 10/18] Update index.less From 5a35168b87e8105c52fa5d16d31253cb7a56a9cc Mon Sep 17 00:00:00 2001 From: James Zow Date: Mon, 11 Sep 2023 10:38:48 +0800 Subject: [PATCH 11/18] Update index.less --- src/design/index.less | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/design/index.less b/src/design/index.less index 772758691..2eacf1402 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -17,7 +17,7 @@ html { text-size-adjust: 100%; } -html, +html; body { width: 100%; height: 100%; @@ -34,11 +34,11 @@ body { } } -a:focus, -a:active, -button, -div, -svg, +a:focus; +a:active; +button; +div; +svg; span { outline: none; } From 98b2233b8f974fd3911923421bcea794d33a082f Mon Sep 17 00:00:00 2001 From: James Zow Date: Mon, 11 Sep 2023 10:51:37 +0800 Subject: [PATCH 12/18] Update index.less --- src/design/index.less | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/design/index.less b/src/design/index.less index 2eacf1402..e7e7388b3 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -17,7 +17,7 @@ html { text-size-adjust: 100%; } -html; +html, body { width: 100%; height: 100%; @@ -33,12 +33,11 @@ body { filter: progid:dximagetransform.microsoft.basicimage(grayscale=1); } } - -a:focus; -a:active; -button; -div; -svg; +a:focus, +a:active, +button, +div, +svg, span { outline: none; } From 0e7548829be4eab66ab6946400a908561f7bc3a1 Mon Sep 17 00:00:00 2001 From: James Zow Date: Mon, 11 Sep 2023 11:49:35 +0800 Subject: [PATCH 13/18] Update index.less --- src/design/index.less | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/src/design/index.less b/src/design/index.less index e7e7388b3..3a8ff9b1b 100644 --- a/src/design/index.less +++ b/src/design/index.less @@ -29,15 +29,27 @@ body { } &.gray-mode { - filter: grayscale(100%); filter: progid:dximagetransform.microsoft.basicimage(grayscale=1); } } -a:focus, -a:active, + +a { + &:focus, + &:active { + outline: none; + } +} + button, div, svg, span { outline: none; } + +// 保持 和 windi 一样的全局样式,减少升级带来的影响 +ul { + margin: 0; + padding: 0; + list-style: none; +} From e7b3c781d7bde5dfa4342a0d1dfbf3b05b496a67 Mon Sep 17 00:00:00 2001 From: James Zow Date: Mon, 11 Sep 2023 12:37:59 +0800 Subject: [PATCH 14/18] Update index.less --- src/design/var/index.less | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/design/var/index.less b/src/design/var/index.less index 3e2d92b8f..3ed8aa37e 100644 --- a/src/design/var/index.less +++ b/src/design/var/index.less @@ -2,7 +2,7 @@ @import 'easing'; @import 'breakpoint'; -@name-space: vben; +@namespace: vben; // tabs @multiple-height: 30px; @@ -33,7 +33,7 @@ @page-footer-z-index: 99; .bem(@n; @content) { - @{name-space}-@{n}: { + @{name-space}-@{n} { @content(); } } From e45617ac5acddd1686703779a8e334259c04ab24 Mon Sep 17 00:00:00 2001 From: James Zow Date: Mon, 11 Sep 2023 12:40:57 +0800 Subject: [PATCH 15/18] add 20.x version check --- .github/workflows/node.js.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/node.js.yml b/.github/workflows/node.js.yml index 74efa66d6..56412de55 100644 --- a/.github/workflows/node.js.yml +++ b/.github/workflows/node.js.yml @@ -12,7 +12,7 @@ jobs: strategy: matrix: - node-version: [16.x, 18.x] + node-version: [16.x, 18.x, 20.x] steps: - name: Checkout code From b113b76c871fe6940d4d0456c24db970f14db7e6 Mon Sep 17 00:00:00 2001 From: jameszow Date: Mon, 11 Sep 2023 13:00:01 +0800 Subject: [PATCH 16/18] fix(cd/cd): error in pnpm vite build --- src/components/Application/src/AppDarkModeToggle.vue | 2 +- src/components/Application/src/AppLogo.vue | 2 +- src/components/Application/src/search/AppSearchFooter.vue | 2 +- src/components/Application/src/search/AppSearchModal.vue | 4 ++-- src/components/Basic/src/BasicArrow.vue | 2 +- src/components/Basic/src/BasicHelp.vue | 2 +- src/components/Basic/src/BasicTitle.vue | 2 +- .../Container/src/collapse/CollapseContainer.vue | 2 +- src/components/CountDown/src/CountdownInput.vue | 2 +- src/components/Cropper/src/CopperModal.vue | 2 +- src/components/Cropper/src/Cropper.vue | 2 +- src/components/Cropper/src/CropperAvatar.vue | 2 +- src/components/Drawer/src/BasicDrawer.vue | 4 ++-- src/components/Drawer/src/components/DrawerFooter.vue | 2 +- src/components/Drawer/src/components/DrawerHeader.vue | 2 +- src/components/FlowChart/src/FlowChartToolbar.vue | 2 +- src/components/Form/src/BasicForm.vue | 2 +- src/components/Icon/src/IconPicker.vue | 2 +- src/components/Icon/src/SvgIcon.vue | 2 +- src/components/Menu/src/index.less | 2 +- src/components/Modal/src/components/ModalClose.vue | 2 +- src/components/Page/src/PageFooter.vue | 2 +- src/components/Page/src/PageWrapper.vue | 2 +- src/components/Preview/src/Preview.vue | 2 +- src/components/SimpleMenu/src/components/menu.less | 6 +++--- src/components/SimpleMenu/src/index.less | 4 ++-- src/components/StrengthMeter/src/StrengthMeter.vue | 2 +- src/components/Table/src/BasicTable.vue | 2 +- src/components/Table/src/components/HeaderCell.vue | 2 +- src/components/Table/src/components/TableAction.vue | 2 +- src/components/Table/src/components/TableHeader.vue | 2 +- src/components/Table/src/components/TableImg.vue | 2 +- src/components/Table/src/components/TableTitle.vue | 2 +- .../Table/src/components/editable/EditableCell.vue | 2 +- .../Table/src/components/settings/ColumnSetting.vue | 2 +- src/components/Tinymce/src/Editor.vue | 2 +- src/components/Tinymce/src/ImgUpload.vue | 2 +- src/components/Tree/style/index.less | 2 +- src/design/ant/table.less | 2 +- src/design/var/index.less | 2 +- src/hooks/web/useI18n.ts | 2 +- src/layouts/default/content/index.vue | 2 +- src/layouts/default/feature/index.vue | 2 +- src/layouts/default/footer/index.vue | 2 +- src/layouts/default/header/MultipleHeader.vue | 2 +- src/layouts/default/header/components/Breadcrumb.vue | 2 +- src/layouts/default/header/components/lock/LockModal.vue | 2 +- .../default/header/components/notify/NoticeList.vue | 2 +- src/layouts/default/header/components/notify/index.vue | 2 +- .../default/header/components/user-dropdown/index.vue | 2 +- src/layouts/default/header/index.less | 8 ++++---- src/layouts/default/index.vue | 2 +- src/layouts/default/menu/index.vue | 4 ++-- .../default/setting/components/InputNumberItem.vue | 2 +- src/layouts/default/setting/components/SelectItem.vue | 2 +- src/layouts/default/setting/components/SettingFooter.vue | 2 +- src/layouts/default/setting/components/SwitchItem.vue | 2 +- .../default/setting/components/ThemeColorPicker.vue | 2 +- src/layouts/default/setting/components/TypePicker.vue | 2 +- src/layouts/default/sider/DragBar.vue | 2 +- src/layouts/default/sider/LayoutSider.vue | 2 +- src/layouts/default/sider/MixSider.vue | 2 +- src/layouts/default/sider/index.vue | 2 +- src/layouts/default/tabs/index.less | 2 +- src/views/sys/exception/Exception.vue | 2 +- src/views/sys/iframe/index.vue | 2 +- src/views/sys/lock/LockPage.vue | 2 +- src/views/sys/login/Login.vue | 6 +++--- src/views/sys/login/SessionTimeoutLogin.vue | 2 +- 69 files changed, 80 insertions(+), 80 deletions(-) diff --git a/src/components/Application/src/AppDarkModeToggle.vue b/src/components/Application/src/AppDarkModeToggle.vue index 301655a4c..13c229958 100644 --- a/src/components/Application/src/AppDarkModeToggle.vue +++ b/src/components/Application/src/AppDarkModeToggle.vue @@ -32,7 +32,7 @@ }