hookehuyr

首页产品中心hover效果调整

<!--
* @Date: 2024-08-27 10:06:30
* @LastEditors: hookehuyr hookehuyr@gmail.com
* @LastEditTime: 2024-10-24 16:34:09
* @LastEditTime: 2024-10-24 17:35:08
* @FilePath: /hager/src/views/index.vue
* @Description: 首页
-->
......@@ -257,7 +257,8 @@ export default {
// 高度监听
this.$nextTick(() => {
this.product_box_height = $('.product-item').outerWidth() - $('.product-title').outerHeight() + 'px';
})
});
window.addEventListener('resize', this.handleHeightResize);
},
beforeDestroy() {
// 在组件销毁前移除监听器,防止内存泄漏
......@@ -564,10 +565,11 @@ export default {
color: #333;
border-radius: 8px;
background-color: #f3f3f3;
transition: transform 0.3s ease-in-out;
overflow: hidden;
&:hover {
color: #F56400;
cursor: pointer;
transform: scale(1.05);
// transform: scale(1.05);
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
&.xs {
......@@ -585,6 +587,12 @@ export default {
background-repeat: no-repeat;
border-top-left-radius: 5px;
border-top-right-radius: 5px;
transition: transform 0.3s ease-in-out;
&:hover {
// cursor: pointer;
transform: scale(1.05);
// box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}
}
}
......