diff --git a/src/components/Condition/Operator.vue b/src/components/Condition/Operator.vue index 56a8af3..4b0f7dd 100644 --- a/src/components/Condition/Operator.vue +++ b/src/components/Condition/Operator.vue @@ -6,20 +6,20 @@ const $props = defineProps<{ }>() const operatorOptions = [ { - value: 'equal', + value: 'eq', label: '等于' }, { - value: 'not_equal', + value: 'ne', label: '不等于' }, { label: '包含', - value: 'contains' + value: 'lk' }, { label: '不包含', - value: 'not_contain' + value: 'nl' } ] const $emits = defineEmits<{ diff --git a/src/components/Condition/index.ts b/src/components/Condition/index.ts index 1379617..5be0bb5 100644 --- a/src/components/Condition/index.ts +++ b/src/components/Condition/index.ts @@ -14,7 +14,7 @@ export interface Condition { * 筛选规则 */ export interface FilterRules { - logicalOperator: 'or' | 'and', + operator: 'or' | 'and', conditions: Condition[] groups: FilterRules[] } \ No newline at end of file diff --git a/src/components/Condition/index.vue b/src/components/Condition/index.vue index 670211e..44e7c7a 100644 --- a/src/components/Condition/index.vue +++ b/src/components/Condition/index.vue @@ -25,7 +25,7 @@ const addRule = () => { filterRules.value.conditions.push( { field: null, - operator: 'equal', + operator: 'eq', value: null } ) @@ -46,7 +46,7 @@ const handleDel = (index: number) => { */ const addGroup = () => { filterRules.value.groups.push({ - logicalOperator: 'and', + operator: 'and', conditions: [{ field: null, operator: '', @@ -69,7 +69,7 @@ const delGroup = (index: number) => {