打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
成功vue img动态切换图片

    <el-menu
      mode="horizontal"
      class="topMenu"
      background-color="transparent"
      text-color="#fff"
      active-text-color="#ffd04b"
      :default-active="ActiveIndex"
      :router="false"
      :unique-opened="true"
      @select="HandleSelect"
    >
      <el-menu-item index="1" @click="newPatient" v-if="if_newPatient">
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/xjbl.png'):require('@/assets/img/xjbl2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
          测试1
        </div>
      </el-menu-item>
      <el-menu-item index="2" @click="SelectCase" v-if="if_SelectCase">
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/kjcx.png'):require('@/assets/img/kjcx2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
          测试2
        </div>
      </el-menu-item>
      <el-menu-item index="3" @click="SampleStorage" v-if="if_SampleStorage">
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/ybrk.png'):require('@/assets/img/ybrk2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
          测试3
        </div>
      </el-menu-item>
      <el-menu-item index="4" @click="WarehouseOut" v-if="if_WarehouseOut">
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/ybck.png'):require('@/assets/img/ybck2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
          测试4
        </div>
      </el-menu-item>
      <el-menu-item
        index="5"
        @click="StatisticalQuery"
        v-if="if_StatisticalQuery"
      >
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/tjcx.png'):require('@/assets/img/tjcx2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
         测试5
        </div>
      </el-menu-item>
      <el-menu-item
        index="6"
        @click="LaboratoryManagement"
        v-if="if_LaboratoryManagement"
      >
        <div style="margin-top: 10px; text-align: center">
          <img style="width: 48px; height: 48px" :src="ActiveIndex==6?require('@/assets/img/sysgl.png'):require('@/assets/img/sysgl2.png')" />
        </div>
        <div style="font-size: 12px; margin-top: 2px; text-align: center">
          测试6
        </div>
      </el-menu-item>
    </el-menu>
export default {
  data() {
    return {
      ActiveIndex: "",
      SearchContent: "",
      if_newPatient: false,
      if_SelectCase: false,
      if_SampleStorage: false,
      if_WarehouseOut: false,
      if_StatisticalQuery: false,
      if_LaboratoryManagement: false,
    };
  },
关键代码::src="ActiveIndex==6?require('@/assets/img/sysgl.png'):require('@/assets/img/sysgl2.png')"

本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
div中图片和文字同一行实现垂直居中
花卉抠图
【边框模板】精美边框收藏
[卢勤]《把孩子培养成财富》系列视频
QQ空间防举报代码
新浪博客技巧大全
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服