mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
chore: cleanup
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/**
|
||||
* View that can host another view.
|
||||
* @module "ui/content-view"
|
||||
*/ /** */
|
||||
|
||||
import { View, AddChildFromBuilder } from "../core/view";
|
||||
|
||||
export * from "../core/view";
|
||||
|
||||
/**
|
||||
* Represents a View that has a single child - content.
|
||||
* The View itself does not have visual representation and serves as a placeholder for its content in the logical tree.
|
||||
*/
|
||||
export class ContentView extends View implements AddChildFromBuilder {
|
||||
/**
|
||||
* Gets or sets the single child of the view.
|
||||
*/
|
||||
content: View;
|
||||
|
||||
//@private
|
||||
/**
|
||||
* Called when the content property has changed.
|
||||
* @private
|
||||
* @param oldView The previous content.
|
||||
* @param newView The new content.
|
||||
*/
|
||||
_onContentChanged(oldView: View, newView: View);
|
||||
//@endprivate
|
||||
|
||||
_addChildFromBuilder(name: string, value: any): void;
|
||||
|
||||
layoutView: View;
|
||||
}
|
||||
@@ -1,9 +1,18 @@
|
||||
import { ContentView as ContentViewDefinition } from ".";
|
||||
import { View, CustomLayoutView, AddChildFromBuilder, layout, isIOS } from "../core/view";
|
||||
import { View, CustomLayoutView, AddChildFromBuilder } from "../core/view";
|
||||
import { layout } from "../../utils/utils";
|
||||
import { isIOS } from "../../platform";
|
||||
import { ContentView as ContentViewDefinition } from ".";
|
||||
|
||||
/**
|
||||
* Represents a View that has a single child - content.
|
||||
* The View itself does not have visual representation and serves as a placeholder for its content in the logical tree.
|
||||
*/
|
||||
export class ContentView extends CustomLayoutView implements ContentViewDefinition, AddChildFromBuilder {
|
||||
private _content: View;
|
||||
|
||||
/**
|
||||
* Gets or sets the single child of the view.
|
||||
*/
|
||||
get content(): View {
|
||||
return this._content;
|
||||
}
|
||||
@@ -47,6 +56,13 @@ export class ContentView extends CustomLayoutView implements ContentViewDefiniti
|
||||
return this._content ? 1 : 0;
|
||||
}
|
||||
|
||||
//@private
|
||||
/**
|
||||
* Called when the content property has changed.
|
||||
* @private
|
||||
* @param oldView The previous content.
|
||||
* @param newView The new content.
|
||||
*/
|
||||
public _onContentChanged(oldView: View, newView: View) {
|
||||
//
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
{
|
||||
"name": "content-view",
|
||||
"main": "content-view",
|
||||
"types": "content-view.d.ts"
|
||||
}
|
||||
Reference in New Issue
Block a user