04 2020 档案

摘要:1、router.js路由内部写法 import Vue from "vue" import VueRouter from "vue-router" import Home from "../views/home.vue" import List from "../views/list.vue" i 阅读全文
posted @ 2020-04-27 09:27 Alex-Song 阅读(6504) 评论(1) 推荐(2) 编辑
摘要:1、局部自定义指令,实现拖拽 <template> <div style="width:100%"> <!-- 自定义指令绑定元素 --> <button v-drag>拖拽</button> </div> </template> <script> export default { name: "L 阅读全文
posted @ 2020-04-24 17:24 Alex-Song 阅读(797) 评论(0) 推荐(0) 编辑
摘要:1、使用定时器setInterval dateHandle(end){ // 使用定时器,每秒执行获取时间,执行一次函数 let setInt=setInterval(() => { let nowTime=Date.parse(new Date())//现在时间 let endTime=Date. 阅读全文
posted @ 2020-04-24 16:42 Alex-Song 阅读(3333) 评论(0) 推荐(0) 编辑
摘要:1、通过官方网站获取对应的key值; 2、在html中引入相应script文件 <script type="text/javascript" src="https://webapi.amap.com/maps?v=1.4.15&key=f7f1406a1ee197180c9b7b2444d62b83 阅读全文
posted @ 2020-04-23 16:31 Alex-Song 阅读(7439) 评论(1) 推荐(1) 编辑
摘要:store.js文件内部写法: import vue from 'vue'; // 创建公共数据store export const store = vue.observable({ count: 0 }); // 创建更改状态的方法,创建后在组件内直接使用,也可不使用,在组建内直接书写 expor 阅读全文
posted @ 2020-04-22 17:50 Alex-Song 阅读(499) 评论(0) 推荐(0) 编辑
摘要:<template> <div> <button @click="handle">添加属性</button> <div ref="div">{{change}}</div> </div> </template> <script> export default { name: "Mine", data 阅读全文
posted @ 2020-04-22 16:12 Alex-Song 阅读(378) 评论(0) 推荐(0) 编辑
摘要:console.log(div.offsetWidth) //width+padding+border console.log(div.offsetHeight)//height+padding+border console.log(div.clientWidth)//width+padding-滚 阅读全文
posted @ 2020-04-21 15:41 Alex-Song 阅读(252) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示