07 2020 档案
摘要:https://juejin.im/post/5d153267e51d4510624f9809?tdsourcetag=s_pctim_aiomsg1,[vue] 在vue中watch和created哪个先执行?为什么? 在wacth监控数据时,设置immediate:true;会优先执行watch
阅读全文
摘要:this.$set(this.someObject,'b',2) 有时你可能需要为已有对象赋值多个新 property,比如使用 Object.assign() 或 _.extend()。但是,这样添加到对象上的新 property 不会触发更新。在这种情况下,你应该用原对象与要混合进去的对象的 p
阅读全文
摘要:JSON.parse() :是从一个字符串中解析出 json 对象 //定义一个字符串 var data='{"name":"goatling"}' //解析对象 JSON.parse(data) 结果是: name:"goatling" JSON.stringify():是从一个对象中解析出
阅读全文
摘要:<template> <div id="pic_upload"> <!-- 图片预览 --> <!-- <el-dialog custom-class="img_preview" :visible.sync="previewShow" :show-close="false" @close="$emi
阅读全文
摘要:<template> <div id="pic_upload dddd"> <div></div> </div> </template> <script> export default { name: "ckaudio", props: { file: { default: {} } }, data
阅读全文
摘要:for (let i in this.workerList) { for (let j in this.taskOrderList) { if (this.workerList[i].id == this.taskOrderList[j].worker) { this.taskOrderList[j
阅读全文
摘要:for (var i = 0; i < steps.length; i++) { if ( steps[i].status == 400 || steps[i].status == 700 || steps[i].status == 800 || steps[i].status == 900 ||
阅读全文
摘要:Vue.directive('sColor', { bind: function (el, binding) { console.log(binding); el.style.color = binding.value == '请选择' ? '#999' : '#1F2D45' }, update:
阅读全文
摘要:getStrValue(fieldName, str, flag) { var fieldIndex = str.indexOf(fieldName + "="); //第一次出现指定字符串的位置 var fieldRemain = str.substr(fieldIndex + 5, str.le
阅读全文
摘要://根据选择的日期 计算出年龄 export const birthdayToAge = (strBirthday) => { var returnAge, strBirthdayArr = strBirthday.split("-"), birthYear = strBirthdayArr[0],
阅读全文