Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
N
najiu-admin-template
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
najiu-frontend
najiu-admin-template
Commits
930383f9
Commit
930383f9
authored
Dec 23, 2020
by
vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: add mainout page demo
parent
2ee01fa6
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
45 additions
and
5 deletions
+45
-5
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+1
-0
UploadModal.vue
src/components/Upload/src/UploadModal.vue
+1
-1
menuHelper.ts
src/router/helper/menuHelper.ts
+1
-1
dashboard.ts
src/router/menus/modules/dashboard.ts
+2
-2
feat.ts
src/router/menus/modules/demo/feat.ts
+1
-0
index.ts
src/router/routes/index.ts
+2
-1
mainOut.ts
src/router/routes/mainOut.ts
+17
-0
index.vue
src/views/demo/main-out/index.vue
+20
-0
No files found.
CHANGELOG.zh_CN.md
View file @
930383f9
...
@@ -5,6 +5,7 @@
...
@@ -5,6 +5,7 @@
-
新增
`v-ripple`
水波纹指令
-
新增
`v-ripple`
水波纹指令
-
新增左侧菜单混合模式
-
新增左侧菜单混合模式
-
新增 markdown 嵌入表单内示例
-
新增 markdown 嵌入表单内示例
-
新增主框架外页面示例
### 🐛 Bug Fixes
### 🐛 Bug Fixes
...
...
src/components/Upload/src/UploadModal.vue
View file @
930383f9
...
@@ -125,7 +125,7 @@
...
@@ -125,7 +125,7 @@
// 设置类型,则判断
// 设置类型,则判断
if
(
accept
.
length
>
0
&&
!
checkFileType
(
file
,
accept
))
{
if
(
accept
.
length
>
0
&&
!
checkFileType
(
file
,
accept
))
{
createMessage
.
error
!
(
t
(
'
acomponent.upload.
cceptUpload
'
,
[
accept
.
join
(
'
,
'
)]));
createMessage
.
error
!
(
t
(
'
component.upload.a
cceptUpload
'
,
[
accept
.
join
(
'
,
'
)]));
return
false
;
return
false
;
}
}
const
commonItem
=
{
const
commonItem
=
{
...
...
src/router/helper/menuHelper.ts
View file @
930383f9
...
@@ -23,7 +23,7 @@ function joinParentPath(list: any, node: any) {
...
@@ -23,7 +23,7 @@ function joinParentPath(list: any, node: any) {
parentPath
+=
/^
\/
/
.
test
(
p
)
?
p
:
`/
${
p
}
`
;
parentPath
+=
/^
\/
/
.
test
(
p
)
?
p
:
`/
${
p
}
`
;
});
});
}
}
node
.
path
=
`
${
parentPath
}${
/^
\
//.test(node.path) ? node.path : `
/${node.path}`}`.replace(
node
.
path
=
`
${
/^
\
//.test(node.path) ? node.path : `${parentPath}
/${node.path}`}`.replace(
/
\
/
\
//g,
/
\
/
\
//g,
'
/
'
'
/
'
);
);
...
...
src/router/menus/modules/dashboard.ts
View file @
930383f9
...
@@ -8,11 +8,11 @@ const menu: MenuModule = {
...
@@ -8,11 +8,11 @@ const menu: MenuModule = {
path
:
'
/dashboard
'
,
path
:
'
/dashboard
'
,
children
:
[
children
:
[
{
{
path
:
'
/
workbench
'
,
path
:
'
workbench
'
,
name
:
t
(
'
routes.dashboard.workbench
'
),
name
:
t
(
'
routes.dashboard.workbench
'
),
},
},
{
{
path
:
'
/
analysis
'
,
path
:
'
analysis
'
,
name
:
t
(
'
routes.dashboard.analysis
'
),
name
:
t
(
'
routes.dashboard.analysis
'
),
},
},
],
],
...
...
src/router/menus/modules/demo/feat.ts
View file @
930383f9
...
@@ -62,6 +62,7 @@ const menu: MenuModule = {
...
@@ -62,6 +62,7 @@ const menu: MenuModule = {
path
:
'
error-log
'
,
path
:
'
error-log
'
,
name
:
t
(
'
routes.demo.feat.errorLog
'
),
name
:
t
(
'
routes.demo.feat.errorLog
'
),
},
},
{
{
name
:
t
(
'
routes.demo.excel.excel
'
),
name
:
t
(
'
routes.demo.excel.excel
'
),
path
:
'
excel
'
,
path
:
'
excel
'
,
...
...
src/router/routes/index.ts
View file @
930383f9
...
@@ -3,6 +3,7 @@ import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
...
@@ -3,6 +3,7 @@ import type { AppRouteRecordRaw, AppRouteModule } from '/@/router/types';
import
{
PAGE_NOT_FOUND_ROUTE
,
REDIRECT_ROUTE
}
from
'
../constant
'
;
import
{
PAGE_NOT_FOUND_ROUTE
,
REDIRECT_ROUTE
}
from
'
../constant
'
;
import
modules
from
'
globby!/@/router/routes/modules/**/*.@(ts)
'
;
import
modules
from
'
globby!/@/router/routes/modules/**/*.@(ts)
'
;
import
{
mainOutRoutes
}
from
'
./mainOut
'
;
import
{
PageEnum
}
from
'
/@/enums/pageEnum
'
;
import
{
PageEnum
}
from
'
/@/enums/pageEnum
'
;
import
{
t
}
from
'
/@/hooks/web/useI18n
'
;
import
{
t
}
from
'
/@/hooks/web/useI18n
'
;
...
@@ -35,4 +36,4 @@ export const LoginRoute: AppRouteRecordRaw = {
...
@@ -35,4 +36,4 @@ export const LoginRoute: AppRouteRecordRaw = {
};
};
// 基础路由 不用权限
// 基础路由 不用权限
export
const
basicRoutes
=
[
LoginRoute
,
RootRoute
,
REDIRECT_ROUTE
];
export
const
basicRoutes
=
[
LoginRoute
,
RootRoute
,
...
mainOutRoutes
,
REDIRECT_ROUTE
];
src/router/routes/mainOut.ts
0 → 100644
View file @
930383f9
import
type
{
AppRouteModule
}
from
'
/@/router/types
'
;
// test
// http:ip:port/main-out
export
const
mainOutRoutes
:
AppRouteModule
[]
=
[
{
path
:
'
/main-out
'
,
name
:
'
MainOut
'
,
component
:
()
=>
import
(
'
/@/views/demo/main-out/index.vue
'
),
meta
:
{
title
:
'
MainOut
'
,
ignoreAuth
:
true
,
},
},
];
export
const
mainOutRouteNames
=
mainOutRoutes
.
map
((
item
)
=>
item
.
name
);
src/views/demo/main-out/index.vue
0 → 100644
View file @
930383f9
<
template
>
<div
class=
"test"
>
位于主框架外的页面
</div>
</
template
>
<
script
lang=
"ts"
>
import
{
defineComponent
}
from
'
vue
'
;
export
default
defineComponent
({});
</
script
>
<
style
scoped
>
.test
{
position
:
fixed
;
display
:
flex
;
width
:
100%
;
height
:
100%
;
justify-content
:
center
;
align-items
:
center
;
font-size
:
50px
;
}
</
style
>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment