<template> <div> <n-tabs type="segment" animated> <n-tab-pane name="chap1" tab="逐时水深"> <Hourlydepth :valueModalNld="valueModalNld" /> </n-tab-pane> <!-- <n-tab-pane name="chap2" tab="历史水深"> <div id="historicalWaterDepth"></div> </n-tab-pane> --> <n-tab-pane v-if="showYdyc" name="chap3" tab="一点一策"> <baseMsg :valueModalNld="valueModalNld" /> </n-tab-pane> </n-tabs> </div> </template> <script> import { ref, toRefs, onMounted, reactive, onBeforeUnmount, nextTick } from 'vue'; import { lyInfoStationDetail, lyInfoSwlljcData } from '@/services'; import * as echarts from 'echarts'; import Hourlydepth from './Hourlydepth.vue'; import baseMsg from './baseMsg.vue'; import ydycData from './一点一策.json'; export default { name: 'shuiweiModals', props: { valueModalNld: Object, }, components: { Hourlydepth, baseMsg, }, data() { return { showYdyc: true } }, created() { if (!ydycData.find((item) => item.STCD == this.valueModalNld.STCD)) { this.showYdyc = false } }, methods: { } }; </script> <style lang="less"></style>