摘要: this.$refs[formName].validateField('phone', phoneError => { //验证手机号码是否正确 if (!phoneError) { console.log('手机号正确') } else { return false; } }); 阅读全文
posted @ 2019-11-15 19:56 一城柳絮吹成雪 阅读(2417) 评论(0) 推荐(0) 编辑
摘要: <!-- 字符串 --> <router-link to="home">Home</router-link> <!-- 渲染结果 --> <a href="home">Home</a> <!-- 使用 v-bind 的 JS 表达式 --> <router-link v-bind:to="'home 阅读全文
posted @ 2019-11-15 12:02 一城柳絮吹成雪 阅读(223) 评论(0) 推荐(0) 编辑
摘要: 数组对象arr中属性num最大值最小值 // 最大值 Math.max.apply(Math,arr.map(item => { return item.num })) arr.sort((a, b) => { return b-a })[0].num // 最小值 Math.min.apply(M 阅读全文
posted @ 2019-11-15 09:46 一城柳絮吹成雪 阅读(1506) 评论(0) 推荐(0) 编辑