当前位置:网站首页>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 .

边栏推荐
- Train your dataset with swinunet
- 归并排序和非比较排序
- BiSeNet的特點
- Open3d ISS key points
- 发挥创客教育空间的广泛实用性
- Fluentd is easy to use. Combined with the rainbow plug-in market, log collection is faster
- Low success rate of unit test report
- Zcmu--1396: queue problem (2)
- Zcmu--1492: problem d (C language)
- Ebpf cilium practice (1) - team based network isolation
猜你喜欢

Using nocalhost to develop microservice application on rainbow

在 Rainbond 中一键安装高可用 Nacos 集群

Rainbond 5.6 版本发布,增加多种安装方式,优化拓扑图操作体验

在Rainbond中一键部署高可用 EMQX 集群

Opencv learning note 3 - image smoothing / denoising

Rainbow 5.7.1 supports docking with multiple public clouds and clusters for abnormal alarms

Train your dataset with swinunet

Analysis of maker education in innovative education system

解读创客思维与数学课程的实际运用

Golang compilation constraint / conditional compilation (/ / +build < tags>)
随机推荐
ES6_ Arrow function
雅思考试自己的复习进度以及方法使用【日更版】
Several ways of lambda used in functions in kotlin (higher-order functions)
One click deployment of highly available emqx clusters in rainbow
MySQL introduction - crud Foundation (establishment of the prototype of the idea of adding, deleting, changing and searching)
BiSeNet的特點
Explore creativity in steam art design
接口作为参数(接口回调)
解析创新教育体系中的创客教育
POJ - 3616 Milking Time(DP+LIS)
使用SwinUnet训练自己的数据集
The field value in Splunk subquery fuzzy matching CSV is*
Splunk子查询模糊匹配csv中字段值为*
Pvtv2--pyramid vision transformer V2 learning notes
Obsidan之数学公式的输入
Function extension, attribute extension and non empty type extension in kotlin
A single game with goods increased by 100000, and the rural anchor sold men's clothes on top of the list?
Implementation of navigation bar at the bottom of applet
Caractéristiques de bisenet
Iptables' state module (FTP service exercise)