1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <template>
- <div>
- <el-dialog title="查看健康建议" v-model="dialogVisible">
- <template #header>
- <h4>
- {{ props.data.createdAt.split(" ")[0] }} 至
- {{ props.data.nextTime.split(" ")[0] }}
- </h4>
- </template>
- <div>
- {{ props.data.advise }}
- </div>
- <template #footer> </template>
- </el-dialog>
- </div>
- </template>
- <script lang="ts" setup>
- import { ref, computed, defineProps, defineEmits, watch } from "vue";
- const props = defineProps({
- show: {
- type: Boolean,
- default: false
- },
- data: {
- type: Object,
- default: () => {}
- }
- });
- const emits = defineEmits(["update:show"]);
- const dialogVisible = computed({
- get() {
- return props.show;
- },
- set(n) {
- emits("update:show", n);
- }
- });
- watch(
- () => dialogVisible.value,
- n => {
- if (n) {
- } else {
- }
- }
- );
- </script>
|