mirror of
https://github.com/jeecgboot/JeecgBoot.git
synced 2026-01-01 18:05:28 +08:00
1.项目样式 scss 全部转换为 less,且移除了项目 node-sass 依赖;
2.online开发ButtonExpHandler is not defined #957; 3.关于打包后JS文件过大,导致加载缓慢的建议 #969
This commit is contained in:
@ -0,0 +1,41 @@
|
||||
/**
|
||||
* online 自定义按钮表达式处理类
|
||||
*/
|
||||
export default class ButtonExpHandler {
|
||||
/**
|
||||
* 构造器
|
||||
* @param express
|
||||
*/
|
||||
constructor(express,record) {
|
||||
this._express = express;
|
||||
this._record = record;
|
||||
}
|
||||
|
||||
get show() {
|
||||
if(!this._express || this._express==''){
|
||||
return true;
|
||||
}
|
||||
let arr = this._express.split('#');
|
||||
//获取字段值
|
||||
let fieldValue = this._record[arr[0]];
|
||||
//获取表达式
|
||||
let exp = arr[1].toLowerCase();
|
||||
//判断表达式
|
||||
if(exp === 'eq'){
|
||||
return fieldValue == arr[2];
|
||||
}else if(exp === 'ne'){
|
||||
return !(fieldValue == arr[2]);
|
||||
}else if(exp === 'empty'){
|
||||
if(arr[2]==='true' || arr[2]===true){
|
||||
return !fieldValue || fieldValue=='';
|
||||
}else{
|
||||
return fieldValue && fieldValue.length>0
|
||||
}
|
||||
}else if(exp === 'in'){
|
||||
let arr2 = arr[2].split(',');
|
||||
return arr2.indexOf(String(fieldValue))>=0;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
}
|
||||
@ -209,6 +209,7 @@
|
||||
import { cloneObject, filterObj } from '@/utils/util'
|
||||
import JImportModal from '@/components/jeecg/JImportModal'
|
||||
import JSuperQuery from '@comp/jeecg/JSuperQuery'
|
||||
import ButtonExpHandler from './ButtonExpHandler'
|
||||
|
||||
export default {
|
||||
name: 'OnlCgFormAutoList',
|
||||
|
||||
Reference in New Issue
Block a user