tav-ui
Version:
21 lines (16 loc) • 534 B
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
function useLoading(props) {
const loadingRef = vue.ref(vue.unref(props).loading);
vue.watch(() => vue.unref(props).loading, (loading) => {
loadingRef.value = loading;
});
const getLoading = vue.computed(() => vue.unref(loadingRef));
function setLoading(loading) {
loadingRef.value = loading;
}
return { getLoading, setLoading };
}
exports.useLoading = useLoading;
//# sourceMappingURL=useLoading2.js.map