Skip to content

Commit 7757738

Browse files
committed
优化表格自动高度,自动计算footer高度
1 parent 5b177ee commit 7757738

File tree

5 files changed

+124
-254
lines changed

5 files changed

+124
-254
lines changed

config/admin.php

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@
8383
'file' => 'files',
8484
],
8585
//文件上传类型
86-
'mimes' => 'jpeg,bmp,png,gif,jpg,jks',
86+
'mimes' => 'jpeg,bmp,png,gif,jpg',
8787
],
8888
'database' => [
8989
// Database connection for following tables.
@@ -123,7 +123,8 @@
123123
'except' => [
124124
'admin/auth/logs*',
125125
'admin-api/auth/logs*',
126-
'admin'
126+
'admin',
127+
'admin-api'
127128
],
128129
],
129130
'check_route_permission' => true,

public/app.js

Lines changed: 40 additions & 106 deletions
Original file line numberDiff line numberDiff line change
@@ -1986,28 +1986,6 @@ __webpack_require__.r(__webpack_exports__);
19861986
//
19871987
//
19881988
//
1989-
//
1990-
//
1991-
//
1992-
//
1993-
//
1994-
//
1995-
//
1996-
//
1997-
//
1998-
//
1999-
//
2000-
//
2001-
//
2002-
//
2003-
//
2004-
//
2005-
//
2006-
//
2007-
//
2008-
//
2009-
//
2010-
//
20111989

20121990
/* harmony default export */ __webpack_exports__["default"] = ({
20131991
props: {
@@ -2028,6 +2006,7 @@ __webpack_require__.r(__webpack_exports__);
20282006
mounted: function mounted() {
20292007
var _this = this;
20302008

2009+
//监听路由变动
20312010
this.$bus.on("route-after", function (to) {
20322011
_this.route = to.path;
20332012
_this.query = to.query;
@@ -2050,13 +2029,17 @@ __webpack_require__.r(__webpack_exports__);
20502029
}
20512030
});
20522031
}
2053-
});
2032+
}); //监听message事件
2033+
20542034
this.$bus.on("message", function (_ref) {
20552035
var type = _ref.type,
20562036
message = _ref.message;
20572037

20582038
_this.$message[type](message);
20592039
});
2040+
this.$nextTick(function () {
2041+
window.rootFooterHeight = _this.$refs.rootFooter.offsetHeight + 60;
2042+
});
20602043
},
20612044
destroyed: function destroyed() {
20622045
this.$bus.off("route-after");
@@ -3377,55 +3360,6 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
33773360
//
33783361
//
33793362
//
3380-
//
3381-
//
3382-
//
3383-
//
3384-
//
3385-
//
3386-
//
3387-
//
3388-
//
3389-
//
3390-
//
3391-
//
3392-
//
3393-
//
3394-
//
3395-
//
3396-
//
3397-
//
3398-
//
3399-
//
3400-
//
3401-
//
3402-
//
3403-
//
3404-
//
3405-
//
3406-
//
3407-
//
3408-
//
3409-
//
3410-
//
3411-
//
3412-
//
3413-
//
3414-
//
3415-
//
3416-
//
3417-
//
3418-
//
3419-
//
3420-
//
3421-
//
3422-
//
3423-
//
3424-
//
3425-
//
3426-
//
3427-
//
3428-
//
34293363

34303364

34313365

@@ -3670,7 +3604,7 @@ function _defineProperty(obj, key, value) { if (key in obj) { Object.definePrope
36703604
},
36713605
gridHeight: function gridHeight() {
36723606
if (this.attrs.attributes.height == "auto") {
3673-
return window.innerHeight - 55 - 120 - this.topViewHeight - 40;
3607+
return window.innerHeight - 55 - window.rootFooterHeight - this.topViewHeight - 40;
36743608
}
36753609

36763610
return this.attrs.attributes.height;
@@ -30878,13 +30812,7 @@ var render = function() {
3087830812
_c(
3087930813
"span",
3088030814
{ staticClass: "layout-header-user-name" },
30881-
[
30882-
_vm._v(
30883-
"\n " +
30884-
_vm._s(_vm.page_data.user.name) +
30885-
"\n "
30886-
)
30887-
]
30815+
[_vm._v(_vm._s(_vm.page_data.user.name))]
3088830816
)
3088930817
],
3089030818
1
@@ -30949,32 +30877,38 @@ var render = function() {
3094930877
)
3095030878
]),
3095130879
_vm._v(" "),
30952-
_c("el-footer", { staticClass: "admin-footer" }, [
30953-
_c(
30954-
"div",
30955-
{ staticClass: "footer-links" },
30956-
_vm._l(_vm.page_data.footerLinks, function(item, index) {
30957-
return _c(
30958-
"el-link",
30959-
{
30960-
key: index,
30961-
attrs: {
30962-
type: "text",
30963-
href: item.href,
30964-
target: "_blank",
30965-
underline: false
30966-
}
30967-
},
30968-
[_vm._v(_vm._s(item.title))]
30969-
)
30970-
}),
30971-
1
30972-
),
30973-
_vm._v(" "),
30974-
_c("div", {
30975-
domProps: { innerHTML: _vm._s(_vm.page_data.copyright) }
30976-
})
30977-
])
30880+
_c(
30881+
"el-footer",
30882+
{ staticClass: "admin-footer", attrs: { height: "auto" } },
30883+
[
30884+
_c("div", { ref: "rootFooter" }, [
30885+
_c(
30886+
"div",
30887+
{ staticClass: "footer-links" },
30888+
_vm._l(_vm.page_data.footerLinks, function(item, index) {
30889+
return _c(
30890+
"el-link",
30891+
{
30892+
key: index,
30893+
attrs: {
30894+
type: "text",
30895+
href: item.href,
30896+
target: "_blank",
30897+
underline: false
30898+
}
30899+
},
30900+
[_vm._v(_vm._s(item.title))]
30901+
)
30902+
}),
30903+
1
30904+
),
30905+
_vm._v(" "),
30906+
_c("div", {
30907+
domProps: { innerHTML: _vm._s(_vm.page_data.copyright) }
30908+
})
30909+
])
30910+
]
30911+
)
3097830912
],
3097930913
1
3098030914
)

0 commit comments

Comments
 (0)