踩坑element-plus-drawer点击别处不隐藏
孙泽辉

明明示例可以点击别处隐藏,我的配置和他一样,原因竟是没有引入遮罩样式!

上面是bug效果,点drawer以外的东西没反应,而且狂点也没反应!

认真地和示例程序对比后发现,人家的有一层遮罩,而我的没有。

此时立刻想到可能是没引入遮罩样式,引入后就解决了。

main.ts中引入遮罩样式

1
2
3
4
5
6
import { createApp } from "vue";
import "element-plus/theme-chalk/el-overlay.css"; // 遮罩层样式
import App from "./App.vue";

const app = createApp(App);
app.mount("#app");
  • Post title:踩坑element-plus-drawer点击别处不隐藏
  • Post author:孙泽辉
  • Create time:2022-09-04 17:36:08
  • Post link:https://hui.zone/post/d08010b3.html
  • Copyright Notice:All articles in this blog are licensed under BY-NC-SA unless stating additionally.