条件演算子をカスタマイズし、kintoneクエリ文字列に変換することができます。

This commit is contained in:
Mouriya
2024-06-03 07:07:20 +09:00
parent 6df72a1ae3
commit fc9c3a5e81
3 changed files with 64 additions and 13 deletions

View File

@@ -113,7 +113,7 @@ import { finished } from 'stream';
</div>
</template>
<script lang="ts">
import { defineComponent,ref,reactive, computed } from 'vue';
import { defineComponent,ref,reactive, computed, inject } from 'vue';
import { INode,ConditionTree,GroupNode,ConditionNode, LogicalOperator,Operator,NodeType } from '../../types/Conditions';
import ConditionObject from './ConditionObject.vue';
export default defineComponent( {
@@ -143,12 +143,9 @@ export default defineComponent( {
return opts;
});
const operator = inject('Operator')
const operators =computed(()=>{
const opts=[];
for(const op in Operator){
opts.push(Operator[op as keyof typeof Operator]);
}
return opts;
return operator ? operator : Object.values(Operator);
});
const tree = reactive(props.conditionTree);