--no commit message
Showing
1 changed file
with
20 additions
and
15 deletions
... | @@ -12,6 +12,7 @@ | ... | @@ -12,6 +12,7 @@ |
12 | style="page-break-after: always" | 12 | style="page-break-after: always" |
13 | > | 13 | > |
14 | <div class="title">{{ title }}</div> | 14 | <div class="title">{{ title }}</div> |
15 | <div class="num">共{{ datass.length }}页,第{{ indexx + 1 }}页</div> | ||
15 | <table class="xxTable"> | 16 | <table class="xxTable"> |
16 | <tr v-for="item in columns" :key="item.name"> | 17 | <tr v-for="item in columns" :key="item.name"> |
17 | <td> | 18 | <td> |
... | @@ -54,10 +55,10 @@ export default { | ... | @@ -54,10 +55,10 @@ export default { |
54 | type: Array, | 55 | type: Array, |
55 | default: () => [], | 56 | default: () => [], |
56 | }, | 57 | }, |
57 | render:{ | 58 | render: { |
58 | type: Boolean, | 59 | type: Boolean, |
59 | default: false, | 60 | default: false, |
60 | } | 61 | }, |
61 | }, | 62 | }, |
62 | created() {}, | 63 | created() {}, |
63 | watch: { | 64 | watch: { |
... | @@ -66,11 +67,11 @@ export default { | ... | @@ -66,11 +67,11 @@ export default { |
66 | this.tableData = newValue; | 67 | this.tableData = newValue; |
67 | }, | 68 | }, |
68 | }, | 69 | }, |
69 | render: { | 70 | render: { |
70 | handler(newValue, oldValue) { | 71 | handler(newValue, oldValue) { |
71 | if(newValue){ | 72 | if (newValue) { |
72 | this.loadData(); | 73 | this.loadData(); |
73 | } | 74 | } |
74 | }, | 75 | }, |
75 | }, | 76 | }, |
76 | immediate: true, | 77 | immediate: true, |
... | @@ -89,7 +90,7 @@ export default { | ... | @@ -89,7 +90,7 @@ export default { |
89 | this.columns = res.result; | 90 | this.columns = res.result; |
90 | } | 91 | } |
91 | }); | 92 | }); |
92 | if (this.tableData.length&&this.datass.length==0) { | 93 | if (this.tableData.length && this.datass.length == 0) { |
93 | for (let i = 0; i < this.tableData.length; i += 4) { | 94 | for (let i = 0; i < this.tableData.length; i += 4) { |
94 | this.datass.push(this.tableData.slice(i, i + 4)); | 95 | this.datass.push(this.tableData.slice(i, i + 4)); |
95 | } | 96 | } |
... | @@ -109,8 +110,13 @@ export default { | ... | @@ -109,8 +110,13 @@ export default { |
109 | <style lang="scss" scoped> | 110 | <style lang="scss" scoped> |
110 | .tbalede { | 111 | .tbalede { |
111 | width: 100%; | 112 | width: 100%; |
112 | // height: 1123px; | ||
113 | margin: auto; | 113 | margin: auto; |
114 | position: relative; | ||
115 | .num { | ||
116 | position: absolute; | ||
117 | right: 10px; | ||
118 | top: 0px; | ||
119 | } | ||
114 | .title { | 120 | .title { |
115 | width: 100%; | 121 | width: 100%; |
116 | font-weight: 700; | 122 | font-weight: 700; |
... | @@ -136,16 +142,15 @@ export default { | ... | @@ -136,16 +142,15 @@ export default { |
136 | padding: 5px; | 142 | padding: 5px; |
137 | } | 143 | } |
138 | td { | 144 | td { |
139 | width: 20px!important; | 145 | width: 20px !important; |
140 | word-break: break-all; | 146 | word-break: break-all; |
141 | // /* 方法一:使用 word-break */ | 147 | // /* 方法一:使用 word-break */ |
142 | // word-break: break-all; | 148 | // word-break: break-all; |
143 | // // /* 方法二:使用 white-space */ | 149 | // // /* 方法二:使用 white-space */ |
144 | // // white-space: pre-wrap; | 150 | // // white-space: pre-wrap; |
145 | // // /* 方法三:使用 overflow-wrap */ | 151 | // // /* 方法三:使用 overflow-wrap */ |
146 | // // overflow-wrap: break-word; | 152 | // // overflow-wrap: break-word; |
147 | } | 153 | } |
148 | |||
149 | } | 154 | } |
150 | } | 155 | } |
151 | </style> | 156 | </style> | ... | ... |
-
Please register or sign in to post a comment