mirror of
https://github.com/vbenjs/vue-vben-admin.git
synced 2025-08-22 22:16:18 +08:00
feat: support set default props for drawer and modal (#5390)
* feat: support set default props for drawer and modal * docs: fix typo
This commit is contained in:
@@ -1,7 +1,11 @@
|
||||
import { createApp, watchEffect } from 'vue';
|
||||
|
||||
import { registerAccessDirective } from '@vben/access';
|
||||
import { initTippy } from '@vben/common-ui';
|
||||
import {
|
||||
initTippy,
|
||||
setDefaultDrawerProps,
|
||||
setDefaultModalProps,
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { initStores } from '@vben/stores';
|
||||
import '@vben/styles';
|
||||
@@ -19,6 +23,16 @@ async function bootstrap(namespace: string) {
|
||||
// 初始化组件适配器
|
||||
await initComponentAdapter();
|
||||
|
||||
// 设置弹窗的默认配置
|
||||
setDefaultModalProps({
|
||||
fullscreenButton: false,
|
||||
zIndex: 1020,
|
||||
});
|
||||
// 设置抽屉的默认配置
|
||||
setDefaultDrawerProps({
|
||||
zIndex: 1020,
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
// 国际化 i18n 配置
|
||||
|
@@ -1,7 +1,11 @@
|
||||
import { createApp, watchEffect } from 'vue';
|
||||
|
||||
import { registerAccessDirective } from '@vben/access';
|
||||
import { initTippy } from '@vben/common-ui';
|
||||
import {
|
||||
initTippy,
|
||||
setDefaultDrawerProps,
|
||||
setDefaultModalProps,
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { initStores } from '@vben/stores';
|
||||
import '@vben/styles';
|
||||
@@ -19,6 +23,15 @@ import { router } from './router';
|
||||
async function bootstrap(namespace: string) {
|
||||
// 初始化组件适配器
|
||||
await initComponentAdapter();
|
||||
// 设置弹窗的默认配置
|
||||
setDefaultModalProps({
|
||||
fullscreenButton: false,
|
||||
zIndex: 2000,
|
||||
});
|
||||
// 设置抽屉的默认配置
|
||||
setDefaultDrawerProps({
|
||||
zIndex: 2000,
|
||||
});
|
||||
const app = createApp(App);
|
||||
|
||||
// 注册Element Plus提供的v-loading指令
|
||||
|
@@ -1,7 +1,11 @@
|
||||
import { createApp, watchEffect } from 'vue';
|
||||
|
||||
import { registerAccessDirective } from '@vben/access';
|
||||
import { initTippy } from '@vben/common-ui';
|
||||
import {
|
||||
initTippy,
|
||||
setDefaultDrawerProps,
|
||||
setDefaultModalProps,
|
||||
} from '@vben/common-ui';
|
||||
import { preferences } from '@vben/preferences';
|
||||
import { initStores } from '@vben/stores';
|
||||
import '@vben/styles';
|
||||
@@ -18,6 +22,17 @@ import { router } from './router';
|
||||
async function bootstrap(namespace: string) {
|
||||
// 初始化组件适配器
|
||||
initComponentAdapter();
|
||||
|
||||
// 设置弹窗的默认配置
|
||||
setDefaultModalProps({
|
||||
fullscreenButton: false,
|
||||
zIndex: 2000,
|
||||
});
|
||||
// 设置抽屉的默认配置
|
||||
setDefaultDrawerProps({
|
||||
zIndex: 2000,
|
||||
});
|
||||
|
||||
const app = createApp(App);
|
||||
|
||||
// 国际化 i18n 配置
|
||||
|
Reference in New Issue
Block a user