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 | 1 | import { withInstall } from '../util'; |
2 | 2 | import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent'; |
3 | +import AppLogo from './src/AppLogo.vue'; | |
3 | 4 | |
4 | 5 | export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'), { |
5 | 6 | loading: true, |
... | ... | @@ -8,8 +9,9 @@ export const AppProvider = createAsyncComponent(() => import('./src/AppProvider. |
8 | 9 | export const AppSearch = createAsyncComponent(() => import('./src/search/AppSearch.vue'), { |
9 | 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 | 14 | withInstall(AppLocalePicker, AppLogo, AppProvider, AppSearch); |
14 | 15 | |
15 | 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 | 102 | |
103 | 103 | uidRef.value = uuid; |
104 | 104 | drawerInstanceRef.value = modalInstance; |
105 | - currentInstall.emit('register', modalInstance); | |
105 | + currentInstall.emit('register', modalInstance, uuid); | |
106 | 106 | }; |
107 | 107 | |
108 | 108 | watchEffect(() => { | ... | ... |
src/components/Modal/src/useModal.ts
... | ... | @@ -90,6 +90,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { |
90 | 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 | 96 | const getInstance = () => { |
94 | 97 | const instance = unref(modalInstanceRef); |
95 | 98 | if (!instance) { |
... | ... | @@ -103,10 +106,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => { |
103 | 106 | tryOnUnmounted(() => { |
104 | 107 | modalInstanceRef.value = null; |
105 | 108 | }); |
106 | - | |
107 | 109 | uidRef.value = uuid; |
108 | 110 | modalInstanceRef.value = modalInstance; |
109 | - currentInstall.emit('register', modalInstance); | |
111 | + currentInstall.emit('register', modalInstance, uuid); | |
110 | 112 | }; |
111 | 113 | |
112 | 114 | watchEffect(() => { | ... | ... |
src/layouts/default/header/LayoutMultipleHeader.less
src/layouts/default/index.less
src/layouts/default/sider/index.less