API
Component

Blob ($UI/system/components/justep/blob/blob)

使用范围:UI2

Contents

component Blob ($UI/system/components/justep/blob/blob) extends BindComponent

Blob

Constructor Top

  Blob ()
  Blob ( options)

Properties Top

boolean disabled

禁用

string limitSize

上传文件限制大小,支持格式:1024,25B,100KB,390M,34G,单位支持:B、KB、M、G,默认单位是B,不设置标示不限制大小

Attributes Top

string bind-ref

绑定数据,可以指向blob关系,也可以指向引用blob数据的关系

string blobConcept

当bind-ref指向引用时,需要指定blob存放的概念

string blobDataModel

执行获取blob数据action的数据模块

string blobLastModifiedRelation

Blob数据最后修改时间关系,可以控制前段数据的缓存更新

string blobRelation

当bind-ref指向引用时,需要指定blob存放的关系

string class

组件class

boolean disabled

禁用

string limitSize

上传文件限制大小,支持格式:1024,25B,100KB,390M,34G,单位支持:B、KB、M、G,默认单位是B,不设置标示不限制大小

string xid

组件标示

Methods Top

void deleteBlob ()
Object get (String name)
void refresh ()
void set (json arg)

Events Top

void onCreateURL (BlobCreateURLEvent event)
void onDeleteSuccess (ViewEvent event)
void onRefresh (BlobRefreshEvent event)
void onUploadFileSelected (ViewEvent event)
void onUploadStart (ViewEvent event)
void onUploadSuccess (ViewEvent event)

Constructor details Top

public Blob ()

Blob

public Blob ( options)

构造函数

Inherited from ViewComponent

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

Parameters

options

参数选项

Properties Detail Top

public boolean disabled

禁用

public string limitSize

上传文件限制大小,支持格式:1024,25B,100KB,390M,34G,单位支持:B、KB、M、G,默认单位是B,不设置标示不限制大小

Attributes Detail Top

public string bind-ref

绑定数据,可以指向blob关系,也可以指向引用blob数据的关系

public string blobConcept

当bind-ref指向引用时,需要指定blob存放的概念

public string blobDataModel

执行获取blob数据action的数据模块

public string blobLastModifiedRelation

Blob数据最后修改时间关系,可以控制前段数据的缓存更新

public string blobRelation

当bind-ref指向引用时,需要指定blob存放的关系

public string class

组件class

	
		基础样式: x-blob(必须)
	

public boolean disabled

禁用

public string limitSize

上传文件限制大小,支持格式:1024,25B,100KB,390M,34G,单位支持:B、KB、M、G,默认单位是B,不设置标示不限制大小

public string xid

组件标示

Methods Detail Top

public void deleteBlob ()

清除blob数据

Return Value

void

public Object get (String name)

获取属性值

Parameters

String name

属性名称,取值范围:"disabled"、"limitSize"

Return Value

Object

public void refresh ()

刷新blob组件

Return Value

void

public void set (json arg)

设置属性值

Parameters

json arg

属性值对
结构如下:

{ "disabled" : 禁用, "limitSize" : 上传文件限制大小,支持格式:1024,25B,100KB,390M,34G,单位支持:B、KB、M、G,默认单位是B,不设置标示不限制大小 }

Return Value

void

Events Detail Top

public void onCreateURL (BlobCreateURLEvent event)

[回调型事件]生成加载数据URL

Parameters

BlobCreateURLEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 "process" : 执行取blob数据的process,默认使用当前上下文 "activity" : 执行取blob数据的activity,默认使用当前上下文 "action" : 执行取blob数据的action,默认使用blobDownloadAction, "blobDataModel" : 执行取blob数据action的数据模块, "blobRelation" : blob数据存放的关系, "blobLastModified" : blob数据最后修改标记,可以通过此域控制缓存刷新 "blobConcept" : blob数据存放的概念, "blobConceptValue" : blob数据存放的概念的值,用于定位数据 }

Return Value

void

public void onDeleteSuccess (ViewEvent event)

[回调型事件]清除数据成功

Parameters

ViewEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void

public void onRefresh (BlobRefreshEvent event)

[回调型事件]刷新blob数据事件

Parameters

BlobRefreshEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明, "url" : 刷新数据的url }

Return Value

void

public void onUploadFileSelected (ViewEvent event)

[回调型事件]选择文件后,可以接管控制是否能选择文件

Parameters

ViewEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void

public void onUploadStart (ViewEvent event)

[回调型事件]开始提交文件前

Parameters

ViewEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void

public void onUploadSuccess (ViewEvent event)

[回调型事件]提交文件成功

Parameters

ViewEvent event


结构如下:

{ "source" : 组件的js对象, "bindingContext" : 组件绑定的上下文,包含$model、$object等具体请参考bindingContext说明 }

Return Value

void