💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
[TOC] ## 1、怎么定义vue-router的动态路由?怎么获取传过来的动态参数?  > 答:在router目录下的index.js文件中,对path属性加上/:id。  使用router对象的params.id > <router-link :to\="'/detail/'+item.id"> ## 2. vue怎么获取dom > 利用Vue提供的ref属性以及this.$refs即可实现 ``` <button ref="btn">获取ref</button> this.$refs.btn.style.backgroundColor="#ff0000" ```