- 博客(6)
- 收藏
- 关注
原创 vue3.0 使用inject(“reload“)刷新页面
(1)在app.vue<template> <router-view v-if="isRouterAlive" /></template><script>import { defineComponent, ref, nextTick, provide } from 'vue';export default defineComponent({setup() { // 局部组件刷新 const isRouter...
2021-11-16 15:39:59
4986
1
转载 vue 使用this.reload方法刷新页面配置
1.在vue(app.vue文件)里配置:<template> <div> <router-view v-if="isRouterAlive" /> </div></template><script>export default { provide() { //提供reload方法 return { reload: this.reload }...
2021-09-18 10:28:12
2149
原创 js some和filter用法和区别
some方法array1.some(callbackfn[, thisArg])对数组array1中的每个元素调用回调函数callbackfn,当回调函数返回true或者遍历完所有数组后,some方法终止。可选参数thisArg可以替换回调函数中的this对象filter方法array1.filter(callbackfn[, thisArg])对数组array1中的每个元素调用回调函数callbackfn方法,该方法会返回一个在回调函数中返回true的元素的新的集合。可选参数thisA
2021-09-08 14:33:26
407
转载 input框按enter跳转页面问题总结
分页中需要 输入页码进行跳转,但是却出现 跳到指定页面后,页面也刷新了。从而无法满足无刷新的分页。最初代码如下:<form class="zh-skip" action=""> <input type="number" v-model="pageNumber" oninput="if(value<1)value=1" @keyup="goPageKeyUp($event)"> <button class="zh-btn-blue" type="butt...
2021-09-01 11:00:53
2335
转载 鼠标滚轮事件
// 放大缩小刷新页面 var normalWidth = window.innerWidth; var normalHeight = window.innerHeight; window.onresize = function(){ location.reload(); }今天写代码遇到问题,要监控浏览器放大或缩小,查了查,解决问题,记录下方法,也给大家分享下。...
2021-08-30 12:12:58
68
转载 获取浏览器缩放百分比
varratio=0;varscreen=window.screen;varua=navigator.userAgent.toLowerCase();if(window.devicePixelRatio!==undefined){ratio=window.devicePixelRatio;console.log('ratio',ratio)}elseif(~ua.indexOf...
2021-08-30 10:37:16
931
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人