UNPKG

uv-ui

Version:

基于vue3的移动端组件库

86 lines (85 loc) 2.04 kB
import { openBlock as t, createBlock as n, Transition as r, withCtx as c, withDirectives as i, createElementVNode as u, normalizeClass as s, normalizeStyle as d, renderSlot as f, createElementBlock as m, createVNode as g, unref as y, createCommentVNode as v, vShow as k } from "vue"; import B from "../icon/index.js"; import "./tag.vue_vue_type_style_index_0_lang.js"; const C = { name: "UvTag" }, w = /* @__PURE__ */ Object.assign(C, { props: { show: { type: Boolean, default: !0 }, closeable: { type: Boolean, default: !1 }, type: { type: String, default: "primary" }, plain: { type: Boolean, default: !1 }, round: { type: Boolean, default: !1 }, mark: { type: Boolean, default: !1 }, size: { type: String, default: "mini" }, bgColor: { type: String, default: "" }, color: { type: String, default: "" } }, emits: ["close"], setup(e, { emit: l }) { const a = () => { l("close"); }; return (o, h) => (t(), n(r, { name: "tag-face" }, { default: c(() => [ i(u("div", { class: s(["uv-tag", [ e.type, e.plain ? "uv-tag-plain" : "", e.round ? "uv-tag-round" : "", e.mark ? "uv-tag-mark" : "", e.size === "medium" ? "uv-tag-medium" : "", e.size === "large" ? "uv-tag-large" : "" ]]), style: d({ backgroundColor: e.bgColor, color: e.color }) }, [ f(o.$slots, "default"), e.closeable ? (t(), m("div", { key: 0, class: "uv-tag-close", onClick: a }, [ g(y(B), { name: "close", size: "12", color: e.color ? e.color : "#fff" }, null, 8, ["color"]) ])) : v("", !0) ], 6), [ [k, e.show] ]) ]), _: 3 })); } }); export { w as default };