<template>
    <button @click="routerBloodSugarClick" v-if="oldButton">血糖</button>
    <el-button @click="routerBloodSugarClick" v-else>血糖</el-button>
</template>

<script setup name='BloodSugar'>
import router from "@/router";

const props = defineProps({
    patNo: String,
    times: Number,
    oldButton: {
        type: Boolean,
        default: true
    }
})

const routerBloodSugarClick = () => {
    router.push({
        name: 'bloodSugarQuery',
        params: {
            patNo: props.patNo,
            times: props.times,
        }
    })
}

</script>

<style scoped lang="scss">

</style>
