摘要:
function debounce(fn, wait) { var timer = null; var self = this; var args = arguments; var count = 0; return function () { clearTimeout(timer); if (co 阅读全文
摘要:
解决方案一:nginx代理转发 项目build后,通过nginx代理转发 location / { root D:\myproject\my-vue\dist; index index.html index.htm; } location /pyapi { proxy_pass 'http://lo 阅读全文
摘要:
安装包 1. cnpm install gulp-concat gulp-uglify gulp-rename gulp-clean-css gulp-htmlmin-S 2. cnpm install gulp-livereload gulp-connect -S 代码目录结构 gulpfile. 阅读全文
摘要:
1.声明式表单验证: <Form.Item name="username" rules={[ { required: true, message: 'Please input your Username!', }, { max: 20, message: '最长20位!', }, { min: 5, 阅读全文
摘要:
1. 页面结构 2. js代码 mui.plusReady(function() { var pages = ['home.html', 'h5plus.html', 'settings.html', 'email.html']; var pageStyles = { top: "0", botto 阅读全文
摘要:
1. git clone git@github.com:youzan/vant-weapp.git 拷贝代码 2. 将dist目录拷贝到小程序目录下,改名为vant 3. 使用 阅读全文
摘要:
import { Loading } from 'element-ui'; Vue.prototype.Loading = ''; // 显示loading Vue.prototype.showLoading = function(){ Vue.prototype.Loading = Loading 阅读全文
摘要:
1.el-form 表单 校验 需要 绑定model,否则,使用校验this.$refs.loginForm.validate有问题 阅读全文
摘要:
fastclick 原理: 在检测到touchend事件的时候,会通过DOM自定义事件立即出发模拟一个click事件,并把浏览器在300ms之后真正的click事件阻止掉 // 安装 cnpm install fastclick -S // 使用 import fastclick from 'fas 阅读全文