Component is missing template or render function I use the lib vue3-colorpicker. I have this error: component is missing template or render function. I try to use as simple as is it.
My usage:
<template>
<ColorPicker v-model:pureColor="pureColor" />
</template>
<script setup>
import { ref } from 'vue'
import ColorPicker from "vue3-colorpicker"
import "vue3-colorpicker/style.css"
const pureColor = ref('red')
</script>
It looks like you are missing the render function in your component. The render function is used to render the component's template. You can add the render function to your component like this:
<script setup>
import { ref } from 'vue'
import ColorPicker from "vue3-colorpicker"
import "vue3-colorpicker/style.css"
const pureColor = ref('red')
export default {
render() {
return (
<template>
<ColorPicker v-model:pureColor="pureColor" />
</template>
)
}
}
</script>
Sorry for that but It need to wrap with brackets to work
import { ColorPicker } from 'vue3-colorpicker'
Please sign in or create an account to participate in this conversation.