.env.development | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.env.production | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
.env.staging | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
index.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
package.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/components/TopNav/index.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/layout/components/Navbar.vue | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
src/store/modules/app.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
.env.development
@@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 陕西昭德环保型煤有限公司 # 开发环境配置 VITE_APP_ENV = 'development' # 若依管理系统/开发环境 # 陕西昭德环保型煤有限公司/开发环境 VITE_APP_BASE_API = '/dev-api' .env.production
@@ -1,10 +1,10 @@ # 页面标题 VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 陕西昭德环保型煤有限公司 # 生产环境配置 VITE_APP_ENV = 'production' # 若依管理系统/生产环境 # 陕西昭德环保型煤有限公司/生产环境 VITE_APP_BASE_API = '/prod-api' # 是否在打包时开启压缩,支持 gzip 和 brotli .env.staging
@@ -1,10 +1,10 @@ # 页面标题 VITE_APP_TITLE = 若依管理系统 VITE_APP_TITLE = 陕西昭德环保型煤有限公司 # 生产环境配置 VITE_APP_ENV = 'staging' # 若依管理系统/生产环境 # 陕西昭德环保型煤有限公司/生产环境 VITE_APP_BASE_API = '/stage-api' # 是否在打包时开启压缩,支持 gzip 和 brotli index.html
@@ -7,7 +7,7 @@ <meta name="renderer" content="webkit"> <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> <link rel="icon" href="/favicon.ico"> <title>若依管理系统</title> <title>陕西昭德环保型煤有限公司</title> <!--[if lt IE 11]><script>window.location.href='/html/ie.html';</script><![endif]--> <style> html, package.json
@@ -1,7 +1,7 @@ { "name": "ruoyi", "version": "3.8.9", "description": "若依管理系统", "description": "陕西昭德环保型煤有限公司", "author": "若依", "license": "MIT", "type": "module", src/components/TopNav/index.vue
@@ -66,7 +66,10 @@ if (menu.path === '/' && menu.children) { topMenus.push(menu.children[0]) } else { topMenus.push(menu) menu.children.forEach(item => { topMenus.push(item) }) } } }) @@ -102,13 +105,13 @@ const tmpPath = path.substring(1, path.length) if (!route.meta.link) { activePath = "/" + tmpPath.substring(0, tmpPath.indexOf("/")) appStore.toggleSideBarHide(false) // appStore.toggleSideBarHide(false) } } else if(!route.children) { activePath = path appStore.toggleSideBarHide(true) // appStore.toggleSideBarHide(true) } activeRoutes(activePath) // activeRoutes(activePath) return activePath }) @@ -132,11 +135,11 @@ } else { router.push({ path: key }) } appStore.toggleSideBarHide(true) // appStore.toggleSideBarHide(true) } else { // 显示左侧联动菜单 activeRoutes(key) appStore.toggleSideBarHide(false) // activeRoutes(key) // appStore.toggleSideBarHide(false) } } @@ -152,7 +155,7 @@ if(routes.length > 0) { permissionStore.setSidebarRouters(routes) } else { appStore.toggleSideBarHide(true) // appStore.toggleSideBarHide(true) } return routes } src/layout/components/Navbar.vue
@@ -2,8 +2,10 @@ <div class="navbar"> <!-- <hamburger id="hamburger-container" :is-active="appStore.sidebar.opened" class="hamburger-container" @toggleClick="toggleSideBar" />--> <!-- <breadcrumb v-if="!settingsStore.topNav" id="breadcrumb-container" class="breadcrumb-container" />--> <!-- <top-nav v-if="settingsStore.topNav" id="topmenu-container" class="topmenu-container" />--> <div class="logo"> <div v-if="sidebar.hide"> <top-nav id="topmenu-container" class="topmenu-container" /> </div> <div class="logo" v-if="!sidebar.hide"> <img src="@/assets/logo/logo.png" alt=""/> </div> <div class="right-menu"> @@ -21,6 +23,9 @@ <router-link to="/user/profile"> <el-dropdown-item>个人中心</el-dropdown-item> </router-link> <!-- <el-dropdown-item command="setLayout" v-if="settingsStore.showSettings">--> <!-- <span>布局设置</span>--> <!-- </el-dropdown-item>--> <el-dropdown-item divided command="logout"> <span>退出登录</span> </el-dropdown-item> @@ -35,6 +40,7 @@ </template> <script setup> import {useWindowSize} from '@vueuse/core' import { ElMessageBox } from 'element-plus' import Breadcrumb from '@/components/Breadcrumb' import TopNav from '@/components/TopNav' @@ -47,11 +53,47 @@ import useAppStore from '@/store/modules/app' import useUserStore from '@/store/modules/user' import useSettingsStore from '@/store/modules/settings' const sidebar = computed(() => useAppStore().sidebar) const device = computed(() => useAppStore().device) import Sidebar from "@/layout/components/Sidebar/index.vue"; const appStore = useAppStore() const userStore = useUserStore() const settingsStore = useSettingsStore() const isShowTop = ref(false) const { width, height } = useWindowSize() const WIDTH = 992 // refer to Bootstrap's responsive design watch(() => device.value, () => { if (device.value === 'mobile' && sidebar.value.opened) { useAppStore().closeSideBar({ withoutAnimation: false }) } }) watchEffect(() => { if (width.value - 1 < WIDTH) { useAppStore().toggleDevice('mobile') appStore.toggleSideBarHide(true) useAppStore().closeSideBar({ withoutAnimation: true }) } else { useAppStore().toggleDevice('desktop') appStore.toggleSideBarHide(false) } }) // 根据窗口宽度设置 isShowTop // const handleResize = () => { // settingsStore.topNav = !(window.innerWidth < 992) // } // // onMounted(() => { // handleResize() // 初始判断一次 // window.addEventListener('resize', handleResize) // }) // // onUnmounted(() => { // window.removeEventListener('resize', handleResize) // }) function toggleSideBar() { appStore.toggleSideBar() } @@ -122,7 +164,6 @@ .topmenu-container { position: absolute; left: 50px; } .errLog-container { src/store/modules/app.js
@@ -14,7 +14,6 @@ }), actions: { toggleSideBar(withoutAnimation) { console.log('toggleSideBar', withoutAnimation) if (this.sidebar.hide) { return false }