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. yk-davdomin
    • Profile
    • Following 1
    • Followers 0
    • Topics 3
    • Posts 8
    • Best 0
    • Groups 0

    yk-davdomin

    @yk-davdomin

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

    yk-davdomin Follow

    Latest posts made by yk-davdomin

    • RE: How to access translations in static .js file?

      I was talking about using it in single js file, I found a solution:

      import { i18n } from 'src/boot/i18n'
      const { t } = i18n.global
      
      .
      .
      .
      export const eStatusList = [
        { code: '0', label: t('documents.inProgress') },
        { code: '1', label: t('documents.sent') },
        { code: '2', label: t('documents.accepted') },
        { code: '3', label: t('documents.rejected') },
        { code: '4', label: t('documents.voiding') },
        { code: '5', label: t('documents.voided') }
      ]
      
      posted in Help
      yk-davdomin
      yk-davdomin
    • RE: How to access translations in static .js file?

      Hey @metalsadman How can I do this in quasar 2?

      posted in Help
      yk-davdomin
      yk-davdomin
    • RE: How can I make reactive rules ?

      @dobbel Yes i am new, but i did this, look at the example in the snippet counter is reactive for the label but no in the rule

      posted in Help
      yk-davdomin
      yk-davdomin
    • How can I make reactive rules ?

      I noticed that the q-input rule’s error message is not reactive. Code:

      The counter only increment when I change the q-input text… how can I make this reactive?

      <div id="q-app">
        <div class="column q-gutter-md q-pa-md" style="max-width: 400px">
          <q-input
            ref="input"
            filled
            v-model="model"
            :rules="[
                val => (!!val && val.length < 2) || `Counter is ${counter}`,
              ]"
            lazy-rules
          ></q-input>
      
          <div>Counter is {{ counter }}</div>
          <q-btn label="Increment" @click="counter++" color="primary"></q-btn>
          <q-btn label="Reset Validation" @click="reset" color="secondary"></q-btn>
          <div>Quasar {{ $q.version }}</div>
      
      new Vue({
        el: '#q-app',
        data () {
          return {
            model: '',
            counter: 1
          }
        },
      
        methods: {
          reset () {
            this.$refs.input.resetValidation()
          }
        },
        mounted () {
          this.$refs.input.validate()
        }
      })
      

      You can run this example in: https://stackoverflow.com/questions/64154704/how-can-i-make-reactive-rules-in-quasar

      posted in Help
      yk-davdomin
      yk-davdomin
    • Can I use q-input rules with a template variable

      Hi guys
      I am a noob usinhg quasar - vueJS and I need to validate a q-input with a template variable but don’t work…
      Is this possible?
      I did a sandbox with a little example:

      https://codesandbox.io/s/blissful-meadow-e64gh?file=/src/pages/Index.vue

      <template>
        <q-page class="flex flex-center">
          <q-form class="q-gutter-md">
            <q-input
              v-model="text1"
              label="text1"
              :rules="[
                (val) => !!val || 'This field is required',
                (val) => !falgs.flag1 || 'The flag1 must be activaed'
              ]"
            >
            </q-input>
            <q-input
              v-model="text2"
              label="text2"
              :rules="[(val) => !!val || 'This field is required']"
            >
            </q-input>
          </q-form>
        </q-page>
      </template>
      
      <script>
      export default {
        name: 'PageIndex',
        data() {
          return {
            text1: '',
            text2: '',
            flags: {
              flag1: false,
              flag2: false
            }
          }
        }
      }
      </script>
      
      
      posted in Help
      yk-davdomin
      yk-davdomin
    • RE: clearble q-input problem with focus

      Thanks @metalsadman and @dobbel it is working now

      posted in Help
      yk-davdomin
      yk-davdomin
    • RE: clearble q-input problem with focus

      @metalsadman Thanks, but I dont understand how to use the slot can you put an example?

      posted in Help
      yk-davdomin
      yk-davdomin
    • clearble q-input problem with focus

      I have a problem with the clearable input because then when the input lost the focus then the focus goes to the (x) and no to the other input I want the the (x) button doesn’t have a focus

      Here I put a code snippet https://stackoverflow.com/questions/64109189/quasars-clearble-q-input-problem-with-focus?noredirect=1

      Thanks guys

      posted in Help
      yk-davdomin
      yk-davdomin