perf:: 修复empty组件为函数式组件

This commit is contained in:
“huailei000”
2022-03-23 10:24:50 +08:00
committed by Jiangjie.Bai
parent ea2c3f1a11
commit 8ae14bfb37
18 changed files with 22 additions and 32 deletions

6
src/layout/empty.js Normal file
View File

@@ -0,0 +1,6 @@
export default {
name: 'Empty',
render(h) {
return <router-view/>
}
}

View File

@@ -1,15 +0,0 @@
<template>
<div>
<router-view />
</div>
</template>
<script>
export default {
name: 'Layout'
}
</script>
<style lang="scss" scoped>
</style>

View File

@@ -1,9 +1,8 @@
import Layout from '@/layout'
import i18n from '@/i18n/i18n'
import SessionRoutes from './sessions'
import LogRoutes from './logs'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default {
path: '/audit/',

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import XPackRoutes from './xpack'
export default [

View File

@@ -1,6 +1,6 @@
import Layout from '@/layout/index'
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import UsersRoute from './users'
import AssetsRoute from './assets'

View File

@@ -1,6 +1,6 @@
import i18n from '@/i18n/i18n'
import { BASE_URL } from '@/utils/common'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import { BASE_URL } from '@/utils/common'
// Todo: 放到系统设置中

View File

@@ -1,5 +1,5 @@
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default [
{

View File

@@ -1,4 +1,4 @@
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import i18n from '@/i18n/i18n'
export default [

View File

@@ -1,6 +1,6 @@
import Layout from '@/layout'
import i18n from '@/i18n/i18n'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default {
path: '/settings',

View File

@@ -1,5 +1,5 @@
import Layout from '@/layout'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import i18n from '@/i18n/i18n'
export default {

View File

@@ -1,7 +1,7 @@
import Layout from '@/layout'
import i18n from '@/i18n/i18n'
import { BASE_URL } from '@/utils/common'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
export default {
path: '/workspace/',

View File

@@ -3,7 +3,7 @@ import {
viewRoutes,
constantRoutes
} from '@/router'
import empty from '@/layout/empty'
const empty = () => import('@/layout/empty.js')
import Layout from '@/layout/index'
import { getResourceNameByPath, hasPermission } from '@/utils/jms'