bfe8abfb by yuanbo

增加注释

1 parent 97690a4f
...@@ -52,10 +52,6 @@ export default { ...@@ -52,10 +52,6 @@ export default {
52 LbRender 52 LbRender
53 }, 53 },
54 methods: { 54 methods: {
55 /**
56 * @description: setColumn
57 * @author: renchao
58 */
59 setColumn () { 55 setColumn () {
60 if (this.column.type) { 56 if (this.column.type) {
61 this.column.renderHeader = forced[this.column.type].renderHeader 57 this.column.renderHeader = forced[this.column.type].renderHeader
......
...@@ -112,30 +112,15 @@ export default { ...@@ -112,30 +112,15 @@ export default {
112 }, 112 },
113 methods: { 113 methods: {
114 // 单选 114 // 单选
115 /**
116 * @description: 单选
117 * @param {*} row
118 * @author: renchao
119 */
120 singleElection (row) { 115 singleElection (row) {
121 this.selected = this.data.indexOf(row); 116 this.selected = this.data.indexOf(row);
122 }, 117 },
123 118
124 /**
125 * @description: tableRowClassName
126 * @param {*} row
127 * @param {*} rowIndex
128 * @author: renchao
129 */
130 tableRowClassName ({ row, rowIndex }) { 119 tableRowClassName ({ row, rowIndex }) {
131 if (rowIndex % 2 === 1) { 120 if (rowIndex % 2 === 1) {
132 return 'interlaced'; 121 return 'interlaced';
133 } 122 }
134 }, 123 },
135 /**
136 * @description: getHeight
137 * @author: renchao
138 */
139 getHeight () { 124 getHeight () {
140 if (!this.heightNumSetting) { 125 if (!this.heightNumSetting) {
141 let _this = this 126 let _this = this
...@@ -152,12 +137,6 @@ export default { ...@@ -152,12 +137,6 @@ export default {
152 } 137 }
153 } 138 }
154 }, 139 },
155 /**
156 * @description: calcHeightx
157 * @param {*} value
158 * @param {*} wappered
159 * @author: renchao
160 */
161 calcHeightx (value, wappered = true) { 140 calcHeightx (value, wappered = true) {
162 //项目自定义的公共header部分的高度,可忽略 141 //项目自定义的公共header部分的高度,可忽略
163 let header = document.querySelector(".from-clues-header").offsetHeight; 142 let header = document.querySelector(".from-clues-header").offsetHeight;
...@@ -177,91 +156,36 @@ export default { ...@@ -177,91 +156,36 @@ export default {
177 } 156 }
178 return res; 157 return res;
179 }, 158 },
180 /**
181 * @description: clearSelection
182 * @author: renchao
183 */
184 clearSelection () { 159 clearSelection () {
185 this.$refs.elTable.clearSelection() 160 this.$refs.elTable.clearSelection()
186 }, 161 },
187 /**
188 * @description: toggleRowSelection
189 * @param {*} row
190 * @param {*} selected
191 * @author: renchao
192 */
193 toggleRowSelection (row, selected) { 162 toggleRowSelection (row, selected) {
194 this.$refs.elTable.toggleRowSelection(row, selected) 163 this.$refs.elTable.toggleRowSelection(row, selected)
195 }, 164 },
196 /**
197 * @description: toggleAllSelection
198 * @author: renchao
199 */
200 toggleAllSelection () { 165 toggleAllSelection () {
201 this.$refs.elTable.toggleAllSelection() 166 this.$refs.elTable.toggleAllSelection()
202 }, 167 },
203 /**
204 * @description: toggleRowExpansion
205 * @param {*} row
206 * @param {*} expanded
207 * @author: renchao
208 */
209 toggleRowExpansion (row, expanded) { 168 toggleRowExpansion (row, expanded) {
210 this.$refs.elTable.toggleRowExpansion(row, expanded) 169 this.$refs.elTable.toggleRowExpansion(row, expanded)
211 }, 170 },
212 /**
213 * @description: setCurrentRow
214 * @param {*} row
215 * @author: renchao
216 */
217 setCurrentRow (row) { 171 setCurrentRow (row) {
218 this.$refs.elTable.setCurrentRow(row) 172 this.$refs.elTable.setCurrentRow(row)
219 }, 173 },
220 /**
221 * @description: clearSort
222 * @author: renchao
223 */
224 clearSort () { 174 clearSort () {
225 this.$refs.elTable.clearSort() 175 this.$refs.elTable.clearSort()
226 }, 176 },
227 /**
228 * @description: clearFilter
229 * @param {*} columnKey
230 * @author: renchao
231 */
232 clearFilter (columnKey) { 177 clearFilter (columnKey) {
233 this.$refs.elTable.clearFilter(columnKey) 178 this.$refs.elTable.clearFilter(columnKey)
234 }, 179 },
235 /**
236 * @description: doLayout
237 * @author: renchao
238 */
239 doLayout () { 180 doLayout () {
240 this.$refs.elTable.doLayout() 181 this.$refs.elTable.doLayout()
241 }, 182 },
242 /**
243 * @description: sort
244 * @param {*} prop
245 * @param {*} order
246 * @author: renchao
247 */
248 sort (prop, order) { 183 sort (prop, order) {
249 this.$refs.elTable.sort(prop, order) 184 this.$refs.elTable.sort(prop, order)
250 }, 185 },
251 /**
252 * @description: paginationCurrentChange
253 * @param {*} val
254 * @author: renchao
255 */
256 paginationCurrentChange (val) { 186 paginationCurrentChange (val) {
257 this.$emit('p-current-change', val) 187 this.$emit('p-current-change', val)
258 }, 188 },
259 /**
260 * @description: getMergeArr
261 * @param {*} tableData
262 * @param {*} merge
263 * @author: renchao
264 */
265 getMergeArr (tableData, merge) { 189 getMergeArr (tableData, merge) {
266 if (!merge) return 190 if (!merge) return
267 this.mergeLine = {} 191 this.mergeLine = {}
...@@ -284,14 +208,6 @@ export default { ...@@ -284,14 +208,6 @@ export default {
284 }) 208 })
285 }) 209 })
286 }, 210 },
287 /**
288 * @description: mergeMethod
289 * @param {*} row
290 * @param {*} column
291 * @param {*} rowIndex
292 * @param {*} columnIndex
293 * @author: renchao
294 */
295 mergeMethod ({ row, column, rowIndex, columnIndex }) { 211 mergeMethod ({ row, column, rowIndex, columnIndex }) {
296 const index = this.merge.indexOf(column.property) 212 const index = this.merge.indexOf(column.property)
297 if (index > -1) { 213 if (index > -1) {
......