全局设置

import ElementPlus from 'element-plus';
import 'element-plus/lib/theme-chalk/index.css';
import {
  createApp
} from 'vue';
import router from './router';
import store from './store';
import App from './App.vue';
import axios from 'axios';
import VueAxios from 'vue-axios';
import '../node_modules/bootstrap/dist/css/bootstrap.min.css';
import '../node_modules/bootstrap/dist/js/bootstrap';
import $ from 'jquery';
import area from '../src/api/area';
import locale from 'element-plus/lib/locale/lang/zh-cn';
import VueUeditorWrap from 'vue-ueditor-wrap';
import * as echarts from 'echarts'
import Moment from 'moment'
import 'dayjs/locale/zh-cn';
import common from '../src/api/common'

const app = createApp(App).use(VueAxios, axios).use(common).use(VueUeditorWrap).use(area).use($).use(store).use(router).use(ElementPlus, {
  locale
}).mount('#app');
app.echarts = echarts;
// 设置全局属性 弹窗默认点击遮罩层不关闭
app.$.appContext.components.ElDialog.props.closeOnClickModal.default = false;

局部

标签上添加 :close-on-press-escape=“false” :close-on-click-modal=“false”

<el-dialog
            title="处理"
            :visible.sync="dialogQuestion"
            :before-close="handleCloseQuestion"
            :close-on-press-escape="false" :close-on-click-modal="false"
      >
Logo

前往低代码交流专区

更多推荐