Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
T
test-ZenTao-with-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
fengyuncheng
test-ZenTao-with-gitlab
Commits
b545974e
Commit
b545974e
authored
May 08, 2023
by
fengyuncheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init: 删掉多余依赖和代码
parent
555e5dea
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
9 additions
and
91 deletions
+9
-91
.env
.env
+2
-2
package.json
package.json
+0
-0
pnpm-lock.yaml
pnpm-lock.yaml
+0
-0
localhost.ts
src/api/adapter/localhost.ts
+0
-14
index.scss
src/assets/styles/index.scss
+0
-31
http.ts
src/interface/http.ts
+0
-1
main.ts
src/main.ts
+0
-3
base.ts
src/store/base.ts
+0
-6
message.ts
src/utils/message.ts
+7
-4
vueTools.ts
src/utils/vueTools.ts
+0
-30
No files found.
.env
View file @
b545974e
...
...
@@ -2,6 +2,6 @@ VITE_API_BASEURL = http://127.0.0.1:8080/api/v1
VITE_BASE = /
VITE_APP_TITLE =
AronaConfigWebUI
VITE_APP_TITLE =
TestSite
VITE_APP_DESCRIPTION = A
zero-config Vue3 template includes Vite3、Vue3 and TypeScript
VITE_APP_DESCRIPTION = A
Test Site for Test vue3 renren
package.json
View file @
b545974e
This diff was suppressed by a .gitattributes entry.
pnpm-lock.yaml
View file @
b545974e
This diff was suppressed by a .gitattributes entry.
src/api/adapter/localhost.ts
View file @
b545974e
...
...
@@ -23,10 +23,6 @@ const axiosInstance: AxiosInstance = axios.create({
// 请求拦截器
axiosInstance
.
interceptors
.
request
.
use
(
(
config
:
IRequestConfig
)
=>
{
if
(
!
config
.
version
)
{
config
.
version
=
"v1"
;
config
.
baseURL
=
`
${
config
.
baseURL
}
/api/
${
config
.
version
}
/`
;
}
config
.
showServerResponseError
=
config
.
showServerResponseError
||
true
;
return
config
;
},
...
...
@@ -114,14 +110,4 @@ function buildFileUploadHeader(fileName: string) {
"arona-file-name"
:
fileName
,
};
}
export
function
updateAPIService
(
host
:
string
,
port
:
number
)
{
axiosInstance
.
defaults
.
baseURL
=
currentAPI
(
host
,
port
);
}
export
function
currentAPI
(
host
?:
string
,
port
?:
number
)
{
if
(
!
host
||
!
port
)
{
return
axiosInstance
.
defaults
.
baseURL
;
}
return
`
${
host
}
:
${
port
}
`
;
}
export
default
LocalhostService
;
src/assets/styles/index.scss
View file @
b545974e
...
...
@@ -3,15 +3,6 @@
@import
'@/assets/styles/dark.scss'
;
@import
"@/assets/styles/variables.scss"
;
@font-face
{
font-family
:
"Game Font"
;
src
:
url("/font/U-OTF-ShinMGoUpr-Medium.woff")
;
}
@font-face
{
font-family
:
"Chinese Game Font"
;
src
:
url("/font/ResourceHanRoundedCN-Medium.woff")
;
}
#app
{
width
:
100vw
;
height
:
100vh
;
...
...
@@ -51,25 +42,3 @@
}
}
}
// 主配置文件连接
.config-drag-item
{
background-color
:
white
;
border
:
1px
solid
#346789
;
text-align
:
center
;
cursor
:
pointer
;
box-shadow
:
2px
2px
19px
#aaa
;
border-radius
:
6px
;
position
:
absolute
;
color
:
black
;
width
:
140px
;
height
:
60px
;
line-height
:
1
;
user-select
:
none
;
}
.dialog-body-padding-bottom-0
{
.el-dialog__body
{
padding-bottom
:
0
;
}
}
src/interface/http.ts
View file @
b545974e
...
...
@@ -10,7 +10,6 @@ export interface IRequestConfig<D = any> extends AxiosRequestConfig<D> {
showServerResponseError
?:
boolean
;
// 返回值是否是文件流
isBlob
?:
boolean
;
version
?:
"v1"
|
"v2"
;
}
// eslint-disable-next-line @typescript-eslint/no-explicit-any
...
...
src/main.ts
View file @
b545974e
...
...
@@ -12,7 +12,6 @@ import "virtual:windi.css";
import
"virtual:windi-devtools"
;
import
"@/assets/styles/index.scss"
;
import
"element-plus/dist/index.css"
;
import
{
setApp
}
from
"@/utils/vueTools"
;
const
i18n
=
createI18n
({
locale
:
"zh-cn"
,
...
...
@@ -27,5 +26,3 @@ app.use(router).use(store);
app
.
use
(
i18n
);
app
.
mount
(
"#app"
);
setApp
(
app
);
src/store/base.ts
View file @
b545974e
import
{
defineStore
}
from
"pinia"
;
import
{
NetworkAdapterType
}
from
"@/interface/http"
;
import
{
updateAPIService
}
from
"@/api/adapter/localhost"
;
import
{
BaseStoreState
}
from
"@/store/type"
;
const
useBaseStore
=
defineStore
({
...
...
@@ -26,11 +25,6 @@ const useBaseStore = defineStore({
},
persist
:
{
key
:
"setting"
,
afterRestore
:
(
ctx
)
=>
{
if
(
ctx
.
store
.
isRestoreBackend
)
{
updateAPIService
(
ctx
.
store
.
api
.
host
,
ctx
.
store
.
api
.
port
);
}
},
},
});
...
...
src/utils/message.ts
View file @
b545974e
import
{
ElMessage
,
ElMessageBox
}
from
"element-plus"
;
import
{
ElMessageBoxOptions
,
MessageBoxData
}
from
"element-plus/es/components/message-box/src/message-box.type"
;
import
{
MessageTypedFn
}
from
"element-plus/es/components/message/src/message"
;
export
function
infoMessage
(
info
:
any
)
{
type
IMessage
=
Parameters
<
MessageTypedFn
>
[
0
];
export
function
infoMessage
(
info
:
IMessage
)
{
return
ElMessage
.
info
(
info
);
}
export
function
successMessage
(
info
:
any
)
{
export
function
successMessage
(
info
:
IMessage
)
{
return
ElMessage
.
success
(
info
);
}
export
function
warningMessage
(
info
:
any
)
{
export
function
warningMessage
(
info
:
IMessage
)
{
return
ElMessage
.
warning
(
info
);
}
export
function
errorMessage
(
info
:
any
)
{
export
function
errorMessage
(
info
:
IMessage
)
{
return
ElMessage
.
error
(
info
);
}
...
...
src/utils/vueTools.ts
deleted
100644 → 0
View file @
555e5dea
import
{
App
,
createVNode
,
defineAsyncComponent
,
render
}
from
"vue"
;
import
{
VNodeProps
}
from
"@vue/runtime-core"
;
type
NodeEventListener
<
K
extends
keyof
HTMLElementEventMap
>
=
{
type
:
K
;
handler
:
(
ev
:
HTMLElementEventMap
[
K
])
=>
void
;
};
export
function
mountAsyncComponent
(
loader
:
Parameters
<
typeof
defineAsyncComponent
>
[
0
],
props
?:
(
Record
<
string
,
unknown
>
&
VNodeProps
)
|
null
,
hook
?:
NodeEventListener
<
keyof
HTMLElementEventMap
>
[],
):
HTMLElement
{
const
component
=
defineAsyncComponent
(
loader
);
const
componentVNode
=
createVNode
(
component
,
props
);
componentVNode
.
appContext
=
_app
.
_context
;
const
container
=
document
.
createElement
(
"div"
);
if
(
hook
)
{
hook
.
forEach
((
it
)
=>
container
.
addEventListener
(
it
.
type
,
it
.
handler
));
}
render
(
componentVNode
,
container
);
return
container
;
}
let
_app
:
App
;
export
function
setApp
(
app
:
App
)
{
_app
=
app
;
}
export
function
useApp
()
{
return
_app
;
}
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