Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
啊嘞嘞EC
vue-vben-admin
提交
eba55769
V
vue-vben-admin
项目概览
啊嘞嘞EC
/
vue-vben-admin
与 Fork 源项目一致
从无法访问的项目Fork
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
V
vue-vben-admin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eba55769
编写于
1月 10, 2021
作者:
V
vben
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
feat: support vite2
上级
66403532
变更
11
隐藏空白更改
内联
并排
Showing
11 changed file
with
52 addition
and
78 deletion
+52
-78
.env
.env
+0
-3
CHANGELOG.zh_CN.md
CHANGELOG.zh_CN.md
+6
-1
src/App.vue
src/App.vue
+1
-1
src/components/registerGlobComp.ts
src/components/registerGlobComp.ts
+13
-2
src/layouts/default/setting/SettingDrawer.tsx
src/layouts/default/setting/SettingDrawer.tsx
+1
-1
src/logics/error-handle/index.ts
src/logics/error-handle/index.ts
+0
-0
src/logics/initAppConfig.ts
src/logics/initAppConfig.ts
+0
-17
src/main.ts
src/main.ts
+1
-5
src/settings/colorSetting.ts
src/settings/colorSetting.ts
+0
-29
src/settings/designSetting.ts
src/settings/designSetting.ts
+30
-0
src/setup/ant-design-vue/index.ts
src/setup/ant-design-vue/index.ts
+0
-19
未找到文件。
.env
浏览文件 @
eba55769
...
...
@@ -6,6 +6,3 @@ VITE_GLOB_APP_TITLE = Vben Admin
# spa shortname
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 @@
### ✨ Refactor
独立组件配置到
`/@/settings/componentsSetting`
-
独立组件配置到
`/@/settings/componentsSetting`
-
`colorSetting`
和
`designSetting`
现在合并为
`designSetting`
-
`ant-design-vue`
组件注册移动到
`components/registerComponent`
-
移除
`setup`
文件夹
-
升级到
`vite2`
### ✨ Features
...
...
@@ -11,6 +15,7 @@
-
modal 组件新增
`height`
和
`min-height`
属性
-
新增
`PageWrapper`
组件。并应用于示例页面
-
新增标签页折叠功能
-
兼容旧版浏览器
### 🐛 Bug Fixes
...
...
src/App.vue
浏览文件 @
eba55769
...
...
@@ -10,7 +10,7 @@
import
{
defineComponent
}
from
'
vue
'
;
import
{
ConfigProvider
}
from
'
ant-design-vue
'
;
import
{
initAppConfigStore
}
from
'
/@/
setup/App
'
;
import
{
initAppConfigStore
}
from
'
/@/
logics/initAppConfig
'
;
import
{
useLockPage
}
from
'
/@/hooks/web/useLockPage
'
;
import
{
useLocale
}
from
'
/@/locales/useLocale
'
;
...
...
src/components/registerGlobComp.ts
浏览文件 @
eba55769
...
...
@@ -34,7 +34,14 @@ import {
Avatar
,
Menu
,
Breadcrumb
,
Form
,
Input
,
Row
,
Col
,
Spin
,
}
from
'
ant-design-vue
'
;
import
'
ant-design-vue/dist/antd.css
'
;
import
{
App
}
from
'
vue
'
;
const
compList
=
[
Icon
,
Button
,
AntButton
.
Group
];
...
...
@@ -46,7 +53,6 @@ export function registerGlobComp(app: App) {
});
// 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 don’t need it, you can delete it
app
...
...
@@ -78,5 +84,10 @@ export function registerGlobComp(app: App) {
.
use
(
Empty
)
.
use
(
Avatar
)
.
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 {
mixSidebarTriggerOptions
,
}
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
();
...
...
src/
setup
/error-handle/index.ts
→
src/
logics
/error-handle/index.ts
浏览文件 @
eba55769
文件已移动
src/
setup/App
.ts
→
src/
logics/initAppConfig
.ts
浏览文件 @
eba55769
...
...
@@ -3,9 +3,7 @@
*/
import
type
{
ProjectConfig
}
from
'
/@/types/config
'
;
import
{
computed
,
ref
}
from
'
vue
'
;
import
{
ThemeModeEnum
}
from
'
/@/enums/appEnum
'
;
import
{
PROJ_CFG_KEY
}
from
'
/@/enums/cacheEnum
'
;
import
projectSetting
from
'
/@/settings/projectSetting
'
;
...
...
@@ -20,21 +18,6 @@ import {
import
{
appStore
}
from
'
/@/store/modules/app
'
;
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
export
function
initAppConfigStore
()
{
let
projCfg
:
ProjectConfig
=
getLocal
(
PROJ_CFG_KEY
)
as
ProjectConfig
;
...
...
src/main.ts
浏览文件 @
eba55769
...
...
@@ -3,8 +3,7 @@ import App from './App.vue';
import
router
,
{
setupRouter
}
from
'
/@/router
'
;
import
{
setupStore
}
from
'
/@/store
'
;
import
{
setupAntd
}
from
'
/@/setup/ant-design-vue
'
;
import
{
setupErrorHandle
}
from
'
/@/setup/error-handle
'
;
import
{
setupErrorHandle
}
from
'
/@/logics/error-handle
'
;
import
{
setupGlobDirectives
}
from
'
/@/directives
'
;
import
{
setupI18n
}
from
'
/@/locales/setupI18n
'
;
import
{
setupProdMockServer
}
from
'
../mock/_createProductionServer
'
;
...
...
@@ -19,9 +18,6 @@ const app = createApp(App);
registerGlobComp
(
app
);
// Configure component library
setupAntd
(
app
);
// Multilingual configuration
setupI18n
(
app
);
...
...
src/settings/colorSetting.ts
已删除
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
{
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
已删除
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
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录