当前位置:网站首页>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)
边栏推荐
- 趋势前沿 | 达摩院语音 AI 最新技术大全
- Qt TCP 分包粘包的解决方法
- 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
- Building intelligent gray-scale data system from 0 to 1: Taking vivo game center as an example
- CUDA11.1在线安装
- Codeforces Round #804 (Div. 2)
- Steady, 35K, byte business data analysis post
- Hometown 20 years later (primary school exercises)
- 2022半年总结
- ByteDance program yuan teaches you how to brush algorithm questions: I'm not afraid of the interviewer tearing the code
猜你喜欢

TCP three handshakes you need to know

Codeforces Round #804 (Div. 2) Editorial(A-B)

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

Yolov5 tensorrt acceleration

Vulhub vulnerability recurrence 71_ Unomi

Microblogging hot search stock selection strategy

01. 开发博客项目之项目介绍

指針經典筆試題

In 2022, we must enter the big factory as soon as possible
![[lgr-109] Luogu may race II & windy round 6](/img/fe/d5b67c7dff759c519a04da023630ea.png)
[lgr-109] Luogu may race II & windy round 6
随机推荐
[untitled]
Ad20 is set with through-hole direct connection copper sheet, and the bonding pad is cross connected
Can the feelings of Xi'an version of "Coca Cola" and Bingfeng beverage rush for IPO continue?
RT thread analysis - object container implementation and function
Application of Flody
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
剑指 Offer II 039. 直方图最大矩形面积
[effective Objective-C] - memory management
【torch】|torch.nn.utils.clip_grad_norm_
指針經典筆試題
Summary of redis AOF and RDB knowledge points
MySQL advanced learning summary 9: create index, delete index, descending index, and hide index
Notes, continuation, escape and other symbols
驱动开发——HelloWDM驱动
从0到1建设智能灰度数据体系:以vivo游戏中心为例
Ora-01779: the column corresponding to the non key value saving table cannot be modified
02. 开发博客项目之数据存储
Three methods of Oracle two table Association update
【OSPF 和 ISIS 在多路访问网络中对掩码的要求】
A little knowledge of CPU, disk and memory