Commit 1293a7389ea797b1c1dad62e06657c846b1dcb3c
1 parent
f7ec3c93
fix: fix modal and drawer component missing uid
Showing
7 changed files
with
14 additions
and
8 deletions
CHANGELOG.zh_CN.md
src/components/Application/index.ts
1 | import { withInstall } from '../util'; | 1 | import { withInstall } from '../util'; |
2 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; | 2 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; |
3 | +import AppLogo from './src/AppLogo.vue'; | ||
3 | 4 | ||
4 | export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'), { | 5 | export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'), { |
5 | loading: true, | 6 | loading: true, |
@@ -8,8 +9,9 @@ export const AppProvider = createAsyncComponent(() => import('./src/AppProvider. | @@ -8,8 +9,9 @@ export const AppProvider = createAsyncComponent(() => import('./src/AppProvider. | ||
8 | export const AppSearch = createAsyncComponent(() => import('./src/search/AppSearch.vue'), { | 9 | export const AppSearch = createAsyncComponent(() => import('./src/search/AppSearch.vue'), { |
9 | loading: true, | 10 | loading: true, |
10 | }); | 11 | }); |
11 | -export const AppLogo = createAsyncComponent(() => import('./src/AppLogo.vue')); | 12 | +// export const AppLogo = createAsyncComponent(() => import('./src/AppLogo.vue')); |
12 | 13 | ||
13 | withInstall(AppLocalePicker, AppLogo, AppProvider, AppSearch); | 14 | withInstall(AppLocalePicker, AppLogo, AppProvider, AppSearch); |
14 | 15 | ||
15 | export { useAppProviderContext } from './src/useAppContext'; | 16 | export { useAppProviderContext } from './src/useAppContext'; |
17 | +export { AppLogo }; |
src/components/Drawer/src/useDrawer.ts
@@ -102,7 +102,7 @@ export const useDrawerInner = (callbackFn?: Fn): UseDrawerInnerReturnType => { | @@ -102,7 +102,7 @@ export const useDrawerInner = (callbackFn?: Fn): UseDrawerInnerReturnType => { | ||
102 | 102 | ||
103 | uidRef.value = uuid; | 103 | uidRef.value = uuid; |
104 | drawerInstanceRef.value = modalInstance; | 104 | drawerInstanceRef.value = modalInstance; |
105 | - currentInstall.emit('register', modalInstance); | 105 | + currentInstall.emit('register', modalInstance, uuid); |
106 | }; | 106 | }; |
107 | 107 | ||
108 | watchEffect(() => { | 108 | watchEffect(() => { |
src/components/Modal/src/useModal.ts
@@ -90,6 +90,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { | @@ -90,6 +90,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { | ||
90 | throw new Error('instance is undefined!'); | 90 | throw new Error('instance is undefined!'); |
91 | } | 91 | } |
92 | 92 | ||
93 | + // currentInstall.type.emits = [...currentInstall.type.emits, 'register']; | ||
94 | + // Object.assign(currentInstall.type.emits, ['register']); | ||
95 | + | ||
93 | const getInstance = () => { | 96 | const getInstance = () => { |
94 | const instance = unref(modalInstanceRef); | 97 | const instance = unref(modalInstanceRef); |
95 | if (!instance) { | 98 | if (!instance) { |
@@ -103,10 +106,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { | @@ -103,10 +106,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { | ||
103 | tryOnUnmounted(() => { | 106 | tryOnUnmounted(() => { |
104 | modalInstanceRef.value = null; | 107 | modalInstanceRef.value = null; |
105 | }); | 108 | }); |
106 | - | ||
107 | uidRef.value = uuid; | 109 | uidRef.value = uuid; |
108 | modalInstanceRef.value = modalInstance; | 110 | modalInstanceRef.value = modalInstance; |
109 | - currentInstall.emit('register', modalInstance); | 111 | + currentInstall.emit('register', modalInstance, uuid); |
110 | }; | 112 | }; |
111 | 113 | ||
112 | watchEffect(() => { | 114 | watchEffect(() => { |
src/layouts/default/header/LayoutMultipleHeader.less
src/layouts/default/index.less
src/layouts/default/sider/index.less
@@ -25,7 +25,7 @@ | @@ -25,7 +25,7 @@ | ||
25 | } | 25 | } |
26 | 26 | ||
27 | &:not(.ant-layout-sider-dark) { | 27 | &:not(.ant-layout-sider-dark) { |
28 | - box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05); | 28 | + // box-shadow: 2px 0 8px 0 rgba(29, 35, 41, 0.05); |
29 | 29 | ||
30 | .ant-layout-sider-trigger { | 30 | .ant-layout-sider-trigger { |
31 | color: @text-color-base; | 31 | color: @text-color-base; |