qx
qx
2 天以前 b767cea8ee6bf2e782c7727ad9ccfd1d69b4f8cb
src/layout/components/Navbar.vue
@@ -5,8 +5,9 @@
    <breadcrumb id="breadcrumb-container" class="breadcrumb-container" v-if="!topNav" />
    <top-nav id="topmenu-container" class="topmenu-container" v-if="topNav" />
    <div class="centered-title">{{ hospname }}</div>
    <div class="right-menu">
      <div class="knowledge">
        <el-dropdown>
          <span class="el-dropdown-links">知识列表<i class="el-icon-arrow-down el-icon--right"></i>
@@ -94,11 +95,12 @@
import Search from "@/components/HeaderSearch";
import RuoYiGit from "@/components/RuoYi/Git";
import RuoYiDoc from "@/components/RuoYi/Doc";
import {selectHosp} from '@/api/hosp/hosp.js'
export default {
  data() {
    return {
      InfoList: [],
      hospname: ''
    };
  },
  components: {
@@ -131,6 +133,12 @@
    },
  },
  created() {
    selectHosp().then((res) => {
      if (res.msg) {
        this.hospname = res.msg
      }
    })
    this.getInfoList();
  },
  methods: {
@@ -254,4 +262,14 @@
  font-weight: 600;
  font-size: 16px;
}
.centered-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    margin: 0;
    z-index: 1; // 确保标题在其他元素上方显示,如果有重叠
    font-size: 26px; // 示例:设置字体大小
    font-weight: 700;
    line-height: 50px;
  }
</style>