JavaScript getDay()与getDate() | 您所在的位置:网站首页 › 函数getdate的功能 › JavaScript getDay()与getDate() |
vue3——自己实现数据无限加载功能的封装
Cha_Shao: 感谢 另外这是ts+setup的代码 [code=javascript] import { ref } from "vue"; import { useIntersectionObserver } from "@vueuse/core"; const props = defineProps({ loading: { type: Boolean, default: false, }, finished: { type: Boolean, default: false, }, }); const emit = defineEmits(["infinite"]); const container = ref(null); useIntersectionObserver( container, (isIntersecting: any, dom: any) => { if (isIntersecting) { // 当`loading`和finished的值都为false时,就通知父组件调用方法继续向后台请求数据 if (props.loading === false && props.finished === false) { emit("infinite"); } } }, { threshold: 0, } ); [/code] 全屏功能的实现及实际应用@王大白: F11监听貌似没有生效,博主 Vue3封装 page 分页组件
Miya锤:
范喜来: 小兔鲜儿?哈哈哈哈哈 Vue3自己封装 confirm 函数weixin_44896746: 这个怎么使用啊,confirm.vue是要全局注册嘛,有完整的代码嘛 |
CopyRight 2018-2019 实验室设备网 版权所有 |