Compare commits
7 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3768db7bfb | ||
|
|
26eb66cb85 | ||
|
|
6508c97a63 | ||
|
|
68d60bda80 | ||
|
|
cf075b7021 | ||
|
|
fd6496895a | ||
|
|
0a3289d6a8 |
@@ -1,7 +1,7 @@
|
||||
ENV = 'development'
|
||||
|
||||
# 接口地址
|
||||
VUE_APP_BASE_API = 'https://eladmin.vip'
|
||||
VUE_APP_BASE_API = 'http://localhost:8000'
|
||||
VUE_APP_WS_API = 'ws://localhost:8000'
|
||||
|
||||
# 是否启用 babel-plugin-dynamic-import-node插件
|
||||
|
||||
@@ -2,6 +2,6 @@ ENV = 'production'
|
||||
|
||||
# 如果使用 Nginx 代理后端接口,那么此处需要改为 '/',文件查看 Docker 部署篇,Nginx 配置
|
||||
# 接口地址,注意协议,如果你没有配置 ssl,需要将 https 改为 http
|
||||
VUE_APP_BASE_API = '/'
|
||||
VUE_APP_BASE_API = 'https://eladmin.vip'
|
||||
# 如果接口是 http 形式, wss 需要改为 ws
|
||||
VUE_APP_WS_API = '/'
|
||||
VUE_APP_WS_API = 'wss://eladmin.vip'
|
||||
|
||||
78
README.md
78
README.md
@@ -1,7 +1,77 @@
|
||||
# 注意
|
||||
# ELADMIN-WEB
|
||||
|
||||
该分支仅用于 预览服务器 Jenkins 自动部署
|
||||
ELADMIN 前端源码
|
||||
|
||||
# 请勿使用该分支进行开发
|
||||
#### 项目源码
|
||||
|
||||
# 开发请选择 master 分支
|
||||
| | 后端源码 | 前端源码 |
|
||||
|--- |--- | --- |
|
||||
| github | https://github.com/elunez/eladmin | https://github.com/elunez/eladmin-web |
|
||||
| 码云 | https://gitee.com/elunez/eladmin | https://gitee.com/elunez/eladmin-web |
|
||||
|
||||
#### 开发文档
|
||||
[https://eladmin.vip](https://eladmin.vip)
|
||||
|
||||
#### 体验地址
|
||||
[https://eladmin.vip/demo](https://eladmin.vip/demo)
|
||||
|
||||
#### 前端模板
|
||||
|
||||
初始模板基于: [https://github.com/PanJiaChen/vue-element-admin](https://github.com/PanJiaChen/vue-element-admin)
|
||||
|
||||
模板文档: [https://panjiachen.github.io/vue-element-admin-site/zh/guide/](https://panjiachen.github.io/vue-element-admin-site/zh/guide/)
|
||||
|
||||
#### VPS推荐
|
||||
<a href="https://bwh81.net/aff.php?aff=70876" target="_blank">
|
||||
<img src="https://eladmin.vip/images/banner/side.jpeg" style="width: 435px;border-radius: 2px;">
|
||||
</a>
|
||||
|
||||
使用优惠码: `BWHCCNCXVV`,可获得 6.81% 的折扣, [查看介绍](https://bwhstock.in/)
|
||||
|
||||
#### Build Setup
|
||||
**推荐 node 版本:12-16**
|
||||
``` bash
|
||||
# 配置镜像加速
|
||||
https://www.ydyno.com/archives/1219.html
|
||||
|
||||
# 安装依赖
|
||||
npm install
|
||||
|
||||
# 启动服务 localhost:8013
|
||||
npm run dev
|
||||
|
||||
# 构建生产环境
|
||||
npm run build:prod
|
||||
```
|
||||
|
||||
#### 常见问题
|
||||
|
||||
1、linux 系统在安装依赖的时候会出现 node-sass 无法安装的问题
|
||||
|
||||
解决方案:
|
||||
```
|
||||
1. 单独安装:npm install --unsafe-perm node-sass
|
||||
2. 直接使用:npm install --unsafe-perm
|
||||
```
|
||||
|
||||
2、加速node-sass安装
|
||||
|
||||
https://www.ydyno.com/archives/1219.html
|
||||
|
||||
#### 特别鸣谢
|
||||
|
||||
- 感谢 [JetBrains](https://www.jetbrains.com/) 提供的非商业开源软件开发授权
|
||||
|
||||
- 感谢 [PanJiaChen](https://github.com/PanJiaChen/vue-element-admin) 大佬提供的前端模板
|
||||
|
||||
- 感谢 [Moxun](https://github.com/moxun1639) 大佬提供的前端 Crud 通用组件
|
||||
|
||||
- 感谢 [zhy6599](https://gitee.com/zhy6599) 大佬提供的后端运维管理相关功能
|
||||
|
||||
- 感谢 [j.yao.SUSE](https://github.com/everhopingandwaiting) 大佬提供的匿名接口与Redis限流等功能
|
||||
|
||||
- 感谢 [d15801543974](https://github.com/d15801543974) 大佬提供的基于注解的通用查询方式
|
||||
|
||||
#### 反馈交流
|
||||
|
||||
- QQ交流群:891137268 、947578238、659622532
|
||||
@@ -6,7 +6,7 @@
|
||||
"license": "Apache-2.0",
|
||||
"scripts": {
|
||||
"dev": "vue-cli-service serve",
|
||||
"build:prod": "vue-cli-service build --max_old_space_size=8096",
|
||||
"build:prod": "vue-cli-service build",
|
||||
"build:stage": "vue-cli-service build --mode staging",
|
||||
"preview": "node build/index.js --preview",
|
||||
"lint": "eslint --ext .js,.vue src",
|
||||
@@ -36,7 +36,7 @@
|
||||
"@riophae/vue-treeselect": "^0.4.0",
|
||||
"@wangeditor/editor": "^5.1.23",
|
||||
"@wangeditor/editor-for-vue": "^1.0.2",
|
||||
"axios": "^1.6.0",
|
||||
"axios": "^0.28.0",
|
||||
"clipboard": "2.0.4",
|
||||
"codemirror": "^5.49.2",
|
||||
"core-js": "^2.6.12",
|
||||
@@ -52,7 +52,7 @@
|
||||
"mavon-editor": "^2.9.1",
|
||||
"normalize.css": "7.0.0",
|
||||
"nprogress": "0.2.0",
|
||||
"path-to-regexp": "2.4.0",
|
||||
"path-to-regexp": "8.0.0",
|
||||
"qs": "^6.10.1",
|
||||
"screenfull": "4.2.0",
|
||||
"sortablejs": "1.8.4",
|
||||
|
||||
@@ -1,12 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta base="/demo/">
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no">
|
||||
<link href="<%= BASE_URL %>favicon.ico" rel="icon">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title><%= webpackConfig.name %></title>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
@@ -1,3 +1,2 @@
|
||||
User-agent: *
|
||||
|
||||
Allow: /
|
||||
Disallow: /
|
||||
@@ -1 +0,0 @@
|
||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1690351561879" class="icon" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="10676" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><path d="M832 320H362.666667c-46.933333 0-85.333333 38.4-85.333334 85.333333v298.666667c0 46.933333 38.4 85.333333 85.333334 85.333333h149.333333l-21.333333 64h-74.666667c-17.066667 0-32 14.933333-32 32s14.933333 32 32 32h362.666667c17.066667 0 32-14.933333 32-32s-14.933333-32-32-32H704l-21.333333-64h149.333333c46.933333 0 85.333333-38.4 85.333333-85.333333V405.333333c0-46.933333-38.4-85.333333-85.333333-85.333333z" p-id="10677" fill="#bfbfbf"></path><path d="M320 885.333333c0-12.8 2.133333-25.6 6.4-36.266666-64-14.933333-113.066667-74.666667-113.066667-145.066667V405.333333c0-83.2 66.133333-149.333333 149.333334-149.333333h170.666666V192c0-46.933333-38.4-85.333333-85.333333-85.333333H192C145.066667 106.666667 106.666667 145.066667 106.666667 192v640c0 46.933333 38.4 85.333333 85.333333 85.333333h134.4c-4.266667-10.666667-6.4-21.333333-6.4-32z" p-id="10678" fill="#bfbfbf"></path></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB |
@@ -207,81 +207,3 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.sidebar-container-ad {
|
||||
transition: width 0.28s;
|
||||
width: $sideBarWidth !important;
|
||||
background-color: $menuBg;
|
||||
height: 30%;
|
||||
position: fixed;
|
||||
font-size: 0;
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
z-index: 1001;
|
||||
overflow: hidden;
|
||||
|
||||
// reset element-ui css
|
||||
.horizontal-collapse-transition {
|
||||
transition: 0s width ease-in-out, 0s padding-left ease-in-out, 0s padding-right ease-in-out;
|
||||
}
|
||||
|
||||
.scrollbar-wrapper {
|
||||
overflow-x: hidden !important;
|
||||
}
|
||||
|
||||
.el-scrollbar__bar.is-vertical {
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.el-scrollbar {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
&.has-logo {
|
||||
.el-scrollbar {
|
||||
height: calc(100% - 50px);
|
||||
}
|
||||
}
|
||||
|
||||
.is-horizontal {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a {
|
||||
display: inline-block;
|
||||
width: 100%;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.svg-icon {
|
||||
margin-right: 16px;
|
||||
}
|
||||
|
||||
.el-menu {
|
||||
border: none;
|
||||
height: 100%;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
// menu hover
|
||||
.submenu-title-noDropdown,
|
||||
.el-submenu__title {
|
||||
&:hover {
|
||||
background-color: $menuHover !important;
|
||||
}
|
||||
}
|
||||
|
||||
.is-active>.el-submenu__title {
|
||||
color: $subMenuActiveText !important;
|
||||
}
|
||||
|
||||
& .nest-menu .el-submenu>.el-submenu__title,
|
||||
& .el-submenu .el-menu-item {
|
||||
min-width: $sideBarWidth !important;
|
||||
background-color: $subMenuBg !important;
|
||||
|
||||
&:hover {
|
||||
background-color: $subMenuHover !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,13 +1,13 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-button v-permission="permission.edit" :loading="crud.status.cu === 2" :disabled="disabledEdit" size="mini" type="primary" icon="el-icon-edit" @click="crud.toEdit(data)" />
|
||||
<el-button v-permission="permission.edit" :loading="crud.status.cu === 2" :disabled="disabledEdit" size="mini" type="primary" icon="el-icon-edit" @click.stop="crud.toEdit(data)" />
|
||||
<el-popover v-model="pop" v-permission="permission.del" placement="top" width="180" trigger="manual" @show="onPopoverShow" @hide="onPopoverHide">
|
||||
<p>{{ msg }}</p>
|
||||
<div style="text-align: right; margin: 0">
|
||||
<el-button size="mini" type="text" @click="doCancel">取消</el-button>
|
||||
<el-button :loading="crud.dataStatus[crud.getDataId(data)].delete === 2" type="primary" size="mini" @click="crud.doDelete(data)">确定</el-button>
|
||||
</div>
|
||||
<el-button slot="reference" :disabled="disabledDle" type="danger" icon="el-icon-delete" size="mini" @click="toDelete" />
|
||||
<el-button slot="reference" :disabled="disabledDle" type="danger" icon="el-icon-delete" size="mini" @click.stop="toDelete" />
|
||||
</el-popover>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -34,7 +34,7 @@ function CRUD(options) {
|
||||
// 排序规则,默认 id 降序, 支持多字段排序 ['id,desc', 'createTime,asc']
|
||||
sort: ['id,desc'],
|
||||
// 等待时间
|
||||
time: 1,
|
||||
time: 50,
|
||||
// CRUD Method
|
||||
crudMethod: {
|
||||
add: (form) => {},
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
<router-view :key="key" />
|
||||
</keep-alive>
|
||||
</transition>
|
||||
<el-backtop :bottom="50" :right="40"><i class="el-icon-caret-top" /></el-backtop>
|
||||
<div v-if="$store.state.settings.showFooter" id="el-main-footer">
|
||||
<span v-html="$store.state.settings.footerTxt" />
|
||||
<span v-if="$store.state.settings.caseNumber"> ⋅ </span>
|
||||
|
||||
@@ -13,7 +13,7 @@ const whiteList = ['/login']// no redirect whitelist
|
||||
|
||||
router.beforeEach((to, from, next) => {
|
||||
if (to.meta.title) {
|
||||
document.title = Config.title + ' - ' + to.meta.title
|
||||
document.title = to.meta.title + ' - ' + Config.title
|
||||
}
|
||||
NProgress.start()
|
||||
if (getToken()) {
|
||||
|
||||
@@ -61,9 +61,8 @@ export const constantRouterMap = [
|
||||
]
|
||||
|
||||
export default new Router({
|
||||
mode: 'hash',
|
||||
base: '/demo/',
|
||||
// mode: 'history',
|
||||
// mode: 'hash',
|
||||
mode: 'history',
|
||||
scrollBehavior: () => ({ y: 0 }),
|
||||
routes: constantRouterMap
|
||||
})
|
||||
|
||||
@@ -147,7 +147,7 @@ export default {
|
||||
})
|
||||
},
|
||||
initWebSocket() {
|
||||
const wsUri = process.env.VUE_APP_WS_API + '/webSocket/deploy'
|
||||
const wsUri = (process.env.VUE_APP_WS_API === '/' ? '/' : (process.env.VUE_APP_WS_API + '/')) + 'webSocket/deploy'
|
||||
this.websock = new WebSocket(wsUri)
|
||||
this.websock.onerror = this.webSocketOnError
|
||||
this.websock.onmessage = this.webSocketOnMessage
|
||||
|
||||
@@ -41,7 +41,7 @@
|
||||
:action="fileUploadApi + '?name=' + form.name"
|
||||
>
|
||||
<div class="eladmin-upload"><i class="el-icon-upload" /> 添加文件</div>
|
||||
<div slot="tip" class="el-upload__tip">请勿上传违法文件,演示环境带宽有限,限制文件大小小于50KB</div>
|
||||
<div slot="tip" class="el-upload__tip">可上传任意格式文件,且不超过100M</div>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@@ -145,10 +145,10 @@ export default {
|
||||
},
|
||||
beforeUpload(file) {
|
||||
let isLt2M = true
|
||||
isLt2M = file.size / 1024 < 52
|
||||
isLt2M = file.size / 1024 / 1024 < 100
|
||||
if (!isLt2M) {
|
||||
this.loading = false
|
||||
this.$message.error('上传文件大小超出限制:50KB')
|
||||
this.$message.error('上传文件大小不能超过 100MB!')
|
||||
}
|
||||
this.form.name = file.name
|
||||
return isLt2M
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
:before-remove="handleBeforeRemove"
|
||||
:on-success="handleSuccess"
|
||||
:on-error="handleError"
|
||||
:before-upload="beforeUpload"
|
||||
:file-list="fileList"
|
||||
:headers="headers"
|
||||
:action="qiNiuUploadApi"
|
||||
@@ -40,7 +39,7 @@
|
||||
multiple
|
||||
>
|
||||
<el-button size="small" type="primary">点击上传</el-button>
|
||||
<div slot="tip" style="display: block;" class="el-upload__tip">请勿上传违法文件,演示环境带宽有限,限制文件大小小于50KB</div>
|
||||
<div slot="tip" style="display: block;" class="el-upload__tip">请勿上传违法文件,且文件不超过15M</div>
|
||||
</el-upload>
|
||||
<div slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="doSubmit">确认</el-button>
|
||||
@@ -121,15 +120,6 @@ export default {
|
||||
_this.init()
|
||||
_this.dialog = true
|
||||
},
|
||||
beforeUpload(file) {
|
||||
let isLt2M = true
|
||||
isLt2M = file.size / 1024 < 52
|
||||
if (!isLt2M) {
|
||||
this.loading = false
|
||||
this.$message.error('上传文件大小超出限制:50KB')
|
||||
}
|
||||
return isLt2M
|
||||
},
|
||||
handleSuccess(response, file, fileList) {
|
||||
const uid = file.uid
|
||||
const id = response.id
|
||||
|
||||
@@ -13,8 +13,9 @@ const port = 8013 // 端口配置
|
||||
// All configuration item explanations can be find in https://cli.vuejs.org/config/
|
||||
module.exports = {
|
||||
// hash 模式下可使用
|
||||
publicPath: process.env.NODE_ENV === 'development' ? '/' : '/demo/',
|
||||
outputDir: 'demo',
|
||||
// publicPath: process.env.NODE_ENV === 'development' ? '/' : './',
|
||||
publicPath: '/',
|
||||
outputDir: 'dist',
|
||||
assetsDir: 'static',
|
||||
lintOnSave: process.env.NODE_ENV === 'development',
|
||||
productionSourceMap: false,
|
||||
|
||||
Reference in New Issue
Block a user