Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
B
basic-vue-admin
概览
概览
详情
活动
周期分析
版本库
存储库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
问题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程表
图表
维基
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
Basic
basic-vue-admin
Commits
eba55769
提交
eba55769
authored
1月 10, 2021
作者:
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: support vite2
上级
66403532
隐藏空白字符变更
内嵌
并排
正在显示
11 个修改的文件
包含
52 行增加
和
78 行删除
+52
-78
.env
.env
+0
-3
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+6
-1
App.vue
src/App.vue
+1
-1
registerGlobComp.ts
src/components/registerGlobComp.ts
+13
-2
SettingDrawer.tsx
src/layouts/default/setting/SettingDrawer.tsx
+1
-1
index.ts
src/logics/error-handle/index.ts
+0
-0
initAppConfig.ts
src/logics/initAppConfig.ts
+0
-17
main.ts
src/main.ts
+1
-5
colorSetting.ts
src/settings/colorSetting.ts
+0
-29
designSetting.ts
src/settings/designSetting.ts
+30
-0
index.ts
src/setup/ant-design-vue/index.ts
+0
-19
没有找到文件。
.env
浏览文件 @
eba55769
...
@@ -6,6 +6,3 @@ VITE_GLOB_APP_TITLE = Vben Admin
...
@@ -6,6 +6,3 @@ VITE_GLOB_APP_TITLE = Vben Admin
# spa shortname
# spa shortname
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin_2x
VITE_GLOB_APP_SHORT_NAME = vue_vben_admin_2x
# Whether to dynamically load all files in `src/views`
VITE_DYNAMIC_IMPORT = true
CHANGELOG.zh_CN.md
浏览文件 @
eba55769
...
@@ -2,7 +2,11 @@
...
@@ -2,7 +2,11 @@
### ✨ Refactor
### ✨ Refactor
独立组件配置到
`/@/settings/componentsSetting`
-
独立组件配置到
`/@/settings/componentsSetting`
-
`colorSetting`
和
`designSetting`
现在合并为
`designSetting`
-
`ant-design-vue`
组件注册移动到
`components/registerComponent`
-
移除
`setup`
文件夹
-
升级到
`vite2`
### ✨ Features
### ✨ Features
...
@@ -11,6 +15,7 @@
...
@@ -11,6 +15,7 @@
-
modal 组件新增
`height`
和
`min-height`
属性
-
modal 组件新增
`height`
和
`min-height`
属性
-
新增
`PageWrapper`
组件。并应用于示例页面
-
新增
`PageWrapper`
组件。并应用于示例页面
-
新增标签页折叠功能
-
新增标签页折叠功能
-
兼容旧版浏览器
### 🐛 Bug Fixes
### 🐛 Bug Fixes
...
...
src/App.vue
浏览文件 @
eba55769
...
@@ -10,7 +10,7 @@
...
@@ -10,7 +10,7 @@
import
{
defineComponent
}
from
'vue'
;
import
{
defineComponent
}
from
'vue'
;
import
{
ConfigProvider
}
from
'ant-design-vue'
;
import
{
ConfigProvider
}
from
'ant-design-vue'
;
import
{
initAppConfigStore
}
from
'/@/
setup/App
'
;
import
{
initAppConfigStore
}
from
'/@/
logics/initAppConfig
'
;
import
{
useLockPage
}
from
'/@/hooks/web/useLockPage'
;
import
{
useLockPage
}
from
'/@/hooks/web/useLockPage'
;
import
{
useLocale
}
from
'/@/locales/useLocale'
;
import
{
useLocale
}
from
'/@/locales/useLocale'
;
...
...
src/components/registerGlobComp.ts
浏览文件 @
eba55769
...
@@ -34,7 +34,14 @@ import {
...
@@ -34,7 +34,14 @@ import {
Avatar
,
Avatar
,
Menu
,
Menu
,
Breadcrumb
,
Breadcrumb
,
Form
,
Input
,
Row
,
Col
,
Spin
,
}
from
'ant-design-vue'
;
}
from
'ant-design-vue'
;
import
'ant-design-vue/dist/antd.css'
;
import
{
App
}
from
'vue'
;
import
{
App
}
from
'vue'
;
const
compList
=
[
Icon
,
Button
,
AntButton
.
Group
];
const
compList
=
[
Icon
,
Button
,
AntButton
.
Group
];
...
@@ -46,7 +53,6 @@ export function registerGlobComp(app: App) {
...
@@ -46,7 +53,6 @@ export function registerGlobComp(app: App) {
});
});
// Optional
// Optional
// Why register here: The main reason for registering here is not to increase the size of the first screen code
// If you need to customize global components, you can write here
// If you need to customize global components, you can write here
// If you don’t need it, you can delete it
// If you don’t need it, you can delete it
app
app
...
@@ -78,5 +84,10 @@ export function registerGlobComp(app: App) {
...
@@ -78,5 +84,10 @@ export function registerGlobComp(app: App) {
.
use
(
Empty
)
.
use
(
Empty
)
.
use
(
Avatar
)
.
use
(
Avatar
)
.
use
(
Menu
)
.
use
(
Menu
)
.
use
(
Tabs
);
.
use
(
Tabs
)
.
use
(
Form
)
.
use
(
Input
)
.
use
(
Row
)
.
use
(
Col
)
.
use
(
Spin
);
}
}
src/layouts/default/setting/SettingDrawer.tsx
浏览文件 @
eba55769
...
@@ -31,7 +31,7 @@ import {
...
@@ -31,7 +31,7 @@ import {
mixSidebarTriggerOptions
,
mixSidebarTriggerOptions
,
}
from
'./enum'
;
}
from
'./enum'
;
import
{
HEADER_PRESET_BG_COLOR_LIST
,
SIDE_BAR_BG_COLOR_LIST
}
from
'/@/settings/
color
Setting'
;
import
{
HEADER_PRESET_BG_COLOR_LIST
,
SIDE_BAR_BG_COLOR_LIST
}
from
'/@/settings/
design
Setting'
;
const
{
t
}
=
useI18n
();
const
{
t
}
=
useI18n
();
...
...
src/
setup
/error-handle/index.ts
→
src/
logics
/error-handle/index.ts
浏览文件 @
eba55769
File moved
src/
setup/App
.ts
→
src/
logics/initAppConfig
.ts
浏览文件 @
eba55769
...
@@ -3,9 +3,7 @@
...
@@ -3,9 +3,7 @@
*/
*/
import
type
{
ProjectConfig
}
from
'/@/types/config'
;
import
type
{
ProjectConfig
}
from
'/@/types/config'
;
import
{
computed
,
ref
}
from
'vue'
;
import
{
ThemeModeEnum
}
from
'/@/enums/appEnum'
;
import
{
PROJ_CFG_KEY
}
from
'/@/enums/cacheEnum'
;
import
{
PROJ_CFG_KEY
}
from
'/@/enums/cacheEnum'
;
import
projectSetting
from
'/@/settings/projectSetting'
;
import
projectSetting
from
'/@/settings/projectSetting'
;
...
@@ -20,21 +18,6 @@ import {
...
@@ -20,21 +18,6 @@ import {
import
{
appStore
}
from
'/@/store/modules/app'
;
import
{
appStore
}
from
'/@/store/modules/app'
;
import
{
deepMerge
}
from
'/@/utils'
;
import
{
deepMerge
}
from
'/@/utils'
;
// TODO Theme switching
export
function
useThemeMode
(
mode
:
ThemeModeEnum
)
{
const
modeRef
=
ref
(
mode
);
const
html
=
document
.
documentElement
;
const
clsList
=
html
.
classList
;
const
change
=
()
=>
{
clsList
.
contains
(
mode
)
?
clsList
.
remove
(
mode
)
:
clsList
.
add
(
mode
);
};
return
{
runChangeThemeMode
:
change
,
mode
:
computed
(()
=>
modeRef
.
value
),
};
}
// Initial project configuration
// Initial project configuration
export
function
initAppConfigStore
()
{
export
function
initAppConfigStore
()
{
let
projCfg
:
ProjectConfig
=
getLocal
(
PROJ_CFG_KEY
)
as
ProjectConfig
;
let
projCfg
:
ProjectConfig
=
getLocal
(
PROJ_CFG_KEY
)
as
ProjectConfig
;
...
...
src/main.ts
浏览文件 @
eba55769
...
@@ -3,8 +3,7 @@ import App from './App.vue';
...
@@ -3,8 +3,7 @@ import App from './App.vue';
import
router
,
{
setupRouter
}
from
'/@/router'
;
import
router
,
{
setupRouter
}
from
'/@/router'
;
import
{
setupStore
}
from
'/@/store'
;
import
{
setupStore
}
from
'/@/store'
;
import
{
setupAntd
}
from
'/@/setup/ant-design-vue'
;
import
{
setupErrorHandle
}
from
'/@/logics/error-handle'
;
import
{
setupErrorHandle
}
from
'/@/setup/error-handle'
;
import
{
setupGlobDirectives
}
from
'/@/directives'
;
import
{
setupGlobDirectives
}
from
'/@/directives'
;
import
{
setupI18n
}
from
'/@/locales/setupI18n'
;
import
{
setupI18n
}
from
'/@/locales/setupI18n'
;
import
{
setupProdMockServer
}
from
'../mock/_createProductionServer'
;
import
{
setupProdMockServer
}
from
'../mock/_createProductionServer'
;
...
@@ -19,9 +18,6 @@ const app = createApp(App);
...
@@ -19,9 +18,6 @@ const app = createApp(App);
registerGlobComp
(
app
);
registerGlobComp
(
app
);
// Configure component library
setupAntd
(
app
);
// Multilingual configuration
// Multilingual configuration
setupI18n
(
app
);
setupI18n
(
app
);
...
...
src/settings/colorSetting.ts
deleted
100644 → 0
浏览文件 @
66403532
// header preset color
export
const
HEADER_PRESET_BG_COLOR_LIST
:
string
[]
=
[
'#ffffff'
,
'#009688'
,
'#5172DC'
,
'#1E9FFF'
,
'#018ffb'
,
'#409eff'
,
'#4e73df'
,
'#e74c3c'
,
'#24292e'
,
'#394664'
,
'#001529'
,
'#383f45'
,
];
// sider preset color
export
const
SIDE_BAR_BG_COLOR_LIST
:
string
[]
=
[
'#001529'
,
'#273352'
,
'#ffffff'
,
'#191b24'
,
'#191a23'
,
'#304156'
,
'#001628'
,
'#28333E'
,
'#344058'
,
'#383f45'
,
];
src/settings/designSetting.ts
浏览文件 @
eba55769
export
default
{
export
default
{
prefixCls
:
'vben'
,
prefixCls
:
'vben'
,
};
};
// header preset color
export
const
HEADER_PRESET_BG_COLOR_LIST
:
string
[]
=
[
'#ffffff'
,
'#009688'
,
'#5172DC'
,
'#1E9FFF'
,
'#018ffb'
,
'#409eff'
,
'#4e73df'
,
'#e74c3c'
,
'#24292e'
,
'#394664'
,
'#001529'
,
'#383f45'
,
];
// sider preset color
export
const
SIDE_BAR_BG_COLOR_LIST
:
string
[]
=
[
'#001529'
,
'#273352'
,
'#ffffff'
,
'#191b24'
,
'#191a23'
,
'#304156'
,
'#001628'
,
'#28333E'
,
'#344058'
,
'#383f45'
,
];
src/setup/ant-design-vue/index.ts
deleted
100644 → 0
浏览文件 @
66403532
// Load on demand
// This module only introduces components globally before login
import
type
{
App
}
from
'vue'
;
import
{
// need
Form
,
Input
,
Row
,
Col
,
Spin
,
}
from
'ant-design-vue'
;
import
'ant-design-vue/dist/antd.css'
;
export
function
setupAntd
(
app
:
App
<
Element
>
)
{
// need
// Here are the components required before registering and logging in
app
.
use
(
Form
).
use
(
Input
).
use
(
Row
).
use
(
Col
).
use
(
Spin
);
}
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论