uv-ui
Version:
基于vue3的移动端组件库
160 lines (159 loc) • 3.98 kB
JavaScript
import { openBlock as l, createElementBlock as n, renderSlot as d, createElementVNode as t, normalizeStyle as r, toDisplayString as h } from "vue";
import "../../hooks/useCountDown.js";
import { useId as _ } from "../../hooks/useId.js";
import "./empty.vue_vue_type_style_index_0_lang.js";
const a = { class: "uv-empty" }, f = {
key: 0,
viewBox: "0 0 160 160"
}, u = ["id"], g = /* @__PURE__ */ t("stop", {
"stop-color": "#F2F3F5",
offset: "0"
}, null, -1), m = /* @__PURE__ */ t("stop", {
"stop-color": "#DCDEE0",
offset: "100%"
}, null, -1), p = [
g,
m
], y = ["id"], x = /* @__PURE__ */ t("stop", {
"stop-color": "#EAEDF1",
offset: "0"
}, null, -1), E = /* @__PURE__ */ t("stop", {
"stop-color": "#DCDEE0",
offset: "100%"
}, null, -1), F = [
x,
E
], v = ["id"], D = /* @__PURE__ */ t("stop", {
"stop-color": "#EAEDF1",
offset: "0"
}, null, -1), w = /* @__PURE__ */ t("stop", {
"stop-color": "#DCDEE0",
offset: "100%"
}, null, -1), S = [
D,
w
], b = {
transform: "translate(36 50)",
fill: "none"
}, z = { transform: "translate(8)" }, B = /* @__PURE__ */ t("rect", {
fill: "#EBEDF0",
opacity: ".6",
x: "38",
y: "13",
width: "36",
height: "53",
rx: "2"
}, null, -1), $ = ["fill"], k = /* @__PURE__ */ t("rect", {
fill: "#FFF",
x: "6",
y: "6",
width: "52",
height: "55",
rx: "1"
}, null, -1), I = ["fill"], A = /* @__PURE__ */ t("rect", {
width: "34",
height: "6",
rx: "1"
}, null, -1), C = /* @__PURE__ */ t("path", { d: "M0 14h34v6H0z" }, null, -1), G = /* @__PURE__ */ t("rect", {
y: "28",
width: "34",
height: "6",
rx: "1"
}, null, -1), N = [
A,
C,
G
], U = ["fill"], j = /* @__PURE__ */ t("rect", {
fill: "#F7F8FA",
x: "29",
y: "72",
width: "30",
height: "6",
rx: "1"
}, null, -1), H = ["src"], M = { class: "uv-empty-label" }, O = {
name: "UvEmpty"
}, P = /* @__PURE__ */ Object.assign(O, {
props: {
image: {
type: String,
default: "default"
},
imageSize: {
type: [String, Number],
default: "160"
},
label: {
type: String,
default: ""
}
},
setup(o) {
const c = _(), s = (e) => `${c}-${e}`, i = (e) => `url(#${s(e)})`;
return (e, V) => (l(), n("div", a, [
d(e.$slots, "image", {}, () => [
t("div", {
class: "uv-empty-image",
style: r({ width: o.imageSize + "px", height: o.imageSize + "px" })
}, [
o.image === "default" ? (l(), n("svg", f, [
t("defs", null, [
t("linearGradient", {
x1: "50%",
x2: "50%",
y2: "100%",
id: s(5)
}, p, 8, u),
t("linearGradient", {
x1: "95%",
y1: "48%",
x2: "5.5%",
y2: "51%",
id: s(6)
}, F, 8, y),
t("linearGradient", {
y1: "45%",
x2: "100%",
y2: "54%",
id: s(7)
}, S, 8, v)
]),
t("g", b, [
t("g", z, [
B,
t("rect", {
fill: i(5),
width: "64",
height: "66",
rx: "2"
}, null, 8, $),
k,
t("g", {
transform: "translate(15 17)",
fill: i(6)
}, N, 8, I)
]),
t("rect", {
fill: i(7),
y: "61",
width: "88",
height: "28",
rx: "1"
}, null, 8, U),
j
])
])) : (l(), n("img", {
key: 1,
src: o.image,
alt: ""
}, null, 8, H))
], 4)
]),
d(e.$slots, "default", {}, () => [
t("div", M, h(o.label), 1)
])
]));
}
});
export {
P as default
};