Skip to content

Commit 847fbe0

Browse files
authored
Merge pull request #78 from lin-xin/dev
vue-manage-system 升级改版
2 parents 07811bf + 645e902 commit 847fbe0

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+1452
-1275
lines changed

.babelrc

+7-8
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
{
22
"presets": [
3-
["es2015", { "modules": false }],
3+
["env", {
4+
"modules": false,
5+
"targets": {
6+
"browsers": ["> 1%", "last 2 versions", "not ie <= 8"]
7+
}
8+
}],
49
"stage-2"
510
],
6-
"plugins": ["transform-runtime"],
7-
"comments": false,
8-
"env": {
9-
"test": {
10-
"plugins": [ "istanbul" ]
11-
}
12-
}
11+
"plugins": ["transform-vue-jsx", "transform-runtime"]
1312
}

.postcssrc.js

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// https://github.com/michael-ciniawsky/postcss-load-config
2+
3+
module.exports = {
4+
"plugins": {
5+
// to edit target browsers: use "browserslist" field in package.json
6+
"postcss-import": {},
7+
"autoprefixer": {}
8+
}
9+
}

README.md

+12-14
Original file line numberDiff line numberDiff line change
@@ -31,19 +31,22 @@
3131
|-- src // 源码目录
3232
| |-- components // 组件
3333
| |-- common // 公共组件
34+
| |-- bus.js // Event Bus
3435
| |-- Header.vue // 公共头部
3536
| |-- Home.vue // 公共路由入口
3637
| |-- Sidebar.vue // 公共左边栏
3738
| |-- page // 主要路由页面
3839
| |-- BaseCharts.vue // 基础图表
3940
| |-- BaseForm.vue // 基础表单
4041
| |-- BaseTable.vue // 基础表格
42+
| |-- DragList.vue // 拖拽列表组件
4143
| |-- Login.vue // 登录
4244
| |-- Markdown.vue // markdown组件
45+
| |-- Premission.vue // 权限测试组件
4346
| |-- Readme.vue // 自述组件
4447
| |-- Upload.vue // 图片上传
4548
| |-- VueEditor.vue // 富文本编辑器
46-
| |-- VueTable.vue // vue表格组件
49+
| |-- VueTable.vue // datasource表格组件
4750
| |-- App.vue // 页面入口文件
4851
| |-- main.js // 程序入口文件,加载各种公共组件
4952
|-- .babelrc // ES6语法编译配置
@@ -56,8 +59,8 @@
5659

5760
## 安装步骤 ##
5861

59-
git clone https://github.com/lin-xin/manage-system.git // 把模板下载到本地
60-
cd manage-system // 进入模板目录
62+
git clone https://github.com/lin-xin/vue-manage-system.git // 把模板下载到本地
63+
cd vue-manage-system // 进入模板目录
6164
npm install // 安装项目依赖,等待安装完成之后
6265

