Remove header and footer support,this is unnecessary
This commit is contained in:
@@ -16,7 +16,7 @@
|
||||
import { Stack } from './layouts'
|
||||
import { Property, Superview, View, NativeViewModel } from '../ui/view'
|
||||
import { layoutConfig } from '../util/index.util'
|
||||
import { BridgeContext } from '../..'
|
||||
import { BridgeContext } from "../runtime/global";
|
||||
|
||||
export class FlowLayoutItem extends Stack {
|
||||
/**
|
||||
@@ -26,7 +26,7 @@ export class FlowLayoutItem extends Stack {
|
||||
identifier?: string
|
||||
/**
|
||||
* When set to true, the item will layout using all span area.
|
||||
* HeaderView, footerView or loadMoreView is always true by default.
|
||||
* LoadMoreView is default to true.
|
||||
*/
|
||||
@Property
|
||||
fullSpan?: boolean
|
||||
@@ -40,12 +40,6 @@ export class FlowLayout extends Superview {
|
||||
if (this.loadMoreView) {
|
||||
ret.push(this.loadMoreView)
|
||||
}
|
||||
if (this.header) {
|
||||
ret.push(this.header)
|
||||
}
|
||||
if (this.footer) {
|
||||
ret.push(this.footer)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -90,11 +84,6 @@ export class FlowLayout extends Superview {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
@Property
|
||||
header?: FlowLayoutItem
|
||||
|
||||
@Property
|
||||
footer?: FlowLayoutItem
|
||||
/**
|
||||
* @param context
|
||||
* @returns Returns the range of the visible views for each column.
|
||||
@@ -132,12 +121,6 @@ export class FlowLayout extends Superview {
|
||||
if (this.loadMoreView) {
|
||||
this.dirtyProps['loadMoreView'] = this.loadMoreView.viewId
|
||||
}
|
||||
if (this.header) {
|
||||
this.dirtyProps['header'] = this.header.viewId
|
||||
}
|
||||
if (this.footer) {
|
||||
this.dirtyProps['footer'] = this.footer.viewId
|
||||
}
|
||||
return super.toModel()
|
||||
}
|
||||
}
|
||||
|
@@ -49,12 +49,6 @@ export class List extends Superview {
|
||||
if (this.loadMoreView) {
|
||||
ret.push(this.loadMoreView)
|
||||
}
|
||||
if (this.header) {
|
||||
ret.push(this.header)
|
||||
}
|
||||
if (this.footer) {
|
||||
ret.push(this.footer)
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
||||
@@ -93,12 +87,6 @@ export class List extends Superview {
|
||||
@Property
|
||||
bounces?: boolean
|
||||
|
||||
@Property
|
||||
header?: ListItem
|
||||
|
||||
@Property
|
||||
footer?: ListItem
|
||||
|
||||
scrollToItem(context: BridgeContext, index: number, config?: { animated?: boolean, }) {
|
||||
const animated = config?.animated
|
||||
return this.nativeChannel(context, 'scrollToItem')({ index, animated, }) as Promise<any>
|
||||
@@ -140,12 +128,6 @@ export class List extends Superview {
|
||||
if (this.loadMoreView) {
|
||||
this.dirtyProps['loadMoreView'] = this.loadMoreView.viewId
|
||||
}
|
||||
if (this.header) {
|
||||
this.dirtyProps['header'] = this.header.viewId
|
||||
}
|
||||
if (this.footer) {
|
||||
this.dirtyProps['footer'] = this.footer.viewId
|
||||
}
|
||||
return super.toModel()
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user