How to use a Vue variable in metaInfo?
问题 What is the correct syntax for this line Vue inside the script: export default { metaInfo: { title: "{product.name} wallpaper", The line came to the form: title: "Space wallpaper", product.name I get it in api: mounted() { let vm = this vm.getProducts(); }, methods: { getProducts() { let vm = this axios.get('/api/products') .then(function(response) { vm.products = response.data.data }) 回答1: Template literals use backticks and a dollar sign before the braces, e.g.: title: `${product.name}