09 2018 档案

摘要:var file = document.getElementById('file').files[0]; var url = URL.createObjectURL(file); console.log(url); document.getElementById("audio_id").src = 阅读全文
posted @ 2018-09-26 17:48 Mr_R 阅读(210) 评论(0) 推荐(0) 编辑
摘要:computed: { isFollow () { return this.$store.state.demo.id; //需要监听的数据 } }, watch: { isFollow (newVal, oldVal) { //do something } }, computed: { isFoll 阅读全文
posted @ 2018-09-20 14:30 Mr_R 阅读(7073) 评论(0) 推荐(0) 编辑
摘要:1. 最常见的思路,for...in...遍历属性,为真则为“非空数组”;否则为“空数组” 2.通过JSON自带的.stringify方法判断(上传数据常用) 3.当然就是ES6的语法啦,Object.key(); Object.keys方法是JavaScript中用于遍历对象属性的一个方法 。 它 阅读全文
posted @ 2018-09-20 14:22 Mr_R 阅读(362) 评论(0) 推荐(0) 编辑
摘要:validate: function(value) { var pattern = /[`~!@#$%^&*()_+<>?:"{},.\/;'[\]]/im; if (value '' || value null) return false; if (pattern.test(value)) { r 阅读全文
posted @ 2018-09-10 13:57 Mr_R 阅读(4614) 评论(0) 推荐(1) 编辑
摘要:Date.prototype.Format = function (fmt) { //author: meizz var o = { "M+": this.getMonth() + 1, //月份 "d+": this.getDate(), //日 "h+": this.getHours(), // 阅读全文
posted @ 2018-09-10 13:46 Mr_R 阅读(1183) 评论(0) 推荐(0) 编辑
摘要:一.methods和computed computed是计算属性,methods是方法。 html: <p>Reversed message: "{{ reversedMessage() }}"</p> js: 1. var vm = new Vue({ el: '#example', data: 阅读全文
posted @ 2018-09-05 14:49 Mr_R 阅读(167) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示