API
Component

Wing ($UI/system/components/justep/wing/wing)

使用范围:UI2

Contents

component Wing ($UI/system/components/justep/wing/wing) extends ViewComponent

<b>可实现左右滑动打开侧边栏的效果</b> ## <b>文档链接</b>:#http://docs.newdao.net/app/zuo-you-bian-lan.html#

	
	

Constructor Top

  Wing ()
  Wing ( options)

Properties Top

boolean animate

是否使用滑动动画

boolean dismissible

点击content区域是否隐藏边栏

string display

边栏展示方式, 默认值"overlay", "push"或"reveal"

Boolean leftOpened

左打开

Boolean rightOpened

右打开

Attributes Top

boolean animate

是否使用滑动动画

boolean dismissible

点击content区域是否隐藏边栏

string display

边栏展示方式, 默认值"overlay", "push"或"reveal"

boolean routable

是否启动路由

string xid

Methods Top

get (string name)
integer getSize (string name)
void hide (string name)
void hideLeft (function fn)
void hideRight (Function fn)
void set (json arg)
void setSize (string name, integer value)
void show (string name)
void showLeft (Function fn)
void showRight (Function fn)
void toggleLeft ()
void toggleRight ()

Operations Top

void toggleLeft ()
void toggleRight ()

Constructor details Top

public Wing ()

<b>可实现左右滑动打开侧边栏的效果</b> ## <b>文档链接</b>:#http://docs.newdao.net/app/zuo-you-bian-lan.html#

	
	

public Wing ( options)

构造函数

Inherited from ViewComponent

	
		参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
	 

Parameters

options

参数选项

Properties Detail Top

public boolean animate

是否使用滑动动画

public boolean dismissible

点击content区域是否隐藏边栏

public string display

边栏展示方式, 默认值"overlay", "push"或"reveal"

public Boolean leftOpened

左打开

public Boolean rightOpened

右打开

Attributes Detail Top

public boolean animate

是否使用滑动动画

public boolean dismissible

点击content区域是否隐藏边栏

public string display

边栏展示方式, 默认值"overlay", "push"或"reveal"

public boolean routable

是否启动路由

public string xid

Methods Detail Top

public get (string name)

获取Wing的属性

Parameters

string name

属性名, 值范围: "animate", "display", "dismissible"

Return Value

返回属性值

public integer getSize (string name)

获取侧边栏的宽度

Parameters

string name

"left"或"right"

Return Value

integer

public void hide (string name)

隐藏区域

Parameters

string name

"left"或者"right"

Return Value

void

public void hideLeft (function fn)

隐藏左边栏区域

Parameters

function fn

显示后执行回调方法

Return Value

void

public void hideRight (Function fn)

隐藏右边栏区域

Parameters

Function fn

显示后执行回调方法

Return Value

void

public void set (json arg)

设置Wing的属性

Parameters

json arg

属性值对
结构如下:

{ "animate" : 是否使用滑动动画 "display" : 边栏展示方式, 默认值"overlay", "push"或"reveal" "dismissible" : 点击content区域是否隐藏边栏 }

Return Value

void

public void setSize (string name, integer value)

设置侧边栏的宽度

Parameters

string name

"left"或"right"

integer value

Return Value

void

public void show (string name)

显示区域

Parameters

string name

"content" "left"或者"right"

Return Value

void

public void showLeft (Function fn)

显示左边栏区域

Parameters

Function fn

显示后执行回调方法

Return Value

void

public void showRight (Function fn)

显示右边栏区域

Parameters

Function fn

显示后执行回调方法

Return Value

void

public void toggleLeft ()

切换左边区域显示或隐藏

Return Value

void

public void toggleRight ()

切换右边区域显示或隐藏

Return Value

void

Operations Detail Top

public void toggleLeft ()

切换左侧区域显示或隐藏

See ToggleLeft

Return Value

void

public void toggleRight ()

切换右侧区域显示或隐藏

See ToggleRight

Return Value

void