通过使用文件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
属性。有什么办法可以做到吗?
但我在文档中找不到如何在html
元素上设置属性的信息——我想要设置lang
属性,有什么方法吗?