Browse Source

上传文件至 ''

master
yuejiayang 10 months ago
parent
commit
4e396babb9
  1. 9
      .postcssrc.js
  2. 59
      CHANGELOG.md
  3. 21
      LICENSE
  4. 66
      gulpfile.js
  5. 25
      index.html

9
.postcssrc.js

@ -0,0 +1,9 @@
// https://github.com/michael-ciniawsky/postcss-load-config
module.exports = {
"plugins": {
// to edit target browsers: use "browserslist" field in package.json
"postcss-import": {},
"autoprefixer": {}
}
}

59
CHANGELOG.md

@ -0,0 +1,59 @@
## 更新日志
### 1.2.2
*2018-10-16*
- 修复判断当前路由类型 bug
- 默认开放element-ui所有组件
- 修复子菜单同级出现子菜单项会同时选中bug
- 捕获首次请求菜单列表和权限异常,自动跳转至登录页
- 修复菜单按钮权限错误bug [#41](https://github.com/gaotaoio/gaotao-fast-vue/issues/41)
- 提供重置登录信息状态方法。修复登出或替换账号还保留之前账号操作信息和痕迹bug
- 优化token失效、退出后,为了强制清空整站临时存储数据而刷新页面问题。注意: 此次vux数据并未做重置处理!
### 1.2.1
*2018-06-08*
- 修复tabs关闭最后一个tab后,再次打开会保留最后一个tab bug
- 优化完善mock模拟数据
- 修复linux系统,引入主题色文件名大小写编译错误bug [#22](https://github.com/daxiongYang/gaotao-fast-vue/issues/22)
- 新增echarts图表、ueditor富文本编辑器demo
- 移除登录成功token前端设置的失效时间
- 修复退出/token失效后,返回登录页面未清空整站临时存储数据bug
- 修复手机号码验证正则bug
- 同步后台 修改config模块key vulue子段为paramKey paramValue
- 修复角色管理 新增修改授权接口请求错误bug
- 修复1.2 新版本的导航栏Tab错位bug [#14](https://github.com/daxiongYang/gaotao-fast-vue/issues/14)
- 修复动态菜单路由 最前面带/bug
- 修复其它已知bug
### 1.2.0
*2018-05-03*
- 支持菜单管理操作动态(菜单)路由
- 移除api文件夹目录,简化api请求方式
- 新增element-ui组件主题12套,可同步修改配置设置成整站主题
- 调整store状态目录结构,改变设置/获取方式
- 调整views视图层结构,更友好的支持动态(菜单)路由
- 修复其它已知bug
### 1.1.0
*2018-04-15*
- 使用SVG Sprite矢量图标,替换fontawesome字体图标
- 新增内容tabs标签页,关闭当前/其它/全部、刷新当前功能
- 新增scss变量皮肤定制
- 优化路由机制,通过meta isTab属性,设定是否通过tab标签页展示内容
- 更新element-ui 2.3.2 用于修复左侧菜单收缩卡顿问题
- 新增mock本地开发模拟数据功能
- 修复本地开发找不到baseUrl问题
- 更新element-ui 2.2.1 用于修复tree半选中状态项不能传给后台接口问题
- 修复其它已知bug
### 1.0.0
*2018-02-11*

21
LICENSE

@ -0,0 +1,21 @@
MIT License
Copyright (c) 2018
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.

66
gulpfile.js

@ -0,0 +1,66 @@
var gulp = require('gulp');
var $ = require('gulp-load-plugins')();
var path = require('path');
var del = require('del');
var distPath = path.resolve('./dist');
var version = ''; // 版本号
var versionPath = ''; // 版本号路径
var env = process.env.npm_config_qa ? 'qa' : process.env.npm_config_uat ? 'uat' : 'prod'; // 运行环境
// 创建版本号(年月日时分)
(function () {
var d = new Date();
var yy = d.getFullYear();
var MM = d.getMonth() + 1 >= 10 ? (d.getMonth() + 1) : '0' + (d.getMonth() + 1);
var DD = d.getDate() >= 10 ? d.getDate() : '0' + d.getDate();
var h = d.getHours() >= 10 ? d.getHours() : '0' + d.getHours();
var mm = d.getMinutes() >= 10 ? d.getMinutes() : '0' + d.getMinutes();
version = yy + MM + DD + h + mm;
versionPath = distPath + '/' + version;
})();
// 编译
gulp.task('build', $.shell.task([ 'node build/build.js' ]));
// 创建版本号目录
gulp.task('create:versionCatalog', function () {
return gulp.src(`${distPath}/static/**/*`)
.pipe(gulp.dest(`${versionPath}/static/`))
});
// 替换${versionPath}/static/js/manifest.js window.SITE_CONFIG.cdnUrl占位变量
gulp.task('replace:cdnUrl', function () {
return gulp.src(`${versionPath}/static/js/manifest.js`)
.pipe($.replace(new RegExp(`"${require('./config').build.assetsPublicPath}"`, 'g'), 'window.SITE_CONFIG.cdnUrl + "/"'))
.pipe(gulp.dest(`${versionPath}/static/js/`))
});
// 替换${versionPath}/static/config/index-${env}.js window.SITE_CONFIG['version']配置变量
gulp.task('replace:version', function () {
return gulp.src(`${versionPath}/static/config/index-${env}.js`)
.pipe($.replace(/window.SITE_CONFIG\['version'\] = '.*'/g, `window.SITE_CONFIG['version'] = '${version}'`))
.pipe(gulp.dest(`${versionPath}/static/config/`))
});
// 合并${versionPath}/static/config/[index-${env}, init].js 至 ${distPath}/config/index.js
gulp.task('concat:config', function () {
return gulp.src([`${versionPath}/static/config/index-${env}.js`, `${versionPath}/static/config/init.js`])
.pipe($.concat('index.js'))
.pipe(gulp.dest(`${distPath}/config/`))
});
//清除, 编译 / 处理项目中产生的文件
gulp.task('cleanBuild', function () {
return del([`${distPath}/static`, `${versionPath}/static/config`])
});
// 清空
gulp.task('clean', function () {
return del([versionPath])
});
//gulp.series|4.0 依赖
//gulp.parallel|4.0 多个依赖嵌套
gulp.task('default',gulp.series(gulp.series('build','create:versionCatalog','replace:cdnUrl','replace:version','concat:config','cleanBuild')));

25
index.html

@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Label Printing Platform</title>
<% if (process.env.NODE_ENV === 'production') { %>
<!-- 生产环境 -->
<script>document.write('<script src="./config/index.js?t=' + new Date().getTime() + '"><\/script>');</script>
<% }else { %>
<!-- 开发环境 -->
<link rel="shortcut icon" type="image/x-icon" href="./static/img/favicon.ico">
<script src="./static/config/index.js"></script>
<script src="./static/plugins/mock-1.0.0-beta3/mock-min.js"></script>
<script src="./static/plugins/echarts-3.8.5/echarts.common.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.config.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/ueditor.all.min.js"></script>
<script src="./static/plugins/ueditor-1.4.3.3/lang/zh-cn/zh-cn.js"></script>
<% } %>
</head>
<body>
<div id="app"></div>
</body>
</html>
Loading…
Cancel
Save