hid -> data-hid

This commit is contained in:
Pooya Parsa 2017-08-19 13:22:39 +04:30
parent a078a631eb
commit 80db40fc1f

View File

@ -158,7 +158,14 @@ export function attrsStr (attrObj = {}, exclude = []) {
if (typeof attrObj[attr] !== 'string') { if (typeof attrObj[attr] !== 'string') {
return attr return attr
} }
return `${attr}="${attrObj[attr].replace('"', '\'')}"`
const val = attrObj[attr].replace('"', '\'')
if (attr === 'hid') {
attr = 'data-hid'
}
return `${attr}="${val}"`
}).join(' ') }).join(' ')
} }