Yao 38f91f4893
[improvement] Field: 新增 Form 支持 (#75)
* feat: field 增加 form 支持 && field 增加 focus blur 支持

* 增加文档说明

* 优化 field 文档
2017-12-10 00:15:05 +08:00

11 lines
268 B
JavaScript

// 从事件对象中解析得到 componentId
// 需要在元素上声明 data-component-id
function extractComponentId(event = {}) {
const { dataset: { componentId } } = event.currentTarget || {};
return componentId;
}
module.exports = {
extractComponentId
};