07 2020 档案
摘要:篇文章主要介绍了vue自定义移动端touch事件之点击、滑动、长按事件的实例代码,需要的朋友可以参考下 用法: **HTML** <div id="app" class="box" v-tap="vuetouch" //vuetouch为函数名,如没有参数,可直接写函数名 v-longtap="{f
阅读全文
摘要:可以有以下几种方式: (1)在要运行的test1.bat文件的同层目录新建一个test2.bat文件,内容如下: start test1.bat 然后执行此文件即可。 (2)在要执行的.bat文件加入 pause命令,然后执行 ping 192.168.8.8 pause (3)在要执行的.bat文
阅读全文
摘要:微信官方文档:https://mp.weixin.qq.com/wiki?t=resource/res_main&id=mp1421141115 方法一: 加一段js代码 WeixinJSBridge 是微信浏览器内部私有接口 document.addEventListener('WeixinJSB
阅读全文
摘要:(免费分享,点个赞再走呗) SUI Mobile http://m.sui.taobao.org/components/#popup SUI Mobile 是一套基于 Framework7 开发的UI库。 MUI http://dev.dcloud.net.cn/mui/ 最接近原生APP体验的高性
阅读全文
摘要:import Vue from "vue"; import axios from "axios"; import { apis } from "@/static/js/apis.js"; // import NoData from "@/components/NoData.vue"; let myV
阅读全文
摘要:flexible 主要是用来响应式改变根元素的字体大小 安装命令 npm install lib-flexible --save 在main.js里面导入命令import 'lib-flexible' 要把index.html里面的<meta name='viewport'>标签删除;因为会自动添加
阅读全文
摘要:想要实现vue动态改变页面title,需要给每个页面设置标题。并且在路由发生变化时修改页面title router - index.js const router = new Router({ mode: 'history', routes: [ { path: '/index', name: 'i
阅读全文
摘要:单行: white-space:nowrap; overflow:hidden; text-overflow:ellipsis; 多行: word-break: break-all; text-overflow: ellipsis; overflow: hidden; display: -webki
阅读全文
摘要:最近在把一个c端的项目重构成首屏服务端渲染(SSR:server side render) 项目用到的技术: React 、webpack、koa2、webpack 对于重构成SSR,redux并不是必须的,所以没用redux 本篇文章先讲述一些理论的东西,之后会写代码篇 一、 什么是服务端渲染 简
阅读全文
摘要:在vue.config.js里 添加 configureWebpack : { performance: { hints:'warning', //入口起点的最大体积 整数类型(以字节为单位) maxEntrypointSize: 50000000, //生成文件的最大体积 整数类型(以字节为单位
阅读全文
摘要:一、四舍五入 以下处理结果会四舍五入: var num =2.446242342; num = num.toFixed(2); // 输出结果为 2.45 二、不四舍五入 以下处理结果不会四舍五入。 第一种,先把小数变整数: Math.floor(15.7784514000 * 100) / 100
阅读全文