摘要: vue.config.js配置具体代理规则 module.exports = { devServer: { proxy: { '/api1': { // 匹配所有以 '/api1'开头的请求路径 target: 'http://localhost:5000', // 代理目标的基础路径 change 阅读全文
posted @ 2021-08-18 14:13 至安 阅读(355) 评论(0) 推荐(0) 编辑
摘要: 动画 <template> <div> <button @click="isShow = !isShow">显示/隐藏</button> <transition name="hello" appear> <h1 v-show="isShow">你好啊!</h1> </transition> </di 阅读全文
posted @ 2021-08-18 10:53 至安 阅读(90) 评论(0) 推荐(0) 编辑
摘要: 语法:this.$nextTick(callback) 问题:同一个方法内的某一行代码需要它前面的代码渲染成功才能正确执行,但Vue要执行完一个方法里的所有代码才会渲染,这就产生了矛盾 作用:在下一次 DOM 更新结束后执行其指定的回调。 阅读全文
posted @ 2021-08-18 10:37 至安 阅读(137) 评论(0) 推荐(0) 编辑