tdesign-vue-next
Version:
TDesign Component for vue-next
39 lines (33 loc) • 1.28 kB
JavaScript
/**
* tdesign v1.11.5
* (c) 2025 tdesign
* @license MIT
*/
;
Object.defineProperty(exports, '__esModule', { value: true });
var Vue = require('vue');
function useFormDisabled(extend) {
var ctx = Vue.getCurrentInstance();
var propsDisabled = Vue.computed(function () {
return ctx.props.disabled;
});
var _inject = Vue.inject("formDisabled", /* @__PURE__ */Object.create(null)),
disabled = _inject.disabled;
return Vue.computed(function () {
return propsDisabled.value || (disabled === null || disabled === void 0 ? void 0 : disabled.value) || (extend === null || extend === void 0 ? void 0 : extend.value) || false;
});
}
function useFormReadonly(extend) {
var ctx = Vue.getCurrentInstance();
var propsReadonly = Vue.computed(function () {
return ctx.props.readonly;
});
var _inject2 = Vue.inject("formReadonly", /* @__PURE__ */Object.create(null)),
readonly = _inject2.readonly;
return Vue.computed(function () {
return propsReadonly.value || (readonly === null || readonly === void 0 ? void 0 : readonly.value) || (extend === null || extend === void 0 ? void 0 : extend.value) || false;
});
}
exports.useFormDisabled = useFormDisabled;
exports.useFormReadonly = useFormReadonly;
//# sourceMappingURL=index.js.map