vue 知识点汇总
等数载海棠开吧
全部回复
仅看楼主
level 10
sky13nice 楼主
2018年04月11日 06点04分 1
level 10
sky13nice 楼主
数据的双向绑定原理及实现方式:https://segmentfault.com/a/1190000006599500
2018年04月13日 14点04分 2
level 10
sky13nice 楼主
2018年04月19日 00点04分 3
level 10
sky13nice 楼主
<img class="icon" v-if="poiInfo.discounts2" :src="poiInfo.discounts2[0].icon_url" />
当异步请求一个图片时,要加v-if 判断一下,否者回报以下错误。
[Vue warn]: Error in render: "TypeError: Cannot read property '0' of undefined"
2018年05月05日 06点05分 4
level 10
sky13nice 楼主
2018年05月06日 07点05分 5
level 10
sky13nice 楼主
主要用于保留组件状态或避免重新渲染
2018年05月06日 07点05分 6
level 10
sky13nice 楼主
2018年05月09日 15点05分 7
level 10
sky13nice 楼主
2018年05月09日 15点05分 8
level 10
sky13nice 楼主
解决移动端300ms延迟问题:插件 fastclick
2018年06月07日 09点06分 9
level 10
sky13nice 楼主
2018年06月15日 07点06分 10
level 10
sky13nice 楼主
需求:在一个购物车容器中,一直点击减号直到数量小于等于0时,我们可以直接让购物车隐藏掉,
2018年06月24日 15点06分 12
level 10
sky13nice 楼主
vue 中用v-model 绑定的数据、从后台请求的数据(比如要用v-for循环一个从后台请求的数组)。这种情况下都要在data 函数中初始化数据 <li v-for="(item,index) in subjectLists"
2018年11月11日 09点11分 13
level 10
sky13nice 楼主
当后端的接口让你传递一个必传参数时,前端有两种方式获取该参数对应的值。
1、类似于input输入框的情况 可以通过 v-model绑定一个参数 并在data中初始化改值,这样就可以 在ajax中用 aaa = that.xxx 实现。
2、通过事件的形式,给事件传递参数 <span style="color:#666;margin-right:20px;" @click="removeQuestion(index,typeId)">删除</span>,定义改事件,用形参来接收removeQuestion(index, id){。。。}这样就可以用 aaa = that.typeId 实现。以后再用就用 that.typeId 代替id 了。
2018年11月11日 13点11分 14
level 10
sky13nice 楼主
iview 的加载中:(spin组件)
<template><div class="overlay"><Spin fix class="demo-spin-col"><Icon type="load-c" class="demo-spin-icon-load"></Icon><div class="loading-text">Loading</div></Spin></div></template><script>export default {name: 'loading',data() {return {msg: 'Welcome'}}}</script><style scoped>.box .overlay,.overlay-wrapper .overlay {background: rgba(255, 255, 255, .75);}.overlay {background: rgba(255, 255, 255, .75);width: 100%;height: 100%;position: absolute;top: 0;left: 0;z-index: 666;}.demo-spin-icon-load {animation: ani-demo-spin 1s linear infinite;margin-bottom: 6px;font-size: 55px;}@keyframes ani-demo-spin {from {transform: rotate(0deg);}50% {transform: rotate(180deg);}to {transform: rotate(360deg);}}.demo-spin-col {height: 100px;position: absolute;position: fixed;top: 50%;width: 10%;left: calc(45% + 115px);background: none;}
2018年11月12日 10点11分 15
level 10
sky13nice 楼主
Vue.js结合Canvas制作二维码和图片的合成(qrcanvas + html2canvas)
https://blog.csdn.net/zuorishu/article/details/83866234
2018年11月13日 06点11分 16
1 2 尾页