uv-ui
Version:
基于vue3的移动端组件库
62 lines (61 loc) • 1.77 kB
JavaScript
import { openBlock as o, createElementBlock as s, createElementVNode as e, normalizeStyle as l, createVNode as c, unref as n, createCommentVNode as a, toDisplayString as i } from "vue";
import d from "../icon/index.js";
import "./toast.vue_vue_type_style_index_0_lang.js";
const u = { class: "uv-toast" }, r = {
key: 0,
class: "uv-toast-value-icon"
}, m = {
key: 1,
class: "uv-toast-loading"
}, v = /* @__PURE__ */ e("div", { class: "uv-toast-loading-item" }, null, -1), g = /* @__PURE__ */ e("div", { class: "uv-toast-loading-item" }, null, -1), y = /* @__PURE__ */ e("div", { class: "uv-toast-loading-item" }, null, -1), f = /* @__PURE__ */ e("div", { class: "uv-toast-loading-item" }, null, -1), _ = [
v,
g,
y,
f
], h = { class: "uv-toast-message" }, b = {
name: "Toast"
}, V = /* @__PURE__ */ Object.assign(b, {
props: {
message: {
type: String,
default: ""
},
duration: {
type: Number,
default: 1600
},
bgColor: {
type: String,
default: "#4a4a4b"
},
color: {
type: String,
default: "#fff"
},
type: {
type: String,
default: ""
}
},
setup(t) {
return (p, S) => (o(), s("div", u, [
e("div", {
class: "uv-toast-value",
style: l({ backgroundColor: t.bgColor, color: t.color })
}, [
t.type === "success" || t.type === "error" ? (o(), s("div", r, [
c(n(d), {
name: t.type,
size: "36",
color: t.type === "success" ? "#07c160" : "#f56c6c"
}, null, 8, ["name", "color"])
])) : a("", !0),
t.type === "loading" ? (o(), s("div", m, _)) : a("", !0),
e("div", h, i(t.message), 1)
], 4)
]));
}
});
export {
V as default
};