![](https://img-blog.csdnimg.cn/20201014180756724.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
linwuji的摸爬人生
20年入坑,vue,uniapp,node
展开
-
01-权限指令
Vue Use执行Use里的函数并传入app实例在函数中调用app.directiveapp.directive('name', {});//指令名称(不包括v-){}对象当中是一个个钩子钩子有对应的参数就是在这些钩子当中做一些处理{ mounted:(el,binding)=>{ ... }}没有权限时el.parentNode?.removeChild(el)...原创 2022-03-30 19:30:33 · 291 阅读 · 0 评论 -
监听页面触底,触顶,滚动条事件
https://blog.csdn.net/Jack_zengzhen/article/details/79013841offset带边框clint不带边框,边框以内时间内容document.body.scrollTop谷歌:滚动条距离顶部的距离document.documentElement.scrollTopIE:滚动条距离顶部的距离window.screen.height电脑屏的高度document.body.scrollHeight谷歌&IE: 浏览器所有内容的高度原创 2022-03-03 21:43:20 · 513 阅读 · 0 评论 -
vue项目中长时间不操作退出登录
;(function () { /** * @Tip: * FenZhon:Number 设置超时时间(分钟) * timeoutJianCha:时间戳 多久检查一次 * lastTime:时间戳 最后一次操作的时间 * currentTime:时间戳 当前操作的时间 * timer:计时器 */ let FenZhon = 0.1 let lastTime = new Date().getTime() let currentTime = new D原创 2022-02-28 19:55:22 · 825 阅读 · 3 评论 -
函数式组件
Vue 函数式组件 functional函数式组件无状态无法实例化内部没有任何生命周期处理函数轻量,渲染性能高,适合只依赖于外部数据传递而变化的组件(展示组件,无逻辑和状态修改)在template标签里标明functional只接受props值不需要script标签父组件<template> <div class="hello"> <btn :selfArray=[1,2,3] :click="click" &原创 2022-02-05 21:03:01 · 587 阅读 · 0 评论 -
vue用函数调用 创建组件
01-创建一个好的组件02-在js文件创建函数html<!-- * @Author: Allyn * @Description: * @Date: 2022-02-05 19:47:40 * @LastEditTime: 2022-02-05 20:05:03 * @FilePath: \hmYouGou\components\test.vue--><template> <div v-show="isshow"> <div cl原创 2022-02-05 20:33:17 · 941 阅读 · 0 评论