Skip to content

Commit 95fbc61

Browse files
Merge pull request #64 from lphkxd/master
修复隐藏toolbar自动计算高度报错;隐藏表单时自定义data数据返回数据结构错误bug
2 parents febad90 + a17adac commit 95fbc61

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

resources/js/components/grid/Table.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -302,7 +302,7 @@ export default {
302302
this.$nextTick(() => {
303303
this.topViewHeight = this.$refs.topView.offsetHeight;
304304
305-
this.toolbarsViewHeight = this.$refs.toolbarsView.offsetHeight;
305+
this.toolbarsViewHeight = this.$refs.toolbarsView? this.$refs.toolbarsView.offsetHeight:0;
306306
307307
this.pageViewHeight = this.$refs.pageView ? this.$refs.pageView.offsetHeight : 0;
308308

src/Grid.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -394,7 +394,7 @@ protected function data()
394394
$this->customData['data'] = $this->model()->displayData($this->customData['data']);
395395
return [
396396
'code' => 200,
397-
'data' => $this->customData
397+
'data' => $this->isHidePage() ? $this->customData['data'] : $this->customData
398398
];
399399
}
400400

0 commit comments

Comments
 (0)