UNPKG

tdesign-vue

Version:
71 lines (67 loc) 2.77 kB
/** * tdesign v1.14.1 * (c) 2025 tdesign * @license MIT */ import { h as helper } from '../_chunks/dep-6a4dc7bb.js'; import _defineProperty from '@babel/runtime/helpers/defineProperty'; import Vue from 'vue'; import { renderContent } from '../utils/render-tnode.js'; import props from './props.js'; import _Radio from './radio.js'; import '@babel/runtime/helpers/readOnlyError'; import '@babel/runtime/helpers/typeof'; import '@vue/composition-api'; import 'lodash-es'; import '../utils/helper.js'; import '@babel/runtime/helpers/objectWithoutProperties'; import '@babel/runtime/helpers/slicedToArray'; import '../utils/event.js'; import '../config-provider/config-receiver.js'; import '../config-provider/context.js'; import '../_common/js/global-config/default-config.js'; import '../_common/js/global-config/locale/zh_CN.js'; import '../_chunks/dep-ba613a02.js'; import '../_chunks/dep-fdb1b253.js'; import 'dayjs'; import '../_common/js/global-config/t.js'; import '../utils/mixins.js'; function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; } function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; } var _RadioButton = Vue.extend({ name: "TRadioButton", inheritAttrs: false, props: _objectSpread({}, props), components: { Radio: _Radio }, provide: function provide() { return { radioButton: this }; }, inject: { radioGroup: { "default": void 0 } }, render: function render() { var h = arguments[0]; var $props = this.$props, $listeners = this.$listeners, radioGroup = this.radioGroup; var radioProps = { props: _objectSpread({}, $props), on: $listeners }; if (radioGroup) { radioProps.props.checked = $props.value === radioGroup.value; radioProps.props.disabled = $props.disabled === void 0 ? radioGroup.disabled : $props.disabled; radioProps.props.readonly = $props.readonly === void 0 ? radioGroup.readonly : $props.readonly; radioProps.props.name = radioGroup.name; } return h(_Radio, helper([{}, radioProps]), [renderContent(this, "default", "label")]); } }); export { _RadioButton as default }; //# sourceMappingURL=radio-button.js.map