Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
1b3ac313
提交
1b3ac313
authored
11月 11, 2022
作者:
方治民
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
chore(config): 更新 app log 输出样式
上级
ad68a92f
显示空白字符变更
内嵌
并排
正在显示
2 个修改的文件
包含
19 行增加
和
13 行删除
+19
-13
app.ts
src/config/app.ts
+17
-11
main.ts
src/main.ts
+2
-2
没有找到文件。
src/config/app.ts
浏览文件 @
1b3ac313
import
type
{
App
}
from
'vue'
const
config
:
Application
=
{
name
:
__APP__
.
name
,
version
:
__APP__
.
version
,
...
...
@@ -8,16 +10,20 @@ const config: Application = {
export
const
$app
=
config
export
function
setupAppConfig
()
{
export
function
setupAppConfig
(
app
:
App
<
Element
>
)
{
// 打印 App 信息
const
block
=
Array
(
50
).
fill
(
'='
).
join
(
''
)
const
infos
:
string
[]
=
[]
infos
.
push
(
block
)
infos
.
push
(
`[App] name:
${
config
.
name
}
`
)
infos
.
push
(
`[App] version:
${
config
.
version
}
`
)
infos
.
push
(
`[App] description:
${
config
.
description
}
`
)
infos
.
push
(
`[App] author:
${
config
.
author
.
name
}
${
config
.
author
.
url
}
`
)
infos
.
push
(
`[App] lastBuildTime:
${
config
.
lastBuildTime
}
`
)
infos
.
push
(
block
)
console
.
log
(
'%c'
+
infos
.
join
(
'
\
n'
),
'color: violet;'
)
console
.
log
(
`%c APP %c
${
config
.
name
}
%c V
${
config
.
version
}
`
,
'padding: 2px 1px; border-radius: 3px; color: #fff; background: #fa593b; font-weight: bold; margin-right: 5px;'
,
'padding: 2px 1px; border-radius: 3px 0 0 3px; color: #fff; background: #606060; font-weight: bold;'
,
'padding: 2px 1px; border-radius: 0 3px 3px 0; color: #fff; background: #42c02e; font-weight: bold;'
,
)
app
.
config
.
globalProperties
.
$app
=
$app
}
declare
module
'@vue/runtime-core'
{
interface
ComponentCustomProperties
{
$app
:
Application
}
}
src/main.ts
浏览文件 @
1b3ac313
...
...
@@ -25,8 +25,8 @@ if (isDevMode()) {
async
function
bootstrap
()
{
const
app
=
createApp
(
App
)
// App 配置
setupAppConfig
()
//
注册
App 配置
setupAppConfig
(
app
)
// Configure store
// 配置 store
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论