Quasar v2 Meta plugin reactive meta props
-
Hi,
I create a brand new Quasar app v2.0.0-beta.9 with Meta plugin.
I followed the Reactive example for 2 simple pages: index.vue and test. vue.
Here there are the relevant script part for each page:- index. vue
setup() {
const title = ref(“First page”); // we define the “title” prop
const myDescription = ref({
name: “description”,
content: “First page quasar app”,
});
useMeta(() => {
return {
// whenever “title” from above changes, your meta will automatically update
title: title.value,
meta: {
myKey: myDescription.value,
},
};
});
return {};
},- test.vue:
setup() {
const title = ref(“Test”); // we define the “title” prop
const myDescription = ref({
name: “description”,
content:
“Second page quasar app”,
});
useMeta(() => {
return {
title: title.value,
meta: {
myKey: myDescription.value,
},
};
});
return {};
},The result is the title meta prop is always updated, but the description meta prop is not updated. Instead, it is added a new meta prop with the same name description like this:
<meta name=“description” content=“A Quasar Framework app”>
<meta name=“description” content=“First page quasar app” data-qmeta=“myKey”>
Is this correct? I expected to be just one meta prop with the same name.
Thank you very much for any help.