Skip to content

Commit

Permalink
fix: header theme color error (vbenjs#4170)
Browse files Browse the repository at this point in the history
* fix: header theme color error

* fix: ci error

* fix: ci error
  • Loading branch information
anncwb authored Aug 16, 2024
1 parent 0faf781 commit 6680858
Show file tree
Hide file tree
Showing 9 changed files with 473 additions and 520 deletions.
2 changes: 1 addition & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# registry = "https://registry.npmmirror.com"
registry = "https://registry.npmmirror.com"
public-hoist-pattern[]=husky
public-hoist-pattern[]=eslint
public-hoist-pattern[]=prettier
Expand Down
2 changes: 1 addition & 1 deletion README.ja-JP.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ pnpm build

## 変更ログ

[CHANGELOG](./CHANGELOG.zh_CN.md)
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)

## 貢献方法

Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pnpm build

## Change Log

[CHANGELOG](./CHANGELOG.zh_CN.md)
[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)

## How to contribute

Expand Down
4 changes: 4 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>

## 更新日志

[CHANGELOG](https://github.com/vbenjs/vue-vben-admin/releases/latest)

## Contributor

<a href="https://github.com/vbenjs/vue-vben-admin/graphs/contributors">
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@
"unbuild": "^2.0.0",
"vite": "^5.4.1",
"vitest": "^2.0.5",
"vue": "^3.4.38",
"vue": "^3.4.37",
"vue-tsc": "^2.0.29"
},
"engines": {
Expand All @@ -105,7 +105,7 @@
"@ctrl/tinycolor": "4.1.0",
"clsx": "2.1.1",
"pinia": "2.2.2",
"vue": "3.4.38"
"vue": "3.4.37"
},
"neverBuiltDependencies": [
"canvas",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -351,7 +351,7 @@
--ring: 240 4.9% 83.9%;
--sidebar: 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'],
Expand Down
4 changes: 2 additions & 2 deletions packages/stores/src/modules/tabbar.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ describe('useAccessStore', () => {
const updatedTab = { ...initialTab, query: { id: '1' } };
store.addTab(updatedTab);
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 () => {
Expand All @@ -67,7 +67,7 @@ describe('useAccessStore', () => {

await store.closeAllTabs(router);

expect(store.tabs.length).toBe(0); // 假设没有固定的标签页
expect(store.tabs.length).toBe(1); // 假设没有固定的标签页
// expect(router.replace).toHaveBeenCalled();
});

Expand Down
3 changes: 2 additions & 1 deletion packages/stores/src/modules/tabbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,8 @@ export const useTabbarStore = defineStore('core-tabbar', {
* @zh_CN 关闭所有标签页
*/
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);
this.updateCacheTab();
},
Expand Down
Loading

0 comments on commit 6680858

Please sign in to comment.