Commit b92b8a3c6af1d936d48b5f58674f419407eeb600
1 parent
4f0c6fbc
fix(tabs): fix the problem that other functions are invalid when the tab is closed, close #376
Showing
9 changed files
with
28 additions
and
16 deletions
CHANGELOG.zh_CN.md
build/vite/plugin/hmr.ts
@@ -11,10 +11,12 @@ export function configHmrPlugin(): Plugin { | @@ -11,10 +11,12 @@ export function configHmrPlugin(): Plugin { | ||
11 | name: 'singleHMR', | 11 | name: 'singleHMR', |
12 | handleHotUpdate({ modules, file }) { | 12 | handleHotUpdate({ modules, file }) { |
13 | if (file.match(/xml$/)) return []; | 13 | if (file.match(/xml$/)) return []; |
14 | + | ||
14 | modules.forEach((m) => { | 15 | modules.forEach((m) => { |
15 | m.importedModules = new Set(); | 16 | m.importedModules = new Set(); |
16 | m.importers = new Set(); | 17 | m.importers = new Set(); |
17 | }); | 18 | }); |
19 | + | ||
18 | return modules; | 20 | return modules; |
19 | }, | 21 | }, |
20 | }; | 22 | }; |
build/vite/plugin/index.ts
@@ -16,7 +16,7 @@ import { configThemePlugin } from './theme'; | @@ -16,7 +16,7 @@ import { configThemePlugin } from './theme'; | ||
16 | import { configImageminPlugin } from './imagemin'; | 16 | import { configImageminPlugin } from './imagemin'; |
17 | import { configWindiCssPlugin } from './windicss'; | 17 | import { configWindiCssPlugin } from './windicss'; |
18 | import { configSvgIconsPlugin } from './svgSprite'; | 18 | import { configSvgIconsPlugin } from './svgSprite'; |
19 | -import { configHmrPlugin } from './hmr'; | 19 | +// import { configHmrPlugin } from './hmr'; |
20 | 20 | ||
21 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | 21 | export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { |
22 | const { | 22 | const { |
@@ -35,7 +35,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | @@ -35,7 +35,7 @@ export function createVitePlugins(viteEnv: ViteEnv, isBuild: boolean) { | ||
35 | ]; | 35 | ]; |
36 | 36 | ||
37 | // TODO | 37 | // TODO |
38 | - !isBuild && vitePlugins.push(configHmrPlugin()); | 38 | + // !isBuild && vitePlugins.push(configHmrPlugin()); |
39 | 39 | ||
40 | // @vitejs/plugin-legacy | 40 | // @vitejs/plugin-legacy |
41 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); | 41 | VITE_LEGACY && isBuild && vitePlugins.push(legacy()); |
package.json
@@ -33,8 +33,8 @@ | @@ -33,8 +33,8 @@ | ||
33 | }, | 33 | }, |
34 | "dependencies": { | 34 | "dependencies": { |
35 | "@iconify/iconify": "^2.0.0-rc.6", | 35 | "@iconify/iconify": "^2.0.0-rc.6", |
36 | - "@logicflow/core": "^0.3.0", | ||
37 | - "@logicflow/extension": "^0.3.0", | 36 | + "@logicflow/core": "^0.3.1", |
37 | + "@logicflow/extension": "^0.3.1", | ||
38 | "@vueuse/core": "^4.8.2", | 38 | "@vueuse/core": "^4.8.2", |
39 | "@zxcvbn-ts/core": "^0.3.0", | 39 | "@zxcvbn-ts/core": "^0.3.0", |
40 | "ant-design-vue": "^2.1.2", | 40 | "ant-design-vue": "^2.1.2", |
src/components/ContextMenu/src/index.less
src/components/ContextMenu/src/index.tsx
@@ -15,7 +15,11 @@ const prefixCls = 'context-menu'; | @@ -15,7 +15,11 @@ const prefixCls = 'context-menu'; | ||
15 | const ItemContent: FunctionalComponent<ItemContentProps> = (props) => { | 15 | const ItemContent: FunctionalComponent<ItemContentProps> = (props) => { |
16 | const { item } = props; | 16 | const { item } = props; |
17 | return ( | 17 | return ( |
18 | - <span style="display: inline-block; width: 100%;" onClick={props.handler.bind(null, item)}> | 18 | + <span |
19 | + style="display: inline-block; width: 100%; " | ||
20 | + class="px-4" | ||
21 | + onClick={props.handler.bind(null, item)} | ||
22 | + > | ||
19 | {props.showIcon && item.icon && <Icon class="mr-2" icon={item.icon} />} | 23 | {props.showIcon && item.icon && <Icon class="mr-2" icon={item.icon} />} |
20 | <span>{item.label}</span> | 24 | <span>{item.label}</span> |
21 | </span> | 25 | </span> |
src/store/modules/multipleTab.ts
@@ -267,7 +267,7 @@ export const useMultipleTabStore = defineStore({ | @@ -267,7 +267,7 @@ export const useMultipleTabStore = defineStore({ | ||
267 | if (path !== route.fullPath) { | 267 | if (path !== route.fullPath) { |
268 | const closeItem = this.tabList.find((item) => item.path === path); | 268 | const closeItem = this.tabList.find((item) => item.path === path); |
269 | if (!closeItem) { | 269 | if (!closeItem) { |
270 | - return; | 270 | + continue; |
271 | } | 271 | } |
272 | const affix = closeItem?.meta?.affix ?? false; | 272 | const affix = closeItem?.meta?.affix ?? false; |
273 | if (!affix) { | 273 | if (!affix) { |
src/views/sys/about/index.vue
@@ -4,7 +4,7 @@ | @@ -4,7 +4,7 @@ | ||
4 | <div class="flex justify-between items-center"> | 4 | <div class="flex justify-between items-center"> |
5 | <span class="flex-1"> | 5 | <span class="flex-1"> |
6 | <a :href="GITHUB_URL" target="_blank">{{ name }}</a> | 6 | <a :href="GITHUB_URL" target="_blank">{{ name }}</a> |
7 | - 是一个基于Vue3.0、Vite、 Ant-Design-Vue 、TypeScript | 7 | + 是一个基于Vue3.01、Vite、 Ant-Design-Vue 、TypeScript |
8 | 的后台解决方案,目标是为中大型项目开发,提供现成的开箱解决方案及丰富的示例,原则上不会限制任何代码用于商用。 | 8 | 的后台解决方案,目标是为中大型项目开发,提供现成的开箱解决方案及丰富的示例,原则上不会限制任何代码用于商用。 |
9 | </span> | 9 | </span> |
10 | </div> | 10 | </div> |
yarn.lock
@@ -1151,17 +1151,17 @@ | @@ -1151,17 +1151,17 @@ | ||
1151 | resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0.tgz#d85b3b5f9033f377c5cf2202cf2459aa49948f36" | 1151 | resolved "https://registry.npmjs.org/@intlify/shared/-/shared-9.0.0.tgz#d85b3b5f9033f377c5cf2202cf2459aa49948f36" |
1152 | integrity sha512-0r4v7dnY8g/Jfx2swUWy2GyfH/WvIpWvkU4OIupvxDTWiE8RhcpbOCVvqpVh/xGi0proHQ/r2Dhc0QSItUsfDQ== | 1152 | integrity sha512-0r4v7dnY8g/Jfx2swUWy2GyfH/WvIpWvkU4OIupvxDTWiE8RhcpbOCVvqpVh/xGi0proHQ/r2Dhc0QSItUsfDQ== |
1153 | 1153 | ||
1154 | -"@logicflow/core@^0.3.0": | ||
1155 | - version "0.3.0" | ||
1156 | - resolved "https://registry.yarnpkg.com/@logicflow/core/-/core-0.3.0.tgz#910ca7865487fbe6c45a450d13627875c6965bf4" | ||
1157 | - integrity sha512-FPRTuj0y6Yny+YDZ+faTzA8pZyouEWX1Vr6rH91wJR0J3NOHgb7pV/TJoHSosavFuyyw87nLw9UsyUUgHKVV+A== | 1154 | +"@logicflow/core@^0.3.1": |
1155 | + version "0.3.1" | ||
1156 | + resolved "https://registry.npmjs.org/@logicflow/core/-/core-0.3.1.tgz#183402506c3113f391fb5415d3b3de9093fa843b" | ||
1157 | + integrity sha512-PZwwaRGURwOWFf4JVDc6GGfDRZtawvVGY6/3Z4cjulNiEFzxtQnz4RH0Zqzd6qFRxpEctqKnZ+eckLPWX4YFug== | ||
1158 | 1158 | ||
1159 | -"@logicflow/extension@^0.3.0": | ||
1160 | - version "0.3.0" | ||
1161 | - resolved "https://registry.yarnpkg.com/@logicflow/extension/-/extension-0.3.0.tgz#cea4470de3a8e4b7da69b17d7507b2d8edd76b50" | ||
1162 | - integrity sha512-vMmYT8H53oFhOpNftCYQMbNYbTiXqQUxOOKlPcrKkZb0FsXSiEZ/MUKBF3mAarvFlzdMaB5xJjakMfy07/bdvw== | 1159 | +"@logicflow/extension@^0.3.1": |
1160 | + version "0.3.1" | ||
1161 | + resolved "https://registry.npmjs.org/@logicflow/extension/-/extension-0.3.1.tgz#984ced98df97a3460ee43ac9a513c20511ebe862" | ||
1162 | + integrity sha512-WSPVqwmTvI52e2Go6EQeUEoHs+l6o2h4u47iVuwC39A/cIFcc2skefQ9fTzGJHeWIXjPf7Nl/W5ylrmeVsIJ4Q== | ||
1163 | dependencies: | 1163 | dependencies: |
1164 | - "@logicflow/core" "^0.3.0" | 1164 | + "@logicflow/core" "^0.3.1" |
1165 | ids "^1.0.0" | 1165 | ids "^1.0.0" |
1166 | 1166 | ||
1167 | "@nodelib/fs.scandir@2.1.4": | 1167 | "@nodelib/fs.scandir@2.1.4": |