UNPKG

rocket-data-vue

Version:
30 lines (26 loc) 800 B
export default { methods : { describeOperator(dataType,operator){ if(dataType==='date'||dataType==='time'||dataType==='datetime'){ if(operator==='lt') operator='before'; else if(operator==='gt') operator='after'; } const descriptions = { eq : '=', gt : '>', gte : '>=', lt : '<', lte : '<=', contains : 'contains', startswith : 'starts with', endswith : 'ends with', before : 'is before', after : 'is after', in : 'contains' }; return descriptions[operator]; } } }