UNPKG

dk-plus

Version:
46 lines (45 loc) 1.48 kB
import r from "./index2.js"; import { resolveComponent as a, openBlock as o, createElementBlock as d, normalizeClass as m, normalizeStyle as p, createElementVNode as n, mergeProps as h, createBlock as t, createCommentVNode as c, createTextVNode as k, toDisplayString as u, renderSlot as f } from "vue"; import y from "../../_virtual/index.js"; const g = { class: "dk-switch_slider" }, w = { class: "dk-switch_title" }; function C(e, i, $, I, S, v) { const s = a("dk-icon"); return o(), d("div", { class: m(e.classList), style: p(e.styleList) }, [ n("label", { class: "dk-switch-wrapper", onChange: i[0] || (i[0] = (...l) => e.handleChange && e.handleChange(...l)) }, [ n("input", h({ ref: "switchRef", type: "checkbox", class: "dk-switch_inner" }, e.$attrs), null, 16), n("div", g, [ e.loading ? (o(), t(s, { key: 0, icon: "IconLoading" })) : c("", !0), !e.loading && e.customIcon ? (o(), t(s, { key: 1, icon: e.customIcon }, null, 8, ["icon"])) : c("", !0), n("span", w, [ e.checkIcon ? (o(), t(s, { key: 0, icon: e.checkIcon, size: "14" }, null, 8, ["icon"])) : c("", !0), k(" " + u(e.checkText) + " ", 1), f(e.$slots, "default") ]) ]) ], 32) ], 6); } const N = /* @__PURE__ */ y(r, [["render", C]]); export { N as default };