logo
publist
写文章

简介

该用户还未填写简介

擅长的技术栈

可提供的服务

暂无可提供的服务

html5中video标签设置视频的宽度和高度

转自:https://blog.csdn.net/hahhahahaa/article/details/94547802

通过user-agent判断h5页面是在哪个手机App(QQ、微信、支付宝)下打开的

转自:http://www.cnblogs.com/liyongquan/p/10248433.htmlfunction getAppClient(){  var ua = navigator.userAgent.toLowerCase();  if(ua.match(/MicroMessenger/i)=="micromessenger") {  return "wei...

element ui datePicker 设置当前日期之前/之后的日期不可选

之前:element ui datePicker 设置当前日期之前的日期不可选之后:disabledDate(time) {return time.getTime() > Date.now();}

element-ui表单验证的trigger

看element-ui给的例子trigger可以取'change','blur'等值,但是并不是所有的验证项都可以被这样触发,如何主动控制触发验证呢?可以使用validateField。看element-ui自定义验证里面就有一个例子,在“密码”不为空的时候去验证“确认密码”字段:所以可以在主动验证的地方调用this.refs[formName].validateField('验证字段...

Vue 加入 withCredentials 后无法进行跨域请求

Vue 加入 withCredentials 后无法进行跨域请求暂存,可能有用

vue中require引入图片或背景图

<template><div class="vote-container"><div class="img" :style="{backgroundImage:'url('+src+')'}"></div><img :src="src" /></div></template><script>export

vue设置404页面

在router/index.js中添加{path: "/404",name: "notFound",component: notFound}, {path: "*", // 此处需特别注意置于最底部redirect: "/404"}转自:https://blog.csdn.net/przlovecsdn/article

vue 在一个元素上同时绑定单击和双击事件

转自:https://blog.csdn.net/xingbipai5492/article/details/89881589

vue-router禁止访问某个页面时,点击浏览器回退按钮还是能访问到

有时候为了不让某些用户访问某些页面(即权限控制),可能会使用next(false)中断其访问,或者跳转到404页面,这时候如果点击浏览器“倒退”按钮其实还是能访问到,因为保留了历史访问记录,所以在跳转的时候需要处理一下,使其不保留历史访问记录1.使用next(false)时,可以在其前面一行加上this.$router.go(-1)this.$router.go(-1)next(fal...

    共 30 条
  • 1
  • 2
  • 3
  • 请选择