6366
## 本地开发 ##
@@ -122,21 +125,16 @@ vue.js封装sChart.js的图表组件。访问地址:[vue-schart](https://githu
122125
### vue-datasource ###
123126
一个用于动态创建表格的vue.js服务端组件。访问地址:[vue-datasource](https://github.com/coderdiaz/vue-datasource)
124127

125-
126-
127128
### Vue-Quill-Editor ###
128129
基于Quill、适用于Vue2的富文本编辑器。访问地址:[vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
129130

130-
### Vue-SimpleMDE ###
131-
Vue.js的Markdown Editor组件。访问地址:[Vue-SimpleMDE](https://github.com/F-loat/vue-simplemde)
132-
133-
134-
135-
### Vue-Core-Image-Upload ###
136-
一款轻量级的vue上传插件,支持裁剪。访问地址:[Vue-Core-Image-Upload](https://github.com/Vanthink-UED/vue-core-image-upload)
137-
131+
(IE10及以下不支持)
138132

133+
### mavonEditor ###
134+
基于Vue的markdown编辑器。访问地址:[mavonEditor](https://github.com/hinesboy/mavonEditor)
139135

136+
### vue-cropperjs ###
137+
一个封装了 cropperjs 的 Vue 组件,用于裁剪图片。访问地址:[vue-cropperjs](https://github.com/Agontuk/vue-cropperjs)
140138

141139
## 其他注意事项 ##
142140
### 一、如果我不想用到上面的某些组件呢,那我怎么在模板中删除掉不影响到其他功能呢? ###
@@ -183,7 +181,7 @@ import 'element-ui/lib/theme-default/index.css'; // 默认主题
183181
/*@import "../static/css/theme-green/color-green.css"; !*浅绿色主题*!*/
184182
```
185183

186-
第三步:打开 src/components/common/Sidebar.vue 文件,找到 el-menu 标签,把 theme="dark" 去掉即可
184+
第三步:打开 src/components/common/Sidebar.vue 文件,找到 el-menu 标签,把 background-color/text-color/active-text-color 属性去掉即可
187185

188186
## 项目截图 ##
189187
### 默认皮肤 ###

README_EN.md

+24-147
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
# manage-system #
22
The web management system solution based on Vue2 and Element-UI。[live demo](http://blog.gdfengshuo.com/example/work/)
33

4+
## Donation
5+
![WeChat](http://blog.gdfengshuo.com/images/weixin.jpg)
46

57
## Preface ##
68
The scheme as a set of multi-function background frame templates, suitable for most of the WEB management system development. Convenient development fast simple good components based on Vue2 and Element-UI. Color separation of color style, support manual switch themes, and it is convenient to use a custom theme color.
@@ -25,6 +27,7 @@ The scheme as a set of multi-function background frame templates, suitable for m
2527
|-- src // Source directory
2628
| |-- components // Components
2729
| |-- common // Common component
30+
| |-- bus.js // Event Bus
2831
| |-- Header.vue // Header component
2932
| |-- Home.vue // Home component
3033
| |-- Sidebar.vue // Sidebar component
@@ -33,8 +36,9 @@ The scheme as a set of multi-function background frame templates, suitable for m
3336
| |-- BaseForm.vue // BaseForm
3437
| |-- BaseTable.vue // BaseTable
3538
| |-- Login.vue // Login
39+
| |-- DragList.vue
3640
| |-- Markdown.vue // Markdown
37-
| |-- MixCharts.vue // MixCharts
41+
| |-- Premission.vue
3842
| |-- Readme.vue // Readme
3943
| |-- Upload.vue // Upload
4044
| |-- VueEditor.vue // VueEditor
@@ -51,8 +55,8 @@ The scheme as a set of multi-function background frame templates, suitable for m
5155

5256
## Installation steps ##
5357

54-
git clone https://github.com/lin-xin/manage-system.git // Clone templates
55-
cd manage-system // Enter template directory
58+
git clone https://github.com/lin-xin/vue-manage-system.git // Clone templates
59+
cd vue-manage-system // Enter template directory
5660
npm install // Installation dependency
5761

5862
## Local development ##
@@ -67,149 +71,6 @@ The scheme as a set of multi-function background frame templates, suitable for m
6771

6872
## Component description and presentation ##
6973

70-
### element-ui ###
71-
A desktop component library based on vue.js2.0 . Github : [element](http://element.eleme.io/#/zh-CN/component/layout)
72-
73-
### vue-datasource ###
74-
A Vue.js server side component to create dynamic tables. Github : [vue-datasource](https://github.com/coderdiaz/vue-datasource)
75-
76-
```JavaScript
77-
<template>
78-
<div>
79-
<datasource language="en" :table-data="information.data"
80-
:columns="columns"
81-
:pagination="information.pagination"
82-
:actions="actions"
83-
v-on:change="changePage"
84-
v-on:searching="onSearch"></datasource>
85-
</div>
86-
</template>
87-
88-
<script>
89-
import Datasource from 'vue-datasource'; // import Datasource component
90-
export default {
91-
data: function(){
92-
return {
93-
information: {
94-
pagination: {...}, // pagination config
95-
data: [...]
96-
},
97-
columns: [...], // col config
98-
actions: [...] // function config
99-
}
100-
},
101-
components: {
102-
Datasource
103-
},
104-
methods: {
105-
changePage(values) {...},
106-
onSearch(searchQuery) {...}
107-
}
108-
}
109-
</script>
110-
```
111-
112-
113-
### Vue-Quill-Editor ###
114-
Quill editor component for Vue2. Github : [vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
115-
116-
```JavaScript
117-
<template>
118-
<div>
119-
<quill-editor ref="myTextEditor" v-model="content" :config="editorOption"></quill-editor>
120-
</div>
121-
</template>
122-
123-
<script>
124-
import { quillEditor } from 'vue-quill-editor'; // import quillEditor component
125-
export default {
126-
data: function(){
127-
return {
128-
content: '',
129-
editorOption: {
130-
// something config
131-
}
132-
}
133-
},
134-
components: {
135-
quillEditor
136-
}
137-
}
138-
</script>
139-
```
140-
141-
### Vue-SimpleMDE ###
142-
Markdown Editor component for Vue.js. Github : [Vue-SimpleMDE](https://github.com/F-loat/vue-simplemde)
143-
144-
```JavaScript
145-
<template>
146-
<div>
147-
<markdown-editor v-model="content" :configs="configs" ref="markdownEditor"></markdown-editor>
148-
</div>
149-
</template>
150-
151-
<script>
152-
import { markdownEditor } from 'vue-simplemde';
153-
export default {
154-
data: function(){
155-
return {
156-
content:'',
157-
configs: {
158-
status: false,
159-
initialValue: 'Hello BBK',
160-
renderingConfig: {
161-
codeSyntaxHighlighting: true,
162-
highlightingTheme: 'atom-one-light'
163-
}
164-
}
165-
}
166-
},
167-
components: {
168-
markdownEditor
169-
}
170-
}
171-
</script>
172-
```
173-
174-
### Vue-Core-Image-Upload ###
175-
a vue plugin for image upload and crop. Github : [Vue-Core-Image-Upload](https://github.com/Vanthink-UED/vue-core-image-upload)
176-
177-
```JavaScript
178-
179-
<template>
180-
<div>
181-
<img :src="src">
182-
<vue-core-image-upload :class="['pure-button','pure-button-primary','js-btn-crop']"
183-
:crop="true"
184-
text="上传图片"
185-
url=""
186-
extensions="png,gif,jpeg,jpg"
187-
@:imageuploaded="imageuploaded">
188-
</vue-core-image-upload>
189-
</div>
190-
</template>
191-
192-
<script>
193-
import VueCoreImageUpload from 'vue-core-image-upload';
194-
export default {
195-
data: function(){
196-
return {
197-
src:'../img/1.jpg'
198-
}
199-
},
200-
components: {
201-
VueCoreImageUpload
202-
},
203-
methods:{
204-
imageuploaded(res) {
205-
console.log(res)
206-
}
207-
}
208-
}
209-
</script>
210-
211-
```
212-
21374
### vue-schart ###
21475
Vue.js wrapper for sChart.js. Github : [vue-schart](https://github.com/linxin/vue-schart)
21576

@@ -253,6 +114,22 @@ Vue.js wrapper for sChart.js. Github : [vue-schart](https://github.com/linxin/vu
253114
</script>
254115
```
255116

117+
### element-ui ###
118+
A desktop component library based on vue.js2.0 . Github : [element](http://element.eleme.io/#/zh-CN/component/layout)
119+
120+
### vue-datasource ###
121+
A Vue.js server side component to create dynamic tables. Github : [vue-datasource](https://github.com/coderdiaz/vue-datasource)
122+
123+
### Vue-Quill-Editor ###
124+
Quill editor component for Vue2. Github : [vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
125+
126+
### mavonEditor ###
127+
A markdown editor based on Vue that supports a variety of personalized features. Github: [mavonEditor](https://github.com/hinesboy/mavonEditor)
128+
129+
### vue-cropperjs ###
130+
A Vue wrapper component for cropperjs. Github: [vue-cropperjs](https://github.com/Agontuk/vue-cropperjs)
131+
132+
256133
## Notice ##
257134
### 一、If I don't want to use some components, how can I delete it? ###
258135

@@ -298,7 +175,7 @@ The second step to enter 'src/App.vue' and change into green theme.
298175
/*@import "../static/css/theme-green/color-green.css"; !*浅绿色主题*!*/
299176
```
300177

301-
Finally,enter 'src/components/common/Sidebar.vue' and find el-menu Tags,delete 'theme="dark"'。
178+
Finally,enter 'src/components/common/Sidebar.vue' and find el-menu Tags,delete 'background-color/text-color/active-text-color'。
302179

303180
## Screenshot ##
304181
### Default theme ###

build/build.js

+31-30
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,41 @@
1-
// https://github.com/shelljs/shelljs
1+
'use strict'
22
require('./check-versions')()
33

44
process.env.NODE_ENV = 'production'
55

6-
var ora = require('ora')
7-
var path = require('path')
8-
var chalk = require('chalk')
9-
var shell = require('shelljs')
10-
var webpack = require('webpack')
11-
var config = require('../config')
12-
var webpackConfig = require('./webpack.prod.conf')
6+
const ora = require('ora')
7+
const rm = require('rimraf')
8+
const path = require('path')
9+
const chalk = require('chalk')
10+
const webpack = require('webpack')
11+
const config = require('../config')
12+
const webpackConfig = require('./webpack.prod.conf')
1313

14-
var spinner = ora('building for production...')
14+
const spinner = ora('building for production...')
1515
spinner.start()
1616

17-
var assetsPath = path.join(config.build.assetsRoot, config.build.assetsSubDirectory)
18-
shell.rm('-rf', assetsPath)
19-
shell.mkdir('-p', assetsPath)
20-
shell.config.silent = true
21-
shell.cp('-R', 'static/*', assetsPath)
22-
shell.config.silent = false
23-
24-
webpack(webpackConfig, function (err, stats) {
25-
spinner.stop()
17+
rm(path.join(config.build.assetsRoot, config.build.assetsSubDirectory), err => {
2618
if (err) throw err
27-
process.stdout.write(stats.toString({
28-
colors: true,
29-
modules: false,
30-
children: false,
31-
chunks: false,
32-
chunkModules: false
33-
}) + '\n\n')
19+
webpack(webpackConfig, (err, stats) => {
20+
spinner.stop()
21+
if (err) throw err
22+
process.stdout.write(stats.toString({
23+
colors: true,
24+
modules: false,
25+
children: false, // If you are using ts-loader, setting this to true will make TypeScript errors show up during build.
26+
chunks: false,
27+
chunkModules: false
28+
}) + '\n\n')
29+
30+
if (stats.hasErrors()) {
31+
console.log(chalk.red(' Build failed with errors.\n'))
32+
process.exit(1)
33+
}
3434

35-
console.log(chalk.cyan(' Build complete.\n'))
36-
console.log(chalk.yellow(
37-
' Tip: built files are meant to be served over an HTTP server.\n' +
38-
' Opening index.html over file:// won\'t work.\n'
39-
))
35+
console.log(chalk.cyan(' Build complete.\n'))
36+
console.log(chalk.yellow(
37+
' Tip: built files are meant to be served over an HTTP server.\n' +
38+
' Opening index.html over file:// won\'t work.\n'
39+
))
40+
})
4041
})

0 commit comments

Comments
 (0)