UNPKG

@opentiny/vue-renderless

Version:

An enterprise-class UI component library, support both Vue.js 2 and Vue.js 3, as well as PC and mobile.

21 lines (20 loc) 548 B
import "../chunk-G2ADBYYC.js"; import { emulate } from "@opentiny/utils"; import { onTouchstart, onTouchmove, clearScroll } from "./index"; emulate(); const api = ["state", "onTouchstart", "onTouchmove", "clearScroll"]; const renderless = (props, { reactive }, { vm }) => { const api2 = {}; const state = reactive({ last: -1 }); Object.assign(api2, { state, onTouchstart: onTouchstart(state), onTouchmove: onTouchmove({ props, state, vm }), clearScroll: clearScroll(vm) }); return api2; }; export { api, renderless };