当前位置: 首页 > news >正文

天津电子商务网站建设安卓优化软件

天津电子商务网站建设,安卓优化软件,深圳注册公司无地址怎么办?,呼伦贝尔市规划建设局网站前言:当我们用 vue3 :deep() 处理 elementui 中 el-dialog_body和el-dislog__header 的时候样式一直无法生效,遇到这种情况怎么办? 解决办法: 1.直接在 dialog 上面增加class 我试过,也不起作用,最后用这种…

前言:当我们用 vue3 :deep() 处理 elementui 中 el-dialog_body和el-dislog__header 的时候样式一直无法生效,遇到这种情况怎么办?

解决办法:

1.直接在 dialog 上面增加class 我试过,也不起作用,最后用这种方法解决的,dialog 外面直接包一层 div
2.将样式单独写一个style标签进行覆盖---此方式由于样式写在外面,可能会影响整个项目的全局样式,--慎重考虑

需求:需要将el-drawer__header的底部的外边距去掉
方式一:
修改前:
在这里插入图片描述修改后:
在这里插入图片描述
生效方式:1.在最外层加一层在el-dialog外面包一层


2.主要是vue3中deep会因为最外层没有根节点失效的问题,只需要加一个根节点,deep就有效了
需要注意的是 :deep(这里面只能包一个)

<template><div class="dialog"><el-drawer v-model="drawerDialog" direction="rtl" @close="handleClose" size="50%"><template #header><div class="header"><h4>订单详情----订单编号(23232434343)</h4></div></template><template #default><div class="content"><div class="item-info"><div class="wrap"><div class="top"><div class="left"><div class="line"></div><div class="title">购方信息</div></div><div class="right"><el-button type="primary" plain>编辑</el-button></div></div><div class="info-list"></div></div></div></div></template><template #footer><div style="flex: auto"><el-button @click="handleClose">取消</el-button><el-button type="primary" @click="confirm">确定</el-button></div></template></el-drawer></div>
</template><script setup>
import { watchEffect, ref } from 'vue';
const emit = defineEmits(["close"])
const props = defineProps({visible: {type: Boolean,default: false}
})
const drawerDialog = ref(false);//确定的回调函数
const confirm = () => {}//取消的回调函数
const handleClose = () => {drawerDialog.value = false;emit('close');
}watchEffect(() => {if (props.visible) {drawerDialog.value = props.visible;}
})</script><style scoped lang="scss">
.dialog {:deep(.el-drawer__header) {margin: 0;}
}.header {background-color: #fff;height: 40px;
}.content {background-color: #EDEFEE;.item-info {.wrap {.top {display: flex;justify-content: space-between;.left {display: flex;align-items: center;.line {height: 15px;width: 4px;background-color: #07f;}.title {font-size: 16px;font-weight: bold;}}.right {}}.info-list {}}}
}
</style>

方式二:

<template> <el-drawer v-model="drawerDialog" direction="rtl" @close="handleClose" size="50%"><template #header><div class="header"><h4>订单详情----订单编号(23232434343)</h4></div></template><template #default><div class="content"><div class="item-info"><div class="wrap"><div class="top"><div class="left"><div class="line"></div><div class="title">购方信息</div></div><div class="right"><el-button type="primary" plain>编辑</el-button></div></div><div class="info-list"></div></div></div></div></template><template #footer><div style="flex: auto"><el-button @click="handleClose">取消</el-button><el-button type="primary" @click="confirm">确定</el-button></div></template></el-drawer>
</template><script setup>
import { watchEffect, ref } from 'vue';
const emit = defineEmits(["close"])
const props = defineProps({visible: {type: Boolean,default: false}
})
const drawerDialog = ref(false);//确定的回调函数
const confirm = () => {}//取消的回调函数
const handleClose = () => {drawerDialog.value = false;emit('close');
}watchEffect(() => {if (props.visible) {drawerDialog.value = props.visible;}
})</script><style>
.el-drawer__header {margin: 0;
}
</style>
<style scoped lang="scss">.header {background-color: #fff;height: 40px;
}.content {background-color: #EDEFEE;.item-info {.wrap {.top {display: flex;justify-content: space-between;.left {display: flex;align-items: center;.line {height: 15px;width: 4px;background-color: #07f;}.title {font-size: 16px;font-weight: bold;}}.right {}}.info-list {}}}
}
</style>

修改前:
在这里插入图片描述修改后:
在这里插入图片描述

http://www.wangmingla.cn/news/122008.html

相关文章:

  • 全自动建站系统新媒体运营工作是什么
  • 中联网站建设营销网站建设服务
  • 用什么开源框架做网站网络建站
  • 个人网站数据库怎么做如何建立网站服务器
  • 成都保障房中心官方网站b站推广入口2023mmm无病毒
  • 网站制作难度推广普通话的文字内容
  • 静态网站怎么做百度推广网站seo去哪个网站找好
  • 企业建设门户网站的需求网站快速优化排名官网
  • 重点建设专业 专题网站保定关键词优化软件
  • 盐城网站建设渠道合作上海网络推广排名公司
  • 佛山网站设计模板培训seo
  • 网站建设会员管理系统方案百度链接收录提交入口
  • 长春电商网站建设价格低网站seo李守洪排名大师
  • 龙岗做网站公司病毒式营销案例
  • 做网站如何选域名短链接在线生成
  • 事业单位网站建设计划宁波seo推广外包公司
  • 网站开发网页上传和网页发布软文推广代理
  • 百度推广会帮你做网站不怎样把广告放到百度
  • 游戏网站的设计手机百度极速版
  • 成都网站搜索引擎优化免费快速网站
  • css网页设计实例代码windows系统优化软件排行榜
  • 太原优化网站制作网页的软件有哪些
  • 网站开发工具推荐合肥网站推广公司
  • 我有一个网站怎么做外贸中关村标准化协会
  • b2b平台营销seo sem是指什么意思
  • 温州平面设计公司网站seo技术
  • 域名与网站seo推广系统
  • wordpress自动分享到微博搜索引擎优化的具体操作
  • 网站后缀名百度天眼查公司
  • 做网站什么职业网络营销的缺点及建议