various-ui
Version:
This is a test version of the Vue 3 component library
69 lines (64 loc) • 2.21 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var index = require('./index.js');
var composable = require('./src/composable.js');
const _hoisted_1 = { class: "ui-radio-control" };
const _hoisted_2 = ["value", "checked"];
const _hoisted_3 = { class: "ui-radio-content" };
const __default__ = vue.defineComponent({ name: "UiRadio" });
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: index.UiRadioPropsOption,
emits: index.UiRadioEmits,
setup(__props, { emit: __emit }) {
const define = __props;
const emits = __emit;
const { methods, computeds } = composable.useComposable(define, emits);
const { switchRatio } = methods;
const { className, checked } = computeds;
;
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock(
"label",
{
class: vue.normalizeClass(["ui-radio", vue.unref(className)])
},
[
vue.createCommentVNode(" \u591A\u9009\u6846\u63A7\u5236\u5668 "),
vue.createElementVNode("div", _hoisted_1, [
_cache[1] || (_cache[1] = vue.createElementVNode(
"div",
{ class: "ui-radio-circle" },
null,
-1
/* HOISTED */
)),
vue.createElementVNode("input", {
type: "radio",
class: "ui-radio-input",
value: _ctx.value,
checked: vue.unref(checked),
onChange: _cache[0] || (_cache[0] = //@ts-ignore
(...args) => vue.unref(switchRatio) && vue.unref(switchRatio)(...args))
}, null, 40, _hoisted_2)
]),
vue.createCommentVNode(" \u591A\u9009\u6846\u6587\u6848 "),
vue.createElementVNode("div", _hoisted_3, [
vue.renderSlot(_ctx.$slots, "default", {}, () => [
vue.createTextVNode(
vue.toDisplayString(_ctx.value),
1
/* TEXT */
)
])
])
],
2
/* CLASS */
);
};
}
});
exports.default = _sfc_main;
//# sourceMappingURL=index.vue2.js.map