npm install
npm run serve
npm run build
npm run test
npm run lint
vue.config.js配置scss
component: () => import("@/views/Test.vue") 导入组件
箭头函数:const Test = data => console.log(data);
axios封装request的配置,api调用request、
config.vue.js代理配置
promise讲解,链式嵌套记得return promise
.vue里面import scss文件
路由设置一个hidden属性(自定义)来判断是显示在左侧列表栏里、使用template标签包裹(解决v-for和v-if同时会报错的问题)
el里面的navMenu的router属性,来跳转,path作为路径
修改el样式不能在vue的scoped改,全局scss改,在vue.config.js里面引入
使用svg必须安装svg-sprite-loader依赖
props传参required、validator属性、如果类型是数组 default: () => []
const svgClass = computed(() => {
if (props.className) {
return svg-icon ${props.className}
;
} else {
return svg-icon
;
}
});
vuex,异步:action里面需要请求接口返回token,然后再去调用commit,详细见登陆
路由守卫
封装弹窗等组件 => watch解决单向传值问题
自定义全局方法global,封装vuex全局方法
let arrayData = data.filter(item => item.id == catagory.Id)[0];
let arrayId = data.map(item => item.id);