UNPKG

tdesign-mobile-vue

Version:
37 lines (33 loc) 1.1 kB
/** * tdesign v1.7.0 * (c) 2024 TDesign Group * @license MIT */ import { getCurrentInstance, computed, inject } from 'vue'; import { i as isBoolean_1 } from '../_chunks/dep-ea9a17dc.mjs'; import '../_chunks/dep-8bf3054e.mjs'; import '../_chunks/dep-3d249f65.mjs'; import '../_chunks/dep-620d73f7.mjs'; import '../_chunks/dep-9b2de386.mjs'; function useFormDisabled(extend) { var ctx = getCurrentInstance(); var propsDisabled = computed(function () { return ctx === null || ctx === void 0 ? void 0 : ctx.props.disabled; }); var _inject = inject("formDisabled", /* @__PURE__ */Object.create(null)), disabled = _inject.disabled; return computed(function () { if (isBoolean_1(propsDisabled.value)) { return propsDisabled.value; } if (isBoolean_1(extend === null || extend === void 0 ? void 0 : extend.value)) { return extend.value; } if (isBoolean_1(disabled === null || disabled === void 0 ? void 0 : disabled.value)) { return disabled.value; } return false; }); } export { useFormDisabled }; //# sourceMappingURL=hooks.mjs.map