birdpaper-ui
Version:
一个通用的 vue3 UI组件库。A common vue3 UI component library.
36 lines (35 loc) • 1.48 kB
JavaScript
import _sfc_main from "./switch.vue2.js";
import { openBlock, createElementBlock, normalizeClass, createElementVNode, toDisplayString, createCommentVNode } from "vue";
import _export_sfc from "../../_virtual/_plugin-vue_export-helper.js";
const _hoisted_1 = {
key: 0,
class: "switch-icon-loading ri-loader-4-line"
};
function _sfc_render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("div", {
class: normalizeClass(_ctx.cls),
onClick: _cache[0] || (_cache[0] = (...args) => _ctx.handleClick && _ctx.handleClick(...args))
}, [
createElementVNode("input", {
type: "checkbox",
class: normalizeClass(`${_ctx.name}-inner`)
}, null, 2),
createElementVNode("div", {
class: normalizeClass([`${_ctx.name}-slider`, _ctx.isCheck ? `${_ctx.name}-check` : ""])
}, [
_ctx.checkText || _ctx.uncheckText ? (openBlock(), createElementBlock("span", {
key: 0,
class: normalizeClass(`${_ctx.name}-slider-inner`)
}, toDisplayString(_ctx.isCheck ? _ctx.checkText : _ctx.uncheckText), 3)) : createCommentVNode("", true),
createElementVNode("span", {
class: normalizeClass(`${_ctx.name}-slider-dot`)
}, [
_ctx.loading ? (openBlock(), createElementBlock("i", _hoisted_1)) : createCommentVNode("", true)
], 2)
], 2)
], 2);
}
const _switch = /* @__PURE__ */ _export_sfc(_sfc_main, [["render", _sfc_render]]);
export {
_switch as default
};