UNPKG

t-fighting-design

Version:

Fighting design can quickly build interactive interfaces in vue3 applications, which looks good.

29 lines (28 loc) 561 B
import { ref as l } from "vue"; import { keepDecimal as u } from "../../_utils/index3.js"; const i = () => { const e = l(1), r = l(0), o = () => { u(e.value, 1) <= 0.2 || (e.value -= 0.2); }, t = () => { e.value >= 10 || (e.value += 0.2); }; return { scale: e, rotate: r, smaller: o, bigger: t, onImgMousewheel: (n) => { if (n.preventDefault(), n.deltaY > 1) { o(); return; } t(); }, recovery: () => { e.value = 1, r.value = 0; } }; }; export { i as useOperationImg };