当前位置:网站首页>Jvxetable implant j-popup with slot
Jvxetable implant j-popup with slot
2022-07-06 05:22:00 【OK_ boom】
The previous article talked about how to determine according to the current record jpopup field whether disabled(https://blog.csdn.net/rocklee/article/details/125581874?spm=1001.2014.3001.5501), Here is how to use slot Slot mode assignment template by 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 Inside jpopup Specified parameters
– param Filter parameters specified when browsing records
– row The current record brought in
– disabled Dynamically determine whether to disable
– input Callback eventsInsert this slot
Specify the configuration of a field as slot:
{
title: ' materiel 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: ' Please enter ${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} Can't be empty ' }],
}
- Jpopup Modification of
data() Added oldValue:
data() {
return {
showText: '',
title: '',
oldValue:'',
avalid: true,
extendParam: {}
}
}
openModal() want oldValue Save the original value
openModal() {
if (this.disabled === false) {
this.oldValue=this.row[this.column.key]
this.$refs.jPopupOnlReport.show()
}
}
Last callback Change the last sentence to :
this.$emit('input', str, res,this.oldValue,this.row)
边栏推荐
猜你喜欢
Ad20 is set with through-hole direct connection copper sheet, and the bonding pad is cross connected
Check the useful photo lossless magnification software on Apple computer
Pointer classic written test questions
04. Project blog log
05. 博客项目之安全
Configuration file converted from Excel to Lua
03. 开发博客项目之登录
Lepton 无损压缩原理及性能分析
js Array 列表 实战使用总结
Postman Association
随机推荐
从0到1建设智能灰度数据体系:以vivo游戏中心为例
nacos-高可用seata之TC搭建(02)
【云原生】3.1 Kubernetes平台安装KubeSpher
Microblogging hot search stock selection strategy
Summary of redis basic knowledge points
idea一键导包
Pagoda configuration mongodb
HAC集群修改管理员用户密码
Codeforces Round #804 (Div. 2) Editorial(A-B)
【torch】|torch.nn.utils.clip_grad_norm_
GAMES202-WebGL中shader的编译和连接(了解向)
Mongodb basic knowledge summary
浅谈镜头滤镜的类型及作用
Hometown 20 years later (primary school exercises)
Safe mode on Windows
Oracle query table index, unique constraint, field
01. 开发博客项目之项目介绍
[leetcode daily question] number of enclaves
注释、接续、转义等符号
TCP three handshakes you need to know