65 questions
0
votes
1
answer
2k
views
How to extend/use mixin in Vue 3 composition API with script setup
I am using Composition API with <script setup> in one component (ComponentA.vue) and want to extend a mixin (Greeting.ts) inside Component A.
Problem statement : When I am trying to access ...
2
votes
2
answers
1k
views
Error: [Vue warn]: Invalid handler for event "click": got undefined
I'm using Vue 2 (class syntax) and Typescript (TSX syntax) and I know this question has been asked a few times but none of the answers I've seen have applied to my own situation.
I've created an ...
2
votes
1
answer
2k
views
Vue 3 template ref in composable
I want to switch from Options API to Composition API and use composables in place of mixin. So far I've been using a global mixin with computed property like this:
// globalMixin.js
computed: {
...
0
votes
1
answer
846
views
migrating from global mixins in vue2 to global composables in vue3
I"m porting my new app from vue2 to vue3. Since mixins are not recommended way of reusing code in vue3, Im trying to convert them into composable.
I've 2 mixins (methods) __(key) and __n(key, ...
0
votes
0
answers
170
views
Can I use mixin with an external module in my vuejs project?
I have used mixin vue within my vue project and it worked pretty well. But, is there a way to use mixin with a external module? I would like to use a sepecfic component that is inside that module in ...
0
votes
1
answer
2k
views
Uncaught TypeError: Cannot read properties of undefined (reading 'mixin') Vue 3
I'm trying to integrate commerce.js in vue 3 ... I have an error when I try to integrate commerce as a global plugin
enter image description here
In my browser i have a wite screen with this message ...
0
votes
1
answer
1k
views
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:
...
-1
votes
1
answer
232
views
root element is undefined while pagination
I ma using element ui el-pagination like this
<el-pagination
@size-change="handleChange"
@current-change="CurrentChange"
:current-page.sync="...
1
vote
0
answers
2k
views
Inheritance in Vue3 + Typescript Class Components
I have a App.vue. I have a Component A in App.Vue. Now i also have a Base Class B and Class A should inherit properties from B. I am using Vue3 + Typescript in my project. When i am using simply ...
2
votes
1
answer
2k
views
vue3 typescript component can't call method in global mixin
I've been struggling with this for about a week now, so if anyone knows, I'd be grateful if you could help.
I have been converting vue2-based code to vue3 as a new project.
I do not use the coposition ...
1
vote
0
answers
533
views
Vue 2 global mixin not working only in App.vue
I have a Global mixin that works everywhere except in the App.vue.This mixin is supposed to load a Yaml config file and make it available everywhere.
So the question is ¿why it doesn't work only in ...
1
vote
0
answers
105
views
Vue2 Mixins in Repeated Components
I have a Vue component that displays information for a log entry. On my page, I have a for loop that instantiates this component for each log entry. I could have anywhere from 0 - potentially 100+ ...
1
vote
1
answer
686
views
vuejs place global mixin into seperate file
i would like to create a global mixin that is in a seperate file. all the tutorial i have seen online always place the mixin into the same file, or don't explain how to import another file.
mixins don'...
0
votes
1
answer
1k
views
Mixin that uses component properties (Vue 2, TypeScript)
I have Vue + TypeScript project, we are using Vue class components. One of component's methods was moved to separate mixin. That mixin uses component's properties. To prevent TypeScript's complaining ...
0
votes
1
answer
1k
views
Reinit Vue3 composable function on route change, using nuxt-composition-api
I have a route with dynamic id, for example post/:postId and composable function which contains a lot of methods and functions.
when I go from route post/1 to post/2 composable doesn't updated and I ...