StickyContext.js 391 B

1234567891011
  1. import isStyleSupport from '../../_util/styleChecker';
  2. import { onMounted, ref } from 'vue';
  3. var supportSticky = ref(false);
  4. export var useProvideSticky = function useProvideSticky() {
  5. onMounted(function () {
  6. supportSticky.value = supportSticky.value || isStyleSupport('position', 'sticky');
  7. });
  8. };
  9. export var useInjectSticky = function useInjectSticky() {
  10. return supportSticky;
  11. };