Questions tagged [vue-render-function]
42 questions
0
votes
1 answer
global mixin not called in vue3 using render function
I want to use a global mixin in vue3.
Using the mixin property - mixin:[mixinName] in createApp does not work.
Using the method .mixin(mixinName) will work.
What is the difference?
Not working:
return createApp({
mixins: [utilsMixin],
…

user3046913
- 83
- 1
- 1
- 8
0
votes
1 answer
How to make the loop (v-for) dynamic inside h (Vue.JS) function?
I have a reactive variable list either ref or reactive
in a vue.Js project
and i create an app that depends on this list(reactive)
let list = ref(['item']);
let vNode = h(
'ul',
list.value.map((v, i) => { return h('li', { key: i }, v)…

mod7ex
- 874
- 9
- 27
0
votes
2 answers
Vue.js remove contenteditable attribute in render function
it seems should be a simple solution but something went wrong...
I need to conditionally remove contenteditable attribute from element:
I've tried:
data() {
…

Kuzzy
- 562
- 1
- 9
- 24
0
votes
2 answers
Vue render function: include slots to child component without wrapper
I'm trying to make a functional component that renders a component or another depending on a prop.
One of the output has to be a component, and I want to pass it down all its slots / props, like if we called it directly.

Kapcash
- 6,377
- 2
- 18
- 40
0
votes
1 answer
Wrapping dynamically added child elements in my slot
If i have a component with a single slot and instead of just rendering all of it's children I want to wrap each element, I do something like this:
Vue.component('MyElement', {
render: function(createElement){
for (let i = 0; i <…

Steven Yates
- 2,400
- 3
- 30
- 58
0
votes
1 answer
Vue Composition Api render function sync emit doesn't work
I wanted to refactor the code from this tutorial about render functions to use Composition API. Everything is working fine except context.emit("update:activeTabId", tab.props.tabId); line in onClick function. Console logging the tab.props.tabId…

bukacz
- 25
- 6
0
votes
1 answer
How to wrap the slot in a scoped slot at runtime
I have an very unusual scenario.
The WrapperComponent should manage all instances of the InnerComponent. However I don't know what will be compiled into the…

Patrick
- 29
- 1
- 6
0
votes
2 answers
Render Functions and Recursive Components in Vue
I am having some trouble grasping my head around recursive components and I believe for what I am trying to accomplish, this may be the best way of doing so. Here is a Fiddle of where I am at so far, will explain…

Solankill
- 3
- 2
- 7
0
votes
2 answers
Hide-Show N divs with Vuejs and @click [beginner]
I am confused on how to hide and show 3 divs according to the click.
I have been able to show and hide 2 divs with v-show but v-show does not apply I think for more than 2 divs.
This is my code without vuejs, because I don't understand how to render…

suhkha
- 571
- 1
- 7
- 17
0
votes
1 answer
How do I inject data from the server into a Vue CLI app?
I have a Vue CLI app that I want to connect to a server back-end.
The server will return a view template with a data payload, and I want to inject that payload as JSON into the Vue app as a data property.
The index.html file generated by Vue CLI…

HartleySan
- 7,404
- 14
- 66
- 119
0
votes
2 answers
VUE Insert the component inside the array list
I have an array. Inside that array I need to display the random component.
In my case it's FeedbackComponent. It should be displayed before the last two objects in array.
So it should be something like this schematically:
storyObject storyObject…
0
votes
0 answers
"nativeOn" vs. "on" in the render function & JSX
In the Vue documentation at https://v2.vuejs.org/v2/guide/render-function.html#The-Data-Object-In-Depth there is an explanation for “on” and “nativeOn”:
// Event handlers are nested under `on`, though
// modifiers such as in `v-on:keyup.enter` are…

Bryan Miller
- 3,262
- 4
- 27
- 51