发表于: 2017-02-23 23:54:38

2 1127


你今天做了什么?
上传功能实现(预览未实现)
新增,编辑页面完成
点击类型为行业大图时,出现另一个下拉选择

表单验证


你明天打算做什么?
下午做PPT
晚上优化下上线下线,删除 ,时间选择器,分页器


你遇见什么困难?
1:angular-file-upload API上遇见一些麻烦,首先就是看不懂,后来看懂了URL了找了很久也没找到想要找的点击上传,选择图片之后直接本地预览,上传,而不是上传之后才进行本地预览
  • url {String}: Path on the server to upload files
  • alias {String}: Name of the field which will contain the file, default is file
  • queue {Array}: Items to be uploaded
  • progress {Number}: Upload queue progress percentage. Read only.
  • headers {Object}: Headers to be sent along with the files. HTML5 browsers only.
  • formData {Array}: Data to be sent along with the files
  • filters {Array}: Filters to be applied to the files before adding them to the queue. If the filter returns true the file will be added to the queue
  • autoUpload {Boolean}: Automatically upload files after adding them to the queue
  • method {String}: It's a request method. By default POST. HTML5 browsers only.
  • removeAfterUpload {Boolean}: Remove files from the queue after uploading
  • isHTML5 {Boolean}true if uploader is html5-uploader. Read only.
  • isUploading {Boolean}true if an upload is in progress. Read only.
  • queueLimit {Number} : maximum count of files
  • withCredentials {Boolean} : enable CORS. HTML5 browsers only.
          
文档标题还是要看一下,慢下来,发现看文档的时候还是不细心
2
在下午使用这个解决掉第一个下拉选择空白之后,导入数据,需要根据一个值对当前下拉选择框进行默认选择,
 repeat空白解决办法
<select class="form-control" ng-model="vm.selectType" ng-options="x.name for x in vm.type.industry" >
       <option value="">-- 请选择 --</option>
       <option >{{x.name}}</option>
 </select>
  • 关于下拉框使用ng-repeat或者ng-options指令的区别
  • 关于下拉框的默认选项如何设置
  • 关于下拉框选项的model值如何绑定
  • 关于下拉框的禁用选项问题
  • 关于下拉框的分组问题
  • 关于下拉框的排序问题
 

select as label for value in array
value表示数组中的单个对象,as左边的值是我们的下拉框选中时的值,as右边的值是下拉框表面表示选择项。

label group by group for value in array
group by group的解释,其中前面的group by是固定的,后面的group使我们分组的依据。

select as label disable when disable for value in array
disabled when disabled,disabled when是固定的语句,后面的disabled是一个条件,如果条件是true的话,那么这一项是不可以被选中的。

label disable when disable for value in array
如果表达式中使用了as关键字的话那么as左边的表达式的值就是我们的下拉框的model值,如果不使用的话,默认的就是我们数组中的某一项的值,在此处是一个对象。

label for value in array track by trackexpr
已经选择的选项会被保留下来,也就是说,会保留每一项当时选择的状态。多选模式

label for value in array | orderBy : expr track by trackexpr
使用过滤器


你的收获?
api的阅读方法
ngOptions指令



返回列表 返回列表
评论

    分享到