adaptive-recognition
v1.0.2
Published
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 ```javascript np
Downloads
3
Readme
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