mine-h5-ui
Version:
一款轻量级、模块化基于 Vue3.x 的 H5 前端 UI 组件库 👍
21 lines (20 loc) • 534 B
JavaScript
import { ref as t, nextTick as m } from "vue";
const v = (i, u) => {
const e = t(!1), o = t(!1), n = t(""), s = 400, a = (l, f) => {
o.value = !1, u("action", l, f), setTimeout(() => {
e.value = !0;
}, s);
}, c = () => {
a("onOff");
}, r = () => {
a("onOk", i.type === "prompt" ? n.value : void 0);
};
return m(() => {
setTimeout(() => {
o.value = !0;
}, 0);
}), { isShow: o, isDestroy: e, inputValue: n, onCancel: c, onConfirm: r, animationDuration: s };
};
export {
v as useShow
};