UNPKG

xdesign-vue-next

Version:

XDesign Component for vue-next

23 lines (19 loc) 666 B
/** * xdesign v1.0.6 * (c) 2023 xdesign * @license MIT */ import { getCurrentInstance, computed, inject } from 'vue'; function useFormDisabled(extend) { var ctx = getCurrentInstance(); var propsDisabled = computed(function () { return ctx.props.disabled; }); var _inject = inject("formDisabled", /* @__PURE__ */Object.create(null)), disabled = _inject.disabled; return computed(function () { return propsDisabled.value || (disabled === null || disabled === void 0 ? void 0 : disabled.value) || (extend === null || extend === void 0 ? void 0 : extend.value) || false; }); } export { useFormDisabled }; //# sourceMappingURL=hooks.js.map