bd129aa0 by yuanbo

增加注释

1 parent ce2113de
......@@ -52,10 +52,6 @@ export default {
LbRender
},
methods: {
/**
* @description: setColumn
* @author: renchao
*/
setColumn () {
if (this.column.type) {
this.column.renderHeader = forced[this.column.type].renderHeader
......
......@@ -112,30 +112,14 @@ export default {
},
methods: {
// 单选
/**
* @description: 单选
* @param {*} row
* @author: renchao
*/
singleElection (row) {
this.selected = this.data.indexOf(row);
},
/**
* @description: tableRowClassName
* @param {*} row
* @param {*} rowIndex
* @author: renchao
*/
tableRowClassName ({ row, rowIndex }) {
if (rowIndex % 2 === 1) {
return 'interlaced';
}
},
/**
* @description: getHeight
* @author: renchao
*/
getHeight () {
if (!this.heightNumSetting) {
let _this = this
......@@ -152,12 +136,6 @@ export default {
}
}
},
/**
* @description: calcHeightx
* @param {*} value
* @param {*} wappered
* @author: renchao
*/
calcHeightx (value, wappered = true) {
//项目自定义的公共header部分的高度,可忽略
let header = document.querySelector(".from-clues-header").offsetHeight;
......@@ -177,91 +155,36 @@ export default {
}
return res;
},
/**
* @description: clearSelection
* @author: renchao
*/
clearSelection () {
this.$refs.elTable.clearSelection()
},
/**
* @description: toggleRowSelection
* @param {*} row
* @param {*} selected
* @author: renchao
*/
toggleRowSelection (row, selected) {
this.$refs.elTable.toggleRowSelection(row, selected)
},
/**
* @description: toggleAllSelection
* @author: renchao
*/
toggleAllSelection () {
this.$refs.elTable.toggleAllSelection()
},
/**
* @description: toggleRowExpansion
* @param {*} row
* @param {*} expanded
* @author: renchao
*/
toggleRowExpansion (row, expanded) {
this.$refs.elTable.toggleRowExpansion(row, expanded)
},
/**
* @description: setCurrentRow
* @param {*} row
* @author: renchao
*/
setCurrentRow (row) {
this.$refs.elTable.setCurrentRow(row)
},
/**
* @description: clearSort
* @author: renchao
*/
clearSort () {
this.$refs.elTable.clearSort()
},
/**
* @description: clearFilter
* @param {*} columnKey
* @author: renchao
*/
clearFilter (columnKey) {
this.$refs.elTable.clearFilter(columnKey)
},
/**
* @description: doLayout
* @author: renchao
*/
doLayout () {
this.$refs.elTable.doLayout()
},
/**
* @description: sort
* @param {*} prop
* @param {*} order
* @author: renchao
*/
sort (prop, order) {
this.$refs.elTable.sort(prop, order)
},
/**
* @description: paginationCurrentChange
* @param {*} val
* @author: renchao
*/
paginationCurrentChange (val) {
this.$emit('p-current-change', val)
},
/**
* @description: getMergeArr
* @param {*} tableData
* @param {*} merge
* @author: renchao
*/
getMergeArr (tableData, merge) {
if (!merge) return
this.mergeLine = {}
......@@ -284,14 +207,6 @@ export default {
})
})
},
/**
* @description: mergeMethod
* @param {*} row
* @param {*} column
* @param {*} rowIndex
* @param {*} columnIndex
* @author: renchao
*/
mergeMethod ({ row, column, rowIndex, columnIndex }) {
const index = this.merge.indexOf(column.property)
if (index > -1) {
......