vue & template & v-else & v-for bug

nested table bug

https://codepen.io/xgqfrms/pen/wvaGmGE

bug

      <el-table-column
v-for="({
prop,
label,
align,
width,
slot,
}, i) in selectManageClomuns"
:key="prop + i"
:prop="prop"
:width="width"
:align="align"
:label="label">
<!-- rowSpan ??? -->
<template
v-if="tableData[scope.$index].render"
slot-scope="scope">
<span>
{{tableData[scope.$index][prop]}}
</span>
<div v-if="prop === 'showName'">
<el-button
type="primary"
size="small"
@click="editHandler(scope.$index, scope.row)">
关闭选排
</el-button>
<el-button
type="primary"
size="small"
@click="editHandler(scope.$index, scope.row)">
创建新模版
</el-button>
</div>
<div v-else></div>
</template>
<template
v-else
slot-scope="scope">
<span>
{{tableData[scope.$index][prop]}}
</span>
</template>
</el-table-column>

solution

not using v-else template in v-for, instead of using div as box


<el-table-column
v-for="({
prop,
label,
align,
width,
slot,
}, i) in selectManageClomuns"
:key="prop + i"
:prop="prop"
:width="width"
:align="align"
:label="label">
<!-- rowSpan ??? -->
<template
slot-scope="scope">
<div v-if="tableData[scope.$index].render">
<span>
{{tableData[scope.$index][prop]}}
</span>
<div v-if="prop === 'showName'">
<el-button
type="primary"
size="small"
@click="editHandler(scope.$index, scope.row)">
关闭选排
</el-button>
<el-button
type="primary"
size="small"
@click="editHandler(scope.$index, scope.row)">
创建新模版
</el-button>
</div>
</div>
<div v-else>
<span v-if="prop !== 'showName'">
{{tableData[scope.$index][prop]}}
</span>
</div>
</template>
</el-table-column>


vue & template & v-else & v-for bug的更多相关文章

  1. 临时文件相关的v$tempfile v$sort_usage与V$tempseg_usage

    SQL> select username,user,segtype,segfile#,segblk#,extents,segrfno# from v$sort_usage; SEGFILE#代表 ...

  2. 转:V$SQL,V$SQLAREA,V$SQLTEXT

    V$SQL*表用于查看Shared SQL Area中SQL情况 V$SQLTEXT V$SQLTEXT用途很简单,就是用来查看完整的SQL语句,V$SQL和V$SQLAREA只能显示1000 byt ...

  3. v$session & v$session_wait

    (1)v$session v$session视图记录了当前连接到数据库的session信息 Column Description SADDR session address SID Session i ...

  4. A discussion of Dead Connection Detection, Resource Limits, V$SESSION, V$PROCESS and OS processes

    A discussion of Dead Connection Detection, Resource Limits, V$SESSION, V$PROCESS and OS processes (文 ...

  5. 错误提示:Dynamic Performance Tables not accessible, Automatic Statistics Disabled for this session You can disable statistics in the preference menu,or obtanin select priviliges on the v$session,v$sess

    1.错误提示:Dynamic Performance Tables not accessible, Automatic Statistics Disabled for this session You ...

  6. 动态性能视图v$mystat,v$sesstat,v$statname

    视图说明: v$mystat-------> 当前会话统计 v$sesstat------> 按会话进行分组统计 v$sysstat-------> 当系统的整体统计 v$statn ...

  7. Oracle v$session/v$sql 表

    在本视图中,每一个连接到数据库实例中的 session都拥有一条记录.包括用户 session及后台进程如 DBWR, LGWR, arcchiver等等. V$SESSION中的常用列 V$SESS ...

  8. oracle常用视图v$mystat v$sesstat v$sysstat v$statname v$thread v$ parameter v$session v$process

    这两天看了盖国强老师的<<深入浅出>>,很佩服盖老师钻研的精神.书中常用到一个查询语句,为了获取当前会话的跟踪文件路径,sql如下: SELECT d.VALUE || '/' ...

  9. 学习动态性能表(4)--v$sqltext&v$sqlarea

    学习动态性能表 第四篇-(1)-V$SQLTEXT  2007.5.29 本视图包括Shared pool中SQL语句的完整文本,一条SQL语句可能分成多个块被保存于多个记录内. 注:V$SQLARE ...

随机推荐

  1. redis6.0多线程

    https://www.sohu.com/a/331991216_268033 执行还是单线程     读写解析多线程   6.0 https://segmentfault.com/a/1190000 ...

  2. Coded UI

    Coded UI Test是Visual Studio 2010对于Testing Project(测试工程)提供的关于UI自动化测试的框架,支持Win32,Web,WPF等UI的自动化测试,是一个非 ...

  3. 框架spring+strutrs+ibatis

    Tomcat加载完成 --- Web.xml --- sql-map-config.xml --- 读取xml(*-ibatis-config) --- Jsp的url --- action方法 -- ...

  4. Phoenix的shell操作

    Phoenix的shell操作 一.Phoenix的Shell操作 1.进入(hbase01是主机名,2181是zookeeper的端口) 2.退出(注意结尾不加分号) 3.查询所有表(注意结尾不加分 ...

  5. Python3 注释、运算符、数字、字符串

    文章目录 注释 单引号(''') 双引号(""") 运算符 数字(Number) Python 数字类型转换 数学函数 随机数函数 三角函数 数学常量 数字与字符,列表之 ...

  6. Python Package(转)

    http://www.cnpythoner.com/post/2.html python中的Module是比较重要的概念.常见的情况是,事先写好一个.py文 件,在另一个文件中需要import时,将事 ...

  7. Java编程工具IDEA的使用

    IDEA psvm + Enter 快速构建main方法 sout + Enter 快速打印与句 Ctrl+Shift + Enter,语句完成 Ctrl+F12,可以显示当前文件的结构 Ctrl + ...

  8. jvm-本地方法接口

    什么是本地方法 简单地讲,一个Native Methodt是一个Java调用非Java代码的接囗.一个Native Method是这样一个Java方法:该方法的实现由非Java语言实现,比如C.这个特 ...

  9. docker(8)Dockerfile指令介绍

    前言 Dockerfile 是一个用来构建镜像的文本文件,文本内容包含了一条条构建镜像所需的指令和说明. Dockerfile简介 Dockerfile是用来构建Docker镜像的构建文件,是由一系列 ...

  10. 《进击吧!Blazor!》第一章 4.数据交互

    <进击吧!Blazor!>是本人与张善友老师合作的Blazor零基础入门系列视频,此系列能让一个从未接触过Blazor的程序员掌握开发Blazor应用的能力. 视频地址:https://s ...