Merge branch 'hotfix/新版本'
Former-commit-id: 701cb1ab3a944aa55d830f365f479534242acf91
This commit is contained in:
+3
-6
@@ -1,10 +1,7 @@
|
||||
# travis 自动构建预览
|
||||
|
||||
# 页面 title 前缀
|
||||
VUE_APP_TITLE=D2Admin Preview
|
||||
# travis
|
||||
|
||||
# 指定构建模式
|
||||
NODE_ENV=production
|
||||
|
||||
# 标记当前是 CI
|
||||
VUE_APP_TRAVIS=TRUE
|
||||
# 标记当前是 CI 自动构建
|
||||
VUE_APP_BUILD_MODE=TRAVIS
|
||||
|
||||
@@ -1,5 +1,142 @@
|
||||
[](https://www.travis-ci.org/d2-projects/d2-admin-start-kit)
|
||||

|
||||
|
||||
[D2Admin](https://github.com/d2-projects/d2-admin) 简化版起始模板,删除所有完整版中的示例代码,保留所有核心功能。
|
||||
<p align="center">
|
||||
<a><img src="https://img.shields.io/github/release/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/npm/v/@d2-admin/ice-scaffold.svg"/></a>
|
||||
<a href="https://www.travis-ci.org/d2-projects/d2-admin"><img src="https://www.travis-ci.org/d2-projects/d2-admin.svg?branch=master"/></a>
|
||||
<a><img src="https://img.shields.io/github/last-commit/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/badge/code_style-standard-brightgreen.svg"/></a>
|
||||
</p>
|
||||
|
||||
[码云镜像](https://gitee.com/fairyever/d2-admin-start-kit)
|
||||
<p align="center">
|
||||
<a><img src="https://img.shields.io/github/issues/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/github/issues-closed/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/github/issues-pr/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/github/issues-pr-closed/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/github/forks/d2-projects/d2-admin.svg"/></a>
|
||||
<a><img src="https://img.shields.io/github/stars/d2-projects/d2-admin.svg"/></a>
|
||||
</p>
|
||||
|
||||
[D2Admin](https://github.com/d2-projects/d2-admin) 是一个完全 **开源免费** 的企业中后台产品前端集成方案,使用最新的前端技术栈,已经做好大部分项目前期准备工作,并且带有大量示例代码,助力管理系统敏捷开发。
|
||||
|
||||
## 文档
|
||||
|
||||
[文档](https://doc.d2admin.fairyever.com)
|
||||
|
||||
## 预览
|
||||
|
||||
[预览地址](https://d2admin.fairyever.com)
|
||||
|
||||
## 码云镜像
|
||||
|
||||
[码云](https://gitee.com/fairyever/d2-admin)
|
||||
|
||||
## 功能
|
||||
|
||||
* 使用 vue-cli3 构建
|
||||
* 首屏加载等待动画
|
||||
* 五款主题
|
||||
* 详细的文档
|
||||
* 登录和注销
|
||||
* 分离的路由和菜单设置
|
||||
* 可折叠侧边栏
|
||||
* 多国语
|
||||
* 富文本编辑器
|
||||
* Markdown 编辑器
|
||||
* 全屏
|
||||
* Fontawesome 图标库
|
||||
* 图标选择器
|
||||
* 自动注册 SVG 图标
|
||||
* 模拟数据
|
||||
* 剪贴板封装
|
||||
* 图表库
|
||||
* 时间日期计算工具
|
||||
* 导入 Excel ( xlsx + csv )
|
||||
* 数据导出 Excel ( xlsx + csv )
|
||||
* 数据导出文本
|
||||
* 数字动画
|
||||
* 可拖拽调整大小的区块布局
|
||||
* 可拖拽调整大小和位置的网格布局
|
||||
* 开箱即用的页面布局组件
|
||||
* 加载并解析 markdown 文件
|
||||
* GitHub 样式的 markdown 显示组件
|
||||
* markdown 内代码高亮
|
||||
* 为 markdown 扩展了百度云链接解析和优化显示
|
||||
* 右键菜单组件
|
||||
* 自定义滚动条和滚动控制
|
||||
* 公用样式抽离,方便的主题定制
|
||||
* 支持临时菜单配置
|
||||
* 系统功能展示模块 `1.1.4 +`
|
||||
* 多标签页模式 `1.1.4 +`
|
||||
* 美化滚动条 `1.1.4 +`
|
||||
* json view `1.1.4 +`
|
||||
* cookie 封装 `1.1.5 +`
|
||||
* 多标签页全局控制 API `1.1.5 +`
|
||||
* 菜单全局控制 API `1.1.5 +`
|
||||
* 多标签页关闭控制支持右键菜单 `1.1.10 +`
|
||||
* 模块化全局状态管理 `1.2.0 +`
|
||||
* 多种数据持久化方式:区分用户,区分路由,页面数据快照功能 `1.2.0 +`
|
||||
* 支持跳出外部链接的菜单系统 `1.2.0 +`
|
||||
* 支持菜单 svg 图标 `1.3.0 +`
|
||||
* 日志记录和错误捕捉 `1.3.0 +`
|
||||
* 全局菜单搜索 `1.3.0 +`
|
||||
* 自定义登录重定向 `1.3.0 +`
|
||||
* 切换全局基础组件尺寸 `1.4.0 +`
|
||||
* 页面载入进度条 `1.4.1 +`
|
||||
* 自适应的顶部菜单栏 `1.4.7 +`
|
||||
* 数据导出 xslx 时支持合并单元格 `1.5.4 +`
|
||||
|
||||
## 其它版本
|
||||
|
||||
| 名称 | Github / 主页 | 预览 | 介绍 |
|
||||
| --- | --- | --- | --- |
|
||||
| 简化版模板 | [Github](https://github.com/d2-projects/d2-admin-start-kit) | [预览](https://start-kit.d2admin.fairyever.com) | 无 |
|
||||
| 飞冰脚手架 | [飞冰](https://alibaba.github.io/ice/scaffold?type=vue) | [预览](https://ice.d2admin.fairyever.com) | [介绍](https://juejin.im/post/5b6349716fb9a04f834669d6) |
|
||||
|
||||
## 生态
|
||||
|
||||
| 名称 | Github / 主页 | 预览 | 介绍 |
|
||||
| --- | --- | --- | --- |
|
||||
| D2 日报 | [Github](https://github.com/d2-projects/d2-awesome) | [网站](https://awesome.fairyever.com/daily/) | 每天更新设计与技术圈的新闻和资源 |
|
||||
| D2 CRUD | [Github](https://github.com/d2-projects/d2-crud) | [预览](https://d2admin.fairyever.com/#/demo/d2-crud/index) | 表格常用操作封装 |
|
||||
| D2 Ribbons | [Github](https://github.com/d2-projects/d2-ribbons) | [预览](https://github.com/d2-projects/d2-ribbons) | 开源项目徽标库 |
|
||||
|
||||
## 开源后端实现
|
||||
|
||||
> 后端由开源社区贡献,不保证使用 D2Admin 最新版本,相关使用问题请联系其开源作者。
|
||||
|
||||
| 名称 | Github / 主页 | 预览 | 介绍 |
|
||||
| --- | --- | --- | --- |
|
||||
| ( Spring Cloud ) Taroco | [Github](https://github.com/liuht777/Taroco) | [预览](http://111.231.192.110/) | 整套微服务企业级解决方案 |
|
||||
|
||||
## 徽章
|
||||
|
||||
如果您的开源项目基于 D2Admin 开发,请在您的 README 添加下面的徽章:
|
||||
|
||||
<a href="https://github.com/d2-projects/d2-admin" target="_blank">
|
||||
<img src="https://raw.githubusercontent.com/FairyEver/d2-admin/master/doc/image/d2-admin@2x.png" width="200">
|
||||
</a>
|
||||
|
||||
复制下面代码加入到 README 中即可:
|
||||
|
||||
``` html
|
||||
<a href="https://github.com/d2-projects/d2-admin" target="_blank"><img src="https://raw.githubusercontent.com/FairyEver/d2-admin/master/doc/image/d2-admin@2x.png" width="200"></a>
|
||||
```
|
||||
|
||||
同时您可以将您的项目汇报给我们,优秀项目我们会放置在 D2Admin 相关位置并帮助您宣传。
|
||||
|
||||
## 加入我们
|
||||
|
||||
D2Admin 是完全开源免费的项目,旨在帮助开发者更方便地进行管理系统开发,同时也提供 2000 人的 QQ 交流群和微信群,前后端的朋友可以相互答疑,项目组成员全部在内,所有 D2 相关项目使用问题欢迎在群内提问。
|
||||
|
||||
> 隐性福利:重要通知会发群红包
|
||||
|
||||

|
||||
|
||||
## License
|
||||
|
||||
[MIT](https://github.com/d2-projects/d2-admin/blob/master/LICENSE)
|
||||
|
||||
Copyright (c) 2018-present FairyEver
|
||||
|
||||

|
||||
|
||||
Generated
+1647
-2081
File diff suppressed because it is too large
Load Diff
+5
-5
@@ -1,17 +1,17 @@
|
||||
{
|
||||
"name": "d2-admin",
|
||||
"version": "1.5.3",
|
||||
"version": "1.5.6",
|
||||
"private": true,
|
||||
"scripts": {
|
||||
"serve": "vue-cli-service serve --open",
|
||||
"start": "vue-cli-service serve --open",
|
||||
"dev": "vue-cli-service serve --open",
|
||||
"start": "npm run serve",
|
||||
"dev": "npm run serve",
|
||||
"build": "vue-cli-service build",
|
||||
"build:travis": "vue-cli-service build --mode travis",
|
||||
"lint": "vue-cli-service lint --fix",
|
||||
"test:unit": "vue-cli-service test:unit"
|
||||
},
|
||||
"dependencies": {
|
||||
"@d2-projects/d2-crud": "^1.2.0",
|
||||
"axios": "^0.17.1",
|
||||
"babel-polyfill": "^6.26.0",
|
||||
"better-scroll": "^1.12.1",
|
||||
@@ -21,7 +21,7 @@
|
||||
"fuse.js": "^3.2.1",
|
||||
"hotkeys-js": "^3.3.6",
|
||||
"js-cookie": "^2.2.0",
|
||||
"lodash": "^4.17.10",
|
||||
"lodash": "^4.17.11",
|
||||
"lowdb": "^1.0.0",
|
||||
"mockjs": "^1.0.1-beta3",
|
||||
"nprogress": "^0.2.0",
|
||||
|
||||
@@ -0,0 +1,6 @@
|
||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32" fill="white">
|
||||
<path opacity=".25" d="M16 0 A16 16 0 0 0 16 32 A16 16 0 0 0 16 0 M16 4 A12 12 0 0 1 16 28 A12 12 0 0 1 16 4"/>
|
||||
<path d="M16 0 A16 16 0 0 1 32 16 L28 16 A12 12 0 0 0 16 4z">
|
||||
<animateTransform attributeName="transform" type="rotate" from="0 16 16" to="360 16 16" dur="0.8s" repeatCount="indefinite" />
|
||||
</path>
|
||||
</svg>
|
||||
|
After Width: | Height: | Size: 422 B |
+32
-154
@@ -7,143 +7,19 @@
|
||||
<link rel="icon" href="<%= BASE_URL %>icon.ico">
|
||||
<title><%= VUE_APP_TITLE %></title>
|
||||
<style>
|
||||
html, body, #app {
|
||||
height: 100%;
|
||||
margin: 0px;
|
||||
padding: 0px;
|
||||
}
|
||||
.d2-app-loading-group {
|
||||
height: 100%;
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
flex-direction: column;
|
||||
background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
|
||||
background-blend-mode: multiply,multiply;
|
||||
}
|
||||
.d2-app-loading-title {
|
||||
color: #FFF;
|
||||
font-weight: bold;
|
||||
font-size: 14px;
|
||||
margin-top: 40px;
|
||||
margin-bottom: 10px;
|
||||
letter-spacing: 0.2em;
|
||||
}
|
||||
.d2-app-loading-sub-title {
|
||||
color: #FFF;
|
||||
font-size: 10px;
|
||||
margin-bottom: 10px;
|
||||
}
|
||||
.d2-app-loading-sub-info {
|
||||
color: #FFF;
|
||||
font-size: 10px;
|
||||
opacity: .8;
|
||||
margin-bottom: 4px;
|
||||
}
|
||||
.d2-app-loading-btn {
|
||||
text-decoration: none;
|
||||
display: inline-block;
|
||||
line-height: 1;
|
||||
white-space: nowrap;
|
||||
cursor: pointer;
|
||||
background: #fff;
|
||||
border: 1px solid #dcdfe6;
|
||||
border-color: #dcdfe6;
|
||||
color: #606266;
|
||||
-webkit-appearance: none;
|
||||
text-align: center;
|
||||
box-sizing: border-box;
|
||||
outline: none;
|
||||
margin: 0;
|
||||
transition: .1s;
|
||||
font-weight: 500;
|
||||
-moz-user-select: none;
|
||||
-webkit-user-select: none;
|
||||
-ms-user-select: none;
|
||||
padding: 12px 20px;
|
||||
font-size: 14px;
|
||||
border-radius: 4px;
|
||||
/* 圆角 */
|
||||
padding: 7px 15px;
|
||||
border-radius: 20px;
|
||||
font-size: 12px;
|
||||
}
|
||||
.d2-app-loading-grid {
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
}
|
||||
.d2-app-loading-grid .d2-app-loading {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background-color: #FFF;
|
||||
float: left;
|
||||
-webkit-animation: d2-app-loading-grid-scale-delay 1.3s infinite ease-in-out;
|
||||
animation: d2-app-loading-grid-scale-delay 1.3s infinite ease-in-out;
|
||||
}
|
||||
.d2-app-loading-grid .d2-app-loading1 {
|
||||
border-top-left-radius: 4px;
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s; }
|
||||
.d2-app-loading-grid .d2-app-loading2 {
|
||||
-webkit-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s; }
|
||||
.d2-app-loading-grid .d2-app-loading3 {
|
||||
border-top-right-radius: 4px;
|
||||
-webkit-animation-delay: 0.4s;
|
||||
animation-delay: 0.4s; }
|
||||
.d2-app-loading-grid .d2-app-loading4 {
|
||||
-webkit-animation-delay: 0.1s;
|
||||
animation-delay: 0.1s; }
|
||||
.d2-app-loading-grid .d2-app-loading5 {
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s; }
|
||||
.d2-app-loading-grid .d2-app-loading6 {
|
||||
-webkit-animation-delay: 0.3s;
|
||||
animation-delay: 0.3s; }
|
||||
.d2-app-loading-grid .d2-app-loading7 {
|
||||
border-bottom-left-radius: 4px;
|
||||
-webkit-animation-delay: 0s;
|
||||
animation-delay: 0s; }
|
||||
.d2-app-loading-grid .d2-app-loading8 {
|
||||
-webkit-animation-delay: 0.1s;
|
||||
animation-delay: 0.1s; }
|
||||
.d2-app-loading-grid .d2-app-loading9 {
|
||||
border-bottom-right-radius: 4px;
|
||||
-webkit-animation-delay: 0.2s;
|
||||
animation-delay: 0.2s; }
|
||||
|
||||
@-webkit-keyframes d2-app-loading-grid-scale-delay {
|
||||
0%, 70%, 100% {
|
||||
-webkit-transform: scale3D(1, 1, 1);
|
||||
transform: scale3D(1, 1, 1);
|
||||
} 35% {
|
||||
-webkit-transform: scale3D(0, 0, 1);
|
||||
transform: scale3D(0, 0, 1);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes d2-app-loading-grid-scale-delay {
|
||||
0%, 70%, 100% {
|
||||
-webkit-transform: scale3D(1, 1, 1);
|
||||
transform: scale3D(1, 1, 1);
|
||||
} 35% {
|
||||
-webkit-transform: scale3D(0, 0, 1);
|
||||
transform: scale3D(0, 0, 1);
|
||||
}
|
||||
}
|
||||
html, body, #app { height: 100%; margin: 0px; padding: 0px; }
|
||||
.d2-home { background-color: #303133; height: 100%; display: flex; flex-direction: column; }
|
||||
.d2-home__main { user-select: none; width: 100%; flex-grow: 1; display: flex; justify-content: center; align-items: center; flex-direction: column; }
|
||||
.d2-home__footer { width: 100%; flex-grow: 0; text-align: center; padding: 1em 0; }
|
||||
.d2-home__footer > a { font-size: 12px; color: #ABABAB; text-decoration: none; }
|
||||
.d2-home__loading { height: 32px; width: 32px; margin-bottom: 20px; }
|
||||
.d2-home__title { color: #FFF; font-size: 14px; margin-bottom: 10px; }
|
||||
.d2-home__sub-title { color: #ABABAB; font-size: 12px; }
|
||||
</style>
|
||||
<script>
|
||||
// 感谢您使用 D2Admin
|
||||
// D2Admin 完全开源免费,并且长期更新维护
|
||||
// 下面的百度统计代码不会拖慢您的应用速度也不会占用多少网络带宽,我们只是想统计一下我们的用户量
|
||||
// 所以希望您不要删除我们的统计代码,让我们知道有更多人的在使用,给我们继续开发的动力
|
||||
(function() {
|
||||
var hm = document.createElement("script");
|
||||
hm.src = "https://hm.baidu.com/hm.js?1dfa88d0c8571eef2d383070cb3e5ca1";
|
||||
var s = document.getElementsByTagName("script")[0];
|
||||
s.parentNode.insertBefore(hm, s);
|
||||
})();
|
||||
var _hmt = _hmt || [];
|
||||
var hmid = "1dfa88d0c8571eef2d383070cb3e5ca1";
|
||||
(function() { var hm = document.createElement("script"); hm.src = "https://hm.baidu.com/hm.js?" + hmid; var s = document.getElementsByTagName("script")[0]; s.parentNode.insertBefore(hm, s);})();
|
||||
</script>
|
||||
<!-- ua -->
|
||||
<script src="<%= BASE_URL %>script/ua-parser.min.js"></script>
|
||||
@@ -151,30 +27,32 @@
|
||||
</head>
|
||||
<body>
|
||||
<noscript>
|
||||
<strong>We're sorry but d2-admin doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
|
||||
<strong>
|
||||
很抱歉,如果没有 JavaScript 支持,D2Admin 将不能正常工作。请启用浏览器的 JavaScript 然后继续。
|
||||
</strong>
|
||||
</noscript>
|
||||
<div id="app">
|
||||
<div class="d2-app-loading-group">
|
||||
<div class="d2-app-loading-grid">
|
||||
<div class="d2-app-loading d2-app-loading1"></div>
|
||||
<div class="d2-app-loading d2-app-loading2"></div>
|
||||
<div class="d2-app-loading d2-app-loading3"></div>
|
||||
<div class="d2-app-loading d2-app-loading4"></div>
|
||||
<div class="d2-app-loading d2-app-loading5"></div>
|
||||
<div class="d2-app-loading d2-app-loading6"></div>
|
||||
<div class="d2-app-loading d2-app-loading7"></div>
|
||||
<div class="d2-app-loading d2-app-loading8"></div>
|
||||
<div class="d2-app-loading d2-app-loading9"></div>
|
||||
<div class="d2-home">
|
||||
<div class="d2-home__main">
|
||||
<img
|
||||
class="d2-home__loading"
|
||||
src="./image/loading/loading-spin.svg"
|
||||
alt="loading">
|
||||
<div class="d2-home__title">
|
||||
正在加载资源
|
||||
</div>
|
||||
<div class="d2-home__sub-title">
|
||||
初次加载资源可能需要较多时间 请耐心等待
|
||||
</div>
|
||||
</div>
|
||||
<div class="d2-app-loading-title">加载中</div>
|
||||
<div class="d2-app-loading-sub-title">欢迎使用 D2Admin。初次加载较慢,请耐心等待</div>
|
||||
<div class="d2-app-loading-sub-info">如果很久很久都没有加载成功,请清空缓存重新加载页面</div>
|
||||
<div style="margin-top: 10px;">
|
||||
<a class="d2-app-loading-btn" href="https://github.com/d2-projects/d2-admin" target="blank">Github仓库</a>
|
||||
<a class="d2-app-loading-btn" href="https://d2-projects.github.io/d2-admin-doc/zh/" target="blank">中文文档</a>
|
||||
<div class="d2-home__footer">
|
||||
<a
|
||||
href="https://github.com/d2-projects/d2-admin"
|
||||
target="_blank">
|
||||
https://github.com/d2-projects/d2-admin
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- built files will be auto injected -->
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -1,17 +0,0 @@
|
||||
import request from '@/plugin/axios'
|
||||
|
||||
export function httpGet (url, params = {}) {
|
||||
return request({
|
||||
url,
|
||||
method: 'get',
|
||||
params
|
||||
})
|
||||
}
|
||||
|
||||
export function httpPost (url, data = {}) {
|
||||
return request({
|
||||
url,
|
||||
method: 'post',
|
||||
data
|
||||
})
|
||||
}
|
||||
@@ -1,17 +1,39 @@
|
||||
<template>
|
||||
<el-table :data="list" v-bind="table">
|
||||
<el-table-column prop="title" align="center" width="160"/>
|
||||
<el-table-column label="预览" width="120">
|
||||
<el-table
|
||||
:data="list"
|
||||
v-bind="table">
|
||||
<el-table-column
|
||||
prop="title"
|
||||
align="center"
|
||||
width="160"/>
|
||||
<el-table-column
|
||||
label="预览"
|
||||
width="120">
|
||||
<div
|
||||
slot-scope="scope"
|
||||
class="theme-preview"
|
||||
:style="{'backgroundImage': `url(${$baseUrl}${scope.row.preview})`}">
|
||||
:style="{
|
||||
backgroundImage: `url(${$baseUrl}${scope.row.preview})`
|
||||
}">
|
||||
</div>
|
||||
</el-table-column>
|
||||
<el-table-column prop="address" align="center">
|
||||
<el-table-column
|
||||
prop="address"
|
||||
align="center">
|
||||
<template slot-scope="scope">
|
||||
<el-button v-if="activeName === scope.row.name" type="success" icon="el-icon-check" round>已激活</el-button>
|
||||
<el-button v-else round @click="handleSelectTheme(scope.row.name)">使用</el-button>
|
||||
<el-button
|
||||
v-if="activeName === scope.row.name"
|
||||
type="success"
|
||||
icon="el-icon-check"
|
||||
round>
|
||||
已激活
|
||||
</el-button>
|
||||
<el-button
|
||||
v-else
|
||||
round
|
||||
@click="handleSelectTheme(scope.row.name)">
|
||||
使用
|
||||
</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
@@ -1,11 +1,23 @@
|
||||
<template>
|
||||
<div>
|
||||
<el-tooltip effect="dark" content="主题" placement="bottom">
|
||||
<el-button class="d2-ml-0 d2-mr btn-text can-hover" type="text" @click="dialogVisible = true">
|
||||
<d2-icon name="diamond" style="font-size: 16px"/>
|
||||
<el-tooltip
|
||||
effect="dark"
|
||||
content="主题"
|
||||
placement="bottom">
|
||||
<el-button
|
||||
class="d2-ml-0 d2-mr btn-text can-hover"
|
||||
type="text"
|
||||
@click="dialogVisible = true">
|
||||
<d2-icon
|
||||
name="diamond"
|
||||
style="font-size: 16px"/>
|
||||
</el-button>
|
||||
</el-tooltip>
|
||||
<el-dialog title="主题" width="600px" :visible.sync="dialogVisible" :append-to-body="true">
|
||||
<el-dialog
|
||||
title="主题"
|
||||
width="600px"
|
||||
:visible.sync="dialogVisible"
|
||||
:append-to-body="true">
|
||||
<d2-theme-list style="margin-top: -25px;"/>
|
||||
</el-dialog>
|
||||
</div>
|
||||
|
||||
@@ -12,9 +12,6 @@ import i18n from './i18n'
|
||||
// 核心插件
|
||||
import d2Admin from '@/plugin/d2admin'
|
||||
|
||||
// [ 可选插件组件 ]D2-Crud
|
||||
import D2Crud from '@d2-projects/d2-crud'
|
||||
|
||||
// 菜单和路由设置
|
||||
import router from './router'
|
||||
import menuHeader from '@/menu/header'
|
||||
@@ -24,10 +21,6 @@ import { frameInRoutes } from '@/router/routes'
|
||||
// 核心插件
|
||||
Vue.use(d2Admin)
|
||||
|
||||
// 可选插件组件
|
||||
// https://github.com/d2-projects/d2-crud
|
||||
Vue.use(D2Crud)
|
||||
|
||||
new Vue({
|
||||
router,
|
||||
store,
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<div class="page">
|
||||
<p class="page_title">page not found</p>
|
||||
<p class="page_title">404 page not found</p>
|
||||
<el-button class="d2-mt" @click="$router.replace({ path: '/' })">
|
||||
返回首页
|
||||
</el-button>
|
||||
@@ -10,7 +10,7 @@
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/style/public.scss';
|
||||
.page {
|
||||
background: linear-gradient(to bottom, rgba(255,255,255,0.15) 0%, rgba(0,0,0,0.15) 100%), radial-gradient(at top center, rgba(255,255,255,0.40) 0%, rgba(0,0,0,0.40) 120%) #989898;
|
||||
background: #303133;
|
||||
background-blend-mode: multiply,multiply;
|
||||
height: 100%;
|
||||
display: flex;
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<d2-icon name="github" class="d2-mr-5"/>
|
||||
主页
|
||||
</el-button>
|
||||
<el-button @click="$open('https://d2-projects.github.io/d2-admin-doc/zh/')">
|
||||
<el-button @click="$open('https://doc.d2admin.fairyever.com/zh/')">
|
||||
<d2-icon name="book" class="d2-mr-5"/>
|
||||
中文文档
|
||||
</el-button>
|
||||
@@ -30,11 +30,11 @@
|
||||
</el-button-group>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-alert :closable="false" type="info" title="扫码进 QQ 群 [ 推荐 ]" class="d2-mb"/>
|
||||
<el-alert :closable="false" type="info" title="2000人QQ群 [ 推荐 ]" class="d2-mb"/>
|
||||
<img src="./image/qq.jpg" style="width: 100%;">
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-alert :closable="false" type="info" title="作者微信 加好友后邀请进微信群" class="d2-mb"/>
|
||||
<el-alert :closable="false" type="info" title="与作者成为微信好友 邀请进微信群" class="d2-mb"/>
|
||||
<img src="./image/we.jpg" style="width: 100%;">
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
+19
-11
@@ -1,9 +1,11 @@
|
||||
<template>
|
||||
<d2-container class="page">
|
||||
<d2-page-cover
|
||||
title="I AM D2ADMIN"
|
||||
sub-title="追求简约美感的后台管理系统集成方案">
|
||||
<d2-icon-svg style="width: 120px;" name="d2-admin"/>
|
||||
:title="`D2 Admin ${version}`"
|
||||
sub-title="优雅的中后台集成方案">
|
||||
<d2-icon-svg
|
||||
class="page__logo"
|
||||
name="d2-admin"/>
|
||||
<template slot="footer">
|
||||
<div class="page__btn-group">
|
||||
<span @click="$open('https://github.com/d2-projects')">开源组织</span> |
|
||||
@@ -11,19 +13,16 @@
|
||||
<span @click="$open('https://github.com/d2-projects/d2-admin-start-kit')">简化版</span> |
|
||||
<span @click="$open('https://alibaba.github.io/ice/scaffold?type=vue')">飞冰</span> |
|
||||
<span @click="$open('https://juejin.im/user/57a48b632e958a006691b946/posts')">掘金</span> |
|
||||
<span @click="$open('https://awesome.fairyever.com/daily/')">程序员日报</span> |
|
||||
<span @click="$open('https://awesome.fairyever.com/daily/')">开发者日报</span> |
|
||||
<el-popover
|
||||
:width="172"
|
||||
trigger="hover">
|
||||
<p class="d2-mt-0 d2-mb-10">D2Projects</p>
|
||||
<img src="./image/qr@2x.png" style="width: 172px;">
|
||||
<img
|
||||
src="./image/qr@2x.png"
|
||||
style="width: 172px;">
|
||||
<span slot="reference">微信公众号</span>
|
||||
<p
|
||||
style="
|
||||
font-size: 12px;
|
||||
margin-top: 0px;
|
||||
margin-bottom: 0px;
|
||||
">
|
||||
<p style="font-size: 12px; margin-top: 0px; margin-bottom: 0px;">
|
||||
官方公众号,主要推送前端技术类文章、框架资源、学习教程,以及 D2 系列项目更新信息
|
||||
</p>
|
||||
</el-popover>
|
||||
@@ -36,12 +35,18 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex'
|
||||
import D2HelpBtn from './components/d2-help-btn'
|
||||
import D2Badge from './components/d2-badge'
|
||||
export default {
|
||||
components: {
|
||||
D2HelpBtn,
|
||||
D2Badge
|
||||
},
|
||||
computed: {
|
||||
...mapState('d2admin/releases', [
|
||||
'version'
|
||||
])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
@@ -49,6 +54,9 @@ export default {
|
||||
<style lang="scss" scoped>
|
||||
@import '~@/assets/style/public.scss';
|
||||
.page {
|
||||
.page__logo {
|
||||
width: 120px;
|
||||
}
|
||||
.page__btn-group {
|
||||
color: $color-text-placehoder;
|
||||
font-size: 12px;
|
||||
|
||||
+2
-5
@@ -1,6 +1,6 @@
|
||||
import { version } from '../package'
|
||||
|
||||
const setting = {
|
||||
export default {
|
||||
// 快捷键
|
||||
// 支持快捷键 例如 ctrl+shift+s
|
||||
hotkey: {
|
||||
@@ -27,8 +27,7 @@ const setting = {
|
||||
},
|
||||
// 版本
|
||||
releases: {
|
||||
version: version,
|
||||
api: 'https://api.github.com/repos/FairyEver/d2-admin/releases/latest'
|
||||
version
|
||||
},
|
||||
// 菜单搜索
|
||||
search: {
|
||||
@@ -77,5 +76,3 @@ const setting = {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
export default setting
|
||||
|
||||
@@ -109,7 +109,7 @@ export default {
|
||||
// 添加进当前显示的页面数组
|
||||
state.opened.push(newTag)
|
||||
// 如果这个页面需要缓存 将其添加到缓存设置
|
||||
if (get(newTag, 'meta.requiresAuth', false)) {
|
||||
if (get(newTag, 'meta.cache', false)) {
|
||||
commit('keepAlivePush', tag.name)
|
||||
}
|
||||
// 持久化
|
||||
|
||||
@@ -1,5 +1,3 @@
|
||||
import { httpGet } from '@/api/sys/http'
|
||||
import semver from 'semver'
|
||||
import util from '@/libs/util.js'
|
||||
import setting from '@/setting.js'
|
||||
|
||||
@@ -7,33 +5,7 @@ export default {
|
||||
namespaced: true,
|
||||
state: {
|
||||
// D2Admin 版本
|
||||
version: setting.releases.version,
|
||||
// 最新版本的信息
|
||||
latest: {},
|
||||
// 有新版本
|
||||
update: false
|
||||
},
|
||||
actions: {
|
||||
/**
|
||||
* @description 检查版本更新
|
||||
* @param {Object} param context
|
||||
*/
|
||||
checkUpdate ({ state, commit }) {
|
||||
httpGet(setting.releases.api)
|
||||
.then(res => {
|
||||
let versionGet = res.tag_name
|
||||
const update = semver.lt(state.version, versionGet)
|
||||
if (update) {
|
||||
util.log.capsule('D2Admin', `New version ${res.name}`)
|
||||
console.log(`版本号: ${res.tag_name} | 详情 ${res.html_url}`)
|
||||
commit('updateSet', true)
|
||||
}
|
||||
commit('latestSet', res)
|
||||
})
|
||||
.catch(err => {
|
||||
console.log('checkUpdate error', err)
|
||||
})
|
||||
}
|
||||
version: setting.releases.version
|
||||
},
|
||||
mutations: {
|
||||
/**
|
||||
@@ -43,25 +15,8 @@ export default {
|
||||
versionShow (state) {
|
||||
util.log.capsule('D2Admin', `v${state.version}`)
|
||||
console.log('Github https://github.com/d2-projects/d2-admin')
|
||||
console.log('Doc https://d2-projects.github.io/d2-admin-doc/zh/')
|
||||
},
|
||||
/**
|
||||
* @description 设置是否有新的 D2Admin 版本
|
||||
* @param {Object} state vuex state
|
||||
* @param {Boolean} update can update
|
||||
*/
|
||||
updateSet (state, update) {
|
||||
// store 赋值
|
||||
state.update = update
|
||||
},
|
||||
/**
|
||||
* @description 设置最新版本的信息
|
||||
* @param {Object} state vuex state
|
||||
* @param {Object}} latest releases value
|
||||
*/
|
||||
latestSet (state, latest) {
|
||||
// store 赋值
|
||||
state.latest = latest
|
||||
console.log('Doc https://doc.d2admin.fairyever.com/zh/')
|
||||
console.log('请不要吝啬您的 star,谢谢 ~')
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-7
@@ -1,14 +1,8 @@
|
||||
const path = require('path')
|
||||
|
||||
// 拼接路径
|
||||
function resolve (dir) {
|
||||
return path.join(__dirname, dir)
|
||||
}
|
||||
const resolve = dir => require('path').join(__dirname, dir)
|
||||
|
||||
// 基础路径 注意发布之前要先修改这里
|
||||
let baseUrl = '/'
|
||||
// 演示项目自动构建使用
|
||||
if (process.env.VUE_APP_TRAVIS === 'TRUE') baseUrl = '/'
|
||||
|
||||
module.exports = {
|
||||
baseUrl: baseUrl, // 根据你的实际情况更改这里
|
||||
|
||||
Reference in New Issue
Block a user