094877b4 by 杨威

height报错修复

1 parent 8a6c87a9
...@@ -79,7 +79,9 @@ ...@@ -79,7 +79,9 @@
79 pageNo: this.pageNo, 79 pageNo: this.pageNo,
80 pageSize: this.pageSize, 80 pageSize: this.pageSize,
81 }) 81 })
82 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; 82 this.$nextTick(()=>{
83 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
84 })
83 }, 85 },
84 methods: { 86 methods: {
85 handleCurrentChange(val) { 87 handleCurrentChange(val) {
......
...@@ -73,7 +73,9 @@ ...@@ -73,7 +73,9 @@
73 }, 73 },
74 mounted() { 74 mounted() {
75 this.getData({}) 75 this.getData({})
76 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; 76 this.$nextTick(()=>{
77 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
78 })
77 }, 79 },
78 methods: { 80 methods: {
79 onSubmit() { 81 onSubmit() {
......
...@@ -95,7 +95,9 @@ export default { ...@@ -95,7 +95,9 @@ export default {
95 }; 95 };
96 }, 96 },
97 mounted() { 97 mounted() {
98 this.tableHeight = this.$refs.notice.offsetHeight - 53; 98 this.$nextTick(()=>{
99 this.tableHeight = this.$refs.notice.offsetHeight - 53;
100 })
99 }, 101 },
100 methods: { 102 methods: {
101 handleSelect() {}, 103 handleSelect() {},
......
...@@ -78,7 +78,9 @@ ...@@ -78,7 +78,9 @@
78 }, 78 },
79 mounted() { 79 mounted() {
80 this.getData({}) 80 this.getData({})
81 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; 81 this.$nextTick(()=>{
82 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
83 })
82 }, 84 },
83 methods: { 85 methods: {
84 handleCurrentChange(val) { 86 handleCurrentChange(val) {
......
...@@ -63,15 +63,17 @@ ...@@ -63,15 +63,17 @@
63 pageNo: 1, 63 pageNo: 1,
64 pageSize: 15, 64 pageSize: 15,
65 tableData: [], 65 tableData: [],
66 tableHeight: "", 66 tableHeight: 0,
67 queryData: {} 67 queryData: {}
68 }; 68 };
69 }, 69 },
70 created() { 70 created() {
71 }, 71 },
72 mounted() { 72 mounted() {
73 this.getData({pageSize:15}) 73 this.getData({pageSize:15});
74 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68; 74 this.$nextTick(()=>{
75 this.tableHeight = this.$refs.dataGrid.offsetHeight - 68;
76 })
75 }, 77 },
76 methods: { 78 methods: {
77 onSubmit() { 79 onSubmit() {
......