How to use the quasar.uid function in quasar

To help you get started, we’ve selected a few quasar examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github aws-samples / aws-serverless-airline-booking / src / frontend / main.js View on Github external
graphql_headers: async () => ({
      "x-correlation-id": uid() // experiment with X-AMZN-Trace-Id
    })
  }
github quasarframework / quasar / app / templates / entry / bex / bridge.js View on Github external
_nextSend () {
    if (!this._sendingQueue.length || this._sending) return Promise.resolve()
    this._sending = true

    const
      messages = this._sendingQueue.shift(),
      currentMessage = messages[0],
      eventListenerKey = `${currentMessage.event}.${uid()}`,
      eventResponseKey = eventListenerKey + '.result'

    return new Promise((resolve, reject) => {
      let allChunks = []

      const fn = (r) => {
        // If this is a split message then keep listening for the chunks and build a list to resolve
        if (r !== void 0 && r._chunkSplit) {
          const chunkData = r._chunkSplit
          allChunks = [...allChunks, ...r.data]

          // Last chunk received so resolve the promise.
          if (chunkData.lastChunk) {
            this.off(eventResponseKey, fn)
            resolve(allChunks)
          }
github Dappos / Dappos / src / store / modules / cart.js View on Github external
addItem ({state, getters, rootState, rootGetters, commit, dispatch}, item) {
      const currentPrice = (item.prices[this.get('settings/currency')])
      const price = (!currentPrice)
        ? 0
        : currentPrice
      item.price = price
      if (!item.id) {
        item.id = uid()
        item.nonListed = true
      }
      commit('addItem', item)
      state.valueFiatAnimation.update(getters.valueFiat)
    },
    deleteItem ({state, getters, rootState, rootGetters, commit, dispatch}, item) {
github quasarframework / quasar-play / src / pages / showcase / forms / autocomplete.vue View on Github external
function getRandomSecondLabel () {
  if (Math.floor(Math.random() * 50) % 4 === 0) {
    return `UID: ${uid().substring(0, 8)}`
  }
}
function parseCountries () {
github Dappos / Dappos / src / helpers / animejsWrapper.js View on Github external
els.forEach((_el, index) => {
      const shadow = (index === 1)
      const id = uid()
      if (!state.fly[id]) {
        const animation = anime({
          targets: _el,
          translateX: (shadow) ? Xend - shadowOffsetX : Xend,
          translateY: (shadow) ? Yend : Yend,
          scale: (shadow)
            ? [1, 1.1, 1.1, 0.8, 0.4]
            : [1, 1.1, 1.1, 0.8, 0.4],
          duration: animationDuration,
          easing: 'easeOutQuad',
          elasticity: 0,
          autoplay: false
        })
        setAnimation({type: 'fly', id, animation})
      }
      resetAnimation({type: 'fly', id})
github quasarframework / quasar / dev / components / form / autocomplete.vue View on Github external
function getRandomSecondLabel () {
  if (Math.floor(Math.random() * 50) % 4 === 0) {
    return `UID: ${uid().substring(0, 8)}`
  }
}
function parseCountries () {
github quasarframework / quasar / app / templates / entry / proton.js View on Github external
static transformCallback (callback) {
    const identifier = uid()
    window[identifier] = (result) => {
      delete window[identifier]
      callback(result)
    }
    return identifier
  }
github Dappos / Dappos / src / components / MenuList_ItemRow.vue View on Github external
data () {
    return {
      id: uid(),
      emojiInt: 0,
      standardEmojis: ['📦', '🎈', '⭐️', '👍', '🏀']
    }
  },
  computed:
github openhab / org.openhab.ui.habot / web / src / pages / CardDeck.vue View on Github external
addTabbedCard () {
      this.$router.push({ path: '/designer/' + uid(), query: { type: 'tabs', objects: this.currentObjects.join(','), locations: this.currentLocations.join(',') } })
    }
  },