Skip to content

Commit

Permalink
Merge pull request #173 from newpanjing/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
newpanjing authored Oct 28, 2019
2 parents 1aff47b + e1724cb commit 5c86aad
Show file tree
Hide file tree
Showing 14 changed files with 314 additions and 219 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.idea/
django_simpleui.egg-info
dist
dist
/simpleui.egg-info/
4 changes: 4 additions & 0 deletions QUICK.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ simpleui 快速上手指南
+ [自定义按钮](#自定义按钮)
+ [离线模式](#离线模式)
+ [关闭Loading遮罩层](#关闭Loading遮罩层)
+ [admindoc](#admindoc)
# 常见问题
+ [settings.py](#settingspy-找不到)
+ [python版本问题](#python版本问题)
Expand Down Expand Up @@ -716,6 +717,9 @@ SIMPLEUI_LOADING = False
```
True或None 默认显示加载遮罩层,指定为False 不显示遮罩层。默认显示

## admindoc
admindoc需要simpleui 3.3+ 版本

## 常见问题
### settings.py 找不到

Expand Down
4 changes: 4 additions & 0 deletions doc/en/QUICK_en.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ Before starting,please take a minte to understand **settings.py**, because it'
+ [Custom Action](#Custom%2dAction)
+ [Offline](#Offline)
+ [Close Loading](#Close%2dLoading)
+ [admindoc](#admindoc)
# Common Problems
+ [settings.py](#Not%2dfound%2dsettings.py)
+ [python version problem](#python%2dversion%2dproblem)
Expand Down Expand Up @@ -655,6 +656,9 @@ settings.py:
SIMPLEUI_LOADING = False
```

## admindoc
Admindoc must be the simpleui3.3+ version

## Common Problems
### Not found settings.py

Expand Down
2 changes: 1 addition & 1 deletion simpleui/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
def get_version():
return '3.2'
return '3.3'
6 changes: 5 additions & 1 deletion simpleui/static/admin/simpleui-x/css/index.css

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion simpleui/static/admin/simpleui-x/css/index.css.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

12 changes: 9 additions & 3 deletions simpleui/static/admin/simpleui-x/css/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -112,9 +112,9 @@ html, body {
.simpleui-table tr {
height: 35px;

&:hover{
th,td{
background-color: inherit!important;
&:hover {
th, td {
background-color: inherit !important;
}
}
}
Expand Down Expand Up @@ -431,4 +431,10 @@ html, body {
border-radius: 0;
background: rgba(0, 0, 0, 0.1);
}
}

.lite-menus {
.el-submenu__title:hover, .is-opened .el-submenu__title {
color: white !important;
}
}
28 changes: 22 additions & 6 deletions simpleui/static/admin/simpleui-x/js/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@
for (var i = 0; i < app.menuData.length; i++) {
var item = app.menuData[i]
if ((item.url || '/') == hash) {
app.openTab(item, item.eid, true);

app.openTab(item, item.eid, true, false);
break;
}
}
Expand Down Expand Up @@ -107,6 +108,8 @@
new Vue({
el: '#main',
data: {
drawer: false,
mobile: false,
upgrade: {
isUpdate: false,
body: '',
Expand Down Expand Up @@ -258,7 +261,8 @@
self.fold = width < 800;
})
}
self.isResize = true
self.isResize = true;
self.mobile = width < 800;

//判断全屏状态
try {
Expand Down Expand Up @@ -430,11 +434,12 @@
}
}
,
openTab: function (data, index, selected) {
openTab: function (data, index, selected, loading) {
if (data.breadcrumbs) {
this.breadcrumbs = data.breadcrumbs;
}


//如果data没有eid就直接打开或者添加根据url
if (!data.eid) {
data.eid = new Date().getTime() + "" + Math.random();
Expand Down Expand Up @@ -471,8 +476,13 @@
} else {
//其他的网址loading会一直转
if (data.url && data.url.indexOf('http') != 0) {
data.loading = true;
this.loading = true;
if (loading) {
data.loading = true;
this.loading = true;
}else{
data.loading = false;
this.loading = false;
}
}
// data.id = new Date().getTime() + "" + Math.random();
data.id = data.eid;
Expand All @@ -486,6 +496,12 @@
,
foldClick: function () {

//移动端浮动菜单
var width = document.documentElement.clientWidth || document.body.clientWidth;
if (width < 800) {
this.drawer = !this.drawer;
return;
}
this.menuTextShow = !this.menuTextShow;
this.$nextTick(() => {
this.fold = !this.fold;
Expand Down Expand Up @@ -569,7 +585,7 @@
this.timeline = !this.timeline;
},
report: function (url) {
if(!url){
if (!url) {
url = 'https://github.com/newpanjing/simpleui/issues';
}
window.open(url);
Expand Down
4 changes: 2 additions & 2 deletions simpleui/static/admin/simpleui-x/js/login.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ if (parent.callback) {
//如果是在子框架内就把首页刷新
parent.callback();
}
new Vue({
var loginApp = new Vue({
el: '.login-main',
data: {
username: '',
Expand All @@ -17,4 +17,4 @@ new Vue({
});
}
}
})
});
Loading

0 comments on commit 5c86aad

Please sign in to comment.