BloodSugar.vue 562 B

1234567891011121314151617181920212223242526272829303132
  1. <template>
  2. <span @click="routerBloodSugarClick" v-if="oldButton">血糖</span>
  3. <el-button @click="routerBloodSugarClick" v-else>血糖</el-button>
  4. </template>
  5. <script setup name='BloodSugar'>
  6. import router from "@/router";
  7. const props = defineProps({
  8. patNo: String,
  9. times: Number,
  10. oldButton: {
  11. type: Boolean,
  12. default: true
  13. }
  14. })
  15. const routerBloodSugarClick = () => {
  16. router.push({
  17. name: 'bloodSugarQuery',
  18. params: {
  19. patNo: props.patNo,
  20. times: props.times,
  21. }
  22. })
  23. }
  24. </script>
  25. <style scoped lang="scss">
  26. </style>