Skip to content

Commit

Permalink
fix(tabs): fix the problem that other functions are invalid when the …
Browse files Browse the repository at this point in the history
…tab is closed, close #376
  • Loading branch information
anncwb committed Apr 19, 2021
1 parent 4f0c6fb commit b92b8a3
Show file tree
Hide file tree
Showing 9 changed files with 28 additions and 16 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.zh_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
### 🐛 Bug Fixes

- 修复黑暗主题刷新闪烁的白屏
- 修复标签页关闭其他功能失效问题

## 2.3.0 (2021-04-10)

Expand Down
2 changes: 2 additions & 0 deletions build/vite/plugin/hmr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,10 +11,12 @@ export function configHmrPlugin(): Plugin {
name: 'singleHMR',
handleHotUpdate({ modules, file }) {
if (file.match(/xml$/)) return [];

modules.forEach((m) => {
m.importedModules = new Set();
m.importers = new Set();
});

return modules;
},
};
Expand Down
4 changes: 2 additions & 2 deletions build/vite/plugin/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import { configThemePlugin } from './theme';
import { configImageminPlugin } from './imagemin';
import { configWindiCssPlugin } from './windicss';
import { configSvgIconsPlugin } from './svgSprite';
import { configHmrPlugin } from './hmr';
// import { configHmrPlugin } from './hmr';

export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
const {
Expand All @@ -35,7 +35,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) {
];

// TODO
!isBuild && vitePlugins.push(configHmrPlugin());
// !isBuild && vitePlugins.push(configHmrPlugin());

// @vitejs/plugin-legacy
VITE_LEGACY && isBuild && vitePlugins.push(legacy());
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
},
"dependencies": {
"@iconify/iconify": "^2.0.0-rc.6",
"@logicflow/core": "^0.3.0",
"@logicflow/extension": "^0.3.0",
"@logicflow/core": "^0.3.1",
"@logicflow/extension": "^0.3.1",
"@vueuse/core": "^4.8.2",
"@zxcvbn-ts/core": "^0.3.0",
"ant-design-vue": "^2.1.2",
Expand Down
5 changes: 5 additions & 0 deletions src/components/ContextMenu/src/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,9 @@

.item-style();
}

.ant-menu-submenu-title,
.ant-menu-item {
padding: 0 !important;
}
}
6 changes: 5 additions & 1 deletion src/components/ContextMenu/src/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,11 @@ const prefixCls = 'context-menu';
const ItemContent: FunctionalComponent<ItemContentProps> = (props) => {
const { item } = props;
return (
<span style="display: inline-block; width: 100%;" onClick={props.handler.bind(null, item)}>
<span
style="display: inline-block; width: 100%; "
class="px-4"
onClick={props.handler.bind(null, item)}
>
{props.showIcon && item.icon && <Icon class="mr-2" icon={item.icon} />}
<span>{item.label}</span>
</span>
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/multipleTab.ts
Original file line number Diff line number Diff line change
Expand Up @@ -267,7 +267,7 @@ export const useMultipleTabStore = defineStore({
if (path !== route.fullPath) {
const closeItem = this.tabList.find((item) => item.path === path);
if (!closeItem) {
return;
continue;
}
const affix = closeItem?.meta?.affix ?? false;
if (!affix) {
Expand Down
2 changes: 1 addition & 1 deletion src/views/sys/about/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<div class="flex justify-between items-center">
<span class="flex-1">
<a :href="GITHUB_URL" target="_blank">{{ name }}</a>
是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript
是一个基于Vue3.01、Vite、 Ant-Design-Vue 、TypeScript
的后台解决方案,目标是为中大型项目开发,提供现成的开箱解决方案及丰富的示例,原则上不会限制任何代码用于商用。
</span>
</div>
Expand Down
18 changes: 9 additions & 9 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1151,17 +1151,17 @@
resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0.tgz#d85b3b5f9033f377c5cf2202cf2459aa49948f36"
integrity sha512-0r4v7dnY8g/Jfx2swUWy2GyfH/WvIpWvkU4OIupvxDTWiE8RhcpbOCVvqpVh/xGi0proHQ/r2Dhc0QSItUsfDQ==

"@logicflow/core@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@logicflow/core/-/core-0.3.0.tgz#910ca7865487fbe6c45a450d13627875c6965bf4"
integrity sha512-FPRTuj0y6Yny+YDZ+faTzA8pZyouEWX1Vr6rH91wJR0J3NOHgb7pV/TJoHSosavFuyyw87nLw9UsyUUgHKVV+A==
"@logicflow/core@^0.3.1":
version "0.3.1"
resolved "https://registry.npmjs.org/@logicflow/core/-/core-0.3.1.tgz#183402506c3113f391fb5415d3b3de9093fa843b"
integrity sha512-PZwwaRGURwOWFf4JVDc6GGfDRZtawvVGY6/3Z4cjulNiEFzxtQnz4RH0Zqzd6qFRxpEctqKnZ+eckLPWX4YFug==

"@logicflow/extension@^0.3.0":
version "0.3.0"
resolved "https://registry.yarnpkg.com/@logicflow/extension/-/extension-0.3.0.tgz#cea4470de3a8e4b7da69b17d7507b2d8edd76b50"
integrity sha512-vMmYT8H53oFhOpNftCYQMbNYbTiXqQUxOOKlPcrKkZb0FsXSiEZ/MUKBF3mAarvFlzdMaB5xJjakMfy07/bdvw==
"@logicflow/extension@^0.3.1":
version "0.3.1"
resolved "https://registry.npmjs.org/@logicflow/extension/-/extension-0.3.1.tgz#984ced98df97a3460ee43ac9a513c20511ebe862"
integrity sha512-WSPVqwmTvI52e2Go6EQeUEoHs+l6o2h4u47iVuwC39A/cIFcc2skefQ9fTzGJHeWIXjPf7Nl/W5ylrmeVsIJ4Q==
dependencies:
"@logicflow/core" "^0.3.0"
"@logicflow/core" "^0.3.1"
ids "^1.0.0"

"@nodelib/[email protected]":
Expand Down

0 comments on commit b92b8a3

Please sign in to comment.