vue知识点
1、自定义指令知识点
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
。。。。
。。。
2、插件
![](https://images.cnblogs.com/OutliningIndicators/ContractedBlock.gif)
1 定义,在js文件中 2 3 export default { 4 5 install : (app, options) =>{ 6 7 app.config.globalPropertis.$translation = (key) => { 8 9 return key.split(".").reduce((o,i)=>{ 10 11 if (o) return o[i] 12 }, options) 13 } 14 } 15 16 } 17 18 19 20 21 22 全局导入 23 24 import i18s from './plugins/i18n.js' 25 26 注册 27 28 app.user(i18s, { 29 30 gretting:{ 31 32 hello: '你好!' 33 } 34 35 }) 36 37 38 39 使用 40 41 <h1> {{ $translation(greeting.hello) }} <h1> 插件
2、内置组件