Under certain conditions, move the position of the v-text-field text
P粉041856955
2023-08-28 21:40:26
<p>I'm using Vue.js and Vuetify. Encountered an interesting scene.
So I have three options (radio buttons)</p>
<ul>
<li>left</li>
<li>中</li>
<li>right</li>
</ul>
<p>I have a v-text-field with a specific text value and a read-only attribute.
Now, when the option changes/selects, I want to change the position of that text within the v-text-field. </p>
<p>For example, when option 1 (left), the text should be moved to the left within the v-text-field. When option 2 (middle) is used, the text should move to the middle. So on and so forth. </p>
<p>Any suggestions on this. If there is a better way, please guide me. </p>
You can use class or style binding in Vue
Then bind
activeAlignment
to your radio button modelYou can create classes and bind them: