摘要:
表单提交,文件上传是一个常用又十分麻烦的功能,以前要上传文件通常都是借助插件或者flash来实现,噼里啪啦的加载一大堆东西。自从有了HTML5的FormData后。 FormData可以把它理解成一个虚拟的表单对象,它只有一个方法append,这个可以在浏览器console一下就知道了。我们可以通过 阅读全文
摘要:
<!DOCTYPE html><html><head> <title>父子组件</title> <script type="text/javascript" src="vue 2.js"></script></head><body><div id="box"> <com-a></com-a> <co 阅读全文
摘要:
<!DOCTYPE html><html><head> <title>slot</title><script type="text/javascript" src="vue.js"></script> </head><body><div id="box"> <aaa> <ul slot="ul-sl 阅读全文
摘要:
<!DOCTYPE html><html><head> <title>选择</title> <script type="text/javascript" src="vue.js"></script></head><body><div id="box"> <ul> <li v-for="(index, 阅读全文
摘要:
<!DOCTYPE html><html><head> <title>父子组件</title> <script type="text/javascript" src="vue.js"></script></head><body><div id="box"> <my-aaa></my-aaa></di 阅读全文
摘要:
<div id="box"> <input type="button" value="aaa组件" @click="aaa" /> <input type="button" value="bbb组件" @click="bbb" /> <component :is='a'></component></ 阅读全文
摘要:
组件为:aaa <div id="box"> <aaa></aaa></div> 局部组件数据事件: var vm=new Vue({ el:"#box", data:{ a:"aaa" }, components:{ 'aaa':{ data(){ return { msg:"wo是msg哦" } 阅读全文
摘要:
vuejs: Vue.directive('drag',function(){ var oDiv=this.el; oDiv.onmousedown=function(ev){ var disX=ev.clientX-oDiv.offsetLeft; var disY=ev.clientY-oDiv 阅读全文
摘要:
<!DOCTYPE html><html><head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>拖拽效果</title> <style type="text/css"> body{ ba 阅读全文
摘要:
文件上传对象:class upload{ protected $fileName; protected $uploadPath; protected $imgFlag; protected $maxSize; protected $allowExt; protected $allowMime; pr 阅读全文