First, create a element in template:

<div v-html="'<style>'+styleText+'</style>'"></div>

Then change the value of styleText:

styleText: `
body {
  background: #ffe4c4;
}
`.trim()

The style will update if the value of styleText changed. The style will also be removed after the component unmounted.