status.ts 889 B

1234567891011121314151617181920212223242526272829303132
  1. import { emitNames } from '../enum/emit';
  2. import {ScrollConfig} from "@/components/scroll-view/types/on";
  3. export default <LibMixins>{
  4. methods:{
  5. emitScrollUpper:function (axis:'x'|'y') {
  6. return this.$emit(emitNames.onScrollUpper,axis);
  7. },
  8. emitScrollLower:function (axis:'x'|'y') {
  9. return this.$emit(emitNames.onScrollLower,axis);
  10. },
  11. emitScroll:function (config:ScrollConfig) {
  12. return this.$emit(emitNames.onScroll,config);
  13. }
  14. },
  15. created() {
  16. // x是否执行了到达底部
  17. this._lowerThresholdXStatus = false;
  18. // y是否执行了到达底部
  19. this._lowerThresholdYStatus = false;
  20. // x是否执行了到达顶部
  21. this._upperThresholdXStatus = false;
  22. // y是否执行了到达顶部
  23. this._upperThresholdYStatus = false;
  24. }
  25. }