ADD scTableColumn 组件
This commit is contained in:
parent
7bd5bdd735
commit
bb4cd23314
|
@ -0,0 +1,23 @@
|
||||||
|
import { h, resolveComponent } from 'vue'
|
||||||
|
|
||||||
|
export default {
|
||||||
|
render() {
|
||||||
|
return h (
|
||||||
|
resolveComponent("el-table-column"),
|
||||||
|
{
|
||||||
|
index: this.index,
|
||||||
|
...this.$attrs
|
||||||
|
},
|
||||||
|
this.$slots
|
||||||
|
)
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
index(index){
|
||||||
|
if(this.$attrs.type=="index"){
|
||||||
|
let page = this.$parent.$parent.currentPage
|
||||||
|
let pageSize = this.$parent.$parent.pageSize
|
||||||
|
return (page - 1) * pageSize + index + 1
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
|
@ -5,6 +5,7 @@ import http from "./utils/request"
|
||||||
import { permission, rolePermission } from './utils/permission'
|
import { permission, rolePermission } from './utils/permission'
|
||||||
|
|
||||||
import scTable from './components/scTable'
|
import scTable from './components/scTable'
|
||||||
|
import scTableColumn from './components/scTable/column.js'
|
||||||
import scFilterBar from './components/scFilterBar'
|
import scFilterBar from './components/scFilterBar'
|
||||||
import scUpload from './components/scUpload'
|
import scUpload from './components/scUpload'
|
||||||
import scUploadMultiple from './components/scUpload/multiple'
|
import scUploadMultiple from './components/scUpload/multiple'
|
||||||
|
@ -43,6 +44,7 @@ export default {
|
||||||
|
|
||||||
//注册全局组件
|
//注册全局组件
|
||||||
app.component('scTable', scTable);
|
app.component('scTable', scTable);
|
||||||
|
app.component('scTableColumn', scTableColumn);
|
||||||
app.component('scFilterBar', scFilterBar);
|
app.component('scFilterBar', scFilterBar);
|
||||||
app.component('scUpload', scUpload);
|
app.component('scUpload', scUpload);
|
||||||
app.component('scUploadMultiple', scUploadMultiple);
|
app.component('scUploadMultiple', scUploadMultiple);
|
||||||
|
|
Loading…
Reference in New Issue