随身笔记
随身笔记

前端资源

前端资源

vue多层级组件嵌套传参v-bind="$attrs" v-on="$listeners"

Vue v2.4新增$attrs $listeners 直接上案例: html: <div id="app"> <child1 :p-child1="child1" :p-child2="child2" :p-child-attrs="1231" v-on:test1="onTest1" v-on:test…

   657   2021-07-01   去围观

js处理heic(heif)格式的图片

import heic2any from 'heic2any'; const fileReader = new FileReader(); const fileReaderBuffer = new FileReader(); const file // 图片文件 // 加载图片 function loadImg(img) { return new Promise((resolve, reject) => { img.onload =…

   1,408   2021-06-18   去围观

this.$router.go(-1) 传参

前提:要支持keep-alive 编辑App.vue <keep-alive> <router-view v-if="$route.meta.keepAlive" /> </keep-alive> <router-view v-if="!$route.meta.keepAlive" />   页面路由设置keepAlive:true: { path: 'task-list…

   2,605   2021-06-18   去围观

vue 使用高德地图vue-amap组件

方法一:通用方法不用区分vue2和vue3 1,修改public/index.html,添加以下内容 <script type="text/javascript"> window._AMapSecurityConfig = { securityJsCode:'填写你的安全码', } </script> <script src="https://webapi.amap.co…

   807   2021-06-08   去围观

vue倒计时

文件名:downTime.vue <template> <div class="countDownClass"> <!-- <span>{{countDownText}}</span>--> <img style="height: 5vw" src="@/assets/imgs/icon/time_icon.png" /> <span> <span…

   952   2021-05-26   去围观
加载更多