@vuesax-alpha/nightly
Version:
A Component Library for Vue 3
42 lines (39 loc) • 1.17 kB
JavaScript
import '../../../utils/index.mjs';
import '../../../constants/index.mjs';
import '../../../hooks/index.mjs';
import { buildProps } from '../../../utils/vue/props/runtime.mjs';
import { useColorProp } from '../../../hooks/use-common-props/index.mjs';
import { UPDATE_MODEL_EVENT, CHANGE_EVENT } from '../../../constants/event.mjs';
import { isString } from '@vue/shared';
import { isNumber, isBoolean } from '../../../utils/types.mjs';
const radioProps = buildProps({
color: useColorProp,
modelValue: {
type: [Boolean, String, Number],
default: null
},
value: {
type: [Boolean, String, Number],
default: ""
},
disabled: { type: Boolean, default: false },
label: {
type: [String, Number, Boolean],
default: ""
},
name: { type: String, default: "" },
loading: {
type: Boolean,
default: false
},
labelBefore: {
type: Boolean,
default: false
}
});
const radioEmits = {
[UPDATE_MODEL_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val),
[CHANGE_EVENT]: (val) => isString(val) || isNumber(val) || isBoolean(val)
};
export { radioEmits, radioProps };
//# sourceMappingURL=radio2.mjs.map