当前位置:网站首页>Tips for using jeditabletable
Tips for using jeditabletable
2022-07-07 08:31:00 【OK_ boom】
JEditableTable Use the default criteria to query
JEditableTable By weaving in JeecgListMixin To implement the query ,created Priority will be given to implementation JVxeTableModelMixin Of created, So priority will be given to load once data.
Fortunately, it has a switch to turn it off and automatically load data .
In our own inquiry vue Processing , stay data Add in disableMixinCreated:true And in created You can load the data manually .
created() {
this.getSuperFieldList()
this.$nextTick(()=>{
if (this.type=='purchase'){
this.$set(this.queryParam,'approved',"1")
}
this.loadData();
// Initialize dictionary configuration Define on your own page
this.initDictConfig();
})
}
JEditableTable Modify the default value of the record
There's been a lot of attempts , Finally, make sure to modify JEditableTable Of dataSource And it needs to trigger its monitoring function to load new data into the interface , but JEditableTable Of dataSource No listening deep, It needs to be added to monitor dataSource Changes in content .
dataSource: {
immediate: true,
deep: true,
handler: function (newValue) {
// compatible IE
this.getElementPromise('tbody').then(() => {
this.initialize()
this._pushByDataSource(newValue)
})
}
},
The following is to be achieved , When data linkage makes JEditableTable Inside select Type of field options Refresh again and JEditableTable The value of this field of all records is cleared
async prodCatChange(value){
//tbVendor yes JEditableTable example
let tbVendor = await getRefPromise(this, 'smpProductVendor')
let column=tbVendor.columns.filter(m=>m.key=='vendorId')[0]
column.options=[]// Must empty , Otherwise, the superposition will be recorded
tbVendor._loadDictConcatToOptions(column)
let dataSource=this.smpProductVendorTable.dataSource
dataSource.forEach(item=>{
item.vendorId='.'
})
dataSource.forEach(item=>{
item.vendorId=''
})
},
Why should we put vendorId Set twice ? Because if you set it once , Repeat this method and it will not trigger again tbVendor Of dataSource monitor .
边栏推荐
- SSM 整合
- 单元测试报告成功率低
- rsync远程同步
- Infix keyword infix expression and the use of generic extension function in kotlin
- Low success rate of unit test report
- Train your dataset with swinunet
- 在Rainbond中一键部署高可用 EMQX 集群
- Opencv learning note 4 - expansion / corrosion / open operation / close operation
- Several ways of lambda used in functions in kotlin (higher-order functions)
- 【Go ~ 0到1 】 第七天 获取时间戳,时间比较,时间格式转换,Sleep与定时器
猜你喜欢
【无标题】
Open3d ISS key points
Train your dataset with swinunet
Iptables' state module (FTP service exercise)
Pvtv2--pyramid vision transformer V2 learning notes
National standard gb28181 protocol video platform easygbs adds streaming timeout configuration
opencv学习笔记四——膨胀/腐蚀/开运算/闭运算
BiSeNet的特點
提高企业产品交付效率系列(1)—— 企业应用一键安装和升级
DeiT学习笔记
随机推荐
使用SwinUnet训练自己的数据集
CCTV is so warm-hearted that it teaches you to write HR's favorite resume hand in hand
Practice of implementing cloud native Devops based on rainbow library app
Use of any superclass and generic extension function in kotlin
Train your dataset with swinunet
Rsync remote synchronization
Bisenet features
Pvtv2--pyramid vision transformer V2 learning notes
[IELTS speaking] Anna's oral learning records Part3
GOLand idea intellij 无法输入汉字
opencv学习笔记三——图像平滑/去噪处理
Improve the delivery efficiency of enterprise products (1) -- one click installation and upgrade of enterprise applications
Basic use of CTF web shrink template injection nmap
MES系統,是企業生產的必要選擇
[quick start of Digital IC Verification] 12. Introduction to SystemVerilog testbench (svtb)
国标GB28181协议视频平台EasyGBS新增拉流超时配置
2 - 3 arbre de recherche
[go ~ 0 to 1] obtain timestamp, time comparison, time format conversion, sleep and timer on the seventh day
Openvscode cloud ide joins rainbow integrated development system
打通法律服务群众“最后一公里”,方正璞华劳动人事法律自助咨询服务平台频获“点赞”