vue-directives Questions

3

I would like to ask a question about Vue's custom directives. As a fan of Typescript, I want to use this feature with type support, yet I could not find any solutions neither on the web nor on the ...
Overlie asked 19/2, 2022 at 12:5

4

Solved

I am new to Vue Framework. My requirement is to add money currency formatting in an input box. Formatting: I need to add a decimal with two zeros on focus out and remove zero at focus in. The v-mo...
Lambdacism asked 6/5, 2019 at 14:57

6

I'm learning Vue with an online course and the instructor gave me an exercise to make an input text with a default value. I completed it using v-model but, the instructor chose v-bind:value, and I ...
Bellabelladonna asked 15/2, 2017 at 21:17

3

Solved

I'm writing a custom directive in vue. I want it to work like v-if but it will have a little logic going inside it. Let me explain with an example: <button v-permission="PermissionFoo">Do F...
Cannabis asked 24/3, 2017 at 15:54

5

What's the best way to implement text-character restrictions in Vue JS ? I am looking to achieve with RegExp so that the user will not be allowed to type the symbols in the field.
Justino asked 28/5, 2018 at 12:26

4

I have multiple parameters in url. I am adding new parameter in url with following code: this.$router.push({query: Object.assign({}, this.$route.query, {cities: '1,45'})}); But when I unselect ci...
Threnody asked 9/2, 2018 at 7:17

4

Solved

The questions should be enough clear. But I can see that someone use: <button @click="function()">press</button> Someone use: <button v-on:click="function()">...
Arsenal asked 28/7, 2017 at 9:17

4

Solved

Based on this question Detect click outside element and this answer https://stackoverflow.com/a/42389266, I'm trying to migrate the directive from Vue 2 to Vue 3. It seems that binding.expression a...
Marital asked 13/9, 2020 at 10:47

2

Solved

In Vue.js, if you want to conditionally render multiple elements via a v-if/v-else-if directive you can wrap them inside <template> tags and apply the directive to the <template> tag, a...
Shafer asked 24/8, 2018 at 0:5

4

Solved

I am trying to make a reuseable vue radio-button component that will take a variable name, and an object containing labels and values, then render a list of radio buttons using v-for. I have had ...
Bugg asked 28/10, 2019 at 12:42

4

Solved

I'm developing an app that has different license types, and according to the license we need to disable/enable inputs. One way is to put a conditional :disabled for each input but that's a lot of ...
Diphenylhydantoin asked 29/4, 2019 at 14:4

1

Solved

Hey there, I have some elements with the same custom directive but different values in my page. I want to get all elements with that directive to process on them. When I use this code: Vue.directiv...
Dafodil asked 9/10, 2018 at 21:47

2

What do $v and $event denote in Vue.Js? What and in which situations do we use these. Please elaborate in detail with examples too.
Perlis asked 15/1, 2018 at 12:6

2

Solved

Background I created a custom directive (to detect clicks outside of an element) by following this guide: https://tahazsh.com/detect-outside-click-in-vue. Element: <button id='burger' ref='...
Isley asked 6/12, 2019 at 11:27

3

Solved

I am building a weather app with this Weather API. I am trying to add an <input> field value that when it changes the city name, then updates the other values forecast. I have created the &lt...
Rothberg asked 11/6, 2019 at 15:7

2

Solved

I have a button, user can click the button more than one time if he want. But when the user click the button, he might accidentally click twice, in such cases second click should be blocked b...
Jetta asked 13/2, 2019 at 4:4

1

I am trying to implement https://github.com/jackocnr/intl-tel-input with vuejs2. If I add inside one jQuerydocument.ready, $('#phone').intlTelInput({ options...}) Everything works as expected but...
Fulgurating asked 14/3, 2017 at 17:41

1

Solved

I need to $emit an event from a custom directive. Is it possible? directive.js: vnode.context.$emit("myEvent") // nothing append vnode.child.$emit("myEvent") // error vnode.parent.$emit("myEvent...
Harassed asked 13/3, 2018 at 19:29

2

Solved

I'm new to vuejs. I'm trying to create my first app. I would like to show a confirm message on every click on buttons. Example: <button class="btn btn-danger" v-on:click="reject(proposal)">...
Toxin asked 25/7, 2017 at 15:6

1

Solved

Please look at the code below. The first select box is created with chosen js. When changed it should propagate its changed value to the model to which its bound (cityid). The second normal select ...
Octavie asked 31/5, 2017 at 13:21
1

© 2022 - 2024 — McMap. All rights reserved.