可以做国外购物的网站有哪些,成功营销案例,做一页简单的h5多少钱,郑州做商城网站jeecg自定义按钮使用exp属性不起作用 为什么要写这篇文章#xff1f; 之前写过一篇类似的文章 jeecg笔记之自定义显示按钮exp属性#xff0c;但是有些小伙伴留言参考后不起作用#xff0c;当时我的 jeecg 版本为3.7.5#xff0c;最终以版本不同#xff0c;暂时搁浅了。今… jeecg自定义按钮使用exp属性不起作用 为什么要写这篇文章 之前写过一篇类似的文章 jeecg笔记之自定义显示按钮exp属性但是有些小伙伴留言参考后不起作用当时我的 jeecg 版本为3.7.5最终以版本不同暂时搁浅了。今天重新回到这个问题一起去讨伐这个不起效果的 exp。 前台参考界面 因为重新拉取的新版本 jeecg(3.8)没有合适的场景演示那么就参考一下官方的使用案例吧。 Online表单开发界面(cgFormHeadList.jsp) 主要参考代码部分 t:dgFunOpt expisDbSynch#eq#N titlesync.db funnamedoDbsynch(id,content) urlclassace_button urlfontfa-database/t:dgFunOpt expisDbSynch#eq#YjformType#ne#3 funnameaddbytab(id,content) titleform.template urlclassace_button urlStylebackground-color:#5F9EA0 urlfontfa-cog/t:dgFunOptt:dgFunOpt expisDbSynch#eq#YjformType#ne#3 funnameaddlisttab(tableName,content) titlefunction.test urlStylebackground-color:#18a689; urlclassace_button urlfontfa-gavel/t:dgFunOptt:dgFunOpt expisDbSynch#eq#YjformType#ne#3 funnamepopMenuLink(tableName,content) titleconfig.place urlStylebackground-color:#1a7bb9; urlclassace_button urlfontfa-cog /t:dgFunOptt:dgFunOpt funnamecopyOnline(id) title复制表单 operationCodecopyOnlineTable urlclassace_button urlfontfa-copy/t:dgFunOptt:dgFunOpt exphasPeizhi#ne#0 funnamepropertyTable(id) title配置表 urlclassace_button urlfontfa-cog/t:dgFunOpt 当我看到新版本这几行代码的时候感觉哪里怪怪的这跟上几个版本差不多呀 信誓旦旦的去比对了一下两个文件的差异如下 事实证明确实没有差距只是新版本宽度样式稍微变化了一下。 分析一行代码部分(功能测试按钮) t:dgFunOpt expisDbSynch#eq#YjformType#ne#3 funnameaddlisttab(tableName,content) titlefunction.test urlStylebackground-color:#18a689; urlclassace_button urlfontfa-gavel/t:dgFunOpt 表达式isDbSynch#eq#YjformType#ne#3 isDbSynch属性字段注意是实体字段非数据库表字段列名称eq条件判断中的等于ne 为不等于empty为空判断条件为 true 或者 false。补充 关于 exp 具体实现代码部分在此就不展开说明了感兴趣的小伙伴可以看一下这个类 DataGridTag.java 的 2552 行代码 String exp dataGridUrl.getExp();// 判断显示表达式if (StringUtil.isNotEmpty(exp)) { String[] ShowbyFields exp.split(); for (String ShowbyField : ShowbyFields) { int beginIndex ShowbyField.indexOf(#); int endIndex ShowbyField.lastIndexOf(#); String exptype ShowbyField.substring(beginIndex 1, endIndex);// 表达式类型 String field ShowbyField.substring(0, beginIndex);// 判断显示依据字段 String[] values ShowbyField.substring(endIndex 1, ShowbyField.length()).split(,);// 传入字段值 String value ; for (int i 0; i values.length; i) { value values[i] ; if (i values.length - 1) { value ,; } } if (eq.equals(exptype)) { sb.append(if($.inArray(rec. field ,[ value ])0){); } if (ne.equals(exptype)) { sb.append(if($.inArray(rec. field ,[ value ])0){); } if (empty.equals(exptype) value.equals(true)) { sb.append(if(rec. field ){); } if (empty.equals(exptype) value.equals(false)) { sb.append(if(rec. field !){); } }} 最后 虽然上方我通过 3.8 版本重新尝试了 exp 属性但是你仍然存在无法生效的问题的话欢迎交流~。 文章作者niceyoo文章地址https://www.cnblogs.com/niceyoo/p/10520278.html如果觉得文章对你有所帮助右下方点个推荐~ posted 2019-03-12 22:59 niceyoo 阅读(...) 评论(...) 编辑 收藏