01 2021 档案

摘要:在项目的根目录下新建一个‘utils’文件夹 ,utils下新建validate.js validate.js 代码如下 export const checkVaild = (str, type) => { switch (type) { case 'phone': // 手机号 return /^ 阅读全文
posted @ 2021-01-27 17:33 james_liang 阅读(655) 评论(0) 推荐(0)
摘要:<template> <div> <input placehoder='请输入姓名搜索' v-model=‘searchName’ /> <ul> <li v-for = '(item,index) in filterPersons' :key='index'>姓名:{{item.name}}--年 阅读全文
posted @ 2021-01-19 17:15 james_liang 阅读(1046) 评论(0) 推荐(0)
摘要:validate.js(代码如下) export const checkVaild = (str, type) => { switch (type) { case 'phone': // 手机号 return /^1[0-9][0-9]{9}$/.test(str) case 'tel': // 座 阅读全文
posted @ 2021-01-05 12:03 james_liang 阅读(361) 评论(0) 推荐(0)
摘要:前端页面在根目录下的文件夹pages=》index=》index.vue 接口统一在根目录下的文件夹api=》index(自己模块归类文件夹里)=》... 前端页面代码: 引入统一的接口文件 import { getAds, getData } from '../../api/index/index 阅读全文
posted @ 2021-01-03 11:21 james_liang 阅读(646) 评论(0) 推荐(0)