mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-22 02:50:34 +03:00
generate valid HTML on server-side
This commit is contained in:
@@ -21,9 +21,11 @@ export default function _tagGenerator (options = {}) {
|
|||||||
case 'cssText':
|
case 'cssText':
|
||||||
case 'once':
|
case 'once':
|
||||||
return attrsStr
|
return attrsStr
|
||||||
|
|
||||||
// these form the attribute list for this tag
|
// these form the attribute list for this tag
|
||||||
default:
|
default:
|
||||||
|
if (attr === options.tagIDKeyName) {
|
||||||
|
return `${attrsStr} data-${attr}="${tag[attr]}"`
|
||||||
|
}
|
||||||
return typeof tag[attr] === 'undefined'
|
return typeof tag[attr] === 'undefined'
|
||||||
? `${attrsStr} ${attr}`
|
? `${attrsStr} ${attr}`
|
||||||
: `${attrsStr} ${attr}="${tag[attr]}"`
|
: `${attrsStr} ${attr}="${tag[attr]}"`
|
||||||
|
|||||||
Reference in New Issue
Block a user