![](https://img-blog.csdnimg.cn/20201014180756928.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
VUE
文章平均质量分 62
mumu42
这个作者很懒,什么都没留下…
展开
-
如何实现瀑布流布局?
在小编刚入行的时候,参考着度娘里的答案,用js实现过一次瀑布流布局。所以在接到瀑布流布局的设计稿时,第一反应就是利用js实现。## js实现大概思路是:### css- 1. 瀑布流容器设置绝对定位,然后给所有子元素设置相对定位。- 2. 通过ajax请求拿到数据,并渲染到页面上```javascript div class="waterfall-list-container" > <div class="item-container" > &...原创 2020-09-09 16:45:05 · 551 阅读 · 0 评论 -
axios请求
post请求:axios.post("",{}).then((res)=>{})get请求:axios.get("",{}).then((res)=>{})跨域:axios.get('http://dev.xxxxxxxxxxxxxxx',{withCredentials:true}).then((res)=>[})执行多个请求:function getUserAccount()...原创 2018-03-13 18:11:17 · 201 阅读 · 0 评论 -
vue跨域
一、假如目标服务器端口是8080,我需要把vue的端口改成其他的比如8081。在config目录下打开index.js,把port的8080改成8081port: 8081数据请求,后台不允许跨域,所有需要修改配置在在config目录下打开index.js,添加以下代码dev: { // Various Dev Server settings host: 'localhost', // can...原创 2018-03-14 13:23:20 · 924 阅读 · 0 评论 -
电子签名(vue)
<template> <div class="signatureBox"> <div class="visaDetailTop"> <p> <button class="btnBack" @click="backHome">&l原创 2018-03-27 16:49:50 · 7080 阅读 · 8 评论 -
日历(vue)
days.vue文件<template> <div class="tourDaysBox" ref="dayBox"> <div class="visaDetailTop"> <p> <button class="btnBack" @click=&q原创 2018-03-29 15:59:33 · 1671 阅读 · 0 评论 -
watch检测路由
在父容器检测才会有效果:watch:{ $router(to,from){ console.log(to); console.log(from); }}在网上查看资料的时候,看到有一些说的这样写没有效果的,据说解决办法是写成‘$router’(to,from)就可以了。...原创 2018-04-12 14:48:27 · 642 阅读 · 0 评论 -
vue生命周期
页面第一次进入,钩子的触发顺序created-> mounted-> activated,退出时触发deactivated。当再次进入(前进或者后退)时,只触发activated原创 2018-04-18 17:58:27 · 146 阅读 · 0 评论