35 lines
787 B
Plaintext
35 lines
787 B
Plaintext
|
|
import { Body } from './components/Body'
|
||
|
|
import { Header } from './components/Header'
|
||
|
|
import { Pagination } from './components/Pagination'
|
||
|
|
import { Column } from './components/Types'
|
||
|
|
|
||
|
|
export { Column }
|
||
|
|
|
||
|
|
@Component
|
||
|
|
export struct Table {
|
||
|
|
@Prop @Watch("setupColumn") column: Array<Column> = []
|
||
|
|
@Provide("column") selfColumn: Array<Column> = []
|
||
|
|
@Prop @Watch("setupData") data: Array<object> = []
|
||
|
|
@Provide("data") selfData: Array<object> = []
|
||
|
|
|
||
|
|
aboutToAppear(): void {
|
||
|
|
this.selfColumn = this.column
|
||
|
|
this.selfData = this.data
|
||
|
|
}
|
||
|
|
|
||
|
|
setupColumn() {
|
||
|
|
this.selfColumn = this.column
|
||
|
|
}
|
||
|
|
|
||
|
|
setupData() {
|
||
|
|
this.selfData = this.data
|
||
|
|
}
|
||
|
|
|
||
|
|
build() {
|
||
|
|
Column() {
|
||
|
|
Header()
|
||
|
|
Body()
|
||
|
|
Pagination()
|
||
|
|
}.width("100%").constraintSize({ maxHeight: "100%" })
|
||
|
|
}
|
||
|
|
}
|