Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit a66ca08

Browse files
committedDec 24, 2018
Merge branch 'release/1.0.1'
2 parents 8a80e75 + 18b7c7d commit a66ca08

File tree

10 files changed

+197
-44
lines changed

10 files changed

+197
-44
lines changed
 

‎.github/demo.gif

1.25 MB
Loading

‎LICENSE

+21
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2018 Felix Yang
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

‎README.md

+40-22
Original file line numberDiff line numberDiff line change
@@ -1,41 +1,59 @@
1-
# element-admin
1+
# Element Admin
22

3-
## Project setup
3+
[![License](https://img.shields.io/github/license/codetrial/element-admin.svg)](https://github.com/codetrial/element-admin)
44

5-
```bash
6-
yarn install
7-
```
5+
A dead simple but powerful vue admin with Vue CLI 3 and ElementUI.
6+
7+
This project is built by a magic vue cli plugin - [@codetrial/vue-cli-plugin-element](https://github.com/codetrial/vue-cli-plugin-element)
8+
9+
:us: English | [:cn: 简体中文](README.zh-CN.md)
10+
11+
## Docs
12+
13+
[:zap: Live Demo](https://element-admin.now.sh) | [:book: Docs](https://codetrial.github.io/element-admin)
14+
15+
## Screen Capture
16+
17+
![Screen Capture](.github/demo.gif)
818

9-
### Compiles and hot-reloads for development
19+
## Quick Start
20+
21+
### Using Git
1022

1123
```bash
24+
# clone this repository
25+
yarn install
1226
yarn run serve
1327
```
1428

15-
### Compiles and minifies for production
29+
### Using Vue CLI
1630

1731
```bash
18-
yarn run build
32+
vue create --preset codetrial/vue-cli-plugin-element your-project
1933
```
2034

21-
### Run your tests
35+
## Core Features
2236

23-
```bash
24-
yarn run test
25-
```
37+
- :camera: Minimal dependencies
38+
- :tv: Project Structure
39+
- :telephone_receiver: View Layout
40+
- :pager: Data Processing Layer
41+
- :watch: Authorization
42+
- :radio: Error Pages
43+
- :mag_right: List Example
44+
- :ghost: Form Example
2645

27-
### Lints and fixes files
46+
## Contributing
2847

29-
```bash
30-
yarn run lint
31-
```
48+
Looking forward to your pull requests.
3249

33-
### Run your unit tests
50+
## Built With
3451

35-
```bash
36-
yarn run test:unit
37-
```
52+
- [Vue.js](https://github.com/vuejs/vue)
53+
- [ElementUI](https://github.com/ElemeFE/element)
54+
55+
## License
3856

39-
### Customize configuration
57+
[MIT](http://opensource.org/licenses/MIT)
4058

41-
See [Configuration Reference](https://cli.vuejs.org/config/).
59+
Copyright (c) 2018 - present, Felix Yang

‎README.zh-CN.md

+66
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
# Element Admin
2+
3+
[![License](https://img.shields.io/github/license/codetrial/element-admin.svg)](https://github.com/codetrial/element-admin)
4+
5+
一个简约而不简单的基于 Vue CLI 3 和 ElementUI 的中后台管理系统。
6+
7+
此项目由一个不可思议的 vue cli 插件构建 - [@codetrial/vue-cli-plugin-element](https://github.com/codetrial/vue-cli-plugin-element)
8+
9+
:cn: 简体中文 | [:us: English](README.md)
10+
11+
## 文档
12+
13+
[:zap: 在线示例](https://element-admin.now.sh) | [:book: 参考文档](https://codetrial.github.io/element-admin)
14+
15+
## 截屏预览
16+
17+
![Screen Capture](.github/demo.gif)
18+
19+
## 快速开始
20+
21+
### 使用 Git
22+
23+
```bash
24+
# 克隆这个仓库
25+
yarn install
26+
yarn run serve
27+
```
28+
29+
### 使用 Vue CLI
30+
31+
```bash
32+
vue create --preset codetrial/vue-cli-plugin-element your-project
33+
```
34+
35+
## 核心功能
36+
37+
:camera: **最小依赖**:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。
38+
39+
:tv: **目录结构**:根据项目实战经验,设计了合理、清晰的目录结构。
40+
41+
:telephone_receiver: **页面布局**:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。
42+
43+
:pager: **数据处理**:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。
44+
45+
:watch: **权限控制**:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。
46+
47+
:radio: **列表示例**:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。
48+
49+
:mag_right: **表单示例**:一个相对比较完整的表单页示例,包含表单校验、提交等操作。
50+
51+
:ghost: **错误页面**:内置简单的(其实是偷懒) 403、404 及 500 错误页。
52+
53+
## 贡献
54+
55+
期待你的 `pull requests`。如果你觉得有帮助,还请多多反馈!
56+
57+
## 技术栈
58+
59+
- [Vue.js](https://github.com/vuejs/vue)
60+
- [ElementUI](https://github.com/ElemeFE/element)
61+
62+
## 许可
63+
64+
[MIT](http://opensource.org/licenses/MIT)
65+
66+
Copyright (c) 2018 - present, Felix Yang

‎now.json

+17
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "element-admin",
3+
"version": 2,
4+
"alias": "element-admin",
5+
"builds": [{ "src": "**", "use": "@now/static" }],
6+
"routes": [
7+
{ "src": "^/js/(.*)", "dest": "/js/$1" },
8+
{ "src": "^/css/(.*)", "dest": "/css/$1" },
9+
{ "src": "^/fonts/(.*)", "dest": "/fonts/$1" },
10+
{ "src": "^/img/(.*)", "dest": "/img/$1" },
11+
{
12+
"src": "^/(favicon|manifest|precache|service-worker|robots)(.*)",
13+
"dest": "/$1$2"
14+
},
15+
{ "src": ".*", "dest": "/index.html" }
16+
]
17+
}

‎package.json

+24-3
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,23 @@
11
{
22
"name": "element-admin",
3-
"version": "0.1.0",
3+
"version": "1.0.1",
4+
"description": "A dead simple but powerful vue admin with Vue CLI 3 and ElementUI.",
5+
"keywords": [
6+
"vue",
7+
"vue-cli",
8+
"vue-cli-plugin",
9+
"element",
10+
"element-ui",
11+
"admin",
12+
"dashboard"
13+
],
414
"private": true,
515
"scripts": {
616
"serve": "vue-cli-service serve",
717
"build": "vue-cli-service build",
818
"lint": "vue-cli-service lint",
9-
"test:unit": "vue-cli-service test:unit"
19+
"test:unit": "vue-cli-service test:unit",
20+
"deploy": "npm run build && now ./dist -A ../now.json && now alias"
1021
},
1122
"dependencies": {
1223
"element-ui": "^2.4.11",
@@ -32,5 +43,15 @@
3243
"node-sass": "^4.9.0",
3344
"sass-loader": "^7.0.1",
3445
"vue-template-compiler": "^2.5.17"
35-
}
46+
},
47+
"repository": {
48+
"type": "git",
49+
"url": "git+https://github.com/codetrial/element-admin.git"
50+
},
51+
"bugs": {
52+
"url": "https://github.com/codetrial/element-admin/issues"
53+
},
54+
"homepage": "https://github.com/codetrial/element-admin#readme",
55+
"author": "felixpy",
56+
"license": "MIT"
3657
}

‎src/components/layout/AppHeader.vue

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
>
1010
<el-menu-item index="/">首页</el-menu-item>
1111
<template v-if="user.id">
12-
<el-submenu index="/example">
12+
<el-submenu index="/example" :show-timeout="300" :hide-timeout="0">
1313
<template slot="title">示例模块</template>
1414
<el-menu-item index="/example">列表页</el-menu-item>
1515
<el-menu-item index="/example/new">表单页</el-menu-item>

‎src/views/About.vue

+22-13
Original file line numberDiff line numberDiff line change
@@ -3,43 +3,52 @@
33
<el-row class="bottom-gutter">
44
<el-card shadow="hover">
55
<div class="about-content">
6-
<h3>关于此项目</h3>
6+
<h3>关于此站点</h3>
7+
<p>这是一个使用 @codetrial/vue-cli-plugin-element 插件创建的轻量级后台管理系统。核心技术为 Vue CLI 3 及 ElementUI。</p>
8+
<p>如果你觉得有帮助,还请多多反馈!</p>
79
<p>
8-
源码地址:
10+
项目源码:
11+
<a
12+
target="_blank"
13+
href="https://github.com/codetrial/element-admin"
14+
>@codetrial/element-admin</a>
15+
</p>
16+
<p>
17+
插件源码:
918
<a
1019
target="_blank"
1120
href="https://github.com/codetrial/vue-cli-plugin-element"
1221
>@codetrial/vue-cli-plugin-element</a>
1322
</p>
14-
<p>开发人员:
23+
<p>
24+
开发人员:
1525
<a target="_blank" href="https://github.com/felixpy">felixpy@github</a>
1626
</p>
17-
<h4>项目描述</h4>
18-
<p>这是一个使用 Vue CLI 3 及 ElementUI 开发的轻量级后台管理系统项目架构。如果你觉得有帮助,还请多多反馈!</p>
27+
<h4>项目特点</h4>
1928
<p>麻雀虽小,五脏俱全。下面是它的一些主要特点。</p>
2029
<p>
21-
<b>- 最小依赖</b>:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。
30+
<b>最小依赖</b>:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。
2231
</p>
2332
<p>
24-
<b>- 目录结构</b>:根据项目实战经验,设计了合理、清晰的目录结构。
33+
<b>目录结构</b>:根据项目实战经验,设计了合理、清晰的目录结构。
2534
</p>
2635
<p>
27-
<b>- 布局体系</b>:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。
36+
<b>页面布局</b>:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。
2837
</p>
2938
<p>
30-
<b>- 数据处理</b>:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。
39+
<b>数据处理</b>:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。
3140
</p>
3241
<p>
33-
<b>- 权限控制</b>:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。
42+
<b>权限控制</b>:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。
3443
</p>
3544
<p>
36-
<b>- 列表示例</b>:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。
45+
<b>列表示例</b>:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。
3746
</p>
3847
<p>
39-
<b>- 表单示例</b>:一个相对比较完整的表单页示例,包含表单校验、提交等操作。
48+
<b>表单示例</b>:一个相对比较完整的表单页示例,包含表单校验、提交等操作。
4049
</p>
4150
<p>
42-
<b>- 错误页面</b>:内置简单的(其实是偷懒) 403、404 及 500 错误页。
51+
<b>错误页面</b>:内置简单的(其实是偷懒) 403、404 及 500 错误页。
4352
</p>
4453
</div>
4554
</el-card>

‎src/views/Home.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,12 @@
44
<el-card shadow="hover">
55
<div>
66
<p>
7-
Hi,开发者,欢迎使用 @codetrial/vue-cli-plugin-element 搭建你的后台
7+
Hi,开发者,欢迎使用 @codetrial/vue-cli-plugin-element 插件搭建你的后台
88
<a
99
target="_blank"
1010
href="https://github.com/codetrial/vue-cli-plugin-element"
11-
>查看文档</a>
11+
>插件源码</a> |
12+
<a target="_blank" href="https://codetrial.github.io/element-admin">插件文档</a>
1213
</p>
1314
</div>
1415
</el-card>

‎src/views/example/Table.vue

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<a target="_blank" :href="scope.row.url">{{ scope.row.name }}</a>
6767
</template>
6868
</el-table-column>
69-
<el-table-column prop="typeText" label="类型" min-width="120"></el-table-column>
69+
<el-table-column prop="typeText" label="类型" min-width="80"></el-table-column>
7070
<el-table-column
7171
prop="statusText"
7272
label="状态 (可筛选)"
@@ -76,8 +76,8 @@
7676
></el-table-column>
7777
<el-table-column prop="updateUser" label="更新用户 ID" min-width="120"></el-table-column>
7878
<el-table-column prop="updateUserName" label="更新用户" min-width="120"></el-table-column>
79-
<el-table-column prop="updateTime" label="更新时间" min-width="240"></el-table-column>
80-
<el-table-column label="操作" min-width="100">
79+
<el-table-column prop="updateTime" label="更新时间" min-width="200"></el-table-column>
80+
<el-table-column label="操作" min-width="80">
8181
<template slot-scope="scope">
8282
<el-button type="text" size="small" @click="showExample(scope.row)">查看</el-button>
8383
</template>

0 commit comments

Comments
 (0)
Please sign in to comment.