当前位置:网站首页>Jvxetable用slot植入j-popup
Jvxetable用slot植入j-popup
2022-07-06 05:18:00 【OK_boom】
上一篇讲了如何根据当前记录确定jpopup field是否disabled(https://blog.csdn.net/rocklee/article/details/125581874?spm=1001.2014.3001.5501),这里讲一下如何利用slot插槽方式指定template为j-popup
<template #prodSeq="{row, rowIndex, $rowIndex, column}" >
<j-popup
v-model="row.prodSeq"
:code="column.popupCode"
:field="column.field"
:column="column"
:value="row[column.key]"
:renderOptions="{listeners:$listeners}"
:orgFields="column.orgFields"
:destFields="column.destFields"
:param="column.param"
:sorter="column.sorter"
:row="row"
:multi="false"
:disabled="!column.props.getDisabled(row,column)"
@input="(value,others,oldValue,row)=>updateMainMtRecord(value,others,oldValue,row,column,rowIndex)"
></j-popup>
</template>
slot里面的jpopup指定的参数
– param 浏览记录时指定的过滤参数
– row 带进去的当前记录
– disabled 动态判断是否禁用
– input 回调事件安插这个插槽
将某个字段的配置指定为slot:
{
title: '物料SQ',
key: 'prodSeq',
type: JVXETypes.slot,
slotName:'prodSeq',
fixed: 'left',
width:"150px",
popupCode:"getProds",
field:"prod_seq",
orgFields:"id,prod_name,prod_seq,spec,fukuang,mazhong,unit",
destFields:"prodId,prodName,prodSeq,productInfo.spec,productInfo.fukuang,productInfo.mazhong,productInfo.unit",
placeholder: '请输入${title}',
defaultValue:'',
param: {prod_cat:'B04A01'},
props:{
formType:this.type,
getDisabled: (row,column,ref)=>{return !(!!row['clone']||(this.formType||!!ref&&ref.$attrs.formType)=='edit')}
},
validateRules: [{ required: true, message: '${title}不能为空' }],
}
- Jpopup的修改
data()增加了oldValue:
data() {
return {
showText: '',
title: '',
oldValue:'',
avalid: true,
extendParam: {}
}
}
openModal() 要oldValue保存原值
openModal() {
if (this.disabled === false) {
this.oldValue=this.row[this.column.key]
this.$refs.jPopupOnlReport.show()
}
}
最后callback最后一句改为:
this.$emit('input', str, res,this.oldValue,this.row)
边栏推荐
- Codeforces Round #804 (Div. 2) Editorial(A-B)
- Drive development - the first helloddk
- [effective Objective-C] - memory management
- The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
- Pix2pix: image to image conversion using conditional countermeasure networks
- GAMES202-WebGL中shader的编译和连接(了解向)
- [buuctf.reverse] 159_[watevrCTF 2019]Watshell
- Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
- Promotion hung up! The leader said it wasn't my poor skills
- ByteDance program yuan teaches you how to brush algorithm questions: I'm not afraid of the interviewer tearing the code
猜你喜欢

GAMES202-WebGL中shader的編譯和連接(了解向)

用StopWatch 统计代码耗时

Modbus协议通信异常

C进阶-数据的存储(上)

Yyds dry inventory SSH Remote Connection introduction

Compilation and connection of shader in games202 webgl (learn from)

你需要知道的 TCP 三次握手

从0到1建设智能灰度数据体系:以vivo游戏中心为例

Questions d'examen écrit classiques du pointeur

Unity Vector3. Use and calculation principle of reflect
随机推荐
Pagoda configuration mongodb
nacos-高可用seata之TC搭建(02)
Nestjs配置文件上传, 配置中间件以及管道的使用
Mongodb basic knowledge summary
2021robocom robot developer competition (Preliminary)
Collection + interview questions
Promotion hung up! The leader said it wasn't my poor skills
Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
Yyds dry inventory SSH Remote Connection introduction
Questions d'examen écrit classiques du pointeur
idea一键导包
Steady, 35K, byte business data analysis post
[leetcode] 18. Sum of four numbers
SQLite queries the maximum value and returns the whole row of data
ByteDance program yuan teaches you how to brush algorithm questions: I'm not afraid of the interviewer tearing the code
February 12 relativelayout
The ECU of 21 Audi q5l 45tfsi brushes is upgraded to master special adjustment, and the horsepower is safely and stably increased to 305 horsepower
驱动开发——第一个HelloDDK
关于Unity Inspector上的一些常用技巧,一般用于编辑器扩展或者其他
Modbus协议通信异常