various-ui
Version:
This is a test version of the Vue 3 component library
68 lines (63 loc) • 2.28 kB
JavaScript
;
Object.defineProperty(exports, '__esModule', { value: true });
var vue = require('vue');
var index = require('./index.js');
var composable = require('./src/composable.js');
var index$1 = require('../../icon/index.js');
const _hoisted_1 = { class: "ui-checkbox-control" };
const _hoisted_2 = ["value", "checked", "disabled"];
const _hoisted_3 = { class: "ui-checkbox-content" };
const __default__ = vue.defineComponent({ name: "UiCheckbox" });
var _sfc_main = /* @__PURE__ */ vue.defineComponent({
...__default__,
props: index.UiCheckboxPropsOption,
emits: index.UiCheckboxEmits,
setup(__props, { emit: __emit }) {
const define = __props;
const emits = __emit;
const { methods, computeds } = composable.useComposable(define, emits);
const { checked, disabled, className } = computeds;
const { switchData } = methods;
;
return (_ctx, _cache) => {
return vue.openBlock(), vue.createElementBlock(
"label",
{
class: vue.normalizeClass(["ui-checkbox", vue.unref(className)])
},
[
vue.createCommentVNode(" \u591A\u9009\u6846\u63A7\u5236\u5668 "),
vue.createElementVNode("div", _hoisted_1, [
vue.createElementVNode("input", {
type: "checkbox",
class: "ui-checkbox-input",
value: _ctx.value,
checked: vue.unref(checked),
disabled: vue.unref(disabled),
onChange: _cache[0] || (_cache[0] = //@ts-ignore
(...args) => vue.unref(switchData) && vue.unref(switchData)(...args))
}, null, 40, _hoisted_2),
vue.createVNode(vue.unref(index$1.UiIcon), {
name: "success",
class: "ui-checkbox-icon"
})
]),
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