1 ES6 语法
1 const { hh = [] } = props
2 let a = {a: 1, b: 2}
let b = {...a, c: 3}
console.log(b)
3 let a = {a: 1, b: 2}
let b = {...a}
let {...b} = a
4 let hh = {a: 1, b: 2, c: 3}
let {a, b, c } = hh
let {a: aa, b: bb, c: cc } = hh
let {b: bb, x: xx } = hh
5 const {hh} = props --> const {xx} = hh --> console.log(xx)
const {hh: {xx}} --> console.log(xx)
2 功能插件
1 加密 md5
1 npm i js-md5
2 import md5 from "js-md5"
3 value = md5(value)
2 React 项目中使用 "字体图标"
1 src/assets/iconfont.css: 粘贴字体图标项目 css 文件代码
2 import '@/assets/icon.css'
3 <i class="iconfont icon-xxx"></i> -> OK
3