- 博客(6)
- 收藏
- 关注
转载 vue+element UI (组件递归) 实现多级导航菜单
首先创建一个menus组件:<template> <div> <template v-for="item in childrenList"> <!-- toString() 将number类型转换为string类型 --> <el-submenu v-if="item.hasOwnProperty('children')&&item.children.length>0" :key="item.i
2021-11-10 14:08:07
1012
转载 js实现树级递归,通过js生成tree树形菜单
效果图:数据格式:var data = [{ id: 1, name: "办公管理", pid: 0 },{ id: 2, name: "请假申请", pid: 1 },{ id: 3, name: "出差申请", pid: 1 },{ id: 4, name: "请假记录", pid: 2 },{ id: 5, name: "系统设置", pid: 0 },{ id: 6, name: "权限管理", pid: 5 },{ id: 7, name: "用户角色", pid: 6 },
2021-11-09 16:02:20
425
原创 封装axios请求接口模块(个人笔记)
首先在public 文件下得config.js文件中引入接口地址,这样打包后也可以修改接口地址const serverConfig = { baseUrl:'http://192.168.0.60:8080/TaxPlatfrom/',}然后在api文件下创建一个request.js文件,在里面封装一个axios请求模块/** * 封装 axios 请求模块 */ import axios from "axios" const request = axios.create({
2021-10-20 09:36:39
135
原创 vue全局公共方法(个人笔记)
首先在assets文件下创建一个common.js文件然后在其中写上所用方法,例:// An highlighted block// 数字小于10,补0function Less10 (value) { if (value<10) { return '0'+ value } return value}然后在main.js文件中写入这段代码// An highlighted blockimport Common from './assets/common'Vue.
2021-10-20 09:27:46
180
原创 vue实现全局过滤器
个人做笔记用首先创建一个filter.js文件,然后其中写上const dfilters = { reimbursementStatus:function(value){ let a = '' if(value == '1'){ a = '可报销' } else if( value == '2'){ a = '报销中' } else if( value == '3' ){ a = '已归档' } else if ( value == '4' ){ a = '已付款' } return a; } } ex
2021-10-20 09:15:30
89
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人