使用范围:UI2
Contents
component Contents ($UI/system/components/justep/contents/contents) extends ViewComponent
Constructor Top
Contents () | |||
Contents ( options) |
Properties Top
Boolean |
EOF
是否已经到最后 | ||
boolean |
slidable
是否采用滑动动画 | ||
boolean |
swipe
是否支持手势,如果想同时支持内部横向滚动内容还能滚动需要在滚动区域加class(x-scroll-h) | ||
boolean |
wrap
是否可循环切换 |
Attributes Top
integer |
active
当前content的索引 | ||
boolean |
routable
是否开启路由 | ||
boolean |
slidable
是否采用滑动动画 | ||
boolean |
swipe
是否支持手势,如果想同时支持内部横向滚动内容还能滚动需要在滚动区域加class(x-scroll-h) | ||
boolean |
wrap
是否可循环切换 | ||
string | xid |
Methods Top
Content | add (object content配置) | |
get (String name) | ||
getActiveIndex () | ||
String | getActiveXid () | |
Content | getContent (String xid) | |
getIndexByXid (string xid) | ||
Integer | getLength () | |
boolean | hasNext () | |
void | next (Function chengedCallback) | |
void | prev (Function chengedCallback) | |
void | remove (integer index, integer to) | |
void | set (json arg) | |
void | slide (string transDir, integer transIdx, function fn) | |
void | to (String 目标页xid, Function chengedCallback) |
Operations Top
next () | ||
prev () | ||
to (String 目标页xid) |
Events Top
void | onActiveChange (ContentsActiveEvent event) |
Constructor details
Top
public
Contents
()
使用场景:可实现左右滑动打开不同内容页的效果(常与导航栏或按钮组搭配实现页面切换效果;
使用方法:内容页支持自定义设计,也支持通过内嵌组件内嵌其他页面;
##
文档链接:#http://docs.newdao.net/app/zuo-you-hua-kuai.html#
public
Contents
( options)
构造函数
Inherited from ViewComponent
参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
public
Contents
()
public
Contents
( options)
构造函数
Inherited from ViewComponent
参数options格式类似{parent:xx, config:{}},parent是组件的父节点,允许为空或不指定,config是组件的参数选项
Properties Detail Top
public
Boolean
EOF
是否已经到最后
public
boolean
slidable
是否采用滑动动画
public
boolean
swipe
是否支持手势,如果想同时支持内部横向滚动内容还能滚动需要在滚动区域加class(x-scroll-h)
public
boolean
wrap
是否可循环切换
Attributes Detail Top
public
integer
active
当前content的索引
public
boolean
routable
是否开启路由
public
boolean
slidable
是否采用滑动动画
public
boolean
swipe
是否支持手势,如果想同时支持内部横向滚动内容还能滚动需要在滚动区域加class(x-scroll-h)
public
boolean
wrap
是否可循环切换
public
string
xid
Methods Detail Top
public
Content
add
(object content配置)
添加一个content
public
get
(String name)
获取contents的属性
public
getActiveIndex
()
获取当前active索引
public
String
getActiveXid
()
获取当前激活content的xid
public
Content
getContent
(String xid)
通过xid获取content
public
getIndexByXid
(string xid)
通过content的xid获取索引
public
Integer
getLength
()
获得content个数
public
boolean
hasNext
()
是否有下一个
public
void
next
(Function chengedCallback)
切换下一页
public
void
prev
(Function chengedCallback)
切换到前一个content
public
void
remove
(integer index, integer to)
删除一个content
public
void
set
(json arg)
设置contents的属性
public
void
slide
(string transDir, integer transIdx, function fn)
切换到指定content, 同时可以指定切换的方向
public
void
to
(String 目标页xid, Function chengedCallback)
切换到指定的content
Operations Detail Top
public
next
()
切换下一页
public
prev
()
切换到前一个content
public
to
(String 目标页xid)
切换到指定的content
Events Detail Top
[回调型事件]当active改变时触发