二次封装科技风大屏element-ui弹窗
弹窗最终效果1templateel-dialog:visible.syncdialogVisible:close-on-click-modalfalse:close-on-press-escapefalse:show-closefalse:widthwidthappend-to-bodymodal-append-to-bodycustom-classscreen-dialog!-- 装饰性图片 --imgsrc~/assets/img/screen/dialog/border-left.pngclassborder-leftalt/imgsrc~/assets/img/screen/dialog/border-right.pngclassborder-rightalt/imgsrc~/assets/img/screen/dialog/border-top.pngclassborder-top-leftalt/imgsrc~/assets/img/screen/dialog/border-top.pngclassborder-top-rightalt/imgsrc~/assets/img/screen/dialog/border-bottom.pngclassborder-bottom-leftalt/imgsrc~/assets/img/screen/dialog/border-bottom.pngclassborder-bottom-rightalt/imgsrc~/assets/img/screen/dialog/top-left-angle.pngclasstop-left-anglealt/imgsrc~/assets/img/screen/dialog/top-right-angle.pngclasstop-right-anglealt/imgsrc~/assets/img/screen/dialog/bottom-left-angle.pngclassbottom-left-anglealt/imgsrc~/assets/img/screen/dialog/bottom-right-angle.pngclassbottom-right-anglealt/imgsrc~/assets/img/screen/dialog/top-icon.pngclasstop-iconalt/imgsrc~/assets/img/screen/dialog/bottom-icon.pngclassbottom-iconalt/imgsrc~/assets/img/screen/dialog/close.pngclassclose-iconaltclickclose/!-- 标题区域 --divclassscreen-dialog-headdivclasstitle-pnlimgclassleft-imgsrc~/assets/img/screen/dialog/right-arrow.pngalt/divclasstitle-name{{ title }}/divimgclassright-imgsrc~/assets/img/screen/dialog/left-arrow.pngalt//div/div!-- 内容区域 --divclassscreen-dialog-bodyslot/slot/div!-- 底部区域 --divclassscreen-dialog-footerslotnamefooter/slot/div/el-dialog/templatescriptexportdefault{name:ScreenDialog,props:{title:{type:String,default:标题},width:{type:String,default:1200px},visible:{type:Boolean,default:false}},data(){return{dialogVisible:this.visible};},watch:{visible(newVal){this.dialogVisiblenewVal;},dialogVisible(newVal){if(!newVal){this.$emit(update:visible,false);}}},methods:{close(){this.dialogVisiblefalse;}}};/scriptstylelangscss.screen-dialog{background:transparent;box-shadow:none;.el-dialog__header{display:none;}.el-dialog__body{background:url(~/assets/img/screen/dialog/body-bg.png)no-repeat;background-size:100% 100%;background-origin:content-box;padding:37px 33px 53px;position:relative;// 左边框 .border-left{width:33px;// 100% - 左上角标高度 - 左下角标高度height:calc(100% - 37px - 53px);position:absolute;left:0;top:37px;}// 右边框 .border-right{width:33px;// 100% - 右上角标高度 - 右下角标高度height:calc(100% - 37px - 53px);position:absolute;right:0;top:37px;}// 上边框 .border-top-left{height:37px;// 100% - 左上角标宽度 - 右上角标宽度 - 中间图标宽度width:calc((100% - 33px - 33px - 236px)/ 2);position:absolute;top:0;left:33px;}// 上边框 .border-top-right{height:37px;// 100% - 左上角标宽度 - 右上角标宽度 - 中间图标宽度width:calc((100% - 33px - 33px - 236px)/ 2);position:absolute;top:0;right:33px;}// 下边框 .border-bottom-left{height:53px;// 100% - 左下角标宽度 - 右下角标宽度 - 中间图标宽度width:calc((100% - 33px - 33px - 166px)/ 2);position:absolute;bottom:0;left:33px;}// 下边框 .border-bottom-right{height:53px;// 100% - 左下角标宽度 - 右下角标宽度 - 中间图标宽度width:calc((100% - 33px - 33px - 166px)/ 2);position:absolute;bottom:0;right:33px;}// 左上角标 .top-left-angle{width:33px;height:37px;position:absolute;top:0;left:0;}// 左下角标 .bottom-left-angle{width:33px;height:53px;position:absolute;bottom:0;left:0;}// 右上角标 .top-right-angle{width:33px;height:37px;position:absolute;top:0;right:0;}// 右下角标 .bottom-right-angle{width:33px;height:53px;position:absolute;bottom:0;right:0;}.top-icon{width:236px;height:39px;position:absolute;top:-2px;left:50%;transform:translateX(-50%);}.bottom-icon{width:166px;height:51px;position:absolute;bottom:2px;left:50%;transform:translateX(-50%);}// 关闭按钮 .close-icon{width:24px;height:24px;position:absolute;top:20px;right:20px;cursor:pointer;z-index:1;}// 头部标题 .screen-dialog-head{.title-pnl{display:flex;justify-content:center;align-items:center;column-gap:20px;padding:0px 40px;background:linear-gradient(90deg,rgba(7,47,93,0.2)0%,rgba(7,47,93,1)50%,rgba(7,47,93,0.2)100%);.left-img, .right-img{width:13px;height:10px;}.title-name{font-size:26px;font-family:you-she-biao-ti-hei;color:#ffffff;height:40px;line-height:40px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}}}}.screen-dialog-body{min-height:400px;}}/style使用方式templatescreen-dialog:titledialogTitle:visible.syncdialogVisiblewidth800px!-- 主体内容 --div这里是对话框的内容/div!-- 底部内容 --template#footerel-buttonclickdialogVisible false取消/el-buttonel-buttontypeprimaryclickhandleConfirm确认/el-button/template/screen-dialog/templatescriptimportScreenDialogfrom/components/ScreenDialog.vue;exportdefault{components:{ScreenDialog},data(){return{dialogTitle:自定义标题,dialogVisible:false};},methods:{handleConfirm(){// 处理确认逻辑this.dialogVisiblefalse;}}};/script

