其他分享
首页 > 其他分享> > Jeecg-boot中的popup弹窗增加模糊搜索

Jeecg-boot中的popup弹窗增加模糊搜索

作者:互联网

项目需要对popup弹窗中的搜索框进行模糊搜索,找了一下论坛和开发文档,没发现方法,于是自己改了一下文件

原理是将查询的字段前后加上*号

找到JPopupOnlReport.vue这个文件,改写searchByquery方法

searchByquery(){
        let i
        for(i=0;i<this.queryInfo.length;i++){
            this.queryParam[this.queryInfo[i].field] =  '*' + this.queryParam[this.queryInfo[i].field]+ '*'
        }
        this.loadData(1);
        for(i=0;i<this.queryInfo.length;i++){
          this.queryParam[this.queryInfo[i].field] = this.queryParam[this.queryInfo[i].field].replace(/\*/g,'')
        }
}

改好就行了

标签:文件,popup,searchByquery,模糊,boot,搜索,弹窗
来源: https://www.cnblogs.com/FreedomStark/p/15711076.html