@fesjs/fes-design
Version:
fes-design for PC
234 lines (228 loc) • 11.8 kB
JavaScript
import { defineComponent, openBlock, createElementBlock, createElementVNode, createCommentVNode, createStaticVNode } from 'vue';
// 全局计数器,用于生成唯一ID
let idCounter = 0;
/**
* 生成唯一ID的工具函数
* 结合计数器和时间戳确保每个组件实例的唯一性
* @returns {string} 唯一标识符
*/
function generateUniqueId() {
return `empty-${++idCounter}-${Date.now()}`;
}
var script = defineComponent({
name: 'DefaultImgEmpty',
setup() {
// 为每个组件实例生成唯一ID,避免SVG渐变定义冲突
const uniqueId = generateUniqueId();
return {
uniqueId
};
}
});
const _hoisted_1 = {
class: "empty-svg",
viewBox: "0 0 260 249",
version: "1.1",
xmlns: "http://www.w3.org/2000/svg",
"xmlns:xlink": "http://www.w3.org/1999/xlink"
};
const _hoisted_2 = ["id"];
const _hoisted_3 = ["id"];
const _hoisted_4 = ["id"];
const _hoisted_5 = ["id"];
const _hoisted_6 = ["id"];
const _hoisted_7 = ["id"];
const _hoisted_8 = ["id"];
const _hoisted_9 = ["id"];
const _hoisted_10 = ["id"];
const _hoisted_11 = {
id: "Illustrations",
stroke: "none",
"stroke-width": "1",
fill: "none",
"fill-rule": "evenodd"
};
const _hoisted_12 = {
id: "empty-nodata",
transform: "translate(0.000000, 1.017187)",
"fill-rule": "nonzero"
};
const _hoisted_13 = {
id: "Group-1",
transform: "translate(0.000000, 91.892457)"
};
const _hoisted_14 = {
id: "Group-1-1"
};
const _hoisted_15 = ["fill"];
const _hoisted_16 = ["fill"];
const _hoisted_17 = ["fill"];
const _hoisted_18 = ["fill"];
const _hoisted_19 = ["fill"];
const _hoisted_20 = ["fill"];
const _hoisted_21 = ["fill"];
const _hoisted_22 = ["fill"];
const _hoisted_23 = ["fill"];
function render(_ctx, _cache, $props, $setup, $data, $options) {
return openBlock(), createElementBlock("svg", _hoisted_1, [createElementVNode("defs", null, [createCommentVNode(" 线性渐变定义,使用唯一ID避免多个组件实例间的冲突 "), createElementVNode("linearGradient", {
id: `linearGradient-1-${_ctx.uniqueId}`,
x1: "50%",
y1: "15.6101617%",
x2: "50%",
y2: "94.3434704%"
}, _cache[0] || (_cache[0] = [createElementVNode("stop", {
"stop-color": "#F7F7F7",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#FFFFFF",
"stop-opacity": "0",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_2), createElementVNode("linearGradient", {
id: `linearGradient-2-${_ctx.uniqueId}`,
x1: "50%",
y1: "-2.48949813e-15%",
x2: "50%",
y2: "100%"
}, _cache[1] || (_cache[1] = [createElementVNode("stop", {
"stop-color": "#F6F6F6",
offset: "15.7653382%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#EEEEEE",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_3), createElementVNode("linearGradient", {
id: `linearGradient-3-${_ctx.uniqueId}`,
x1: "50%",
y1: "100%",
x2: "50%",
y2: "-2.48949813e-15%"
}, _cache[2] || (_cache[2] = [createElementVNode("stop", {
"stop-color": "#DDDDDD",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#E7E7E7",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_4), createElementVNode("linearGradient", {
id: `linearGradient-4-${_ctx.uniqueId}`,
x1: "50%",
y1: "100%",
x2: "50%",
y2: "-2.48949813e-15%"
}, _cache[3] || (_cache[3] = [createElementVNode("stop", {
"stop-color": "#D6D6D6",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#DBDBDB",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_5), createElementVNode("linearGradient", {
id: `linearGradient-5-${_ctx.uniqueId}`,
x1: "100%",
y1: "50%",
x2: "0.124801956%",
y2: "50%"
}, _cache[4] || (_cache[4] = [createElementVNode("stop", {
"stop-color": "#E0E0E0",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#E6E6E6",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_6), createElementVNode("linearGradient", {
id: `linearGradient-6-${_ctx.uniqueId}`,
x1: "-2.22044605e-14%",
y1: "50%",
x2: "100%",
y2: "50%"
}, _cache[5] || (_cache[5] = [createElementVNode("stop", {
"stop-color": "#F5F5F5",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#EBEBEB",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_7), createElementVNode("linearGradient", {
id: `linearGradient-7-${_ctx.uniqueId}`,
x1: "-2.22044605e-14%",
y1: "50%",
x2: "100%",
y2: "50%"
}, _cache[6] || (_cache[6] = [createElementVNode("stop", {
"stop-color": "#EDEDED",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#FAFAFA",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_8), createElementVNode("linearGradient", {
id: `linearGradient-8-${_ctx.uniqueId}`,
x1: "-2.22044605e-14%",
y1: "50%",
x2: "100%",
y2: "50%"
}, _cache[7] || (_cache[7] = [createElementVNode("stop", {
"stop-color": "#FFFFFF",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#F7F7F7",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_9), createElementVNode("linearGradient", {
id: `linearGradient-9-${_ctx.uniqueId}`,
x1: "-2.22044605e-14%",
y1: "50%",
x2: "100%",
y2: "50%"
}, _cache[8] || (_cache[8] = [createElementVNode("stop", {
"stop-color": "#FFFFFF",
offset: "0%"
}, null, -1 /* HOISTED */), createElementVNode("stop", {
"stop-color": "#F7F7F7",
offset: "100%"
}, null, -1 /* HOISTED */)]), 8 /* PROPS */, _hoisted_10)]), createElementVNode("g", _hoisted_11, [createElementVNode("g", _hoisted_12, [createElementVNode("g", _hoisted_13, [createElementVNode("g", _hoisted_14, [createCommentVNode(" 使用动态绑定的渐变引用,确保每个组件实例的唯一性 "), createElementVNode("path", {
id: "Oval-1",
d: "M260,146.301035 C260,133.413733 201.797017,122.966511 130,122.966511 C58.2029825,122.966511 0,133.413733 0,146.301035 C0,159.188336 260,159.188336 260,146.301035 Z",
fill: `url(#linearGradient-1-${_ctx.uniqueId})`
}, null, 8 /* PROPS */, _hoisted_15), createElementVNode("path", {
id: "Rectangle-1",
d: "M184,0 L54,0 L54,124.46629 C54,126.473725 55.6273476,128.101072 57.6347826,128.101072 L184,128.101072 L184,128.101072 L184,0 Z",
fill: `url(#linearGradient-2-${_ctx.uniqueId})`
}, null, 8 /* PROPS */, _hoisted_16), createElementVNode("path", {
id: "Rectangle-Copy-1",
d: "M184.000001,1.13686838e-13 L210.009578,1.13686838e-13 L210.009578,128.101072 L187.634784,128.101072 C185.627349,128.101072 184.000001,126.473725 184.000001,124.46629 L184.000001,1.13686838e-13 L184.000001,1.13686838e-13 Z",
fill: `url(#linearGradient-3-${_ctx.uniqueId})`,
transform: "translate(197.004789, 64.050536) scale(-1, 1) translate(-197.004789, -64.050536) "
}, null, 8 /* PROPS */, _hoisted_17), createElementVNode("polygon", {
id: "Rectangle-Copy-2",
fill: `url(#linearGradient-4-${_ctx.uniqueId})`,
transform: "translate(196.954349, 16.551537) scale(-1, 1) translate(-196.954349, -16.551537) ",
points: "184.000001 3.41060513e-13 209.908696 6.82390337e-13 209.908696 33.1030746 184.000001 33.1030746"
}, null, 8 /* PROPS */, _hoisted_18), createElementVNode("polygon", {
id: "Rectangle-2",
fill: `url(#linearGradient-5-${_ctx.uniqueId})`,
opacity: "0.898363386",
points: "54 26.5915493 174.685305 26.5915493 183.908695 3.41060513e-13 184 32.915493 54 32.915493"
}, null, 8 /* PROPS */, _hoisted_19), createElementVNode("polygon", {
id: "Rectangle-Copy-4",
fill: `url(#linearGradient-6-${_ctx.uniqueId})`,
points: "209.908695 1.13686838e-13 221 26.7978558 193.908695 26.5915493 183.908695 1.13686838e-13"
}, null, 8 /* PROPS */, _hoisted_20), createElementVNode("polygon", {
id: "Rectangle-3",
fill: `url(#linearGradient-7-${_ctx.uniqueId})`,
transform: "translate(113.553972, 13.295775) scale(-1, 1) rotate(-180.000000) translate(-113.553972, -13.295775) ",
points: "43.0584897 7.00000001e-07 174.685305 7.00000001e-07 184.049454 26.59155 53.555527 26.59155"
}, null, 8 /* PROPS */, _hoisted_21)]), createElementVNode("rect", {
id: "Rectangle-Copy-3",
fill: `url(#linearGradient-8-${_ctx.uniqueId})`,
x: "74",
y: "82.1010721",
width: "90",
height: "12",
rx: "2"
}, null, 8 /* PROPS */, _hoisted_22), createElementVNode("rect", {
id: "Shape-Combination-Copy",
fill: `url(#linearGradient-9-${_ctx.uniqueId})`,
x: "74",
y: "58.0505361",
width: "41",
height: "12",
rx: "2"
}, null, 8 /* PROPS */, _hoisted_23)]), _cache[9] || (_cache[9] = createStaticVNode("<g id=\"Group-2\" transform=\"translate(139.921051, 51.951083) rotate(13.000000) translate(-139.921051, -51.951083) translate(82.236144, 11.951083)\"><path id=\"Oval-2\" d=\"M91.7456564,59.9303561 C101.300582,54.2352582 106.317585,48.3805222 106.796667,42.3661483 C107.275748,36.3517743 104.591701,31.738336 98.7445265,28.5258334 C90.9834009,33.375078 87.9571608,39.1543525 89.665806,45.8636569 C92.5013618,53.1300061 93.1946452,57.8189059 91.7456564,59.9303561 Z\" fill=\"#EBEBEB\" transform=\"translate(98.027227, 44.228095) rotate(45.000000) translate(-98.027227, -44.228095) \"></path><path id=\"Path-19\" d=\"M43.9620562,14.1453948 C51.8341075,12.1993611 60.3508564,13.425942 69.4980996,17.8091767 L69.065965,18.7109858 C60.1166388,14.4225903 51.8333983,13.2296392 44.20204,15.1161717 C34.5674285,17.4979245 28.2008849,25.8905476 27.7830303,35.2187165 L27.767,35.691 L28.0249856,35.6333514 C35.7693712,33.9334312 43.3514665,36.1406948 44.011234,42.4207064 L44.039152,42.7491675 C44.3612082,47.6834882 40.6918528,49.5958707 35.8345878,48.0805243 C31.163164,46.6231557 27.233043,42.6157483 26.8474452,38.1836237 C26.8158061,37.8199581 26.7929497,37.456879 26.7787371,37.0946496 L26.774,36.973 L26.5239318,37.0459002 C22.0115192,38.3877984 17.6031554,41.1194376 14.8155789,45.2323995 L14.5870652,45.5783436 C9.26398964,53.8495112 7.04412128,60.7192471 7.8933606,66.1733079 L6.90526697,66.3271617 C6.01143137,60.5866906 8.30309539,53.4947717 13.7461595,45.0371619 C16.6779765,40.4816093 21.4884477,37.4684797 26.4226007,36.0407552 L26.762,35.945 L26.7676579,35.650888 C27.0024681,25.8246795 33.5567708,16.895563 43.593317,14.2397501 L43.9620562,14.1453948 Z M43.0412752,42.8142975 C42.6617554,36.9995582 35.4323911,34.9571728 28.0298424,36.6500843 L27.767,36.712 L27.7766024,37.0198904 C27.7855846,37.2587111 27.7984945,37.4979236 27.8153759,37.7374457 L27.843682,38.0969504 C28.1903012,42.0810488 31.8177556,45.7798375 36.1324064,47.1259018 C40.3954372,48.4558619 43.3103376,46.9366837 43.0412752,42.8142975 Z\" fill=\"#EEEEEE\" transform=\"translate(38.107584, 39.788422) rotate(-120.000000) translate(-38.107584, -39.788422) \"></path></g><polygon id=\"Path-2\" fill=\"#FFFFFF\" points=\"183.81255 91.8126038 184.286358 91.9723094 175.196309 118.940312 43.0584897 118.940312 43.0584897 118.440312 174.836 118.44\"></polygon><polygon id=\"Path-4\" fill=\"#FFFFFF\" points=\"184.283862 91.805548 194.159 118.44 210.009577 118.440312 210.009577 118.940312 193.811048 118.940312 183.815046 91.9793652\"></polygon><polygon id=\"Path-5\" fill=\"#FFFFFF\" points=\"185.049454 92.6323721 185.049454 219.993529 183.049454 219.993529 183.049454 92.6323721\"></polygon>", 4))])])]);
}
script.render = render;
script.__file = "components/empty/imgEmpty.vue";
export { script as default };