相关新闻

Milvus向量数据库批量导入数据

Milvus向量数据库批量导入数据

前言 Milvus作为使用最广泛的向量数据库之一,在市场中占据了很大的份额,我们想要学习大模型RAG,向量数据库是逃不开的一环,根据上一篇文章,我们已经配置好了milvus,接下来我们来学习一下如何向Milvus中批量…

2026/11/7 4:07:43 阅读更多 →
tweetback与Eleventy整合开发:静态站点生成实战

tweetback与Eleventy整合开发:静态站点生成实战

tweetback与Eleventy整合开发:静态站点生成实战 【免费下载链接】tweetback Take ownership of your Twitter data and get your tweets back 项目地址: https://gitcode.com/gh_mirrors/tw/tweetback tweetback是一个帮助用户掌控自己Twitter数据的开源项目…

2026/10/24 18:49:44 阅读更多 →
RAG 系统设计拆招:同样一道题,为什么有人拿 offer

RAG 系统设计拆招:同样一道题,为什么有人拿 offer

进阶拆招第一卷。6 道大厂 RAG 真题方向,每题先摆三种最常见的错误答法,逐层拆破绽,再给优化回答。数据均为示意性,重点看思路。 怎么读:每题给三种典型答法——① 概念混淆(方向就错)、② 似是…

2026/10/24 21:18:59 阅读更多 →

最新新闻

Electron桌面应用开发实战:从环境搭建到打包发布全流程

Electron桌面应用开发实战:从环境搭建到打包发布全流程

做前端这些年,我大部分时间都在跟浏览器标签页打交道,直到第一次把桌面应用跑起来,才发现原来自己一直被限制在地址栏和刷新按钮围起来的框框里。Electron这个词,最开始是在某段时间频繁出现在同事的讨论里,一个用HTML…

2026/11/8 1:19:03 阅读更多 →
滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

滑盖智能锁T109深度解析:结构原理、安装调试与故障排查

简介:亚太天能T109滑盖智能锁产品说明书是一份PDF格式的官方技术文档,主要面向智能锁安装人员、终端用户及售后维护者,帮助快速掌握产品安装、配置与常见故障处理。全包仅1个PDF文件,大小4.37MB,内容结构清晰&#xff…

2026/11/7 12:08:40 阅读更多 →
PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

PMSM弱磁控制原理与Simulink建模:高速AGV驱动系统设计指南

上个月我在调试一台高速AGV的驱动系统,整车要求空载跑到8m/s,电机转速已经拉到额定点,驱动器的输出电压也顶到了母线电压极限附近。再往上踩速度指令,转速纹丝不动,三相电流反而开始震荡。那会儿我的第一反应就是&…

2026/11/8 1:35:05 阅读更多 →
C++核心知识点:从内存管理到STL的实战指南

C++核心知识点:从内存管理到STL的实战指南

C 这门语言我前前后后折腾了十几年,用它写过嵌入式驱动、做过游戏服务端,也搭过基础组件库。每次看到新人一头扎进"C 核心知识点"这个搜索词,我其实挺感慨的——这门语言的难点从来不是语法多,而是知识点之间的耦合太深…

2026/11/8 1:38:41 阅读更多 →
T109滑盖智能锁怎么装?安装调试与故障排查全攻略

T109滑盖智能锁怎么装?安装调试与故障排查全攻略

简介:亚太天能T109滑盖智能锁产品说明书以PDF格式发布,适合智能锁用户、安装人员与售后维修人员阅读。内容围绕T109系列指纹密码刷卡锁展开,先介绍前面板、后面板、锁体、机械钥匙、电池盒盖等部件名称与功能,再给出完整安装步骤&…

2026/11/7 12:08:40 阅读更多 →
LLM知识降熵:从信息垄断到理解权下放

LLM知识降熵:从信息垄断到理解权下放

你有没有过这种经历:翻开源码注释、论文摘要或者一份专业报告,每个字都认识,连在一起却像天书。想找人聊聊,身边要么没人懂,要么懂的懒得跟你解释。后来我试着把同一段内容丢给一个大语言模型,几秒钟之后&a…

2026/11/8 1:23:14 阅读更多 →

日新闻

周新闻

月新闻