@zhsz/cool-design-dv
Version:
386 lines (385 loc) • 13.3 kB
JavaScript
import { defineComponent, useAttrs, getCurrentInstance, inject, onMounted, onBeforeUnmount, openBlock, createBlock, unref, mergeProps, withCtx, createElementBlock, normalizeStyle, createElementVNode, renderSlot } from "vue";
import "./style.css";
import Box from "../dv-box/index.mjs";
import { baseConfig } from "../../hooks/useConfig.mjs";
import { useHeader } from "../../hooks/useHeader.mjs";
import { dvPageSymbols } from "../../symbols/index.mjs";
import { addResizeListener, removeResizeListener } from "../../utils/resize-event.mjs";
const _hoisted_1 = {
id: "my-dv-header6-SVGID_1_",
cx: "-65.2149",
cy: "-245.8751",
r: "755.9723",
fx: "-65.5286",
fy: "-471.926",
gradientTransform: "matrix(0.8529 0 0 0.145 56.011 -9.8191)",
gradientUnits: "userSpaceOnUse"
};
const _hoisted_2 = /* @__PURE__ */ createElementVNode("path", {
class: "st0",
d: "M641.6,24.3c0,13.4-248.1,24.3-554.2,24.3c-35.5,0-87.5-0.3-87.5-0.3L0.3,0c0,0,54.2,0,87.1,0\nc242.8,0,554.3,0,554.3,0S641.6,21.6,641.6,24.3z"
}, null, -1);
const _hoisted_3 = { class: "st1" };
const _hoisted_4 = {
id: "my-dv-header6-SVGID_2_",
gradientUnits: "userSpaceOnUse",
x1: "595.2904",
y1: "49.9371",
x2: "595.2904",
y2: "10.4375",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_5 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st2",
points: "593.2,49.9 620.1,49.9 659.5,10.4 632.7,10.4"
}, null, -1);
const _hoisted_6 = /* @__PURE__ */ createElementVNode("animate", {
accumulate: "none",
additive: "replace",
attributeName: "opacity",
begin: "0s",
calcMode: "linear",
dur: "3s",
fill: "remove",
repeatCount: "indefinite",
restart: "always",
values: "0.6;0.4;0.3"
}, null, -1);
const _hoisted_7 = { class: "st3" };
const _hoisted_8 = {
id: "my-dv-header6-SVGID_3_",
gradientUnits: "userSpaceOnUse",
x1: "618.7816",
y1: "54.4375",
x2: "618.7816",
y2: "10.4375",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_9 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st4",
points: "566,54.4 595.8,54.4 639.8,10.4 609.9,10.4 "
}, null, -1);
const _hoisted_10 = /* @__PURE__ */ createElementVNode("animate", {
accumulate: "none",
additive: "replace",
attributeName: "opacity",
begin: "0.2s",
calcMode: "linear",
dur: "3s",
fill: "remove",
repeatCount: "indefinite",
restart: "always",
values: "0.3;0.4;0.6"
}, null, -1);
const _hoisted_11 = { class: "st1" };
const _hoisted_12 = {
id: "my-dv-header6-SVGID_4_",
gradientUnits: "userSpaceOnUse",
x1: "-53.7348",
y1: "72.6793",
x2: "-53.7348",
y2: "45.5429",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_13 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st5",
points: "631.5,73.9 1919.3,73.9 1919.3,43.8 661.6,43.8 "
}, null, -1);
const _hoisted_14 = { class: "st1" };
const _hoisted_15 = {
id: "my-dv-header6-SVGID_5_",
gradientUnits: "userSpaceOnUse",
x1: "31.6832",
y1: "41.7663",
x2: "31.6832",
y2: "5.5625",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_16 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st6",
points: "1159.6,41.8 1184.2,41.8 1220.3,5.6 1195.8,5.6 "
}, null, -1);
const _hoisted_17 = /* @__PURE__ */ createElementVNode("animate", {
accumulate: "none",
additive: "replace",
attributeName: "opacity",
begin: "0.8s",
calcMode: "linear",
dur: "3s",
fill: "remove",
repeatCount: "indefinite",
restart: "always",
values: "0.6;0.2"
}, null, -1);
const _hoisted_18 = { class: "st3" };
const _hoisted_19 = {
id: "my-dv-header6-SVGID_6_",
gradientUnits: "userSpaceOnUse",
x1: "63.7332",
y1: "41.7663",
x2: "63.7332",
y2: "5.5625",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_20 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st7",
points: "1127.6,41.8 1152.1,41.8 1188.3,5.6 1163.7,5.6 "
}, null, -1);
const _hoisted_21 = /* @__PURE__ */ createElementVNode("animate", {
accumulate: "none",
additive: "replace",
attributeName: "opacity",
begin: "0.4s",
calcMode: "linear",
dur: "3s",
fill: "remove",
repeatCount: "indefinite",
restart: "always",
values: "0.8;0.4"
}, null, -1);
const _hoisted_22 = {
id: "my-dv-header6-SVGID_7_",
gradientUnits: "userSpaceOnUse",
x1: "95.7832",
y1: "41.7663",
x2: "95.7832",
y2: "5.5625",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_23 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st8",
points: "1095.5,41.8 1120.1,41.8 1156.2,5.6 1131.7,5.6 "
}, null, -1);
const _hoisted_24 = /* @__PURE__ */ createElementVNode("animate", {
accumulate: "none",
additive: "replace",
attributeName: "opacity",
begin: "0s",
calcMode: "linear",
dur: "3s",
fill: "remove",
repeatCount: "indefinite",
restart: "always",
values: "1;0.6"
}, null, -1);
const _hoisted_25 = {
id: "my-dv-header6-SVGID_8_",
gradientUnits: "userSpaceOnUse",
x1: "538.7734",
y1: "23.6644",
x2: "97.4729",
y2: "23.6644",
gradientTransform: "matrix(-1 0 0 1 1221.6563 0)"
};
const _hoisted_26 = /* @__PURE__ */ createElementVNode("polygon", {
class: "st9",
points: "682.9,41.8 1088,41.8 1124.2,5.6 719,5.6 "
}, null, -1);
const _hoisted_27 = { class: "st10" };
const _hoisted_28 = ["stroke"];
const _hoisted_29 = ["fill"];
const _hoisted_30 = { class: "st1" };
const _hoisted_31 = ["stroke"];
const _hoisted_32 = ["fill"];
const __default__ = defineComponent({
name: "DvHeader6",
inheritAttrs: false
});
const _sfc_main = /* @__PURE__ */ defineComponent({
...__default__,
emits: ["resize"],
setup(__props, { emit: __emit }) {
var _a, _b, _c;
const $attrs = useAttrs();
const instance = (_a = getCurrentInstance()) == null ? void 0 : _a.proxy;
const page = inject(dvPageSymbols, null);
const emits = __emit;
const { svgStyle, resize, color } = useHeader(
emits,
((_c = (_b = page == null ? void 0 : page.settings) == null ? void 0 : _b.value) == null ? void 0 : _c.color) ?? baseConfig.color,
page
);
onMounted(() => {
resize(instance == null ? void 0 : instance.$el);
addResizeListener(instance == null ? void 0 : instance.$el, () => resize(instance == null ? void 0 : instance.$el));
});
onBeforeUnmount(() => {
removeResizeListener(instance == null ? void 0 : instance.$el, () => resize(instance == null ? void 0 : instance.$el));
});
return (_ctx, _cache) => {
return openBlock(), createBlock(unref(Box), mergeProps({
class: "my-dv-header6",
"default-width": "100%",
"default-height": "auto",
top: "0px",
left: "0px"
}, unref($attrs)), {
default: withCtx(() => [
(openBlock(), createElementBlock("svg", {
width: "1920px",
height: "90px",
style: normalizeStyle(unref(svgStyle))
}, [
createElementVNode("radialGradient", _hoisted_1, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4)
]),
_hoisted_2,
createElementVNode("g", _hoisted_3, [
createElementVNode("linearGradient", _hoisted_4, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_5,
_hoisted_6
]),
createElementVNode("g", _hoisted_7, [
createElementVNode("linearGradient", _hoisted_8, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_9,
_hoisted_10
]),
createElementVNode("g", _hoisted_11, [
createElementVNode("linearGradient", _hoisted_12, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4)
]),
_hoisted_13
]),
createElementVNode("g", _hoisted_14, [
createElementVNode("linearGradient", _hoisted_15, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_16,
_hoisted_17
]),
createElementVNode("g", _hoisted_18, [
createElementVNode("linearGradient", _hoisted_19, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_20,
_hoisted_21
]),
createElementVNode("g", null, [
createElementVNode("linearGradient", _hoisted_22, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_23,
_hoisted_24
]),
createElementVNode("g", null, [
createElementVNode("linearGradient", _hoisted_25, [
createElementVNode("stop", {
offset: "0",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0`)
}, null, 4),
createElementVNode("stop", {
offset: "1",
style: normalizeStyle(`stop-color:${unref(color)};stop-opacity:0.9`)
}, null, 4)
]),
_hoisted_26
]),
createElementVNode("g", _hoisted_27, [
createElementVNode("g", null, [
createElementVNode("line", {
class: "st11",
stroke: unref(color),
x1: "1919.3",
y1: "75.5",
x2: "610.8",
y2: "75.5"
}, null, 8, _hoisted_28),
createElementVNode("g", null, [
createElementVNode("rect", {
x: "607.7",
y: "72.2",
fill: unref(color),
width: "6.6",
height: "6.6"
}, null, 8, _hoisted_29)
])
])
]),
createElementVNode("g", _hoisted_30, [
createElementVNode("g", null, [
createElementVNode("polyline", {
class: "st11",
stroke: unref(color),
points: "1919.5,5.6 1229.5,5.6 1198.3,36.8 "
}, null, 8, _hoisted_31),
createElementVNode("g", null, [
createElementVNode("rect", {
x: "1195.1",
y: "33.4",
transform: "matrix(0.7071 -0.7071 0.7071 0.7071 325.0493 858.1429)",
fill: unref(color),
width: "6.6",
height: "6.6"
}, null, 8, _hoisted_32)
])
])
])
], 4)),
createElementVNode("div", {
class: "my-dv-header6__content",
style: normalizeStyle(unref(svgStyle))
}, [
renderSlot(_ctx.$slots, "default")
], 4)
]),
_: 3
}, 16);
};
}
});
export {
_sfc_main as default
};