【发布时间】:2018-06-22 15:16:55
【问题描述】:
使用文件nuxt.config.js文件,head内容可以自定义添加一些元,或其他东西:
module.exports = {
/*
** Headers of the page
*/
head: {
title: 'awesome title',
meta: [
{ charset: 'utf-8' },
{ name: 'viewport', content: 'width=device-width, initial-scale=1' },
{ hid: 'description', name: 'description', content: 'Nuxt.js project' }
],
link: [
{ rel: 'icon', type: 'image/x-icon', href: '/favicon.ico' }
]
},
...
}
但我在文档中找不到任何内容来设置html 元素的属性——我想设置lang 属性。有没有办法做到这一点?
【问题讨论】:
-
@yuriy636 成功了。你能把它作为一个答案让我接受吗?
标签: javascript html vue.js nuxt.js vue-meta