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
8ad127c2
Commit
8ad127c2
authored
Mar 23, 2021
by
Vben
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: add route base close #404
parent
8fb03961
Changes
12
Hide whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
30 additions
and
51 deletions
+30
-51
tsconfig.json
build/tsconfig.json
+0
-17
typeing.d.ts
build/typeing.d.ts
+0
-6
utils.ts
build/utils.ts
+0
-15
html.ts
build/vite/plugin/html.ts
+0
-1
index.ts
build/vite/plugin/index.ts
+0
-1
pwa.ts
build/vite/plugin/pwa.ts
+0
-1
_util.ts
mock/_util.ts
+1
-1
index.ts
src/router/index.ts
+1
-1
projectSetting.ts
src/settings/projectSetting.ts
+1
-1
tsconfig.json
tsconfig.json
+2
-0
event.d.ts
types/event.d.ts
+0
-7
global.d.ts
types/global.d.ts
+25
-0
No files found.
build/tsconfig.json
deleted
100644 → 0
View file @
8fb03961
{
"compilerOptions"
:
{
"target"
:
"esnext"
,
"module"
:
"commonjs"
,
"moduleResolution"
:
"node"
,
"strict"
:
true
,
"forceConsistentCasingInFileNames"
:
true
,
"baseUrl"
:
"."
,
"esModuleInterop"
:
true
,
"noUnusedLocals"
:
true
,
"noUnusedParameters"
:
true
,
"experimentalDecorators"
:
true
,
"lib"
:
[
"dom"
,
"esnext"
],
"incremental"
:
true
,
"skipLibCheck"
:
true
}
}
build/typeing.d.ts
deleted
100644 → 0
View file @
8fb03961
declare
module
'
*.json
'
{
const
src
:
any
;
export
default
src
;
}
declare
type
Recordable
=
Record
<
string
,
any
>
;
build/utils.ts
View file @
8ad127c2
...
...
@@ -17,21 +17,6 @@ export function isReportMode(): boolean {
return
process
.
env
.
REPORT
===
'
true
'
;
}
export
interface
ViteEnv
{
VITE_PORT
:
number
;
VITE_USE_MOCK
:
boolean
;
VITE_USE_PWA
:
boolean
;
VITE_PUBLIC_PATH
:
string
;
VITE_PROXY
:
[
string
,
string
][];
VITE_GLOB_APP_TITLE
:
string
;
VITE_GLOB_APP_SHORT_NAME
:
string
;
VITE_USE_CDN
:
boolean
;
VITE_DROP_CONSOLE
:
boolean
;
VITE_BUILD_COMPRESS
:
'
gzip
'
|
'
brotli
'
|
'
none
'
;
VITE_LEGACY
:
boolean
;
VITE_USE_IMAGEMIN
:
boolean
;
}
// Read all environment variable configuration files to process.env
export
function
wrapperEnv
(
envConf
:
Recordable
):
ViteEnv
{
const
ret
:
any
=
{};
...
...
build/vite/plugin/html.ts
View file @
8ad127c2
...
...
@@ -3,7 +3,6 @@
* https://github.com/anncwb/vite-plugin-html
*/
import
type
{
Plugin
}
from
'
vite
'
;
import
type
{
ViteEnv
}
from
'
../../utils
'
;
import
html
from
'
vite-plugin-html
'
;
...
...
build/vite/plugin/index.ts
View file @
8ad127c2
import
type
{
Plugin
}
from
'
vite
'
;
import
type
{
ViteEnv
}
from
'
../../utils
'
;
import
vue
from
'
@vitejs/plugin-vue
'
;
import
vueJsx
from
'
@vitejs/plugin-vue-jsx
'
;
...
...
build/vite/plugin/pwa.ts
View file @
8ad127c2
...
...
@@ -2,7 +2,6 @@
* Zero-config PWA for Vite
* https://github.com/antfu/vite-plugin-pwa
*/
import
type
{
ViteEnv
}
from
'
../../utils
'
;
import
{
VitePWA
}
from
'
vite-plugin-pwa
'
;
...
...
mock/_util.ts
View file @
8ad127c2
// Interface data format used to return a unified format
export
function
resultSuccess
<
T
=
any
>
(
result
:
T
,
{
message
=
'
ok
'
}
=
{})
{
export
function
resultSuccess
<
T
=
Recordable
>
(
result
:
T
,
{
message
=
'
ok
'
}
=
{})
{
return
{
code
:
0
,
result
,
...
...
src/router/index.ts
View file @
8ad127c2
...
...
@@ -9,7 +9,7 @@ const WHITE_NAME_LIST = [LoginRoute.name, REDIRECT_NAME];
// app router
const
router
=
createRouter
({
history
:
createWebHashHistory
(),
history
:
createWebHashHistory
(
import
.
meta
.
env
.
VITE_PUBLIC_PATH
),
routes
:
(
basicRoutes
as
unknown
)
as
RouteRecordRaw
[],
strict
:
true
,
scrollBehavior
:
()
=>
({
left
:
0
,
top
:
0
}),
...
...
src/settings/projectSetting.ts
View file @
8ad127c2
...
...
@@ -20,7 +20,7 @@ const setting: ProjectConfig = {
settingButtonPosition
:
SettingButtonPositionEnum
.
AUTO
,
// Permission mode
permissionMode
:
PermissionModeEnum
.
BACK
,
permissionMode
:
PermissionModeEnum
.
ROLE
,
// Permission-related cache is stored in sessionStorage or localStorage
permissionCacheType
:
CacheTypeEnum
.
LOCAL
,
...
...
tsconfig.json
View file @
8ad127c2
...
...
@@ -34,6 +34,8 @@
"src/**/*.vue"
,
"types/**/*.d.ts"
,
"types/**/*.ts"
,
"build/**/*.ts"
,
"build/**/*.d.ts"
,
"mock/**/*.ts"
],
"exclude"
:
[
"node_modules"
,
"dist"
,
"**/*.js"
]
...
...
types/event.d.ts
deleted
100644 → 0
View file @
8fb03961
declare
interface
ChangeEvent
extends
Event
{
target
:
HTMLInputElement
;
}
declare
interface
WheelEvent
{
path
?:
EventTarget
[];
}
types/global.d.ts
View file @
8ad127c2
...
...
@@ -61,3 +61,28 @@ declare type ComponentRef<T extends HTMLElement = HTMLDivElement> = ComponentElR
declare
type
ElRef
<
T
extends
HTMLElement
=
HTMLDivElement
>
=
Nullable
<
T
>
;
type
IsSame
<
A
,
B
>
=
A
|
B
extends
A
&
B
?
true
:
false
;
declare
interface
ChangeEvent
extends
Event
{
target
:
HTMLInputElement
;
}
declare
interface
WheelEvent
{
path
?:
EventTarget
[];
}
type
ImportMetaEnv
=
ViteEnv
;
declare
interface
ViteEnv
{
VITE_PORT
:
number
;
VITE_USE_MOCK
:
boolean
;
VITE_USE_PWA
:
boolean
;
VITE_PUBLIC_PATH
:
string
;
VITE_PROXY
:
[
string
,
string
][];
VITE_GLOB_APP_TITLE
:
string
;
VITE_GLOB_APP_SHORT_NAME
:
string
;
VITE_USE_CDN
:
boolean
;
VITE_DROP_CONSOLE
:
boolean
;
VITE_BUILD_COMPRESS
:
'
gzip
'
|
'
brotli
'
|
'
none
'
;
VITE_LEGACY
:
boolean
;
VITE_USE_IMAGEMIN
:
boolean
;
}
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