|
@@ -26,7 +26,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<script>
|
|
<script>
|
|
-import { debounce, throttle } from 'lodash'
|
|
|
|
|
|
+import { throttle } from 'lodash'
|
|
export default {
|
|
export default {
|
|
props: {
|
|
props: {
|
|
typeText:{
|
|
typeText:{
|
|
@@ -52,6 +52,7 @@ export default {
|
|
}
|
|
}
|
|
},
|
|
},
|
|
mounted () {
|
|
mounted () {
|
|
|
|
+ this.windowScrollFn()
|
|
this.$on('hook:mounted', () => {
|
|
this.$on('hook:mounted', () => {
|
|
// dom插入到根元素
|
|
// dom插入到根元素
|
|
window.addEventListener('scroll', this.windowScrollFn)
|
|
window.addEventListener('scroll', this.windowScrollFn)
|
|
@@ -74,7 +75,6 @@ export default {
|
|
},
|
|
},
|
|
windowScrollFn: throttle (function () {
|
|
windowScrollFn: throttle (function () {
|
|
const $ = this.$querySelector.bind(this)
|
|
const $ = this.$querySelector.bind(this)
|
|
- const stickyFooter = $(this.$el)
|
|
|
|
// 吸底
|
|
// 吸底
|
|
// 如果距离底部
|
|
// 如果距离底部
|
|
const bottomFooter = document.querySelector('.j-bottom')
|
|
const bottomFooter = document.querySelector('.j-bottom')
|