惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

The GitHub Blog
The GitHub Blog
Google Online Security Blog
Google Online Security Blog
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
酷 壳 – CoolShell
酷 壳 – CoolShell
Y
Y Combinator Blog
L
LangChain Blog
博客园_首页
云风的 BLOG
云风的 BLOG
博客园 - 叶小钗
月光博客
月光博客
S
Schneier on Security
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
C
CXSECURITY Database RSS Feed - CXSecurity.com
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
D
DataBreaches.Net
Vercel News
Vercel News
P
Privacy International News Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
C
Cyber Attacks, Cyber Crime and Cyber Security
J
Java Code Geeks
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
人人都是产品经理
人人都是产品经理
G
GRAHAM CLULEY
有赞技术团队
有赞技术团队
A
Arctic Wolf
I
InfoQ
T
Tor Project blog
Attack and Defense Labs
Attack and Defense Labs
Microsoft Security Blog
Microsoft Security Blog
博客园 - 司徒正美
K
Kaspersky official blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
Recent Announcements
Recent Announcements
D
Docker
TaoSecurity Blog
TaoSecurity Blog
G
Google Developers Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
爱范儿
爱范儿
T
Troy Hunt's Blog
Help Net Security
Help Net Security
量子位
罗磊的独立博客
C
Cisco Blogs
Hacker News - Newest:
Hacker News - Newest: "LLM"
博客园 - 【当耐特】
腾讯CDC
Webroot Blog
Webroot Blog
N
News and Events Feed by Topic
小众软件
小众软件
N
Netflix TechBlog - Medium

博客园 - 雪莉06

antd vue 树形表格 vue2 jeecgBoot keepalive 解决方案 vue中实现页面全屏和指定元素全屏 screenfull全屏组件的基本使用 网页导出EXCEL格式数据,长数字变为科学计数法的解决方法 dedecms织梦自定义表单导出到excel的方法 织梦dede:arclist按最新修改排序orderby=pubdate无效的解决方法 vue-router报错:Uncaught (in promise) NavigationDuplicated {_name: ‘NavigationDuplicated‘, name: ‘Navig nvm的安装和使用(转) elementUI 的 input无法输入bug解决 vue数字翻牌效果 帝国CMS后台登录空白怎么办?如何修改成https ES6两个数组进行比较 element ui form表单 表格下嵌套动态表格,新增行,删除行 vue 父子组件传值报错:this.$emit is not a function 解决 dede列表页调用二三级导航栏(转载) a-table 鼠标滑过显示小手,当前行可点击(转载) echarts折线图使用dataZoom,切换数据时渲染异常,出现竖线bug vue里面修改title样式
j-modal的 slot="footer" 失效 v-if判断页脚按钮
雪莉06 · 2024-09-19 · via 博客园 - 雪莉06
 

<j-modal :visible="visible" :title="title" @cancel="close" :fullscreen="true">

..........
<span slot="footer">

      <div :key="row.KfjqFlag" v-if="row.KfjqFlag==''||row.KfjqFlag=='待办'">

      <el-button @click="visible = false">取 消</el-button>

      <el-button v-if="orderTypeDesc != '优化'" type="primary" @click="onSubmit('0')" :loading="confirmLoading0"

        >暂 存</el-button

      >

      <el-button v-if="orderTypeDesc != '优化'" type="primary" @click="onSubmit('1')" :loading="confirmLoading1"

        >确 定</el-button

      >

      <el-button v-if="orderTypeDesc == '优化'" type="primary" @click="onFlow()" :loading="confirmLoading"

        >提 交</el-button

      >

      </div>

    </span>
</j-modal>

因为vue虚拟dom机制,会尽量复用已存在相同节点元素而不会重新渲染,导致使用v-if没有达到预期效果

方法:

使用div元素将slot插槽内容包裹起来,并在div元素上使用key,插槽内容才会重新渲染 `

posted @ 2024-09-19 15:40  雪莉06  阅读(96)  评论()    收藏  举报