Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
rmczjs1
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
qd01
rmczjs1
Commits
a8f6d64c
Commit
a8f6d64c
authored
Feb 19, 2025
by
zhangsan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
5852b173
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
20 deletions
+23
-20
components.d.ts
src/components.d.ts
+4
-1
index.ts
src/router/index.ts
+13
-13
vite.config.ts
vite.config.ts
+6
-6
No files found.
src/components.d.ts
View file @
a8f6d64c
...
@@ -18,10 +18,12 @@ declare module 'vue' {
...
@@ -18,10 +18,12 @@ declare module 'vue' {
RouterView
:
typeof
import
(
'
vue-router
'
)[
'
RouterView
'
]
RouterView
:
typeof
import
(
'
vue-router
'
)[
'
RouterView
'
]
SignIn
:
typeof
import
(
'
./components/signIn.vue
'
)[
'
default
'
]
SignIn
:
typeof
import
(
'
./components/signIn.vue
'
)[
'
default
'
]
VanButton
:
typeof
import
(
'
vant/es
'
)[
'
Button
'
]
VanButton
:
typeof
import
(
'
vant/es
'
)[
'
Button
'
]
VanCell
:
typeof
import
(
'
vant/es
'
)[
'
Cell
'
]
VanEmpty
:
typeof
import
(
'
vant/es
'
)[
'
Empty
'
]
VanList
:
typeof
import
(
'
vant/es
'
)[
'
List
'
]
VanList
:
typeof
import
(
'
vant/es
'
)[
'
List
'
]
VanLoading
:
typeof
import
(
'
vant/es
'
)[
'
Loading
'
]
VanLoading
:
typeof
import
(
'
vant/es
'
)[
'
Loading
'
]
VanNavBar
:
typeof
import
(
'
vant/es
'
)[
'
NavBar
'
]
VanNavBar
:
typeof
import
(
'
vant/es
'
)[
'
NavBar
'
]
Va
rAppBar
:
typeof
import
(
'
@varlet/ui
'
)[
'
AppBar
'
]
Va
nTag
:
typeof
import
(
'
vant/es
'
)[
'
Tag
'
]
VarButton
:
typeof
import
(
'
@varlet/ui
'
)[
'
Button
'
]
VarButton
:
typeof
import
(
'
@varlet/ui
'
)[
'
Button
'
]
VarCountTo
:
typeof
import
(
'
@varlet/ui
'
)[
'
CountTo
'
]
VarCountTo
:
typeof
import
(
'
@varlet/ui
'
)[
'
CountTo
'
]
VarForm
:
typeof
import
(
'
@varlet/ui
'
)[
'
Form
'
]
VarForm
:
typeof
import
(
'
@varlet/ui
'
)[
'
Form
'
]
...
@@ -34,6 +36,7 @@ declare module 'vue' {
...
@@ -34,6 +36,7 @@ declare module 'vue' {
VarSteps
:
typeof
import
(
'
@varlet/ui
'
)[
'
Steps
'
]
VarSteps
:
typeof
import
(
'
@varlet/ui
'
)[
'
Steps
'
]
VarSwipe
:
typeof
import
(
'
@varlet/ui
'
)[
'
Swipe
'
]
VarSwipe
:
typeof
import
(
'
@varlet/ui
'
)[
'
Swipe
'
]
VarSwipeItem
:
typeof
import
(
'
@varlet/ui
'
)[
'
SwipeItem
'
]
VarSwipeItem
:
typeof
import
(
'
@varlet/ui
'
)[
'
SwipeItem
'
]
VarSwitch
:
typeof
import
(
'
@varlet/ui
'
)[
'
Switch
'
]
VarTab
:
typeof
import
(
'
@varlet/ui
'
)[
'
Tab
'
]
VarTab
:
typeof
import
(
'
@varlet/ui
'
)[
'
Tab
'
]
VarTabs
:
typeof
import
(
'
@varlet/ui
'
)[
'
Tabs
'
]
VarTabs
:
typeof
import
(
'
@varlet/ui
'
)[
'
Tabs
'
]
}
}
...
...
src/router/index.ts
View file @
a8f6d64c
...
@@ -156,19 +156,19 @@ router.beforeEach(async (to, from, next) => {
...
@@ -156,19 +156,19 @@ router.beforeEach(async (to, from, next) => {
// 检查版本更新
// 检查版本更新
if
(
process
.
env
.
NODE_ENV
===
"
production
"
)
{
if
(
process
.
env
.
NODE_ENV
===
"
production
"
)
{
try
{
//
try {
const
{
version
}
=
await
checkVersion
();
//
const { version } = await checkVersion();
if
(
version
)
{
//
if (version) {
const
storedVersion
=
sessionStorage
.
getItem
(
"
app_version
"
);
//
const storedVersion = sessionStorage.getItem("app_version");
if
(
version
!==
storedVersion
)
{
//
if (version !== storedVersion) {
sessionStorage
.
setItem
(
"
app_version
"
,
version
);
//
sessionStorage.setItem("app_version", version);
window
.
location
.
href
=
to
.
fullPath
;
//
window.location.href = to.fullPath;
return
;
//
return;
}
//
}
}
//
}
}
catch
(
error
)
{
//
} catch (error) {
console
.
error
(
"
Version check failed:
"
,
error
);
//
console.error("Version check failed:", error);
}
//
}
}
}
// 获取用户信息
// 获取用户信息
...
...
vite.config.ts
View file @
a8f6d64c
...
@@ -40,12 +40,12 @@ export default defineConfig({
...
@@ -40,12 +40,12 @@ export default defineConfig({
dts
:
'
src/components.d.ts
'
,
dts
:
'
src/components.d.ts
'
,
dirs
:
[
'
src/components
'
]
dirs
:
[
'
src/components
'
]
}),
}),
vitePluginBundleObfuscator
({
//
vitePluginBundleObfuscator({
enable
:
true
,
//
enable: true,
log
:
true
,
//
log: true,
autoExcludeNodeModules
:
true
,
//
autoExcludeNodeModules: true,
threadPool
:
true
,
//
threadPool: true,
})
//
})
],
],
resolve
:
{
resolve
:
{
alias
:
{
alias
:
{
...
...
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