how to dynamically assign the head title in vue?

I wanted that when the openAddMenu method was called, the title in nuxt.config.js would be dynamically changed with the value “newTitle”.

Sidebar.vue

methods: {
         openAppMenu(itemIndex) {
              const newTitle = this.menuItems[itemIndex].title;
         },
}

nuxt.config.js

head: {
    title: 'XYZ', // this title
    meta: [
        {charset: 'utf-8'},
        {name: 'viewport', content: 'width=device-width, initial-scale=1'},
        {hid: 'description', name: 'description', content: pkg.description}
    ],
    link: [
        {rel: 'icon', type: 'image/x-icon', href: '/favicon.ico'}
    ]
},