当前位置:网站首页>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)
边栏推荐
- UCF(2022暑期团队赛一)
- Biscuits (examination version)
- MySQL if and ifnull use
- 毕业设计游戏商城
- Notes, continuation, escape and other symbols
- Promotion hung up! The leader said it wasn't my poor skills
- Extension of graph theory
- Pagoda configuration mongodb
- [leetcode] 18. Sum of four numbers
- Talking about the type and function of lens filter
猜你喜欢
Implementing fuzzy query with dataframe
TCP three handshakes you need to know
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
注释、接续、转义等符号
04. Project blog log
Steady, 35K, byte business data analysis post
Three methods of Oracle two table Association update
flutter 实现一个有加载动画的按钮(loadingButton)
[untitled]
Postman assertion
随机推荐
GAMES202-WebGL中shader的编译和连接(了解向)
从0到1建设智能灰度数据体系:以vivo游戏中心为例
Hyperledger Fabric2. Some basic concepts of X (1)
Codeforces Round #804 (Div. 2) Editorial(A-B)
Summary of redis basic knowledge points
驱动开发——第一个HelloDDK
Talking about the type and function of lens filter
Modbus协议通信异常
Pix2pix: image to image conversion using conditional countermeasure networks
指针经典笔试题
MySQL if and ifnull use
CUDA11.1在线安装
Vulhub vulnerability recurrence 71_ Unomi
Qt TCP 分包粘包的解决方法
Microblogging hot search stock selection strategy
Vulhub vulnerability recurrence 69_ Tiki Wiki
Select knowledge points of structure
Codeforces Round #804 (Div. 2) Editorial(A-B)
Class inheritance in yyds dry inventory C
[effective Objective-C] - memory management