データ取得処理条件式対応
This commit is contained in:
@@ -5,7 +5,16 @@ import { getFieldObj } from './helper';
|
||||
// conditionValue = '' | 'eq' | 'ne'
|
||||
// conditionItem = { value: 'eq', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b }
|
||||
// = conditionMap[conditionValue]
|
||||
export type ConditionValue = '' | 'eq' | 'ne' | 'test';
|
||||
export type ConditionValue = ""| "="
|
||||
| "!="
|
||||
| ">="
|
||||
| "<="
|
||||
| "<"
|
||||
| ">"
|
||||
| "like"
|
||||
| "not like"
|
||||
| "in"
|
||||
| "not in";
|
||||
|
||||
type ConditionItem = {
|
||||
value: ConditionValue;
|
||||
@@ -16,9 +25,9 @@ type ConditionItem = {
|
||||
|
||||
export const conditionList: ConditionItem[] = [
|
||||
{ value: '', label: '--------', type: '', func: (a: string, b: string) => true },
|
||||
{ value: 'eq', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b },
|
||||
{ value: 'ne', label: '≠ (等しくない)', type: 'input', func: (a: string, b: string) => a !== b },
|
||||
{ value: 'test', label: 'test combobox', type: 'select', func: (a: string, b: string) => a < b },
|
||||
{ value: '=', label: '=(等しい)', type: 'input', func: (a: string, b: string) => a === b },
|
||||
{ value: '!=', label: '≠ (等しくない)', type: 'input', func: (a: string, b: string) => a !== b },
|
||||
{ value: '>=', label: 'test combobox', type: 'select', func: (a: string, b: string) => a < b },
|
||||
];
|
||||
|
||||
// search from conditionList
|
||||
|
||||
Reference in New Issue
Block a user