RuoYi
2023-11-29 dfb809638727baaf4aff07f2f17d542fa6d87532
优化代码
已修改4个文件
36 ■■■■ 文件已修改
src/components/FileUpload/index.vue 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/TopNav/index.vue 25 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/plugins/tab.js 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/views/monitor/operlog/index.vue 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/components/FileUpload/index.vue
@@ -164,10 +164,11 @@
// 获取文件名称
function getFileName(name) {
  // 如果是url那么取最后的名字 如果不是直接返回
  if (name.lastIndexOf("/") > -1) {
    return name.slice(name.lastIndexOf("/") + 1);
  } else {
    return "";
    return name;
  }
}
src/components/TopNav/index.vue
@@ -6,13 +6,12 @@
    :ellipsis="false"
  >
    <template v-for="(item, index) in topMenus">
      <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber"
        ><svg-icon
          v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
          :icon-class="item.meta.icon"
        />
        {{ item.meta.title }}</el-menu-item
      >
      <el-menu-item :style="{'--theme': theme}" :index="item.path" :key="index" v-if="index < visibleNumber">
        <svg-icon
        v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
        :icon-class="item.meta.icon"/>
        {{ item.meta.title }}
      </el-menu-item>
    </template>
    <!-- 顶部菜单超出数量折叠 -->
@@ -22,10 +21,12 @@
        <el-menu-item
          :index="item.path"
          :key="index"
          v-if="index >= visibleNumber"
          ><svg-icon :icon-class="item.meta.icon" />
          {{ item.meta.title }}</el-menu-item
        >
          v-if="index >= visibleNumber">
        <svg-icon
          v-if="item.meta && item.meta.icon && item.meta.icon !== '#'"
          :icon-class="item.meta.icon"/>
        {{ item.meta.title }}
        </el-menu-item>
      </template>
    </el-sub-menu>
  </el-menu>
@@ -195,7 +196,7 @@
/* 背景色隐藏 */
.topmenu-container.el-menu--horizontal>.el-menu-item:not(.is-disabled):focus, .topmenu-container.el-menu--horizontal>.el-menu-item:not(.is-disabled):hover, .topmenu-container.el-menu--horizontal>.el-submenu .el-submenu__title:hover {
    background-color: #ffffff !important;
  background-color: #ffffff !important;
}
/* 图标右间距 */
src/plugins/tab.js
@@ -35,7 +35,7 @@
      return useTagsViewStore().delView(router.currentRoute.value).then(({ visitedViews }) => {
        const latestView = visitedViews.slice(-1)[0]
        if (latestView) {
            return router.push(latestView.fullPath)
          return router.push(latestView.fullPath)
        }
        return router.push('/');
      });
src/views/monitor/operlog/index.vue
@@ -149,7 +149,7 @@
      />
      <!-- 操作日志详细 -->
      <el-dialog title="操作日志详细" v-model="open" width="700px" append-to-body>
      <el-dialog title="操作日志详细" v-model="open" width="800px" append-to-body>
         <el-form :model="form" label-width="100px">
            <el-row>
               <el-col :span="12">
@@ -171,7 +171,7 @@
               <el-col :span="24">
                  <el-form-item label="返回参数:">{{ form.jsonResult }}</el-form-item>
               </el-col>
               <el-col :span="6">
               <el-col :span="8">
                  <el-form-item label="操作状态:">
                     <div v-if="form.status === 0">正常</div>
                     <div v-else-if="form.status === 1">失败</div>
@@ -180,7 +180,7 @@
               <el-col :span="8">
                  <el-form-item label="消耗时间:">{{ form.costTime }}毫秒</el-form-item>
               </el-col>
               <el-col :span="10">
               <el-col :span="8">
                  <el-form-item label="操作时间:">{{ parseTime(form.operTime) }}</el-form-item>
               </el-col>
               <el-col :span="24">