mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-27 14:13:40 +08:00
fix: fix modal and drawer component missing uid
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { withInstall } from '../util';
|
||||
import { createAsyncComponent } from '/@/utils/factory/createAsyncComponent';
|
||||
import AppLogo from './src/AppLogo.vue';
|
||||
|
||||
export const AppLocalePicker = createAsyncComponent(() => import('./src/AppLocalePicker.vue'), {
|
||||
loading: true,
|
||||
@@ -8,8 +9,9 @@ export const AppProvider = createAsyncComponent(() => import('./src/AppProvider.
|
||||
export const AppSearch = createAsyncComponent(() => import('./src/search/AppSearch.vue'), {
|
||||
loading: true,
|
||||
});
|
||||
export const AppLogo = createAsyncComponent(() => import('./src/AppLogo.vue'));
|
||||
// export const AppLogo = createAsyncComponent(() => import('./src/AppLogo.vue'));
|
||||
|
||||
withInstall(AppLocalePicker, AppLogo, AppProvider, AppSearch);
|
||||
|
||||
export { useAppProviderContext } from './src/useAppContext';
|
||||
export { AppLogo };
|
||||
|
@@ -102,7 +102,7 @@ export const useDrawerInner = (callbackFn?: Fn): UseDrawerInnerReturnType => {
|
||||
|
||||
uidRef.value = uuid;
|
||||
drawerInstanceRef.value = modalInstance;
|
||||
currentInstall.emit('register', modalInstance);
|
||||
currentInstall.emit('register', modalInstance, uuid);
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
|
@@ -90,6 +90,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => {
|
||||
throw new Error('instance is undefined!');
|
||||
}
|
||||
|
||||
// currentInstall.type.emits = [...currentInstall.type.emits, 'register'];
|
||||
// Object.assign(currentInstall.type.emits, ['register']);
|
||||
|
||||
const getInstance = () => {
|
||||
const instance = unref(modalInstanceRef);
|
||||
if (!instance) {
|
||||
@@ -103,10 +106,9 @@ export const useModalInner = (callbackFn?: Fn): UseModalInnerReturnType => {
|
||||
tryOnUnmounted(() => {
|
||||
modalInstanceRef.value = null;
|
||||
});
|
||||
|
||||
uidRef.value = uuid;
|
||||
modalInstanceRef.value = modalInstance;
|
||||
currentInstall.emit('register', modalInstance);
|
||||
currentInstall.emit('register', modalInstance, uuid);
|
||||
};
|
||||
|
||||
watchEffect(() => {
|
||||
|
Reference in New Issue
Block a user