![](https://img-blog.csdnimg.cn/20201014180756918.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
实战
但心情怎会无恙
以梦为码
展开
-
使用screenfull.js在vue中实现浏览器全屏显示
1.安装npm install --save screenfull2.引入import screenfull from 'screenfull'3.调用screenfull.toggle()示例<template> <div class="home"> <button @click="open">全屏</button>...原创 2020-04-06 10:22:23 · 581 阅读 · 0 评论 -
微信小程序排坑总结(更新中)
1.样式动态绑定class,不能用对象的写法,得用三目运算wrong:<view class="{current: tabCurrentIndex === index}"></view>right:<view class="{{tabCurrentIndex === index?'current':''}}"></view>2.事件传参要...原创 2020-03-12 15:44:03 · 436 阅读 · 0 评论 -
使用filter实现购物车的删除功能
给删除按钮绑定删除事件:@click=remove(product)methods:{ remove(p){ this.products = this.products.filter(item=>item!==p) }}原创 2018-08-10 20:26:44 · 524 阅读 · 0 评论