作者:作者

UniApp 跨页面传输

背景: A页面数据需要传到B页面,有时候行,有时候不行 解决方法: 必须是 uni.$on 先生效,才可以监听到 uni.$emit so 1

作者 作者 发布于 2024-05-11

vue 限制 input 小数点后的几位数

export function inputLimit(e) {     // 通过正则过滤小数点后1位 e.target.value = (e.target.value.match(/^\d*(\.?\d{0})/g)[0]) || null // 2位 e.target.valu

作者 作者 发布于 2023-12-23

APP微信支付流程

1. 申请微信开放平台。 2. 微信开放平台认证(需要300)。 3. 创建应用,要认证(需要提前上架,最好是应用宝或者ios)。 4.

作者 作者 发布于 2023-08-23

点击子元素不触发父元素事件

使用 view @click.stop="" 如果无效,则 view @click.native.stop=""

作者 作者 发布于 2023-07-11

vue下载图片非同源的情况

// 保存二维码 down() { this.downloadIamge(URL, 'pic') }, downloadIamge(imgsrc, name) { // 下载图片地址和图片名 var image = new Image()

作者 作者 发布于 2023-03-23

vue 监听页面宽度变化

vue 监听页面宽度变化  mounted() {     // 监听窗口大小     window.onresize = () => {       return (() => {         this.windowWidth = document.documentElement.client

作者 作者 发布于 2022-11-17

js 骚操作

 // 获取列表     getListFn(fn) {       this.listLoading = true;       getList({ ...this.form, ...this.page }).then((res) => {         this.list = res.data

作者 作者 发布于 2022-10-17

js计算时间差(距离今天已经过去多久了)

多语言版: diffTime(startDate) {       var dateBegin = new Date(startDate);       var dateEnd = new Date();       var diff = dateEnd.getTime() - dateBegin.

作者 作者 发布于 2022-10-17