35 lines
787 B
Plaintext
Raw Normal View History

2025-09-23 16:46:30 +08:00
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%" })
}
}