-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Access instance Vue using this #37
Comments
That's a very, very good question and something I never thought about. Unfortunately, it's not possible at the moment since The only workaround at the moment would be something like this: <script>
import VueCommand from 'vue-command'
import 'vue-command/dist/vue-command.css'
const fn = pokemon => pokemon === 'pikachu' ? 'yellow' : `Usage: pokedex pokemon [option]<br><br>
Example: pokedex pikachu --color
`
export default {
components: {
VueCommand
},
data: () => ({
commands: {
pokedex: ({ color, _ }) => {
return fn(_[1])
}
}
})
}
</script> That means your logic is independent from the instance. If you have an idea how to get access I'm happy for a contribution. |
I tried to find some method to access the instance but I did not succeed, could you inform me if you will try to update the code for this behavior? I had a really cool idea to use with this terminal :( |
I think it won't be possible because the Why isn't it possible for you to extract the logic from the instance? |
Yeah, that's indeed reasonable. I'm sorry there is no way at the moment :( |
I'll create an issue for this case. |
How do I access an instance of the vue?
The text was updated successfully, but these errors were encountered: