![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
vue
老虎吃大虫
亦余心之所善兮 虽九死其犹未悔
展开
-
vue无缝滚动
无缝滚动原创 2023-02-24 15:33:56 · 137 阅读 · 0 评论 -
vue中混入(mixin)的使用
混入 (mixin) 提供了一种非常灵活的方式,来分发 Vue 组件中的可复用功能。一个混入对象可以包含任意组件选项。当组件使用混入对象时,所有混入对象的选项将被“混合”进入该组件本身的选项。原创 2023-02-24 15:31:00 · 323 阅读 · 0 评论 -
watch监听
1.监听(userName为变化后的值,oldName为变化前的值) <input type="text" v-model="userName"/> //监听 当userName值发生变化时触发 watch: { userName (newName, oldName) { console.log(newName) } } 2.第一次不会监听,immediate为true时监听 <input type="text" v-model="data原创 2022-04-01 20:13:05 · 112 阅读 · 0 评论 -
Vue设置动态样式
<div class="background-jianbian" :style="{ width: scrollerHeight(item.jianWidth),background: item.topsColor,}" ></div> <div class="link" :style="styleVar(item)"></div> methods: { scrollerHeight(width) { return .原创 2022-03-08 09:38:48 · 1198 阅读 · 0 评论