js: padding currently only support group or text,input
This commit is contained in:
@@ -127,14 +127,6 @@ export abstract class View implements Modeling {
|
||||
|
||||
viewId = uniqueId('ViewId')
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
@Property
|
||||
layoutConfig?: LayoutConfig
|
||||
|
||||
@@ -483,6 +475,14 @@ export type ViewFragment = View | ViewArray | undefined | null
|
||||
|
||||
export abstract class Group extends Superview {
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
readonly children: View[] = []
|
||||
|
||||
allSubviews() {
|
||||
|
@@ -111,13 +111,6 @@ export abstract class View implements Modeling {
|
||||
|
||||
tag?: string
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
@Property
|
||||
layoutConfig?: LayoutConfig
|
||||
@@ -508,6 +501,14 @@ export type ViewFragment = View | ViewArray | undefined | null
|
||||
|
||||
export abstract class Group extends Superview implements JSX.ElementChildrenAttribute {
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
readonly children: View[] = new Proxy([], {
|
||||
set: (target, index, value) => {
|
||||
const ret = Reflect.set(target, index, value)
|
||||
|
@@ -104,6 +104,14 @@ export class Input extends View {
|
||||
replacement: string,
|
||||
}) => boolean
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
getText(context: BridgeContext) {
|
||||
return this.nativeChannel(context, 'getText')() as Promise<string>
|
||||
}
|
||||
|
@@ -69,6 +69,14 @@ export class Text extends View implements JSX.ElementChildrenAttribute {
|
||||
@Property
|
||||
truncateAt?: TruncateAt
|
||||
|
||||
@Property
|
||||
padding?: {
|
||||
left?: number,
|
||||
right?: number,
|
||||
top?: number,
|
||||
bottom?: number,
|
||||
}
|
||||
|
||||
set innerElement(e: string) {
|
||||
this.text = e
|
||||
}
|
||||
|
Reference in New Issue
Block a user