mirror of
https://github.com/tenrok/vue-meta.git
synced 2026-06-18 23:10:33 +03:00
feat: append tag into body
This commit is contained in:
@@ -10,9 +10,10 @@ export default function _tagGenerator (options = {}) {
|
||||
*/
|
||||
return function tagGenerator (type, tags) {
|
||||
return {
|
||||
text () {
|
||||
text ({inBody = false} = {}) {
|
||||
// build a string containing all tags of this type
|
||||
return tags.reduce((tagsStr, tag) => {
|
||||
if (!!tag.inBody !== inBody) return tagsStr
|
||||
// build a string containing all attributes of this tag
|
||||
const attrs = Object.keys(tag).reduce((attrsStr, attr) => {
|
||||
switch (attr) {
|
||||
|
||||
Reference in New Issue
Block a user