- 博客(8)
- 收藏
- 关注
原创 vue组件/页面间通信(vue eventbus)
首先,在main.js里面全局注册一个eventbus的方法。Vue.prototype.$EventBus = new Vue()分别在页面或组件中注册一个自定义事件和监听事件 this.$EventBus.$emit(自定义事件名, 数据); this.$EventBus.$emit("send","hello")--------------------------------------- this.$EventBus.$on("send",(val)=>{ co
2020-07-29 11:13:24 1255
原创 uniapp禁止单页面侧滑返回
全局禁止在manifestjson中配置"popGesture": "none"https://uniapp.dcloud.io/collocation/manifest?id=%e5%ae%8c%e6%95%b4-manifestjson// 调用5+ Api// #ifdef APP-PLUSvar page = this.$mp.page.$getAppWebview();page.setStyle({ popGesture: 'none' });// #endif禁止...
2020-07-20 09:17:25 11026 6
原创 openinstall vue集成
<template> <button id="downloadButton">单页面点击下载</button></template><script> export default { mounted:function(){ const s = document.createElement('script'); s.type = 'text/javascript';.
2020-07-14 17:15:23 1530
原创 uniapp计算app缓存与清理缓存
计算缓存 formatSize() { let that = this; plus.cache.calculate(function(size) { let sizeCache = parseInt(size); if (sizeCache == 0) { that.f
2020-07-13 17:38:55 5956 18
原创 subNVue 原生子窗体的使用
1.在uniApp中App模式下使用【subNVue 原生子窗体】解决抽屉侧边栏无法覆盖map、canvas等原生组件的问题<template> <div class="wrapper"> <!-- <list class="list-wrapper"> <cell v-for="item in lists" :key="item.id"> <div class="text-wrapper" @click=.
2020-07-13 09:59:27 1679
原创 JS对URL进行编码解码
编码:encodeURIComponent('http://www.baidu.com?name=li@xiao@er&order=1') 结果:"http%3A%2F%2Fwww.baidu.com%3Fname%3Dli%40xiao%40er%26order%3D1"解码:decodeURIComponent("http%3A%2F%2Fwww.baidu.com%3Fname%3Dli%40xiao%40er%26order%3D1") "http://www.baidu.
2020-07-09 16:53:14 255
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人