摘要:
方法1:<script type="text/javascript"> var ua = navigator.userAgent; if (/Android (\d+\.\d+)/.test(ua)){ <!-- 需要在页面加载时候 生效 才能有效 --> var devicePixelRatio 阅读全文
摘要:
一、首先先建一个公共文件,命名eventBus.js,内空为: 二、在要用的组件.vue都import一下eventBus.js公共文件,具体写法 三、在接收的.vue里的mounted方法里加上 4.在传值的.vue里emit过去 阅读全文
摘要:
阅读全文
摘要:
<template> <div id="gkbottomBarVTwo"> <router-view /> <div class="denglu"> <!--<van-tabbar v-model="active" v-show="userWriteAreaLogin" @change="onCha 阅读全文
摘要:
先来个列子: window.open ('page.html','newwindow','height=100,width=400,top=0,left=0,toolbar=no,menubar=no,scrollbars=no, resizable=no,location=no, status=n 阅读全文
摘要:
web页面常用的一个需求,写下拉菜单是我们往往不是用select_option,而是自定义一个元素列出选项来满足需求,当我们点击按钮出现菜单, 点击按钮或菜单以外页面空白地方隐藏该菜单,这里提供一种简单有效的方法仅供参考: 1 document.onclick = function(e) { 2 $ 阅读全文
摘要:
执行如下命令升级 npm uninstall -g vue-clinpm install -g @vue/cli vue create my-project 注意,空格键是选中与取消,A键是全选 ,选择完成后按回车 阅读全文
摘要:
https://www.w3cplus.com/mobile/lib-flexible-for-html5-layout.html//淘宝移动端自适应rem http://www.ofmonkey.com/front/rem //在线px转rem 阅读全文
摘要:
//获取日期 0为今天,负数为前几天,正数为后几天 function getDay(day){ var today = new Date(); var targetday_milliseconds = today.getTime() + 1000*60*60*24*day; today.setTim 阅读全文