product.js
523 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() {
let top = this.$refs.ruleBtnGroup.getBoundingClientRect().top;
this.isFixTop = top < 0;
}
},
computed: {
fixTop() {
return this.isFixTop;
}
},
mounted() {
window.addEventListener("scroll", () => {
this.checkBtnGroupFixed();
});
},
created() { }
}