- 博客(4)
- 资源 (81)
- 收藏
- 关注
原创 vue: 动态路由
参考文章:链接 https://www.cnblogs.com/jj123/p/12784100.html需求:pc后台项目-根据权限动态生成路由1.generateRoutes.js导出的实例对象,解构后作为new Vuex.Store()的参数对象2.后台接口返回的路由表数组 eg.const list = [ { "id": 125, "authName": "用户管理", "path": "", "children": [ { "id":
2020-09-20 15:29:09 104
原创 js:字符串标识(双引号/单引号)
字符串:前端语法检查文件有单双引号字符串标识约束。(如.json文件前端必须双引号,后端没有约束)前端传递无论传什么标识的字符串,后端就能识别字符串(默认是双引号标识)。后端识别数据类型:1)post请求,后端根据表中字段查找前端传递字段2)post请求,后端根据前端字段查找表中的字段(查不到就报错)// 这种就要求前端不能post多余字段,否则后端报错拿不到数据...
2020-09-20 15:12:10 1251
原创 vue: vue3和vue2用法区别
diff算法优化:在一个组件下,对有插值表达式和动态属性的dom做了标记。虚拟Dom的diff比较时就不用比较所有页面的所有的dom元素差异tree shaking (去掉了未使用的api):不适用不会引入v-model,transition相关代码1)Composition API90%的vue2代码在vue3中不受影响// 能用compositioin抽逻辑就不要用mixin2)Fragment碎片不再限制单文件组件只能有一个根节点3)teleport4)suspese5)支.
2020-09-20 01:43:13 1466
原创 vue: vant组件适配
按照官网要求按需导入组件(此处看我之前的文章或官网)根目录下postcss.config.jsmodule.exports = { plugins: { 'autoprefixer': { browsers: ['Android >= 4.0', 'iOS >= 7'] }, 'postcss-pxtorem': { rootValue: 37.5, //这是基准值,在375px的屏幕变大rem的值会变大,小于这个大小元素的.
2020-09-09 11:07:57 1193 1
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人