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. libevent源码学习之event

    timer event libevent添加一个间隔1s持续触发的定时器如下: struct event_base *base = event_base_new(); struct event *ti ...

  2. Pycharm 使用学习

    作为一个菜鸟,为了督促自己坚持学习python,记录每日学习日记是一个不错的选择 电脑安装python,python可以丛网络上下载相关版本进行安装,目前我电脑安装的是pyhon 3.7.3的版本,p ...

  3. Python3爬取猫眼电影信息

    Python3爬取猫眼电影信息 import json import requests from requests.exceptions import RequestException import ...

  4. 将字符串进行md5加密

    import java.security.MessageDigest; public class MD5Tools { /** * 将字符串进行md5加密 */ public static Strin ...

  5. 函数式编程(logging日志管理模块)

    本节内容 日志相关概念 logging模块简介 使用logging提供的模块级别的函数记录日志 logging模块日志流处理流程 使用logging四大组件记录日志 配置logging的几种方式 向日 ...

  6. CAS客户端和服务器配置https证书

    关于如何生成https证书可以看这篇文章: java生成Https证书,及证书导入的步骤和过程 下面整理cas如何整合https: cas服务器端部署(TLS[https]) 1.生成证书: 参照ja ...

  7. string知识

    因为历史原因以及为了与C语言兼容,字符串字面值与标准库string类型不是同一种类型.这一点很容易引起混乱,编程时一定要注意区分字符串字面值和string数据类型的使用,这很重要. 额~~~C字符串是 ...

  8. Thank in Java

    Think in Java 2.一切都是对象 2.1 引用操作对象 Java 中一切都是对象,因此可以采用单一固定得语法. 操作对象得标识符实际上是对对象得一个 "引用"refer ...

  9. Flink-v1.12官方网站翻译-P003-Real Time Reporting with the Table API

    利用表格API进行实时报告 Apache Flink提供的Table API是一个统一的.关系型的API,用于批处理和流处理,即在无边界的.实时的流或有边界的.批处理的数据集上以相同的语义执行查询,并 ...

  10. LSTM机器学习生成音乐

    目录 LSTM机器学习生成音乐 数据集介绍 将mid转成note数组 将note数组转成mid文件 获取数据集并将其保存 将note进行编号 构建数据集 截取数据 进行one-hot编码 构建模型 训 ...