Browse Source

fix: header theme color error (#4170)

* fix: header theme color error

* fix: ci error

* fix: ci error
pull/4172/head
Vben 1 month ago
committed by GitHub
parent
commit
66808582ff
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .npmrc
  2. 2
      README.ja-JP.md
  3. 2
      README.md
  4. 4
      README.zh-CN.md
  5. 4
      package.json
  6. 2
      packages/@core/base/design/src/design-tokens/dark/index.css
  7. 4
      packages/stores/src/modules/tabbar.test.ts
  8. 3
      packages/stores/src/modules/tabbar.ts
  9. 970
      pnpm-lock.yaml

2
.npmrc

@ -1,4 +1,4 @@
# registry = "https://registry.npmmirror.com"
registry = "https://registry.npmmirror.com"
public-hoist-pattern[]=husky public-hoist-pattern[]=husky
public-hoist-pattern[]=eslint public-hoist-pattern[]=eslint
public-hoist-pattern[]=prettier public-hoist-pattern[]=prettier

2
README.ja-JP.md

@ -78,7 +78,7 @@ pnpm build
## 変更ログ ## 変更ログ
[CHANGELOG](./CHANGELOG.zh_CN.md)
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)
## 貢献方法 ## 貢献方法

2
README.md

@ -77,7 +77,7 @@ pnpm build
## Change Log ## Change Log
[CHANGELOG](./CHANGELOG.zh_CN.md)
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)
## How to contribute ## How to contribute

4
README.zh-CN.md

@ -126,6 +126,10 @@ pnpm build
<a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a> <a style="display: block;width: 100px;height: 50px;line-height: 50px; color: #fff;text-align: center; background: #408aed;border-radius: 4px;" href="https://www.paypal.com/paypalme/cvvben">Paypal Me</a>
## 更新日志
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)
## Contributor ## Contributor
<a href="https://github.com/vbenjs/vue-vben-admin/graphs/contributors"> <a href="https://github.com/vbenjs/vue-vben-admin/graphs/contributors">

4
package.json

@ -87,7 +87,7 @@
"unbuild": "^2.0.0", "unbuild": "^2.0.0",
"vite": "^5.4.1", "vite": "^5.4.1",
"vitest": "^2.0.5", "vitest": "^2.0.5",
"vue": "^3.4.38",
"vue": "^3.4.37",
"vue-tsc": "^2.0.29" "vue-tsc": "^2.0.29"
}, },
"engines": { "engines": {
@ -105,7 +105,7 @@
"@ctrl/tinycolor": "4.1.0", "@ctrl/tinycolor": "4.1.0",
"clsx": "2.1.1", "clsx": "2.1.1",
"pinia": "2.2.2", "pinia": "2.2.2",
"vue": "3.4.38"
"vue": "3.4.37"
}, },
"neverBuiltDependencies": [ "neverBuiltDependencies": [
"canvas", "canvas",

2
packages/@core/base/design/src/design-tokens/dark/index.css

@ -351,7 +351,7 @@
--ring: 240 4.9% 83.9%; --ring: 240 4.9% 83.9%;
--sidebar: 240 10% 3.9%; --sidebar: 240 10% 3.9%;
--sidebar-deep: 240 10% 3.9%; --sidebar-deep: 240 10% 3.9%;
--header: 240 4.9% 83.9%;
--header: 240 10% 3.9%;
} }
.dark[data-theme='neutral'], .dark[data-theme='neutral'],

4
packages/stores/src/modules/tabbar.test.ts

@ -55,7 +55,7 @@ describe('useAccessStore', () => {
const updatedTab = { ...initialTab, query: { id: '1' } }; const updatedTab = { ...initialTab, query: { id: '1' } };
store.addTab(updatedTab); store.addTab(updatedTab);
expect(store.tabs.length).toBe(1); expect(store.tabs.length).toBe(1);
expect(store.tabs[0].query).toEqual({ id: '1' });
expect(store.tabs[0]?.query).toEqual({ id: '1' });
}); });
it('closes all tabs', async () => { it('closes all tabs', async () => {
@ -67,7 +67,7 @@ describe('useAccessStore', () => {
await store.closeAllTabs(router); await store.closeAllTabs(router);
expect(store.tabs.length).toBe(0); // 假设没有固定的标签页
expect(store.tabs.length).toBe(1); // 假设没有固定的标签页
// expect(router.replace).toHaveBeenCalled(); // expect(router.replace).toHaveBeenCalled();
}); });

3
packages/stores/src/modules/tabbar.ts

@ -147,7 +147,8 @@ export const useTabbarStore = defineStore('core-tabbar', {
* @zh_CN * @zh_CN
*/ */
async closeAllTabs(router: Router) { async closeAllTabs(router: Router) {
this.tabs = this.tabs.filter((tab) => isAffixTab(tab));
const newTabs = this.tabs.filter((tab) => isAffixTab(tab));
this.tabs = newTabs.length > 0 ? newTabs : [...this.tabs].splice(0, 1);
await this._goToDefaultTab(router); await this._goToDefaultTab(router);
this.updateCacheTab(); this.updateCacheTab();
}, },

970
pnpm-lock.yaml
File diff suppressed because it is too large
View File

Loading…
Cancel
Save