product.js
561 Bytes
import api from '@/api/api'
import {
httpGet,
httpPost
} from '@/api/fetch-api.js'
export default {
data() {
return {
isFixTop: false,
activity: "product"
}
},
components: {},
methods: {
initData() {},
checkBtnGroupFixed() {
if (this.$refs.ruleBtnGroup) {
let top = this.$refs.ruleBtnGroup.getBoundingClientRect().top;
this.isFixTop = top < 0;
}
}
},
computed: {
fixTop() {
return this.isFixTop;
}
},
mounted() {
window.addEventListener("scroll", () => {
this.checkBtnGroupFixed();
});
},
created() {}
}