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. Understanding go.sum and go.mod file in Go

    https://golangbyexample.com/go-mod-sum-module/ Understanding go.sum and go.mod file in Go (Golang) – ...

  2. Python学习【第8篇】:python中的函数

    1.python中函数定义方法 def test(x): "This istest" y = x*2+1 return y vaule = test(2)print(vaule)运 ...

  3. MySQL下载地址与Centos7安装MySQL以及启动问题排查

    目录 一.MySQL国内镜像下载 二.国内镜像相关站点 三.Centos7安装MySQL5.7 1. 下载并解压至/usr/local 2. 配置信息 3. 用户及用户组管理(提高安全) 4. 初始化 ...

  4. Oracle数据库误删除数据恢复(Oracle闪回功能)

    一.启用行移动功能 alter table table_name enable row movement ; 二.可查询之前某一个时间点的数据(默认是1440分钟,即24小时内的数据) select ...

  5. kafka auto.offset.reset参数解析

    kafka auto.offset.reset参数解析 1.latest和earliest区别 2.创建topic 3.生产数据和接收生产数据 4.测试代码 auto.offset.reset关乎ka ...

  6. vb.net和C#两兄弟谁的封装性更好?

    引言: 虽然没怎样接触过vb.net,但是大概对于vb6还是比较了解的.前者是从后者基础上发展而来的.后来接触了C#编程语言,起初没有太关心她和vb.net有啥不同的地方,话说都是面向对象的,而且都是 ...

  7. docker(3)快速搭建centos7-python3.6环境

    前言 当我们在一台电脑上搭建了python3.6的环境,下次换台电脑,又得重新搭建一次,设置环境变量等操作. 好不容易安装好,一会提示pip不是内部或外部命令,一会又提示pip: command no ...

  8. Pytest(8)parametrize参数化

    前言 当某个接口中的一个字段,里面规定的范围为1-5,你5个数字都要单独写一条测试用例,就太麻烦了,这个时候可以使用pytest.mark.parametrize装饰器可以实现测试用例参数化. 官方示 ...

  9. C++的匿名函数(lambda表达式)

    总述  C++11提供了对匿名函数的支持,称为Lambda函数(也叫Lambda表达式). 它是定义和使用匿名函数对象的一种简便的方式.匿名函数是我们需要用到的一个函数,但是又不想去费力命名一个函数的 ...

  10. 四十三:漏洞发现-WEB应用之漏洞探针类型利用修复

    已知CMS 如常见的dedecms,discuz,wordpress等源码结构,这种一般采用非框架开发,但是也有少部分采用框架类开发,针对此类源码程序的安全监测, 我们要利用公开的漏洞进行测试,如不存 ...