UNPKG

gisviewer-vue3-arcgis

Version:

在应用中引入私服的包, 项目根目录下 新建文件 .npmrc 在 .npmrc 中对包源进行配置:

154 lines (153 loc) 5.49 kB
import { defineComponent as G, computed as l, openBlock as a, createElementBlock as r, normalizeStyle as o, createElementVNode as e, toDisplayString as u, createCommentVNode as m } from "vue"; const x = { key: 0, class: "signal-countdown-container" }, B = ["src"], E = { key: 1, class: "signal-countdown-container" }, z = ["src"], D = { key: 2, class: "signal-countdown-container" }, M = ["src"], P = { key: 3, class: "signal-countdown-container" }, X = ["src"], Y = { key: 4, class: "signal-countdown-container" }, j = ["src"], F = /* @__PURE__ */ G({ __name: "signal-countdown-panel", props: { displayMode: {}, flash: { type: Boolean }, crossId: {}, roadId: {}, mapPoint: {}, stopLine: {}, scale: {}, position: {}, rotation: {}, lampStatus: {} }, setup(d) { const n = ["red", "yellow", "green", "grey"], t = d, S = l(() => ({ top: `${t.position.top}px`, left: `${t.position.left}px`, "transform-origin": "bottom center", transform: `translateX(-50%) translateY(-100%) rotate(${t.rotation}deg) scale(${t.scale})` })), g = l(() => !t.lampStatus.blColor || !n.includes(t.lampStatus.blColor) ? "" : `/GisViewerAssets/Images/SignalLamp/bl-${t.lampStatus.blColor}.png`), y = l(() => i(t.lampStatus.blColor)), b = l(() => ({ display: t.lampStatus.blColor && n.includes(t.lampStatus.blColor) ? "block" : "none", animation: t.flash ? "blink 2s infinite" : "none" })), C = l(() => !t.lampStatus.uColor || !n.includes(t.lampStatus.uColor) ? "" : `/GisViewerAssets/Images/SignalLamp/u-${t.lampStatus.uColor}.png`), h = l(() => i(t.lampStatus.uColor)), v = l(() => ({ display: t.lampStatus.uColor && n.includes(t.lampStatus.uColor) ? "block" : "none", animation: t.flash ? "blink 2s infinite" : "none" })), f = l(() => !t.lampStatus.lColor || !n.includes(t.lampStatus.lColor) ? "" : `/GisViewerAssets/Images/SignalLamp/l-${t.lampStatus.lColor}.png`), w = l(() => i(t.lampStatus.lColor)), k = l(() => ({ display: t.lampStatus.lColor && n.includes(t.lampStatus.lColor) ? "block" : "none", animation: t.flash ? "blink 2s infinite" : "none" })), _ = l(() => !t.lampStatus.sColor || !n.includes(t.lampStatus.sColor) ? "" : `/GisViewerAssets/Images/SignalLamp/s-${t.lampStatus.sColor}.png`), N = l(() => i(t.lampStatus.sColor)), I = l(() => ({ display: t.lampStatus.sColor && n.includes(t.lampStatus.sColor) ? "block" : "none", animation: t.flash ? "blink 2s infinite" : "none" })), L = l(() => !t.lampStatus.rColor || !n.includes(t.lampStatus.rColor) ? "" : `/GisViewerAssets/Images/SignalLamp/r-${t.lampStatus.rColor}.png`), $ = l(() => i(t.lampStatus.rColor)), V = l(() => ({ display: t.lampStatus.rColor && n.includes(t.lampStatus.rColor) ? "block" : "none", animation: t.flash ? "blink 2s infinite" : "none" })), A = (s) => { switch (s) { case "red": return "red"; case "yellow": return "rgb(255, 192, 2)"; case "green": return "lime"; default: return "white"; } }, i = (s) => { const c = { color: A(s) }, p = t.rotation < 0 ? t.rotation + 360 : t.rotation; return p > 135 && p < 225 && (c.transform = "rotate(180deg)"), c; }; return (s, c) => (a(), r("div", { class: "signal-countdown-panel", style: o(S.value) }, [ s.lampStatus.uColor ? (a(), r("div", x, [ e("div", { class: "signal-countdown-number", style: o(h.value) }, u(s.lampStatus.uNumber), 5), e("div", { style: o(v.value) }, [ e("img", { src: C.value, width: "20px", height: "20px" }, null, 8, B) ], 4) ])) : m("", !0), s.lampStatus.blColor ? (a(), r("div", E, [ e("div", { class: "signal-countdown-number", style: o(y.value) }, u(s.lampStatus.blNumber), 5), e("div", { style: o(b.value) }, [ e("img", { src: g.value, width: "20px", height: "20px" }, null, 8, z) ], 4) ])) : m("", !0), s.lampStatus.lColor ? (a(), r("div", D, [ e("div", { class: "signal-countdown-number", style: o(w.value) }, u(s.lampStatus.lNumber), 5), e("div", { style: o(k.value) }, [ e("img", { src: f.value, width: "20px", height: "20px" }, null, 8, M) ], 4) ])) : m("", !0), s.lampStatus.sColor ? (a(), r("div", P, [ e("div", { class: "signal-countdown-number", style: o(N.value) }, u(s.lampStatus.sNumber), 5), e("div", { style: o(I.value) }, [ e("img", { src: _.value, width: "20px", height: "20px" }, null, 8, X) ], 4) ])) : m("", !0), s.lampStatus.rColor !== void 0 ? (a(), r("div", Y, [ e("div", { class: "signal-countdown-number", style: o($.value) }, u(s.lampStatus.rNumber), 5), e("div", { style: o(V.value) }, [ e("img", { src: L.value, width: "20px", height: "20px" }, null, 8, j) ], 4) ])) : m("", !0) ], 4)); } }); export { F as default };