Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
ant-design-pro-vue
Overview
Overview
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
tianzhuanghu
ant-design-pro-vue
Commits
ee357979
Commit
ee357979
authored
Sep 17, 2018
by
Sendya
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: eslint
parent
b9834764
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
20 deletions
+70
-20
README.md
README.md
+55
-15
LayoutHeader.vue
src/components/layout/LayoutHeader.vue
+14
-2
RoleList.vue
src/views/list/RoleList.vue
+1
-3
No files found.
README.md
View file @
ee357979
...
...
@@ -4,41 +4,80 @@
[
预览地址
](
https://pro.loacg.com/
)
**附带一些后台基础用到的列表展示例子**
!
[
](https://static-2.loacg.com/open/static/github/20180916-134306.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-134251.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-155011.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-154921.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-155317.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-154937.png)
!
[
](https://static-2.loacg.com/open/static/github/20180916-154950.png)







## 环境和依赖
-
node
-
yarn
-
webpack
-
eslint
-
@vue/cli 3.0.3
-
[
vue-cropper (头像裁剪组件)
](
https://github.com/xyxiao001/vue-cropper
)
-
[
@antv/g2
]
(
https://antv.alipay.com/zh-cn/index.html
)
-
[
viser-vue (封装de antv/g2)
](
https://viserjs.github.io/docs.html#/viser/guide/installation
)
-
@vue/cli 3.0.1
-
[
vue-cropper
](
https://github.com/xyxiao001/vue-cropper
)
- 头像裁剪组件
-
[
@antv/g2
](
https://antv.alipay.com/zh-cn/index.html
)
- Alipay AntV 数据可视化图表
-
[
Viser-vue
](
https://viserjs.github.io/docs.html#/viser/guide/installation
)
- antv/g2 封装实现
## 项目下载和运行
-
拉取项目代码
```
bash
git clone https://github.com/sendya/ant-design-pro-vue.git
cd
ant-design-pro-vue
```
## Project setup
-
安装依赖
```
yarn install
```
### Compiles and hot-reloads for development
-
开发模式运行
```
yarn run serve
```
### Compiles and minifies for production
-
编译项目
```
yarn run build
```
###
Lints and fixes files
-
Lints and fixes files
```
yarn run lint
```
## 其他说明
-
项目使用的
[
vue-cli3
](
https://cli.vuejs.org/guide/
)
, 请更新您的 cli
-
修改 Ant Design 配色
在文件 vue.config.js 中,其他 less 变量覆盖参考 ant design 官方说明
```
ecmascript 6
css: {
loaderOptions: {
less: {
modifyVars: {
/* less 变量覆盖,用于自定义 ant design 主题 */
'primary-color': '#F5222D',
'link-color': '#F5222D',
'border-radius-base': '4px',
},
javascriptEnabled: true,
}
}
}
```
\ No newline at end of file
src/components/layout/LayoutHeader.vue
View file @
ee357979
...
...
@@ -76,12 +76,24 @@
...
mapActions
([
"Logout"
]),
...
mapGetters
([
"nickname"
,
"avatar"
]),
handleLogout
()
{
this
.
Logout
({}).
then
(()
=>
{
const
that
=
this
this
.
$confirm
({
title
:
'提示'
,
content
:
'真的要注销登录吗 ?'
,
onOk
()
{
return
that
.
Logout
({}).
then
(()
=>
{
window
.
location
.
reload
()
}).
catch
(
err
=>
{
this
.
$message
.
error
(
err
.
message
)
that
.
$message
.
error
({
title
:
'错误'
,
description
:
err
.
message
})
})
},
onCancel
()
{},
});
},
toggle
()
{
this
.
$emit
(
'toggle'
)
}
...
...
src/views/list/RoleList.vue
View file @
ee357979
...
...
@@ -140,15 +140,13 @@
label=
'拥有权限'
hasFeedback
>
<a-row
:gutter=
"16"
>
<template
v-for=
"(permission, index) in mdl.permissions"
>
<a-row
:gutter=
"16"
v-for=
"(permission, index) in mdl.permissions"
:key=
"index"
>
<a-col
:span=
"4"
>
{{
permission
.
permissionName
}}
:
</a-col>
<a-col
:span=
"20"
>
<a-checkbox-group
:options=
"permission.actionsOptions"
/>
</a-col>
</
template
>
</a-row>
</a-form-item>
...
...
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