Skip to content

KLDetectOp

考拉开始/停止检测组件

效果

vue
<script setup lang="ts">
import { ref } from 'vue';
const recipeId = ref(1);
const recipes = ref([
  { id: 1, name: 'KL-001' },
  { id: 2, name: 'KL-002' },
  { id: 3, name: 'KL-003' },
]);
const started = ref(false);
function startCB() {
  started.value = true
}
function stopCB() {
  started.value = false
}

</script>
<template>
  <div style="width: 600px; height:196px;">
    <KLDetectOp :recipeId="recipeId" :recipes="recipes" :started="started" :startCB="startCB" :stopCB="stopCB" />
  </div>
</template>

Attributes

属性说明类型默认值
recipeId当前配方number-
recipes配方列表{ id: number, name: string }[]-
started当前检测状态boolean-
prestartCBstartCB执行之前的回调函数,可以为空() => void-
startCB开始检测的回调函数() => void-
stopCB停止检测的回调函数() => void-