1.0.2 • Published 10 months ago

adaptive-recognition v1.0.2

Weekly downloads
-
License
ISC
Repository
-
Last release
10 months ago

This package provides some of the requirements we need in Vue and React development, such as determining whether it is a tablet device, a computer, or a mobile phone. So using this package can help you make better judgments.

install

npm i adaptive-recognition

Usage

Taking Vue as an example mani.js

import Vue from "vue";
import isMobile from 'adaptive-recognition'
Vue.prototype.$isMobile = isMobile

Demo. vue

<template>
  <div></div>
</template>

<script>
export default {
  created() {
    console.log(this.$isMobile()) 
  },
};
</script>

<style lang="scss" scoped>
</style>

So far, we can live with constant monitoring of a device

1.0.2

10 months ago

1.0.0

10 months ago