vpuserlayout
Advanced tools
Comparing version 1.0.14 to 1.0.15
{ | ||
"name": "vpuserlayout", | ||
"version": "1.0.14", | ||
"version": "1.0.15", | ||
"description": "", | ||
@@ -5,0 +5,0 @@ "main": "vpuserlayout.es.js", |
@@ -1,172 +0,21 @@ | ||
import { defineComponent as I, ref as v, getCurrentInstance as M, watchEffect as j, onMounted as N, onUnmounted as U, openBlock as t, createBlock as V, unref as s, createSlots as z, withCtx as x, createElementBlock as n, Fragment as d, renderList as u, createElementVNode as e, toDisplayString as y, createCommentVNode as C, normalizeClass as O, pushScopeId as P, popScopeId as T } from "vue"; | ||
import F from "vitepress/theme"; | ||
import { useMediaQuery as E } from "@vueuse/core"; | ||
import { useData as G } from "vitepress"; | ||
const Q = (o, a) => { | ||
const r = o.__vccOpts || o; | ||
for (const [p, m] of a) | ||
r[p] = m; | ||
return r; | ||
}, L = (o) => (P("data-v-781f02e5"), o = o(), T(), o), W = { | ||
key: 0, | ||
class: "dropdown" | ||
}, $ = /* @__PURE__ */ L(() => /* @__PURE__ */ e("span", { class: "user-menu" }, [ | ||
/* @__PURE__ */ e("svg", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
width: "20", | ||
height: "20", | ||
viewBox: "0 0 24 24", | ||
fill: "none", | ||
stroke: "currentColor", | ||
"stroke-width": "2", | ||
"stroke-linecap": "round", | ||
"stroke-linejoin": "round" | ||
}, [ | ||
/* @__PURE__ */ e("path", { d: "M2 21a8 8 0 0 1 10.434-7.62" }), | ||
/* @__PURE__ */ e("circle", { | ||
cx: "10", | ||
cy: "8", | ||
r: "5" | ||
}), | ||
/* @__PURE__ */ e("circle", { | ||
cx: "18", | ||
cy: "18", | ||
r: "3" | ||
}), | ||
/* @__PURE__ */ e("path", { d: "m19.5 14.3-.4.9" }), | ||
/* @__PURE__ */ e("path", { d: "m16.9 20.8-.4.9" }), | ||
/* @__PURE__ */ e("path", { d: "m21.7 19.5-.9-.4" }), | ||
/* @__PURE__ */ e("path", { d: "m15.2 16.9-.9-.4" }), | ||
/* @__PURE__ */ e("path", { d: "m21.7 16.5-.9.4" }), | ||
/* @__PURE__ */ e("path", { d: "m15.2 19.1-.9.4" }), | ||
/* @__PURE__ */ e("path", { d: "m19.5 21.7-.4-.9" }), | ||
/* @__PURE__ */ e("path", { d: "m16.9 15.2-.4-.9" }) | ||
]) | ||
], -1)), q = /* @__PURE__ */ L(() => /* @__PURE__ */ e("span", { class: "vpi-chevron-down text-icon" }, null, -1)), A = { class: "dropdown-content" }, H = { class: "dropdown-menu" }, J = { class: "menuItem" }, K = I({ | ||
import { openBlock as s, createElementBlock as r } from "vue"; | ||
const a = (o, n) => { | ||
const t = o.__vccOpts || o; | ||
for (const [e, c] of n) | ||
t[e] = c; | ||
return t; | ||
}, p = { | ||
name: "VPUserLayout" | ||
}), R = /* @__PURE__ */ Object.assign(K, { | ||
setup(o) { | ||
var a = v(null); | ||
const r = v(!1), p = async () => { | ||
try { | ||
const l = await fetch("/umenuData.json"); | ||
if (!l.ok) | ||
throw new Error("Network response was not ok"); | ||
const g = await l.json(); | ||
setTimeout(() => { | ||
a.value = g.arrayList, console.log(a.value), r.value = !0; | ||
}, 1e3); | ||
} catch (l) { | ||
console.error("Error fetching local data:", l); | ||
} | ||
}, m = M(); | ||
j(() => { | ||
console.log("langs have changed:", a.value); | ||
}), N(() => { | ||
window.addEventListener("resize", _), p(); | ||
}), U(() => { | ||
window.removeEventListener("resize", _); | ||
}); | ||
const { lang: f, theme: ee } = G(); | ||
var w = E("(min-width: 1280px)").value; | ||
const { Layout: b } = F; | ||
function _() { | ||
w = E("(min-width: 1280px)").value, m.proxy.$forceUpdate(), console.log("reload"); | ||
} | ||
const c = v(!1); | ||
function S() { | ||
c.value = !c.value, console.log(c.value); | ||
} | ||
function B() { | ||
alert("menu1"); | ||
} | ||
return (l, g) => (t(), V(s(b), null, z({ _: 2 }, [ | ||
s(w) && s(a) ? { | ||
name: "nav-bar-content-after", | ||
fn: x(() => [ | ||
(t(!0), n(d, null, u(s(a), (i, k) => (t(), n("div", { | ||
class: "container", | ||
key: k | ||
}, [ | ||
s(f) === i.lang ? (t(), n("div", W, [ | ||
$, | ||
q, | ||
e("div", A, [ | ||
e("div", H, [ | ||
(t(!0), n(d, null, u(i.menus, (h, D) => (t(), n("div", J, y(h), 1))), 256)) | ||
]) | ||
]) | ||
])) : C("", !0) | ||
]))), 128)) | ||
]), | ||
key: "0" | ||
} : { | ||
name: "nav-screen-content-after", | ||
fn: x(() => [ | ||
(t(!0), n(d, null, u(s(a), (i, k) => (t(), n("div", { class: "mobileDropdown" }, [ | ||
s(f) === i.lang ? (t(), n("div", { | ||
key: 0, | ||
class: O(["BMNavScreenMenuGroup", { open: c.value }]) | ||
}, [ | ||
e("button", { | ||
class: "button", | ||
"aria-expanded": c.value, | ||
onClick: S | ||
}, [ | ||
e("span", null, [ | ||
(t(), n("svg", { | ||
xmlns: "http://www.w3.org/2000/svg", | ||
width: "20", | ||
height: "20", | ||
viewBox: "0 0 24 24", | ||
fill: "none", | ||
stroke: "currentColor", | ||
"stroke-width": "2", | ||
"stroke-linecap": "round", | ||
"stroke-linejoin": "round" | ||
}, [ | ||
e("path", { d: "M2 21a8 8 0 0 1 10.434-7.62" }), | ||
e("circle", { | ||
cx: "10", | ||
cy: "8", | ||
r: "5" | ||
}), | ||
e("circle", { | ||
cx: "18", | ||
cy: "18", | ||
r: "3" | ||
}), | ||
e("path", { d: "m19.5 14.3-.4.9" }), | ||
e("path", { d: "m16.9 20.8-.4.9" }), | ||
e("path", { d: "m21.7 19.5-.9-.4" }), | ||
e("path", { d: "m15.2 16.9-.9-.4" }), | ||
e("path", { d: "m21.7 16.5-.9.4" }), | ||
e("path", { d: "m15.2 19.1-.9.4" }), | ||
e("path", { d: "m19.5 21.7-.4-.9" }), | ||
e("path", { d: "m16.9 15.2-.4-.9" }) | ||
])) | ||
]), | ||
e("span", { class: "vpi-plus button-icon" }) | ||
], 8, ["aria-expanded"]), | ||
e("div", { class: "items group" }, [ | ||
(t(!0), n(d, null, u(i.menus, (h, D) => (t(), n("div", { | ||
class: "item", | ||
onClick: B | ||
}, y(h), 1))), 256)) | ||
]) | ||
], 2)) : C("", !0) | ||
]))), 256)) | ||
]), | ||
key: "1" | ||
} | ||
]), 1024)); | ||
} | ||
}), X = /* @__PURE__ */ Q(R, [["__scopeId", "data-v-781f02e5"]]), Y = [X], Z = function(o, a) { | ||
Y.forEach((r) => { | ||
o.component(r.name, r); | ||
}; | ||
function u(o, n, t, e, c, i) { | ||
return s(), r("button", null, "我是测试要发布的按钮组件"); | ||
} | ||
const _ = /* @__PURE__ */ a(p, [["render", u]]), f = [_], l = function(o, n) { | ||
f.forEach((t) => { | ||
o.component(t.name, t); | ||
}); | ||
}, re = { install: Z }; | ||
}, d = { install: l }; | ||
export { | ||
X as VPUserLayout, | ||
re as default | ||
_ as VPUserLayout, | ||
d as default | ||
}; |
@@ -1,1 +0,1 @@ | ||
(function(t,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue"),require("vitepress/theme"),require("@vueuse/core"),require("vitepress")):typeof define=="function"&&define.amd?define(["exports","vue","vitepress/theme","@vueuse/core","vitepress"],e):(t=typeof globalThis<"u"?globalThis:t||self,e(t.VPUserLayout=t.VPUserLayout||{},t.Vue,t.DefaultTheme,t.core,t.vitepress))})(this,function(t,e,N,m,_){"use strict";const g=(n,o)=>{const r=n.__vccOpts||n;for(const[s,d]of o)r[s]=d;return r},p=n=>(e.pushScopeId("data-v-781f02e5"),n=n(),e.popScopeId(),n),y={key:0,class:"dropdown"},B=p(()=>e.createElementVNode("span",{class:"user-menu"},[e.createElementVNode("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M2 21a8 8 0 0 1 10.434-7.62"}),e.createElementVNode("circle",{cx:"10",cy:"8",r:"5"}),e.createElementVNode("circle",{cx:"18",cy:"18",r:"3"}),e.createElementVNode("path",{d:"m19.5 14.3-.4.9"}),e.createElementVNode("path",{d:"m16.9 20.8-.4.9"}),e.createElementVNode("path",{d:"m21.7 19.5-.9-.4"}),e.createElementVNode("path",{d:"m15.2 16.9-.9-.4"}),e.createElementVNode("path",{d:"m21.7 16.5-.9.4"}),e.createElementVNode("path",{d:"m15.2 19.1-.9.4"}),e.createElementVNode("path",{d:"m19.5 21.7-.4-.9"}),e.createElementVNode("path",{d:"m16.9 15.2-.4-.9"})])],-1)),u=p(()=>e.createElementVNode("span",{class:"vpi-chevron-down text-icon"},null,-1)),x={class:"dropdown-content"},L={class:"dropdown-menu"},C={class:"menuItem"},S=e.defineComponent({name:"VPUserLayout"}),h=g(Object.assign(S,{setup(n){var o=e.ref(null);const r=e.ref(!1),s=async()=>{try{const c=await fetch("/umenuData.json");if(!c.ok)throw new Error("Network response was not ok");const V=await c.json();setTimeout(()=>{o.value=V.arrayList,console.log(o.value),r.value=!0},1e3)}catch(c){console.error("Error fetching local data:",c)}},d=e.getCurrentInstance();e.watchEffect(()=>{console.log("langs have changed:",o.value)}),e.onMounted(()=>{window.addEventListener("resize",k),s()}),e.onUnmounted(()=>{window.removeEventListener("resize",k)});const{lang:f,theme:q}=_.useData();var E=m.useMediaQuery("(min-width: 1280px)").value;const{Layout:D}=N;function k(){E=m.useMediaQuery("(min-width: 1280px)").value,d.proxy.$forceUpdate(),console.log("reload")}const a=e.ref(!1);function U(){a.value=!a.value,console.log(a.value)}function I(){alert("menu1")}return(c,V)=>(e.openBlock(),e.createBlock(e.unref(D),null,e.createSlots({_:2},[e.unref(E)&&e.unref(o)?{name:"nav-bar-content-after",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(l,w)=>(e.openBlock(),e.createElementBlock("div",{class:"container",key:w},[e.unref(f)===l.lang?(e.openBlock(),e.createElementBlock("div",y,[B,u,e.createElementVNode("div",x,[e.createElementVNode("div",L,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menus,(i,P)=>(e.openBlock(),e.createElementBlock("div",C,e.toDisplayString(i),1))),256))])])])):e.createCommentVNode("",!0)]))),128))]),key:"0"}:{name:"nav-screen-content-after",fn:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(o),(l,w)=>(e.openBlock(),e.createElementBlock("div",{class:"mobileDropdown"},[e.unref(f)===l.lang?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["BMNavScreenMenuGroup",{open:a.value}])},[e.createElementVNode("button",{class:"button","aria-expanded":a.value,onClick:U},[e.createElementVNode("span",null,[(e.openBlock(),e.createElementBlock("svg",{xmlns:"http://www.w3.org/2000/svg",width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor","stroke-width":"2","stroke-linecap":"round","stroke-linejoin":"round"},[e.createElementVNode("path",{d:"M2 21a8 8 0 0 1 10.434-7.62"}),e.createElementVNode("circle",{cx:"10",cy:"8",r:"5"}),e.createElementVNode("circle",{cx:"18",cy:"18",r:"3"}),e.createElementVNode("path",{d:"m19.5 14.3-.4.9"}),e.createElementVNode("path",{d:"m16.9 20.8-.4.9"}),e.createElementVNode("path",{d:"m21.7 19.5-.9-.4"}),e.createElementVNode("path",{d:"m15.2 16.9-.9-.4"}),e.createElementVNode("path",{d:"m21.7 16.5-.9.4"}),e.createElementVNode("path",{d:"m15.2 19.1-.9.4"}),e.createElementVNode("path",{d:"m19.5 21.7-.4-.9"}),e.createElementVNode("path",{d:"m16.9 15.2-.4-.9"})]))]),e.createElementVNode("span",{class:"vpi-plus button-icon"})],8,["aria-expanded"]),e.createElementVNode("div",{class:"items group"},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(l.menus,(i,P)=>(e.openBlock(),e.createElementBlock("div",{class:"item",onClick:I},e.toDisplayString(i),1))),256))])],2)):e.createCommentVNode("",!0)]))),256))]),key:"1"}]),1024))}}),[["__scopeId","data-v-781f02e5"]]),M=[h],j={install:function(n,o){M.forEach(r=>{n.component(r.name,r)})}};t.VPUserLayout=h,t.default=j,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); | ||
(function(e,t){typeof exports=="object"&&typeof module<"u"?t(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],t):(e=typeof globalThis<"u"?globalThis:e||self,t(e.VPUserLayout=e.VPUserLayout||{},e.Vue))})(this,function(e,t){"use strict";const i=(o,s)=>{const n=o.__vccOpts||o;for(const[c,r]of s)n[c]=r;return n},f={name:"VPUserLayout"};function a(o,s,n,c,r,_){return t.openBlock(),t.createElementBlock("button",null,"我是测试要发布的按钮组件")}const u=i(f,[["render",a]]),d=[u],p={install:function(o,s){d.forEach(n=>{o.component(n.name,n)})}};e.VPUserLayout=u,e.default=p,Object.defineProperties(e,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Network access
Supply chain riskThis module accesses the network.
Found 1 instance in 1 package
1
2968
4
24