adminforth 1.0.56 → 1.0.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -91,7 +91,7 @@ class CodeInjector {
91
91
  routes += `{
92
92
  path: '${item.path}',
93
93
  name: '${item.path}',
94
- component: import('${item.component}'),
94
+ component: () => import('${item.component}'),
95
95
  },\n`;
96
96
  }
97
97
  if (item.children) {
@@ -1,20 +1,9 @@
1
1
  import { createRouter, createWebHistory } from 'vue-router'
2
2
  import ResourceParent from '@/views/ResourceParent.vue'
3
- import ListView from '@/views/ListView.vue'
4
- import ShowView from '@/views/ShowView.vue'
5
- import EditView from '@/views/EditView.vue'
6
- import CreateView from '@/views/CreateView.vue'
7
3
 
8
4
  const router = createRouter({
9
5
  history: createWebHistory(import.meta.env.BASE_URL),
10
6
  routes: [
11
- {
12
- path: '/',
13
- name: 'home',
14
- //redirect to login
15
- /* IMPORTANT:ADMINFORTH REDIRECT */
16
-
17
- },
18
7
  {
19
8
  path: '/login',
20
9
  name: 'login',
@@ -27,22 +16,22 @@ const router = createRouter({
27
16
  children: [
28
17
  {
29
18
  path: '',
30
- component: ListView,
19
+ component: () => import('@/views/ListView.vue'),
31
20
  name: 'resource-list'
32
21
  },
33
22
  {
34
23
  path: 'show/:primaryKey',
35
- component: ShowView,
24
+ component: () => import('@/views/ShowView.vue'),
36
25
  name: 'resource-show'
37
26
  },
38
27
  {
39
28
  path: 'edit/:primaryKey',
40
- component: EditView,
29
+ component: () => import('@/views/EditView.vue'),
41
30
  name: 'resource-edit'
42
31
  },
43
32
  {
44
33
  path: 'create',
45
- component: CreateView,
34
+ component: () => import('@/views/CreateView.vue'),
46
35
  name: 'resource-create'
47
36
  },
48
37
  ]
@@ -100,7 +100,7 @@ class CodeInjector {
100
100
  routes += `{
101
101
  path: '${item.path}',
102
102
  name: '${item.path}',
103
- component: import('${item.component}'),
103
+ component: () => import('${item.component}'),
104
104
  },\n`
105
105
  }
106
106
  if (item.children) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "adminforth",
3
- "version": "1.0.56",
3
+ "version": "1.0.57",
4
4
  "description": "OpenSource Vue3 powered forth-generation admin panel",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -1,20 +1,9 @@
1
1
  import { createRouter, createWebHistory } from 'vue-router'
2
2
  import ResourceParent from '@/views/ResourceParent.vue'
3
- import ListView from '@/views/ListView.vue'
4
- import ShowView from '@/views/ShowView.vue'
5
- import EditView from '@/views/EditView.vue'
6
- import CreateView from '@/views/CreateView.vue'
7
3
 
8
4
  const router = createRouter({
9
5
  history: createWebHistory(import.meta.env.BASE_URL),
10
6
  routes: [
11
- {
12
- path: '/',
13
- name: 'home',
14
- //redirect to login
15
- /* IMPORTANT:ADMINFORTH REDIRECT */
16
-
17
- },
18
7
  {
19
8
  path: '/login',
20
9
  name: 'login',
@@ -27,22 +16,22 @@ const router = createRouter({
27
16
  children: [
28
17
  {
29
18
  path: '',
30
- component: ListView,
19
+ component: () => import('@/views/ListView.vue'),
31
20
  name: 'resource-list'
32
21
  },
33
22
  {
34
23
  path: 'show/:primaryKey',
35
- component: ShowView,
24
+ component: () => import('@/views/ShowView.vue'),
36
25
  name: 'resource-show'
37
26
  },
38
27
  {
39
28
  path: 'edit/:primaryKey',
40
- component: EditView,
29
+ component: () => import('@/views/EditView.vue'),
41
30
  name: 'resource-edit'
42
31
  },
43
32
  {
44
33
  path: 'create',
45
- component: CreateView,
34
+ component: () => import('@/views/CreateView.vue'),
46
35
  name: 'resource-create'
47
36
  },
48
37
  ]