No More Posting New Topics!

If you have a question or an issue, please start a thread in our Github Discussions Forum.
This forum is closed for new threads/ topics.

Navigation

    Quasar Framework

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    1. Home
    2. Joma3565
    J
    • Profile
    • Following 0
    • Followers 0
    • Topics 1
    • Posts 4
    • Best 1
    • Groups 0

    Joma3565

    @Joma3565

    1
    Reputation
    1
    Profile views
    4
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    Joma3565 Follow

    Best posts made by Joma3565

    • RE: Change color select

      @beets Thanks for your help, i found my mistake and I could already solve it 😁 😁 😁

      posted in Help
      J
      Joma3565

    Latest posts made by Joma3565

    • RE: Change color select

      @beets Thanks for your help, i found my mistake and I could already solve it 😁 😁 😁

      posted in Help
      J
      Joma3565
    • RE: Change color select

      @beets Yes, here you have (sorry for my english) ```

      <script>
      cambio(){
      if (this.model==‘app’){
      console.log(‘Opción 1’)
      document.getElementById(‘opcion’).className= “q-my-auto”
      document.getElementById(‘opcion’).style.backgroundColor= ‘#f1fff5’
      document.getElementById(‘opcion’).style.color= ‘#93cda4’
      }
      else if (this.model==‘napp’){
      console.log(‘Opción 2’)
      document.getElementById(‘opcion’).style.backgroundColor=’#fff1f1’
      document.getElementById(‘opcion’).className= “q-my-auto”
      document.getElementById(‘opcion’).style.color=’#bd1111’
      }
      }

      <template>
      <q-td key=“fat” :props=“props”>
      <q-select id=“opcion” transition-show=“flip-up” transition-hide=“flip-down” emit-value map-options v-model=“model” :options=“options” options-selected-class=“text-green-10” dense @input=“cambio”>
      </q-select>
      </q-td>

      posted in Help
      J
      Joma3565
    • RE: Change color select

      @beets Thanks, I was finally able to do it, but i found another problem, when i change the bg-color, only change in the label and i want that change in the q-select Captura1.PNG Captura.PNG

      posted in Help
      J
      Joma3565
    • Change color select

      Hi,

      I have a problem, i would change the background-color and text-color of a q-select depend of the option. I´ve tried differents ways but i can’t. Someone can help me with this, please???

      Mi code is this:
      <q-select id=“opcion2” v-model=“model” :options=“options” color=“teal” options-selected-class=“text-green-10” @input=“cambio”>
      <template v-slot:option=“scope”>
      <q-item v-bind=“scope.itemProps” v-on=“scope.itemEvents”>
      <q-item-section >
      <q-item-label v-html=“scope.opt.label” />
      <q-item-label id=“opcion” caption>{{ scope.opt.description }}</q-item-label>
      </q-item-section>
      </q-item>
      </template>
      </q-select>

      Js:
      cambio(){
      if (document.getElementById(‘opcion’).value==‘app’){
      console.log(‘Opción 1’)
      }
      else{
      console.log(‘Opción 2’)
      }
      }
      model: null,
      options: [
      {
      label: ‘Aplicado’,
      value: ‘app’
      },
      {
      label: ‘No Aplicado’,
      value: ‘napp’
      }
      ]

      posted in Help
      J
      Joma3565