0.0.5 • Published 4 years ago

vq-utils v0.0.5

Weekly downloads
-
License
MIT
Repository
github
Last release
4 years ago

vq-utils - Vue Quasar Utilities

Quasar & Vue Utilities

Work only in Quasar framework, I will make time to make it work in vue as well. - soon

Installation

Attention: This util will copy/overwrite files in your project at:

const TestLocale = JSON.parse(this.$q.localStorage.getItem("locale"));
if (!TestLocale) {
  this.$q.localStorage.set("locale", JSON.stringify("en"));
} else if (TestLocale && Object.keys(TestLocale).length && TestLocale.key) {
  this.$i18n.locale = TestLocale.key;
  this.$store.getters.languages.forEach((lng) => {
    document.querySelector("body").classList.remove(lng.key);
  });
  document.body.className += " " + TestLocale.key;
}

Install by npm i --save 'vq-utils' Then you can use it in

import init from 'vq-utils'
init()

You can also copy the files directly. The repository Source Code

Back to TOP

formMixin

Mixin that includes form validations, very helpful for fast prototyping.

Supports nameRules emailRules & passwordRules

import { formMixin } from 'src/mixins/formMixin'
export default{
  ...
  mixins:[formMixin],
  ...
}

Back to TOP

meta

Perfect when Using Quasar Framework

Example:

in quasar.conf.js

// quasar.conf.js
return {
  framework: {
    plugins: [
      'Meta'
    ]
  }
}

In a .vue file

<script>
  import { meta } from 'waelio-utils'
  export default {
    name:'foo',
    data () {
      return {
        metaTags: {
          title: 'Site Title',
          description: 'Website Utilities',
          url: 'https://github.com/waelio/waelio-utils',
          image: 'nwm_logo.png'
        }
      }
    },
    meta
  }
</script>

Back to TOP

notifyMe

Send PWA Notifications to Site

Works only in Browser

@param {string} to send

Example: In your .js or .vue file:

import { notifyMe } from 'waelio-utils'

notifyMe('Hello World!')

Back to TOP

0.0.5

4 years ago

0.0.4

4 years ago

0.0.3

4 years ago

0.0.2

4 years ago

0.0.1

4 years ago