我正在使用以下内容:
var link = {};
link.action = $link.attr('data-action') || '';
link.dialogType = $link.attr('data-dialogType') || '';
link.params = $link.attr('data-params') || '';
link.title = $link.attr('title') || '';
link.viewURL = $link.attr('data-href') || '';
link.entity = $link.attr('data-entity') || '';
link.row = $link.attr('data-row');
但是有没有更好的方法来做到这一点?