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 | - |
| prestartCB | startCB执行之前的回调函数,可以为空 | () => void | - |
| startCB | 开始检测的回调函数 | () => void | - |
| stopCB | 停止检测的回调函数 | () => void | - |