VueJS坎坷之路111---_self.$scopedSlots.default is not a function
VueJs + Element
话不多说,直接贴错:
_self.$scopedSlots.default is not a function
<el-table stripe border ref="tableData" max-height="500" v-loading="loading" v-bind:data="tableData" @row-dblclick="doubbleClick" row-key="new_srv_partsapplylineId" key="lines">
<el-table-column type="selection" width="50" :selectable="isSelectedTable">
</el-table-column>
<el-table-column key="exchange" prop="exchange" :label="$t('attach.list_operate')">
<template slot-scope="scope">
<el-button type="text" @click="gotoChangePartPage(scope.row)">{{$t('partsApply.line_btn_changeparts')}}</el-button>
</template>
</el-table-column>
<el-table-column key="new_partsid" prop="new_partsid.name" :label="$t('partsApply.line_filed_new_partsid')">
<template slot-scope="scope">
<el-button type="text" @click="gotoEditLinePage(scope.row)">{{scope.row.new_partsid.name}}</el-button>
</template>
</el-table-column>
<el-table-column key="new_applyqty" prop="new_applyqty" :label="$t('partsApply.line_filed_new_applyqty')">
</el-table-column>
<el-table-column key="new_approvedqty" prop="new_approvedqty" :label="$t('partsApply.line_filed_new_approvedqty')" v-if="this.type == 2 || this.type == 3" width="100">
<template slot-scope="scope">
<el-input type="number" :id="scope.row.new_srv_partsapplylineId+'approve'" v-model="scope.row.new_approvedqty" :disabled="!isBtnAcceptEnable" min="0" @blur="qtyBlur(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column key="new_confirmqty" prop="new_confirmqty" :label="this.type === 2 ? $t('partsApply.line_filed_new_assignqty') : $t('partsApply.line_filed_new_confirmqty')" width="100">
<template slot-scope="scope">
<el-input type="number" :id="scope.row.new_srv_partsapplylineId+'confirm'" v-model="scope.row.new_confirmqty" :disabled="!isBtnAcceptEnable" min="0" @blur="qtyBlur(scope.row)"></el-input>
</template>
</el-table-column>
<el-table-column key="new_amount" prop="new_amount" :label="$t('partsApply.line_filed_new_amount')" v-if="this.type == 2 || this.type == 3">
</el-table-column>
<el-table-column key="new_iscontrolname" prop="new_iscontrolname" :label="$t('partsApply.line_filed_new_iscontrolname')" v-if="this.type == 1 || this.type == 3">
</el-table-column>
<el-table-column key="new_agentqty" prop="new_agentqty" :label="$t('partsApply.line_filed_new_agentqty')" v-if="this.type==2 || (this.type==3&&this.applyto==1">
</el-table-column>
<el-table-column key="new_servicecompanyqty" prop="new_servicecompanyqty" :label="$t('partsPurchaseOrSale.line_filed_new_servicecompanyqty')" v-if="this.type==3&&this.applyto==2">
</el-table-column>
</el-table>
解决方法:
第一次,给<el-table>加上属性 key 失败
第二次,给<el-inpurt>加上属性 name 失败,加上 key 失败
第三次,给<el-table-column>加上属性 key 成功
VueJS坎坷之路111---_self.$scopedSlots.default is not a function的更多相关文章
- el-table-column v-if条件渲染报错h.$scopedSlots.default is not a function
我们在实际项目中经常会遇到el-table-column条件渲染出现报错的情况 报错内容: h.$scopedSlots.default is not a function 究其原因,是因为表格是el ...
- VueJS坎坷之路222--vue cli 3.0引入静态文件
前两天准备搭建一个vue小项目,当引入jquery脚本的时候一直找不到引入的文件: 在网上搜了好多vue添加静态文件的方法,发现大多数方法都是创建一个与文件夹src同等级的文件夹static存放引入的 ...
- _self.$scopedSlots.default is not a function报错
问题: 当同一页面有elementUI的多个table表格时,如果用到v-if来动态展示表格,切换时出现如下报错: 原因: 是因为表格是element-ui通过循环产生的,而vue在dom重新渲染时有 ...
- vue element传的值报_self.$scopedSlots.default is not a function
问题描述:使用表格时做了v-if判断:首次渲染没有问题:反复操作便会报错: 解决办法:el-table上给v-if的 el-table-colunm 加上:key="Math.random( ...
- 使用包时,报 xxx.default is not a function
最近做了一个导出功能,代码如下 import request from 'request-promise-native'; export default class Form { // 导出 @po ...
- React报错之Unexpected default export of anonymous function
正文从这开始~ 总览 当我们尝试使用默认导出来导出一个匿名函数时,会导致"Unexpected default export of anonymous function"警告.为了 ...
- python运维开发坎坷之路-01
前言 2014年9月,新疆乌鲁木齐,在51CTO学院看着alex老师的python教学视频,不得不说这是我第一次接触python这门高级语言,从最开始的一无所知到现在能够用python写脚本,再到未来 ...
- 升级JDK8的坎坷之路
为更好的适应JAVA技术的发展,使用更先进及前沿的技术.所以推出将我们现在使用的JDK1.6(1.7)及tomcat6(7)升级至JDK1.8及tomcat8,使我们的系统获得更好的性能,更好适应未来 ...
- 关于CefSharp的坎坷之路
项目背景: 公司的XX产品需要升级和以后支持多平台的使用.因为之前项目是由WPF实现的.目前以后想作为Html5来展示页面. 因为涉及到整体更改遇到的问题较多以及其他原因,所以只是内部内容区域先替换为 ...
随机推荐
- 笔记-JavaWeb学习之旅16
增强对象的功能 动态代理:在内存中形成代理类 实现步骤: 代理对象和真实对象实现相同的接口 代理对象 = Proxy.newProxyInstance(); 使用代理对象调用真实对象的方法 增强方法 ...
- 黑马Spring学习 bean
- Java基础笔记(二)——配置环境变量
https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html 到此处下载jdk,并安装.(选 ...
- IOS 转场动画二和透明控制器视图
一.透明视图控制器 WJListMenuViewController *VC = [[WJListMenuViewController alloc]init]; VC.modalPresentatio ...
- render函数和redirect函数的区别+反向解析
render函数和redirect函数的区别+反向解析 1.视图函数:一定是要包含两个对象的(render源码里面有HttpResponse对象) request对象:----->所有的请求 ...
- eclipse导入基于maven的java项目后没有Java标志和没有maven Dependencies有解决办法
没有java标志,不识别为Java项目,右键项目-->Properties-->Project Facets-->勾选Java 确定就可以了. 没有maven Dependenc ...
- linux-ubuntu下调出中文输入法
linux-ubuntu下调出中文输入法 注:此方法我并没有亲身实践过,只是觉得可能会用到,所以保存一下
- replcation set (复制集)配置过程 --mongodb
一,配置规划 复制集原理(基本构成是1主2从的结构,自带互相监控投票机制(Raft(MongoDB) Paxos(mysql MGR 用的是变种))如果发生主库宕机,复制集内部会进行投票选举,选择一 ...
- js得到当前页面的url信息
所有的代码都是可用,而且附了图片的,不过是直接用我自己的文章地址,所以有些显示的有点奇怪. 大家可以找个网址试试代码是否可行. 1,设置或获取对象指定的文件名或路径. console.log(wind ...
- More than one fragment with the name [spring_web] was found. This is not legal ...
今天在搭建springweb应用环境的时候启动tomcat报错More than one fragment with the name [spring_web] was found. This is ...