Skip to content

Commit

Permalink
update vite to 4.x
Browse files Browse the repository at this point in the history
  • Loading branch information
jzfai committed Dec 21, 2022
1 parent bb1ed1d commit e2f0aa5
Show file tree
Hide file tree
Showing 10 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
"unocss": "^0.33.5",
"unplugin-auto-import": "^0.11.2",
"unplugin-vue-components": "^0.22.8",
"vite": "^3.1.8",
"vite": "^4.0.2",
"vite-plugin-mkcert": "^1.7.2",
"vite-plugin-mock": "^2.9.6",
"vite-plugin-svg-icons": "^2.0.1",
Expand Down
2 changes: 1 addition & 1 deletion src/layout/app-main/Breadcrumb.vue
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const { settings } = useBasicStore()
const route = useRoute()
const getBreadcrumb = () => {
// only show routes with has meta.title
let matched = route.matched.filter((item) => item.meta?.title)
let matched: RouterTypes = route.matched.filter((item) => item.meta?.title)
//如果首页Dashboard,如果没有,添加Dashboard路由到第一个路由
const isHasDashboard = matched[0]?.name?.toLocaleLowerCase() === 'Dashboard'.toLocaleLowerCase()
if (!isHasDashboard) {
Expand Down
2 changes: 1 addition & 1 deletion src/layout/app-main/TagsView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ const isAffix = (tag) => {
}
const filterAffixTags = (routes, basePath = '/') => {
let tags = []
let tags: RouterTypes = []
routes.forEach((route) => {
if (route.meta && route.meta.affix) {
const tagPath = resolve(basePath, route.path)
Expand Down
2 changes: 1 addition & 1 deletion src/layout/app-main/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ const key = computed(() => route.path)
/*listen the component name changing, then to keep-alive the page*/
// cachePage: is true, keep-alive this Page
// leaveRmCachePage: is true, keep-alive remote when page leave
let oldRoute = {}
let oldRoute: rawConfig = {}
let deepOldRouter: RouteLocationMatched | null = null
const basicStore = useBasicStore()
const removeDeepChildren = (deepOldRouter) => {
Expand Down
3 changes: 2 additions & 1 deletion src/layout/sidebar/SidebarItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ import { ref } from 'vue'
import { resolve } from 'path-browserify'
import Link from './Link.vue'
import MenuIcon from './MenuIcon.vue'
import type { RouteRawConfig } from '~/basic'
import { isExternal } from '@/hooks/use-layout'
import { langTitle } from '@/hooks/use-common'
Expand All @@ -52,7 +53,7 @@ const props = defineProps({
//显示sidebarItem 的情况
const onlyOneChild = ref()
const showSidebarItem = (children = [], parent) => {
const showingChildren = children.filter((item: any) => {
const showingChildren = children.filter((item: RouteRawConfig) => {
if (item.hidden) {
return false
} else {
Expand Down
2 changes: 1 addition & 1 deletion src/theme/base/custom/ct-css-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ html.base-theme {
--sidebar-logo-height: 32px;
--sidebar-logo-title-color: #fff;
--side-bar-width: 210px;
--side-bar-border-right-color: '#ddd';
--side-bar-border-right-color: #ddd;
//TagsView
--tags-view-background: #fff;
--tags-view-border-bottom-color: #d8dce5;
Expand Down
2 changes: 1 addition & 1 deletion src/theme/china-red/custom/ct-css-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ html.china-red {
--sidebar-logo-height: 32px;
--sidebar-logo-title-color: #2b2f3a;
--side-bar-width: 210px;
--side-bar-border-right-color: '#ddd';
--side-bar-border-right-color: #ddd;
//TagsView
--tags-view-background: #fff;
--tags-view-border-bottom-color: #d8dce5;
Expand Down
Empty file removed src/theme/index.css
Empty file.
1 change: 0 additions & 1 deletion src/theme/index.css.map

This file was deleted.

2 changes: 1 addition & 1 deletion src/theme/lighting/custom/ct-css-vars.scss
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ html.lighting-theme {
--sidebar-logo-height: 32px;
--sidebar-logo-title-color: #2b2f3a;
--side-bar-width: 210px;
--side-bar-border-right-color: '#ddd';
--side-bar-border-right-color: #ddd;
//TagsView
--tags-view-background: #fff;
--tags-view-border-bottom-color: #d8dce5;
Expand Down

0 comments on commit e2f0aa5

Please sign in to comment.