vue-prevent-browser-back
Introduce it where you need to prevent clicking on the browser to return
3,978
| Install | |
|---|---|
npm install vue-prevent-browser-back |
|
| Latest Version: | 1.0.5 |
| Vue: | 2 |
| License: | MIT |
| Last Updated: | Apr 11, 2019 |
| Links: | npm |
Maintainer: wangmaoling
Prevent Browser Back for Vue2.
模拟阻止(适用于PC,移动端):在需要阻止浏览器返回上一页的页面使用次插件,当点击浏览器返回上一页时使页面不做任何变化。
Install
npm install vue-prevent-browser-back --save
Usage
在需要阻止的组件单独引入,然后注入...
<template>
<div>
</div>
</template>
<script>
import Home from "@/components/common/Home.vue";
import preventBack from 'vue-prevent-browser-back';//组件内单独引入
export default {
mixins: [preventBack],//注入
data() {
return {};
}
};
</script>
Version History
| Version | Released | Vue | License |
|---|---|---|---|
| 1.0.5 | ^2.5.11 | MIT | |
| 1.0.4 | ^2.5.11 | MIT | |
| 1.0.3 | ^2.5.11 | MIT | |
| 1.0.2 | ^2.5.11 | MIT | |
| 1.0.1 | ^2.5.11 | MIT | |
| 1.0.0 | ^2.5.11 | MIT |