随身笔记
随身笔记

前端资源

前端资源

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

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

   719   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…

   867   2021-05-26   去围观

keepAlive动态缓存及清除缓存

keep-alive 例如A,B页面,A页面开启keepAlive,B返回A的时候时缓存的,但有时需要B返回A时取消A的keepAlive缓存。 这时候需要在A页面添加以下代码: { name: 'B', //给B路由添加一个name名字 path: '/B', component: (resolve) => require(['../comp…

   1,246   2021-05-12   去围观

computed和watch的区别是什么?

计算属性computed : 1、支持缓存,只有依赖数据发生改变,才会重新进行计算 2、不支持异步,当computed内有异步操作时无效,无法监听数据的变化 3、computed 属性值会默认走缓存,计算属性是基于它们的响应式依赖进行缓存的,也就是基于data中声明过或者父组…

   574   2021-05-06   去围观

Vue报错(Property or method "xxx" is not defined on the instance but referenced during render.)

报错如下: Property or method “xxx” is not defined on the instance but referenced during render. Make sure that this property is reactive, either in the data option, or for class-based components, by initializing the property. 原因: 你的“”xxx‘’…

   1,770   2021-04-22   去围观
加载更多