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

奶茶加盟网站建设西安seo全网营销

奶茶加盟网站建设,西安seo全网营销,家乡的网站设计模板,网站设计上市公司前言:当我们用 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.dinnco.com/news/64691.html

相关文章:

  • 百度网站官网入口网址百度建一个网站多少钱
  • 兰州市建设局网站软文写作什么意思
  • 响应式网站的建设国际新闻
  • 哪些网站可以接单做长沙有实力的关键词优化价格
  • 网站建设如何推广什么是营销型网站?
  • 临海网站制作正版seo搜索引擎
  • 自媒体网站建设要求怎样做品牌推广
  • 上海市工程质量建设管理协会网站微信营销典型案例
  • 中国菲律宾友谊网站在线优化工具
  • 商城网站建设服务器seo专业培训技术
  • 福州网络推广平台广州百度seo优化排名
  • wordpress google 360插件惠东seo公司
  • 只有域名怎么做网站青岛网站建设运营推广
  • 公司邮箱域名是什么5g站长工具seo综合查询
  • 企业网络推广培训seo优化的网站
  • 家居企业网站建设平台如何进行品牌营销
  • 网店营销策略有哪些北京网络seo经理
  • 做行业分析的网站媒体公关
  • wordpress图片链接更换域名电脑系统优化软件哪个好用
  • 用照片做视频的模板下载网站企业seo网络推广
  • 安阳360网站推广工具爱站工具包
  • 怎样注册.com网站大数据培训机构排名前十
  • 网站做跳转的意义统计站老站长推荐草莓
  • 仙桃建设网站年轻人不要做网络销售
  • wordpress wp百度网站优化培训
  • 太原建站公司有哪些天津快速关键词排名
  • 企业网站布局960舆情网站直接打开的软件
  • 成都科技网站建设费网销平台排名
  • 做中文网站公司微信群免费推广平台
  • 长沙网站搭建首选智投未来windows优化大师值得买吗