Skip to content

Commit

Permalink
Merge branch 'release/1.0.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
felixpy committed Dec 24, 2018
2 parents 8a80e75 + 18b7c7d commit a66ca08
Show file tree
Hide file tree
Showing 10 changed files with 197 additions and 44 deletions.
Binary file added .github/demo.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2018 Felix Yang

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
62 changes: 40 additions & 22 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,41 +1,59 @@
# element-admin
# Element Admin

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

```bash
yarn install
```
A dead simple but powerful vue admin with Vue CLI 3 and ElementUI.

This project is built by a magic vue cli plugin - [@codetrial/vue-cli-plugin-element](https://github.com/codetrial/vue-cli-plugin-element)

:us: English | [:cn: 简体中文](README.zh-CN.md)

## Docs

[:zap: Live Demo](https://element-admin.now.sh) | [:book: Docs](https://codetrial.github.io/element-admin)

## Screen Capture

![Screen Capture](.github/demo.gif)

### Compiles and hot-reloads for development
## Quick Start

### Using Git

```bash
# clone this repository
yarn install
yarn run serve
```

### Compiles and minifies for production
### Using Vue CLI

```bash
yarn run build
vue create --preset codetrial/vue-cli-plugin-element your-project
```

### Run your tests
## Core Features

```bash
yarn run test
```
- :camera: Minimal dependencies
- :tv: Project Structure
- :telephone_receiver: View Layout
- :pager: Data Processing Layer
- :watch: Authorization
- :radio: Error Pages
- :mag_right: List Example
- :ghost: Form Example

### Lints and fixes files
## Contributing

```bash
yarn run lint
```
Looking forward to your pull requests.

### Run your unit tests
## Built With

```bash
yarn run test:unit
```
- [Vue.js](https://github.com/vuejs/vue)
- [ElementUI](https://github.com/ElemeFE/element)

## License

### Customize configuration
[MIT](http://opensource.org/licenses/MIT)

See [Configuration Reference](https://cli.vuejs.org/config/).
Copyright (c) 2018 - present, Felix Yang
66 changes: 66 additions & 0 deletions README.zh-CN.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
# Element Admin

[![License](https://img.shields.io/github/license/codetrial/element-admin.svg)](https://github.com/codetrial/element-admin)

一个简约而不简单的基于 Vue CLI 3 和 ElementUI 的中后台管理系统。

此项目由一个不可思议的 vue cli 插件构建 - [@codetrial/vue-cli-plugin-element](https://github.com/codetrial/vue-cli-plugin-element)

:cn: 简体中文 | [:us: English](README.md)

## 文档

[:zap: 在线示例](https://element-admin.now.sh) | [:book: 参考文档](https://codetrial.github.io/element-admin)

## 截屏预览

![Screen Capture](.github/demo.gif)

## 快速开始

### 使用 Git

```bash
# 克隆这个仓库
yarn install
yarn run serve
```

### 使用 Vue CLI

```bash
vue create --preset codetrial/vue-cli-plugin-element your-project
```

## 核心功能

:camera: **最小依赖**:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。

:tv: **目录结构**:根据项目实战经验,设计了合理、清晰的目录结构。

:telephone_receiver: **页面布局**:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。

:pager: **数据处理**:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。

:watch: **权限控制**:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。

:radio: **列表示例**:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。

:mag_right: **表单示例**:一个相对比较完整的表单页示例,包含表单校验、提交等操作。

:ghost: **错误页面**:内置简单的(其实是偷懒) 403、404 及 500 错误页。

## 贡献

期待你的 `pull requests`。如果你觉得有帮助,还请多多反馈!

## 技术栈

- [Vue.js](https://github.com/vuejs/vue)
- [ElementUI](https://github.com/ElemeFE/element)

## 许可

[MIT](http://opensource.org/licenses/MIT)

Copyright (c) 2018 - present, Felix Yang
17 changes: 17 additions & 0 deletions now.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "element-admin",
"version": 2,
"alias": "element-admin",
"builds": [{ "src": "**", "use": "@now/static" }],
"routes": [
{ "src": "^/js/(.*)", "dest": "/js/$1" },
{ "src": "^/css/(.*)", "dest": "/css/$1" },
{ "src": "^/fonts/(.*)", "dest": "/fonts/$1" },
{ "src": "^/img/(.*)", "dest": "/img/$1" },
{
"src": "^/(favicon|manifest|precache|service-worker|robots)(.*)",
"dest": "/$1$2"
},
{ "src": ".*", "dest": "/index.html" }
]
}
27 changes: 24 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,12 +1,23 @@
{
"name": "element-admin",
"version": "0.1.0",
"version": "1.0.1",
"description": "A dead simple but powerful vue admin with Vue CLI 3 and ElementUI.",
"keywords": [
"vue",
"vue-cli",
"vue-cli-plugin",
"element",
"element-ui",
"admin",
"dashboard"
],
"private": true,
"scripts": {
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:unit": "vue-cli-service test:unit"
"test:unit": "vue-cli-service test:unit",
"deploy": "npm run build && now ./dist -A ../now.json && now alias"
},
"dependencies": {
"element-ui": "^2.4.11",
Expand All @@ -32,5 +43,15 @@
"node-sass": "^4.9.0",
"sass-loader": "^7.0.1",
"vue-template-compiler": "^2.5.17"
}
},
"repository": {
"type": "git",
"url": "git+https://github.com/codetrial/element-admin.git"
},
"bugs": {
"url": "https://github.com/codetrial/element-admin/issues"
},
"homepage": "https://github.com/codetrial/element-admin#readme",
"author": "felixpy",
"license": "MIT"
}
2 changes: 1 addition & 1 deletion src/components/layout/AppHeader.vue
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
>
<el-menu-item index="/">首页</el-menu-item>
<template v-if="user.id">
<el-submenu index="/example">
<el-submenu index="/example" :show-timeout="300" :hide-timeout="0">
<template slot="title">示例模块</template>
<el-menu-item index="/example">列表页</el-menu-item>
<el-menu-item index="/example/new">表单页</el-menu-item>
Expand Down
35 changes: 22 additions & 13 deletions src/views/About.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,43 +3,52 @@
<el-row class="bottom-gutter">
<el-card shadow="hover">
<div class="about-content">
<h3>关于此项目</h3>
<h3>关于此站点</h3>
<p>这是一个使用 @codetrial/vue-cli-plugin-element 插件创建的轻量级后台管理系统。核心技术为 Vue CLI 3 及 ElementUI。</p>
<p>如果你觉得有帮助,还请多多反馈!</p>
<p>
源码地址:
项目源码:
<a
target="_blank"
href="https://github.com/codetrial/element-admin"
>@codetrial/element-admin</a>
</p>
<p>
插件源码:
<a
target="_blank"
href="https://github.com/codetrial/vue-cli-plugin-element"
>@codetrial/vue-cli-plugin-element</a>
</p>
<p>开发人员:
<p>
开发人员:
<a target="_blank" href="https://github.com/felixpy">felixpy@github</a>
</p>
<h4>项目描述</h4>
<p>这是一个使用 Vue CLI 3 及 ElementUI 开发的轻量级后台管理系统项目架构。如果你觉得有帮助,还请多多反馈!</p>
<h4>项目特点</h4>
<p>麻雀虽小,五脏俱全。下面是它的一些主要特点。</p>
<p>
<b>- 最小依赖</b>:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。
<b>最小依赖</b>:仅依赖 Vue 官方库及 ElementUI 组件库,未额外引入其它第三方库,为你提供自由发挥的空间。
</p>
<p>
<b>- 目录结构</b>:根据项目实战经验,设计了合理、清晰的目录结构。
<b>目录结构</b>:根据项目实战经验,设计了合理、清晰的目录结构。
</p>
<p>
<b>- 布局体系</b>:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。
<b>页面布局</b>:使用 Vue Router 嵌套路由及 ElementUI 内置组件进行布局。
</p>
<p>
<b>- 数据处理</b>:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。
<b>数据处理</b>:添加独立的 api 及 service 层,将业务逻辑从组件中抽离。
</p>
<p>
<b>- 权限控制</b>:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。
<b>权限控制</b>:为路由添加配置式拦截器,默认支持用户登录鉴权及角色鉴权。
</p>
<p>
<b>- 列表示例</b>:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。
<b>列表示例</b>:一个相对比较完整的列表页示例,包含字段查询(过滤),字段排序,页码跳转,批量操作等等。
</p>
<p>
<b>- 表单示例</b>:一个相对比较完整的表单页示例,包含表单校验、提交等操作。
<b>表单示例</b>:一个相对比较完整的表单页示例,包含表单校验、提交等操作。
</p>
<p>
<b>- 错误页面</b>:内置简单的(其实是偷懒) 403、404 及 500 错误页。
<b>错误页面</b>:内置简单的(其实是偷懒) 403、404 及 500 错误页。
</p>
</div>
</el-card>
Expand Down
5 changes: 3 additions & 2 deletions src/views/Home.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,12 @@
<el-card shadow="hover">
<div>
<p>
Hi,开发者,欢迎使用 @codetrial/vue-cli-plugin-element 搭建你的后台
Hi,开发者,欢迎使用 @codetrial/vue-cli-plugin-element 插件搭建你的后台
<a
target="_blank"
href="https://github.com/codetrial/vue-cli-plugin-element"
>查看文档</a>
>插件源码</a> |
<a target="_blank" href="https://codetrial.github.io/element-admin">插件文档</a>
</p>
</div>
</el-card>
Expand Down
6 changes: 3 additions & 3 deletions src/views/example/Table.vue
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@
<a target="_blank" :href="scope.row.url">{{ scope.row.name }}</a>
</template>
</el-table-column>
<el-table-column prop="typeText" label="类型" min-width="120"></el-table-column>
<el-table-column prop="typeText" label="类型" min-width="80"></el-table-column>
<el-table-column
prop="statusText"
label="状态 (可筛选)"
Expand All @@ -76,8 +76,8 @@
></el-table-column>
<el-table-column prop="updateUser" label="更新用户 ID" min-width="120"></el-table-column>
<el-table-column prop="updateUserName" label="更新用户" min-width="120"></el-table-column>
<el-table-column prop="updateTime" label="更新时间" min-width="240"></el-table-column>
<el-table-column label="操作" min-width="100">
<el-table-column prop="updateTime" label="更新时间" min-width="200"></el-table-column>
<el-table-column label="操作" min-width="80">
<template slot-scope="scope">
<el-button type="text" size="small" @click="showExample(scope.row)">查看</el-button>
</template>
Expand Down

0 comments on commit a66ca08

Please sign in to comment.