tfp
Version:
A Web UI framework for TaskBuilder
159 lines • 3.65 kB
JavaScript
export default {
"name": "DataCard",
"comment": "数据卡片",
"attrs": [
{
"name": "loadDataService",
"comment": "加载数据服务",
"type": "Service"
},
{
"name": "dataBindingMember",
"comment": "数据绑定成员",
"type": "String"
}
],
"styles": ["size", "position", "background", "border", "margin", "other"],
"defaultStyles": {
"width": "120px",
"height": "120px",
"border": "1px solid #cccccc"
},
"events": [
{
"name": "onBeforeLoadData",
"comment": "加载数据前",
"isNotHtmlEvent": true,
"args": [{
"name": "args",
"type": "Object",
"comment": "请求数据"
}]
}, {
"name": "onAfterLoadData",
"comment": "加载数据后",
"isNotHtmlEvent": true,
"args": [{
"name": "req",
"type": "Object",
"comment": "请求数据"
},{
"name": "res",
"type": "Object",
"comment": "响应数据"
}]
},
{
"name": "onBeforeBindData",
"comment": "绑定数据前",
"isNotHtmlEvent": true,
"args": [{
"name": "data",
"type": "Object",
"comment": "绑定的数据"
}]
},
{
"name": "onAfterBindData",
"comment": "绑定数据后",
"isNotHtmlEvent": true,
"args": [{
"name": "data",
"type": "Object",
"comment": "绑定的数据"
}]
},
{
"name": "onBeforeAddCard",
"comment": "添加卡片前",
"isNotHtmlEvent": true,
"args": [{
"name": "cardData",
"type": "Object",
"comment": "卡片数据"
}]
}, {
"name": "onAfterAddCard",
"comment": "添加卡片后",
"isNotHtmlEvent": true,
"args": [{
"name": "cardData",
"type": "Object",
"comment": "卡片数据"
}]
}, {
"name": "onClick",
"comment": "鼠标点击卡片时",
"isNotHtmlEvent": true,
"args": [{
"name": "cardIndex",
"type": "Int",
"comment": "卡片索引"
},{
"name": "cardData",
"type": "Object",
"comment": "卡片数据"
}]
}, {
"name": "onMouseOver",
"comment": "鼠标经过卡片时",
"isNotHtmlEvent": true,
"args": [{
"name": "cardIndex",
"type": "Int",
"comment": "卡片索引"
},{
"name": "cardData",
"type": "Object",
"comment": "卡片数据"
}]
}, {
"name": "onMouseOut",
"comment": "鼠标移出卡片时",
"isNotHtmlEvent": true,
"args": [{
"name": "cardIndex",
"type": "Int",
"comment": "卡片索引"
},{
"name": "cardData",
"type": "Object",
"comment": "卡片数据"
}]
}
],
"methods": [
{
"name": "add",
"comment": "添加",
"args": [
{
"name": "data",
"comment": "数据",
"type": "Object",
"required": true
}
]
},
{
"name": "remove",
"comment": "删除",
"args": [
{
"name": "index",
"comment": "索引",
"type": "Int",
"required": true
}
]
},
{
"name": "bindData",
"comment": "绑定数据"
},
{
"name": "loadData",
"comment": "加载数据"
}
]
}