@wltech/follow-record-card
Advanced tools
Comparing version 1.0.35 to 1.0.36
@@ -1,19 +0,19 @@ | ||
import { getCurrentScope as Jt, onScopeDispose as en, unref as he, watch as k, defineComponent as Y, createVNode as l, createTextVNode as ke, computed as S, ref as b, onUnmounted as St, onDeactivated as pe, isRef as tn, reactive as oe, getCurrentInstance as Me, onMounted as ce, nextTick as ae, onActivated as De, inject as Qe, provide as qe, isVNode as nn, onBeforeUnmount as ze, watchEffect as on, mergeProps as we, Transition as Je, withDirectives as ye, vShow as Be, Teleport as Ct, Fragment as an, resolveDirective as rn, markRaw as it, effectScope as sn, shallowRef as ln } from "vue"; | ||
const cn = /-(\w)/g, un = (e) => e.replace(cn, (t, n) => n.toUpperCase()), dn = (e) => e === null || e === "" || e === void 0 || e === "null" || e === "undefined" || e === "0" ? !0 : !(e + "").trim(), fn = (e) => { | ||
if (dn(e)) | ||
import { getCurrentScope as qt, onScopeDispose as Jt, unref as he, watch as A, defineComponent as Y, createVNode as l, createTextVNode as ke, computed as $, ref as y, onUnmounted as $t, onDeactivated as pe, isRef as en, reactive as ae, getCurrentInstance as Me, onMounted as ie, nextTick as te, onActivated as De, inject as Qe, provide as qe, isVNode as tn, onBeforeUnmount as ze, watchEffect as nn, mergeProps as we, Transition as Je, withDirectives as ye, vShow as Ae, Teleport as St, Fragment as on, resolveDirective as an, markRaw as it, effectScope as rn, shallowRef as sn } from "vue"; | ||
const ln = /-(\w)/g, cn = (e) => e.replace(ln, (t, o) => o.toUpperCase()), un = (e) => e === null || e === "" || e === void 0 || e === "null" || e === "undefined" || e === "0" ? !0 : !(e + "").trim(), dn = (e) => { | ||
if (un(e)) | ||
return "0 B"; | ||
const t = 1024, n = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], o = Math.floor(Math.log(e) / Math.log(t)); | ||
return (e / Math.pow(t, o)).toPrecision(3) + " " + n[o]; | ||
const t = 1024, o = ["B", "KB", "MB", "GB", "TB", "PB", "EB", "ZB", "YB"], n = Math.floor(Math.log(e) / Math.log(t)); | ||
return (e / Math.pow(t, n)).toPrecision(3) + " " + o[n]; | ||
}; | ||
function ue(e) { | ||
return e.install = (t) => { | ||
const { name: n } = e; | ||
t.component(n, e), t.component(un(`-${n}`), e); | ||
const { name: o } = e; | ||
t.component(o, e), t.component(cn(`-${o}`), e); | ||
}, e; | ||
} | ||
const vn = (e) => { | ||
const fn = (e) => { | ||
console.log("file", e); | ||
const t = /(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent), n = /macintosh|mac os x/i.test(navigator.userAgent); | ||
let o = window.navigator.userAgent.toLowerCase(), i = o.match(/MicroMessenger/i) == "micromessenger" && o.match(/wxwork/i) == "wxwork"; | ||
if (e.type == "pdf" || t || i && n) { | ||
const t = /(iphone|ipad|ipod|ios|android)/i.test(navigator.userAgent), o = /macintosh|mac os x/i.test(navigator.userAgent); | ||
let n = window.navigator.userAgent.toLowerCase(), i = n.match(/MicroMessenger/i) == "micromessenger" && n.match(/wxwork/i) == "wxwork"; | ||
if (e.type == "pdf" || t || i && o) { | ||
let a = document.createElement("a"); | ||
@@ -25,10 +25,10 @@ a.href = e.url, a.download = e.name, a.target = "_blank", a.click(); | ||
if (a.status === 200) { | ||
let r = document.createElement("a"), u = []; | ||
u.push(a.response), window.URL = window.URL || window.webkitURL, r.href = window.URL.createObjectURL(new Blob(u)), r.download = e.name, r.click(); | ||
let s = document.createElement("a"), u = []; | ||
u.push(a.response), window.URL = window.URL || window.webkitURL, s.href = window.URL.createObjectURL(new Blob(u)), s.download = e.name, s.click(); | ||
} | ||
}, a.send(); | ||
} | ||
}, Pt = (e) => `/h5/sliderbar/${location.search}&need_auth=false#/companyDetail?company_id=${e}`; | ||
}, Pt = (e, t) => `/h5/sliderbar/${location.search}&need_auth=false&theme=${t}#/companyDetail?company_id=${e}`; | ||
var rt; | ||
const et = typeof window < "u", _t = (e) => typeof e == "number", mn = (e) => typeof e == "string", je = () => { | ||
const et = typeof window < "u", Ct = (e) => typeof e == "number", vn = (e) => typeof e == "string", mn = () => { | ||
}; | ||
@@ -43,23 +43,23 @@ et && ((rt = window == null ? void 0 : window.navigator) == null ? void 0 : rt.userAgent) && /iP(ad|hone|od)/.test(window.navigator.userAgent); | ||
function wn(e) { | ||
return Jt() ? (en(e), !0) : !1; | ||
return qt() ? (Jt(e), !0) : !1; | ||
} | ||
function yn(e) { | ||
var t; | ||
const n = gn(e); | ||
return (t = n == null ? void 0 : n.$el) != null ? t : n; | ||
const o = gn(e); | ||
return (t = o == null ? void 0 : o.$el) != null ? t : o; | ||
} | ||
const bn = et ? window : void 0; | ||
function Ee(...e) { | ||
let t, n, o, i; | ||
if (mn(e[0]) ? ([n, o, i] = e, t = bn) : [t, n, o, i] = e, !t) | ||
return je; | ||
let a = je; | ||
const r = k(() => yn(t), (d) => { | ||
a(), d && (d.addEventListener(n, o, i), a = () => { | ||
d.removeEventListener(n, o, i), a = je; | ||
}); | ||
}, { immediate: !0, flush: "post" }), u = () => { | ||
r(), a(); | ||
function Ie(...e) { | ||
let t, o, n, i; | ||
if (vn(e[0]) || Array.isArray(e[0]) ? ([o, n, i] = e, t = bn) : [t, o, n, i] = e, !t) | ||
return mn; | ||
Array.isArray(o) || (o = [o]), Array.isArray(n) || (n = [n]); | ||
const a = [], s = () => { | ||
a.forEach((d) => d()), a.length = 0; | ||
}, u = (d, v, m) => (d.addEventListener(v, m, i), () => d.removeEventListener(v, m, i)), f = A(() => yn(t), (d) => { | ||
s(), d && a.push(...o.flatMap((v) => n.map((m) => u(d, v, m)))); | ||
}, { immediate: !0, flush: "post" }), c = () => { | ||
f(), s(); | ||
}; | ||
return wn(u), u; | ||
return wn(c), c; | ||
} | ||
@@ -73,11 +73,11 @@ const Ve = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {}, Ze = "__vueuse_ssr_handlers__"; | ||
})(st || (st = {})); | ||
var pn = Object.defineProperty, lt = Object.getOwnPropertySymbols, In = Object.prototype.hasOwnProperty, Tn = Object.prototype.propertyIsEnumerable, ct = (e, t, n) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n, En = (e, t) => { | ||
for (var n in t || (t = {})) | ||
In.call(t, n) && ct(e, n, t[n]); | ||
var pn = Object.defineProperty, lt = Object.getOwnPropertySymbols, En = Object.prototype.hasOwnProperty, Tn = Object.prototype.propertyIsEnumerable, ct = (e, t, o) => t in e ? pn(e, t, { enumerable: !0, configurable: !0, writable: !0, value: o }) : e[t] = o, In = (e, t) => { | ||
for (var o in t || (t = {})) | ||
En.call(t, o) && ct(e, o, t[o]); | ||
if (lt) | ||
for (var n of lt(t)) | ||
Tn.call(t, n) && ct(e, n, t[n]); | ||
for (var o of lt(t)) | ||
Tn.call(t, o) && ct(e, o, t[o]); | ||
return e; | ||
}; | ||
const xn = { | ||
const On = { | ||
easeInSine: [0.12, 0, 0.39, 0], | ||
@@ -108,10 +108,10 @@ easeOutSine: [0.61, 1, 0.88, 1], | ||
}; | ||
En({ | ||
In({ | ||
linear: hn | ||
}, xn); | ||
const On = () => et && /firefox/i.test(window.navigator.userAgent), $n = () => !navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i), Sn = (e) => Object.keys(e), Cn = {}, Pn = { | ||
}, On); | ||
const xn = () => et && /firefox/i.test(window.navigator.userAgent), $n = () => !navigator.userAgent.match(/(phone|pad|pod|iPhone|iPod|ios|iPad|Android|Mobile|BlackBerry|IEMobile|MQQBrowser|JUC|Fennec|wOSBrowser|BrowserNG|WebOS|Symbian|Windows Phone)/i), Sn = (e) => Object.keys(e), Pn = {}, Cn = { | ||
envir: String, | ||
location: String, | ||
needDataFormat: Boolean, | ||
data: Cn | ||
data: Pn | ||
}; | ||
@@ -121,18 +121,18 @@ console.log("2222"); | ||
name: "RecordComment", | ||
props: Pn, | ||
props: Cn, | ||
emits: {}, | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
return () => l("div", null, [ke("222222222222222")]); | ||
} | ||
}), kt = ue(_n); | ||
console.log("1111", kt); | ||
const xe = "https://wlmvp-cos.weiling.cn/frontend/images/success.png", ut = "https://wlmvp-cos.weiling.cn/frontend/images/success.png", kn = { | ||
ppt: xe, | ||
pdf: xe, | ||
excel: xe, | ||
word: xe | ||
}, Bn = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-close.png", Rn = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-leftarrow.png", An = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-rightarrow.png", Ln = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-enterprise.png", Mn = { | ||
}), _t = ue(_n); | ||
console.log("1111", _t); | ||
const Oe = "https://wlmvp-cos.weiling.cn/frontend/images/success.png", ut = "https://wlmvp-cos.weiling.cn/frontend/images/success.png", kn = { | ||
ppt: Oe, | ||
pdf: Oe, | ||
excel: Oe, | ||
word: Oe | ||
}, An = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-close.png", Rn = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-leftarrow.png", Bn = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-rightarrow.png", Ln = "https://wlmvp-cos.weiling.cn/frontend/images/follow-record-enterprise.png", Mn = { | ||
template_name: String, | ||
@@ -144,3 +144,4 @@ element_content_list: Array | ||
needDataFormat: Boolean, | ||
data: Mn | ||
data: Mn, | ||
theme: String | ||
}, zn = Y({ | ||
@@ -152,15 +153,15 @@ name: "RecordTemplateDetail", | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = `record-template-${e.location}-${e.envir}`, i = `${o}-title`, a = `${o}-intro`, r = `${a}-corp`, u = S(() => { | ||
const n = `record-template-${e.location}-${e.envir}`, i = `${n}-title`, a = `${n}-intro`, s = `${a}-corp`, u = $(() => { | ||
const { | ||
element_content_list: s | ||
element_content_list: r | ||
} = e.data; | ||
return e.location === "detail" && e.envir === "pc" && s.length > 2; | ||
}), d = b(!1), c = S(() => { | ||
let s = e.data.element_content_list; | ||
return e.location === "detail" && e.envir === "mobile" || d.value ? s : s.slice(0, 2); | ||
}), f = () => { | ||
d.value = !d.value; | ||
}, h = (s) => s ? l("div", { | ||
return e.location === "detail" && e.envir === "pc" && r.length > 2; | ||
}), f = y(!1), c = $(() => { | ||
let r = e.data.element_content_list; | ||
return e.location === "detail" && e.envir === "mobile" || f.value ? r : r.slice(0, 2); | ||
}), d = () => { | ||
f.value = !f.value; | ||
}, v = (r) => r ? l("div", { | ||
class: `${i}` | ||
@@ -171,43 +172,43 @@ }, [l("div", { | ||
class: `${i}-span` | ||
}, [s]), l("div", { | ||
}, [r]), l("div", { | ||
class: `${i}-line` | ||
}, null)]) : "", m = (s) => s ? l("div", { | ||
class: `${o}-label` | ||
}, [s]) : "", E = (s) => s ? l("div", { | ||
class: `${r}`, | ||
onClick: () => O(s) | ||
}, null)]) : "", m = (r) => r ? l("div", { | ||
class: `${n}-label` | ||
}, [r]) : "", T = (r) => r ? l("div", { | ||
class: `${s}`, | ||
onClick: () => I(r) | ||
}, [l("img", { | ||
class: `${r}-icon`, | ||
src: s.company_image_url || Ln | ||
class: `${s}-icon`, | ||
src: r.company_image_url || Ln | ||
}, null), l("div", { | ||
class: `${r}-name` | ||
}, [s.element_content])]) : "", O = (s) => { | ||
let g = Pt(s.company_id); | ||
t("toCorp", g); | ||
}, y = (s) => l("div", { | ||
innerHTML: s || "--", | ||
class: `${s}-name` | ||
}, [r.element_content])]) : "", I = (r) => { | ||
let h = Pt(r.company_id, e.theme); | ||
t("toCorp", h); | ||
}, C = (r) => l("div", { | ||
innerHTML: r || "--", | ||
class: `${a}-text` | ||
}, null); | ||
return () => l("div", { | ||
class: `${o}-wrapper` | ||
}, [h(e.data.template_name), (c.value || []).map((s) => l("div", null, [m(s.element_title), s != null && s.company_id ? E(s) : y(s.element_content)])), u.value ? l("div", { | ||
class: `${o}-showmore`, | ||
onClick: () => f() | ||
}, [d.value ? "\u6536\u8D77" : "\u5C55\u5F00\u5168\u90E8"]) : null]); | ||
class: `${n}-wrapper` | ||
}, [v(e.data.template_name), (c.value || []).map((r) => l("div", null, [m(r.element_title), r != null && r.company_id ? T(r) : C(r.element_content)])), u.value ? l("div", { | ||
class: `${n}-showmore`, | ||
onClick: () => d() | ||
}, [f.value ? "\u6536\u8D77" : "\u5C55\u5F00\u5168\u90E8"]) : null]); | ||
} | ||
}), Nn = ue(zn); | ||
const te = (e) => e != null, Ge = (e) => typeof e == "function", tt = (e) => e !== null && typeof e == "object", Yn = (e) => tt(e) && Ge(e.then) && Ge(e.catch), Bt = (e) => typeof e == "number" || /^\d+(\.\d+)?$/.test(e), Fn = () => nt ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1; | ||
const ne = (e) => e != null, Ge = (e) => typeof e == "function", tt = (e) => e !== null && typeof e == "object", Yn = (e) => tt(e) && Ge(e.then) && Ge(e.catch), kt = (e) => typeof e == "number" || /^\d+(\.\d+)?$/.test(e), Fn = () => nt ? /ios|iphone|ipad|ipod/.test(navigator.userAgent.toLowerCase()) : !1; | ||
function jn() { | ||
} | ||
const Ie = Object.assign, nt = typeof window < "u"; | ||
const Ee = Object.assign, nt = typeof window < "u"; | ||
function dt(e, t) { | ||
const n = t.split("."); | ||
let o = e; | ||
return n.forEach((i) => { | ||
const o = t.split("."); | ||
let n = e; | ||
return o.forEach((i) => { | ||
var a; | ||
o = tt(o) && (a = o[i]) != null ? a : ""; | ||
}), o; | ||
n = tt(n) && (a = n[i]) != null ? a : ""; | ||
}), n; | ||
} | ||
function Xn(e, t, n) { | ||
return t.reduce((o, i) => ((!n || e[i] !== void 0) && (o[i] = e[i]), o), {}); | ||
function Xn(e, t, o) { | ||
return t.reduce((n, i) => ((!o || e[i] !== void 0) && (n[i] = e[i]), n), {}); | ||
} | ||
@@ -217,12 +218,12 @@ const Re = null, D = [Number, String], N = { | ||
default: !0 | ||
}, Oe = (e) => ({ | ||
}, xe = (e) => ({ | ||
type: e, | ||
required: !0 | ||
}), Hn = () => ({ | ||
}), Wn = () => ({ | ||
type: Array, | ||
default: () => [] | ||
}), ne = (e) => ({ | ||
}), oe = (e) => ({ | ||
type: D, | ||
default: e | ||
}), H = (e) => ({ | ||
}), V = (e) => ({ | ||
type: String, | ||
@@ -238,3 +239,3 @@ default: e | ||
} | ||
var Wn = (e) => e === window, vt = (e, t) => ({ | ||
var Hn = (e) => e === window, vt = (e, t) => ({ | ||
top: 0, | ||
@@ -248,5 +249,5 @@ left: 0, | ||
const t = he(e); | ||
if (Wn(t)) { | ||
const n = t.innerWidth, o = t.innerHeight; | ||
return vt(n, o); | ||
if (Hn(t)) { | ||
const o = t.innerWidth, n = t.innerHeight; | ||
return vt(o, n); | ||
} | ||
@@ -258,8 +259,8 @@ return t != null && t.getBoundingClientRect ? t.getBoundingClientRect() : vt(0, 0); | ||
if (t) { | ||
const n = Me(), { link: o, unlink: i, internalChildren: a } = t; | ||
o(n), St(() => i(n)); | ||
const r = S(() => a.indexOf(n)); | ||
const o = Me(), { link: n, unlink: i, internalChildren: a } = t; | ||
n(o), $t(() => i(o)); | ||
const s = $(() => a.indexOf(o)); | ||
return { | ||
parent: t, | ||
index: r | ||
index: s | ||
}; | ||
@@ -269,27 +270,27 @@ } | ||
parent: null, | ||
index: b(-1) | ||
index: y(-1) | ||
}; | ||
} | ||
function Zn(e) { | ||
const t = [], n = (o) => { | ||
Array.isArray(o) && o.forEach((i) => { | ||
const t = [], o = (n) => { | ||
Array.isArray(n) && n.forEach((i) => { | ||
var a; | ||
nn(i) && (t.push(i), (a = i.component) != null && a.subTree && (t.push(i.component.subTree), n(i.component.subTree.children)), i.children && n(i.children)); | ||
tn(i) && (t.push(i), (a = i.component) != null && a.subTree && (t.push(i.component.subTree), o(i.component.subTree.children)), i.children && o(i.children)); | ||
}); | ||
}; | ||
return n(e), t; | ||
return o(e), t; | ||
} | ||
function Gn(e, t, n) { | ||
const o = Zn(e.subTree.children); | ||
n.sort( | ||
(a, r) => o.indexOf(a.vnode) - o.indexOf(r.vnode) | ||
function Gn(e, t, o) { | ||
const n = Zn(e.subTree.children); | ||
o.sort( | ||
(a, s) => n.indexOf(a.vnode) - n.indexOf(s.vnode) | ||
); | ||
const i = n.map((a) => a.proxy); | ||
t.sort((a, r) => { | ||
const u = i.indexOf(a), d = i.indexOf(r); | ||
return u - d; | ||
const i = o.map((a) => a.proxy); | ||
t.sort((a, s) => { | ||
const u = i.indexOf(a), f = i.indexOf(s); | ||
return u - f; | ||
}); | ||
} | ||
function Kn(e) { | ||
const t = oe([]), n = oe([]), o = Me(); | ||
const t = ae([]), o = ae([]), n = Me(); | ||
return { | ||
@@ -302,11 +303,11 @@ children: t, | ||
{ | ||
link: (d) => { | ||
d.proxy && (n.push(d), t.push(d.proxy), Gn(o, t, n)); | ||
link: (f) => { | ||
f.proxy && (o.push(f), t.push(f.proxy), Gn(n, t, o)); | ||
}, | ||
unlink: (d) => { | ||
const c = n.indexOf(d); | ||
t.splice(c, 1), n.splice(c, 1); | ||
unlink: (f) => { | ||
const c = o.indexOf(f); | ||
t.splice(c, 1), o.splice(c, 1); | ||
}, | ||
children: t, | ||
internalChildren: n | ||
internalChildren: o | ||
}, | ||
@@ -319,6 +320,6 @@ a | ||
} | ||
function Rt(e) { | ||
function At(e) { | ||
let t; | ||
ce(() => { | ||
e(), ae(() => { | ||
ie(() => { | ||
e(), te(() => { | ||
t = !0; | ||
@@ -330,30 +331,30 @@ }); | ||
} | ||
function Ne(e, t, n = {}) { | ||
function Ne(e, t, o = {}) { | ||
if (!Te) | ||
return; | ||
const { target: o = window, passive: i = !1, capture: a = !1 } = n; | ||
let r; | ||
const { target: n = window, passive: i = !1, capture: a = !1 } = o; | ||
let s; | ||
const u = (c) => { | ||
const f = he(c); | ||
f && !r && (f.addEventListener(e, t, { | ||
const d = he(c); | ||
d && !s && (d.addEventListener(e, t, { | ||
capture: a, | ||
passive: i | ||
}), r = !0); | ||
}, d = (c) => { | ||
const f = he(c); | ||
f && r && (f.removeEventListener(e, t, a), r = !1); | ||
}), s = !0); | ||
}, f = (c) => { | ||
const d = he(c); | ||
d && s && (d.removeEventListener(e, t, a), s = !1); | ||
}; | ||
St(() => d(o)), pe(() => d(o)), Rt(() => u(o)), tn(o) && k(o, (c, f) => { | ||
d(f), u(c); | ||
$t(() => f(n)), pe(() => f(n)), At(() => u(n)), en(n) && A(n, (c, d) => { | ||
f(d), u(c); | ||
}); | ||
} | ||
var Se, Xe; | ||
var Se, je; | ||
function Qn() { | ||
if (!Se && (Se = b(0), Xe = b(0), Te)) { | ||
if (!Se && (Se = y(0), je = y(0), Te)) { | ||
const e = () => { | ||
Se.value = window.innerWidth, Xe.value = window.innerHeight; | ||
Se.value = window.innerWidth, je.value = window.innerHeight; | ||
}; | ||
e(), window.addEventListener("resize", e, { passive: !0 }), window.addEventListener("orientationchange", e, { passive: !0 }); | ||
} | ||
return { width: Se, height: Xe }; | ||
return { width: Se, height: je }; | ||
} | ||
@@ -365,20 +366,20 @@ var qn = /scroll|auto|overlay/i, Jn = Te ? window : void 0; | ||
function to(e, t = Jn) { | ||
let n = e; | ||
for (; n && n !== t && eo(n); ) { | ||
const { overflowY: o } = window.getComputedStyle(n); | ||
if (qn.test(o)) | ||
return n; | ||
n = n.parentNode; | ||
let o = e; | ||
for (; o && o !== t && eo(o); ) { | ||
const { overflowY: n } = window.getComputedStyle(o); | ||
if (qn.test(n)) | ||
return o; | ||
o = o.parentNode; | ||
} | ||
return t; | ||
} | ||
var Ce; | ||
var Pe; | ||
function no() { | ||
if (!Ce && (Ce = b("visible"), Te)) { | ||
if (!Pe && (Pe = y("visible"), Te)) { | ||
const e = () => { | ||
Ce.value = document.hidden ? "hidden" : "visible"; | ||
Pe.value = document.hidden ? "hidden" : "visible"; | ||
}; | ||
e(), window.addEventListener("visibilitychange", e); | ||
} | ||
return Ce; | ||
return Pe; | ||
} | ||
@@ -394,18 +395,18 @@ Fn(); | ||
return !1; | ||
const n = window.getComputedStyle(t), o = n.display === "none", i = t.offsetParent === null && n.position !== "fixed"; | ||
return o || i; | ||
const o = window.getComputedStyle(t), n = o.display === "none", i = t.offsetParent === null && o.position !== "fixed"; | ||
return n || i; | ||
} | ||
const { width: At, height: Lt } = Qn(); | ||
function V(e) { | ||
if (te(e)) | ||
return Bt(e) ? `${e}px` : String(e); | ||
const { width: Rt, height: Bt } = Qn(); | ||
function H(e) { | ||
if (ne(e)) | ||
return kt(e) ? `${e}px` : String(e); | ||
} | ||
function ao(e) { | ||
if (te(e)) { | ||
if (ne(e)) { | ||
if (Array.isArray(e)) | ||
return { | ||
width: V(e[0]), | ||
height: V(e[1]) | ||
width: H(e[0]), | ||
height: H(e[1]) | ||
}; | ||
const t = V(e); | ||
const t = H(e); | ||
return { | ||
@@ -421,10 +422,10 @@ width: t, | ||
} | ||
const ro = /-(\w)/g, Mt = (e) => e.replace(ro, (t, n) => n.toUpperCase()), so = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), J = (e, t, n) => Math.min(Math.max(e, t), n), { hasOwnProperty: lo } = Object.prototype; | ||
function co(e, t, n) { | ||
const o = t[n]; | ||
!te(o) || (!lo.call(e, n) || !tt(o) ? e[n] = o : e[n] = Dt(Object(e[n]), o)); | ||
const ro = /-(\w)/g, Lt = (e) => e.replace(ro, (t, o) => o.toUpperCase()), so = (e) => e.replace(/([A-Z])/g, "-$1").toLowerCase().replace(/^-/, ""), J = (e, t, o) => Math.min(Math.max(e, t), o), { hasOwnProperty: lo } = Object.prototype; | ||
function co(e, t, o) { | ||
const n = t[o]; | ||
!ne(n) || (!lo.call(e, o) || !tt(n) ? e[o] = n : e[o] = Mt(Object(e[o]), n)); | ||
} | ||
function Dt(e, t) { | ||
return Object.keys(t).forEach((n) => { | ||
co(e, t, n); | ||
function Mt(e, t) { | ||
return Object.keys(t).forEach((o) => { | ||
co(e, t, o); | ||
}), e; | ||
@@ -493,3 +494,3 @@ } | ||
}; | ||
const gt = b("zh-CN"), ht = oe({ | ||
const gt = y("zh-CN"), ht = ae({ | ||
"zh-CN": uo | ||
@@ -504,3 +505,3 @@ }), fo = { | ||
add(e = {}) { | ||
Dt(ht, e); | ||
Mt(ht, e); | ||
} | ||
@@ -510,6 +511,6 @@ }; | ||
function mo(e) { | ||
const t = Mt(e) + "."; | ||
return (n, ...o) => { | ||
const i = vo.messages(), a = dt(i, t + n) || dt(i, n); | ||
return Ge(a) ? a(...o) : a; | ||
const t = Lt(e) + "."; | ||
return (o, ...n) => { | ||
const i = vo.messages(), a = dt(i, t + o) || dt(i, o); | ||
return Ge(a) ? a(...n) : a; | ||
}; | ||
@@ -519,6 +520,6 @@ } | ||
return t ? typeof t == "string" ? ` ${e}--${t}` : Array.isArray(t) ? t.reduce( | ||
(n, o) => n + Ke(e, o), | ||
(o, n) => o + Ke(e, n), | ||
"" | ||
) : Object.keys(t).reduce( | ||
(n, o) => n + (t[o] ? Ke(e, o) : ""), | ||
(o, n) => o + (t[n] ? Ke(e, n) : ""), | ||
"" | ||
@@ -528,3 +529,3 @@ ) : ""; | ||
function go(e) { | ||
return (t, n) => (t && typeof t != "string" && (n = t, t = ""), t = t ? `${e}__${t}` : e, `${t}${Ke(t, n)}`); | ||
return (t, o) => (t && typeof t != "string" && (o = t, t = ""), t = t ? `${e}__${t}` : e, `${t}${Ke(t, o)}`); | ||
} | ||
@@ -539,7 +540,7 @@ function Z(e) { | ||
} | ||
const zt = "van-haptics-feedback"; | ||
function Nt(e, { | ||
const Dt = "van-haptics-feedback", ho = 500; | ||
function zt(e, { | ||
args: t = [], | ||
done: n, | ||
canceled: o | ||
done: o, | ||
canceled: n | ||
}) { | ||
@@ -549,18 +550,18 @@ if (e) { | ||
Yn(i) ? i.then((a) => { | ||
a ? n() : o && o(); | ||
}).catch(jn) : i ? n() : o && o(); | ||
a ? o() : n && n(); | ||
}).catch(jn) : i ? o() : n && n(); | ||
} else | ||
n(); | ||
o(); | ||
} | ||
function q(e) { | ||
return e.install = (t) => { | ||
const { name: n } = e; | ||
n && (t.component(n, e), t.component(Mt(`-${n}`), e)); | ||
const { name: o } = e; | ||
o && (t.component(o, e), t.component(Lt(`-${o}`), e)); | ||
}, e; | ||
} | ||
const Yt = Symbol(); | ||
function ho(e) { | ||
const t = Qe(Yt, null); | ||
t && k(t, (n) => { | ||
n && e(); | ||
const Nt = Symbol(); | ||
function wo(e) { | ||
const t = Qe(Nt, null); | ||
t && A(t, (o) => { | ||
o && e(); | ||
}); | ||
@@ -570,8 +571,8 @@ } | ||
const t = Me(); | ||
t && Ie(t.proxy, e); | ||
t && Ee(t.proxy, e); | ||
} | ||
const [wo, wt] = Z("badge"), yo = { | ||
const [yo, wt] = Z("badge"), bo = { | ||
dot: Boolean, | ||
max: D, | ||
tag: H("div"), | ||
tag: V("div"), | ||
color: String, | ||
@@ -581,37 +582,39 @@ offset: Array, | ||
showZero: N, | ||
position: H("top-right") | ||
position: V("top-right") | ||
}; | ||
var bo = Y({ | ||
name: wo, | ||
props: yo, | ||
var po = Y({ | ||
name: yo, | ||
props: bo, | ||
setup(e, { | ||
slots: t | ||
}) { | ||
const n = () => { | ||
const o = () => { | ||
if (t.content) | ||
return !0; | ||
const { | ||
content: r, | ||
showZero: u | ||
content: u, | ||
showZero: f | ||
} = e; | ||
return te(r) && r !== "" && (u || r !== 0 && r !== "0"); | ||
}, o = () => { | ||
return ne(u) && u !== "" && (f || u !== 0 && u !== "0"); | ||
}, n = () => { | ||
const { | ||
dot: r, | ||
max: u, | ||
content: d | ||
dot: u, | ||
max: f, | ||
content: c | ||
} = e; | ||
if (!r && n()) | ||
return t.content ? t.content() : te(u) && Bt(d) && +d > u ? `${u}+` : d; | ||
}, i = S(() => { | ||
const r = { | ||
if (!u && o()) | ||
return t.content ? t.content() : ne(f) && kt(c) && +c > f ? `${f}+` : c; | ||
}, i = (u) => u.startsWith("-") ? u.replace("-", "") : `-${u}`, a = $(() => { | ||
const u = { | ||
background: e.color | ||
}; | ||
if (e.offset) { | ||
const [u, d] = e.offset; | ||
t.default ? (r.top = V(d), typeof u == "number" ? r.right = V(-u) : r.right = u.startsWith("-") ? u.replace("-", "") : `-${u}`) : (r.marginTop = V(d), r.marginLeft = V(u)); | ||
const [f, c] = e.offset, { | ||
position: d | ||
} = e, [v, m] = d.split("-"); | ||
t.default ? (typeof c == "number" ? u[v] = H(v === "top" ? c : -c) : u[v] = v === "top" ? H(c) : i(c), typeof f == "number" ? u[m] = H(m === "left" ? f : -f) : u[m] = m === "left" ? H(f) : i(f)) : (u.marginTop = H(c), u.marginLeft = H(f)); | ||
} | ||
return r; | ||
}), a = () => { | ||
if (n() || e.dot) | ||
return u; | ||
}), s = () => { | ||
if (o() || e.dot) | ||
return l("div", { | ||
@@ -622,4 +625,4 @@ class: wt([e.position, { | ||
}]), | ||
style: i.value | ||
}, [o()]); | ||
style: a.value | ||
}, [n()]); | ||
}; | ||
@@ -629,21 +632,21 @@ return () => { | ||
const { | ||
tag: r | ||
tag: u | ||
} = e; | ||
return l(r, { | ||
return l(u, { | ||
class: wt("wrapper") | ||
}, { | ||
default: () => [t.default(), a()] | ||
default: () => [t.default(), s()] | ||
}); | ||
} | ||
return a(); | ||
return s(); | ||
}; | ||
} | ||
}); | ||
const po = q(bo); | ||
let Ft = 2e3; | ||
const Io = () => ++Ft, To = (e) => { | ||
Ft = e; | ||
}, [jt, Eo] = Z("config-provider"), Xt = Symbol(jt), xo = { | ||
tag: H("div"), | ||
theme: H("light"), | ||
const Eo = q(po); | ||
let Yt = 2e3; | ||
const To = () => ++Yt, Io = (e) => { | ||
Yt = e; | ||
}, [Ft, Oo] = Z("config-provider"), jt = Symbol(Ft), xo = { | ||
tag: V("div"), | ||
theme: V("light"), | ||
zIndex: Number, | ||
@@ -655,10 +658,10 @@ themeVars: Object, | ||
}; | ||
function Oo(e) { | ||
function $o(e) { | ||
const t = {}; | ||
return Object.keys(e).forEach((n) => { | ||
t[`--van-${so(n)}`] = e[n]; | ||
return Object.keys(e).forEach((o) => { | ||
t[`--van-${so(o)}`] = e[o]; | ||
}), t; | ||
} | ||
Y({ | ||
name: jt, | ||
name: Ft, | ||
props: xo, | ||
@@ -668,5 +671,5 @@ setup(e, { | ||
}) { | ||
const n = S(() => Oo(Ie({}, e.themeVars, e.theme === "dark" ? e.themeVarsDark : e.themeVarsLight))); | ||
const o = $(() => $o(Ee({}, e.themeVars, e.theme === "dark" ? e.themeVarsDark : e.themeVarsLight))); | ||
if (nt) { | ||
const o = () => { | ||
const n = () => { | ||
document.documentElement.classList.add(`van-theme-${e.theme}`); | ||
@@ -676,17 +679,17 @@ }, i = (a = e.theme) => { | ||
}; | ||
k(() => e.theme, (a, r) => { | ||
r && i(r), o(); | ||
A(() => e.theme, (a, s) => { | ||
s && i(s), n(); | ||
}, { | ||
immediate: !0 | ||
}), De(o), pe(i), ze(i); | ||
}), De(n), pe(i), ze(i); | ||
} | ||
return qe(Xt, e), on(() => { | ||
e.zIndex !== void 0 && To(e.zIndex); | ||
return qe(jt, e), nn(() => { | ||
e.zIndex !== void 0 && Io(e.zIndex); | ||
}), () => l(e.tag, { | ||
class: Eo(), | ||
style: n.value | ||
class: Oo(), | ||
style: o.value | ||
}, { | ||
default: () => { | ||
var o; | ||
return [(o = t.default) == null ? void 0 : o.call(t)]; | ||
var n; | ||
return [(n = t.default) == null ? void 0 : n.call(t)]; | ||
} | ||
@@ -696,5 +699,5 @@ }); | ||
}); | ||
const [$o, yt] = Z("icon"), So = (e) => e == null ? void 0 : e.includes("/"), Co = { | ||
const [So, yt] = Z("icon"), Po = (e) => e == null ? void 0 : e.includes("/"), Co = { | ||
dot: Boolean, | ||
tag: H("i"), | ||
tag: V("i"), | ||
name: String, | ||
@@ -707,4 +710,4 @@ size: D, | ||
}; | ||
var Po = Y({ | ||
name: $o, | ||
var _o = Y({ | ||
name: So, | ||
props: Co, | ||
@@ -714,3 +717,3 @@ setup(e, { | ||
}) { | ||
const n = Qe(Xt, null), o = S(() => e.classPrefix || (n == null ? void 0 : n.iconPrefix) || yt()); | ||
const o = Qe(jt, null), n = $(() => e.classPrefix || (o == null ? void 0 : o.iconPrefix) || yt()); | ||
return () => { | ||
@@ -720,22 +723,22 @@ const { | ||
dot: a, | ||
name: r, | ||
name: s, | ||
size: u, | ||
badge: d, | ||
badge: f, | ||
color: c | ||
} = e, f = So(r); | ||
return l(po, we({ | ||
} = e, d = Po(s); | ||
return l(Eo, we({ | ||
dot: a, | ||
tag: i, | ||
class: [o.value, f ? "" : `${o.value}-${r}`], | ||
class: [n.value, d ? "" : `${n.value}-${s}`], | ||
style: { | ||
color: c, | ||
fontSize: V(u) | ||
fontSize: H(u) | ||
}, | ||
content: d | ||
content: f | ||
}, e.badgeProps), { | ||
default: () => { | ||
var h; | ||
return [(h = t.default) == null ? void 0 : h.call(t), f && l("img", { | ||
var v; | ||
return [(v = t.default) == null ? void 0 : v.call(t), d && l("img", { | ||
class: yt("image"), | ||
src: r | ||
src: s | ||
}, null)]; | ||
@@ -747,5 +750,5 @@ } | ||
}); | ||
const ot = q(Po), [_o, ge] = Z("loading"), ko = Array(12).fill(null).map((e, t) => l("i", { | ||
const ot = q(_o), [ko, ge] = Z("loading"), Ao = Array(12).fill(null).map((e, t) => l("i", { | ||
class: ge("line", String(t + 1)) | ||
}, null)), Bo = l("svg", { | ||
}, null)), Ro = l("svg", { | ||
class: ge("circular"), | ||
@@ -758,5 +761,5 @@ viewBox: "25 25 50 50" | ||
fill: "none" | ||
}, null)]), Ro = { | ||
}, null)]), Bo = { | ||
size: D, | ||
type: H("circular"), | ||
type: V("circular"), | ||
color: String, | ||
@@ -767,15 +770,15 @@ vertical: Boolean, | ||
}; | ||
var Ao = Y({ | ||
name: _o, | ||
props: Ro, | ||
var Lo = Y({ | ||
name: ko, | ||
props: Bo, | ||
setup(e, { | ||
slots: t | ||
}) { | ||
const n = S(() => Ie({ | ||
const o = $(() => Ee({ | ||
color: e.color | ||
}, ao(e.size))), o = () => { | ||
const a = e.type === "spinner" ? ko : Bo; | ||
}, ao(e.size))), n = () => { | ||
const a = e.type === "spinner" ? Ao : Ro; | ||
return l("span", { | ||
class: ge("spinner", e.type), | ||
style: n.value | ||
style: o.value | ||
}, [t.icon ? t.icon() : a]); | ||
@@ -788,3 +791,3 @@ }, i = () => { | ||
style: { | ||
fontSize: V(e.textSize), | ||
fontSize: H(e.textSize), | ||
color: (a = e.textColor) != null ? a : e.color | ||
@@ -797,15 +800,15 @@ } | ||
type: a, | ||
vertical: r | ||
vertical: s | ||
} = e; | ||
return l("div", { | ||
class: ge([a, { | ||
vertical: r | ||
vertical: s | ||
}]), | ||
"aria-live": "polite", | ||
"aria-busy": !0 | ||
}, [o(), i()]); | ||
}, [n(), i()]); | ||
}; | ||
} | ||
}); | ||
const Lo = q(Ao), Mo = { | ||
const Mo = q(Lo), Do = { | ||
show: Boolean, | ||
@@ -824,15 +827,15 @@ zIndex: D, | ||
}; | ||
function Do(e, t) { | ||
function zo(e, t) { | ||
return e > t ? "horizontal" : t > e ? "vertical" : ""; | ||
} | ||
function at() { | ||
const e = b(0), t = b(0), n = b(0), o = b(0), i = b(0), a = b(0), r = b(""), u = () => r.value === "vertical", d = () => r.value === "horizontal", c = () => { | ||
n.value = 0, o.value = 0, i.value = 0, a.value = 0, r.value = ""; | ||
const e = y(0), t = y(0), o = y(0), n = y(0), i = y(0), a = y(0), s = y(""), u = () => s.value === "vertical", f = () => s.value === "horizontal", c = () => { | ||
o.value = 0, n.value = 0, i.value = 0, a.value = 0, s.value = ""; | ||
}; | ||
return { | ||
move: (m) => { | ||
const E = m.touches[0]; | ||
n.value = (E.clientX < 0 ? 0 : E.clientX) - e.value, o.value = E.clientY - t.value, i.value = Math.abs(n.value), a.value = Math.abs(o.value); | ||
const O = 10; | ||
(!r.value || i.value < O && a.value < O) && (r.value = Do(i.value, a.value)); | ||
const T = m.touches[0]; | ||
o.value = (T.clientX < 0 ? 0 : T.clientX) - e.value, n.value = T.clientY - t.value, i.value = Math.abs(o.value), a.value = Math.abs(n.value); | ||
const I = 10; | ||
(!s.value || i.value < I && a.value < I) && (s.value = zo(i.value, a.value)); | ||
}, | ||
@@ -845,9 +848,9 @@ start: (m) => { | ||
startY: t, | ||
deltaX: n, | ||
deltaY: o, | ||
deltaX: o, | ||
deltaY: n, | ||
offsetX: i, | ||
offsetY: a, | ||
direction: r, | ||
direction: s, | ||
isVertical: u, | ||
isHorizontal: d | ||
isHorizontal: f | ||
}; | ||
@@ -857,31 +860,31 @@ } | ||
const bt = "van-overflow-hidden"; | ||
function zo(e, t) { | ||
const n = at(), o = "01", i = "10", a = (f) => { | ||
n.move(f); | ||
const h = n.deltaY.value > 0 ? i : o, m = to( | ||
f.target, | ||
function No(e, t) { | ||
const o = at(), n = "01", i = "10", a = (d) => { | ||
o.move(d); | ||
const v = o.deltaY.value > 0 ? i : n, m = to( | ||
d.target, | ||
e.value | ||
), { scrollHeight: E, offsetHeight: O, scrollTop: y } = m; | ||
let s = "11"; | ||
y === 0 ? s = O >= E ? "00" : "01" : y + O >= E && (s = "10"), s !== "11" && n.isVertical() && !(parseInt(s, 2) & parseInt(h, 2)) && be(f, !0); | ||
}, r = () => { | ||
document.addEventListener("touchstart", n.start), document.addEventListener("touchmove", a, { passive: !1 }), ve || document.body.classList.add(bt), ve++; | ||
), { scrollHeight: T, offsetHeight: I, scrollTop: C } = m; | ||
let r = "11"; | ||
C === 0 ? r = I >= T ? "00" : "01" : C + I >= T && (r = "10"), r !== "11" && o.isVertical() && !(parseInt(r, 2) & parseInt(v, 2)) && be(d, !0); | ||
}, s = () => { | ||
document.addEventListener("touchstart", o.start), document.addEventListener("touchmove", a, { passive: !1 }), ve || document.body.classList.add(bt), ve++; | ||
}, u = () => { | ||
ve && (document.removeEventListener("touchstart", n.start), document.removeEventListener("touchmove", a), ve--, ve || document.body.classList.remove(bt)); | ||
}, d = () => t() && r(), c = () => t() && u(); | ||
Rt(d), pe(c), ze(c), k(t, (f) => { | ||
f ? r() : u(); | ||
ve && (document.removeEventListener("touchstart", o.start), document.removeEventListener("touchmove", a), ve--, ve || document.body.classList.remove(bt)); | ||
}, f = () => t() && s(), c = () => t() && u(); | ||
At(f), pe(c), ze(c), A(t, (d) => { | ||
d ? s() : u(); | ||
}); | ||
} | ||
function Ht(e) { | ||
const t = b(!1); | ||
return k( | ||
function Xt(e) { | ||
const t = y(!1); | ||
return A( | ||
e, | ||
(n) => { | ||
n && (t.value = n); | ||
(o) => { | ||
o && (t.value = o); | ||
}, | ||
{ immediate: !0 } | ||
), (n) => () => t.value ? n() : null; | ||
), (o) => () => t.value ? o() : null; | ||
} | ||
const [No, Yo] = Z("overlay"), Fo = { | ||
const [Yo, Fo] = Z("overlay"), jo = { | ||
show: Boolean, | ||
@@ -895,21 +898,21 @@ zIndex: D, | ||
}; | ||
var jo = Y({ | ||
name: No, | ||
props: Fo, | ||
var Xo = Y({ | ||
name: Yo, | ||
props: jo, | ||
setup(e, { | ||
slots: t | ||
}) { | ||
const n = b(), o = Ht(() => e.show || !e.lazyRender), i = (r) => { | ||
e.lockScroll && be(r, !0); | ||
}, a = o(() => { | ||
var r; | ||
const u = Ie(io(e.zIndex), e.customStyle); | ||
return te(e.duration) && (u.animationDuration = `${e.duration}s`), ye(l("div", { | ||
ref: n, | ||
const o = y(), n = Xt(() => e.show || !e.lazyRender), i = (s) => { | ||
e.lockScroll && be(s, !0); | ||
}, a = n(() => { | ||
var s; | ||
const u = Ee(io(e.zIndex), e.customStyle); | ||
return ne(e.duration) && (u.animationDuration = `${e.duration}s`), ye(l("div", { | ||
ref: o, | ||
style: u, | ||
class: [Yo(), e.className] | ||
}, [(r = t.default) == null ? void 0 : r.call(t)]), [[Be, e.show]]); | ||
class: [Fo(), e.className] | ||
}, [(s = t.default) == null ? void 0 : s.call(t)]), [[Ae, e.show]]); | ||
}); | ||
return Ne("touchmove", i, { | ||
target: n | ||
target: o | ||
}), () => l(Je, { | ||
@@ -923,6 +926,6 @@ name: "van-fade", | ||
}); | ||
const Xo = q(jo), Ho = Ie({}, Mo, { | ||
const Wo = q(Xo), Ho = Ee({}, Do, { | ||
round: Boolean, | ||
position: H("center"), | ||
closeIcon: H("cross"), | ||
position: V("center"), | ||
closeIcon: V("cross"), | ||
closeable: Boolean, | ||
@@ -932,8 +935,8 @@ transition: String, | ||
closeOnPopstate: Boolean, | ||
closeIconPosition: H("top-right"), | ||
closeIconPosition: V("top-right"), | ||
safeAreaInsetTop: Boolean, | ||
safeAreaInsetBottom: Boolean | ||
}), [Wo, pt] = Z("popup"); | ||
var Uo = Y({ | ||
name: Wo, | ||
}), [Uo, pt] = Z("popup"); | ||
var Vo = Y({ | ||
name: Uo, | ||
inheritAttrs: !1, | ||
@@ -944,19 +947,19 @@ props: Ho, | ||
emit: t, | ||
attrs: n, | ||
slots: o | ||
attrs: o, | ||
slots: n | ||
}) { | ||
let i, a; | ||
const r = b(), u = b(), d = Ht(() => e.show || !e.lazyRender), c = S(() => { | ||
const x = { | ||
zIndex: r.value | ||
const s = y(), u = y(), f = Xt(() => e.show || !e.lazyRender), c = $(() => { | ||
const E = { | ||
zIndex: s.value | ||
}; | ||
if (te(e.duration)) { | ||
const I = e.position === "center" ? "animationDuration" : "transitionDuration"; | ||
x[I] = `${e.duration}s`; | ||
if (ne(e.duration)) { | ||
const p = e.position === "center" ? "animationDuration" : "transitionDuration"; | ||
E[p] = `${e.duration}s`; | ||
} | ||
return x; | ||
}), f = () => { | ||
i || (i = !0, r.value = e.zIndex !== void 0 ? +e.zIndex : Io(), t("open")); | ||
}, h = () => { | ||
i && Nt(e.beforeClose, { | ||
return E; | ||
}), d = () => { | ||
i || (i = !0, s.value = e.zIndex !== void 0 ? +e.zIndex : To(), t("open")); | ||
}, v = () => { | ||
i && zt(e.beforeClose, { | ||
done() { | ||
@@ -966,10 +969,10 @@ i = !1, t("close"), t("update:show", !1); | ||
}); | ||
}, m = (x) => { | ||
t("clickOverlay", x), e.closeOnClickOverlay && h(); | ||
}, E = () => { | ||
}, m = (E) => { | ||
t("clickOverlay", E), e.closeOnClickOverlay && v(); | ||
}, T = () => { | ||
if (e.overlay) | ||
return l(Xo, { | ||
return l(Wo, { | ||
show: e.show, | ||
class: e.overlayClass, | ||
zIndex: r.value, | ||
zIndex: s.value, | ||
duration: e.duration, | ||
@@ -981,7 +984,7 @@ customStyle: e.overlayStyle, | ||
}, { | ||
default: o["overlay-content"] | ||
default: n["overlay-content"] | ||
}); | ||
}, O = (x) => { | ||
t("clickCloseIcon", x), h(); | ||
}, y = () => { | ||
}, I = (E) => { | ||
t("clickCloseIcon", E), v(); | ||
}, C = () => { | ||
if (e.closeable) | ||
@@ -992,13 +995,13 @@ return l(ot, { | ||
name: e.closeIcon, | ||
class: [pt("close-icon", e.closeIconPosition), zt], | ||
class: [pt("close-icon", e.closeIconPosition), Dt], | ||
classPrefix: e.iconPrefix, | ||
onClick: O | ||
onClick: I | ||
}, null); | ||
}, s = () => t("opened"), g = () => t("closed"), B = (x) => t("keydown", x), F = d(() => { | ||
var x; | ||
}, r = () => t("opened"), h = () => t("closed"), S = (E) => t("keydown", E), j = f(() => { | ||
var E; | ||
const { | ||
round: I, | ||
position: P, | ||
safeAreaInsetTop: v, | ||
safeAreaInsetBottom: T | ||
round: p, | ||
position: _, | ||
safeAreaInsetTop: z, | ||
safeAreaInsetBottom: g | ||
} = e; | ||
@@ -1011,48 +1014,48 @@ return ye(l("div", we({ | ||
class: [pt({ | ||
round: I, | ||
[P]: P | ||
round: p, | ||
[_]: _ | ||
}), { | ||
"van-safe-area-top": v, | ||
"van-safe-area-bottom": T | ||
"van-safe-area-top": z, | ||
"van-safe-area-bottom": g | ||
}], | ||
onKeydown: B | ||
}, n), [(x = o.default) == null ? void 0 : x.call(o), y()]), [[Be, e.show]]); | ||
onKeydown: S | ||
}, o), [(E = n.default) == null ? void 0 : E.call(n), C()]), [[Ae, e.show]]); | ||
}), L = () => { | ||
const { | ||
position: x, | ||
transition: I, | ||
transitionAppear: P | ||
} = e, v = x === "center" ? "van-fade" : `van-popup-slide-${x}`; | ||
position: E, | ||
transition: p, | ||
transitionAppear: _ | ||
} = e, z = E === "center" ? "van-fade" : `van-popup-slide-${E}`; | ||
return l(Je, { | ||
name: I || v, | ||
appear: P, | ||
onAfterEnter: s, | ||
onAfterLeave: g | ||
name: p || z, | ||
appear: _, | ||
onAfterEnter: r, | ||
onAfterLeave: h | ||
}, { | ||
default: F | ||
default: j | ||
}); | ||
}; | ||
return k(() => e.show, (x) => { | ||
x && !i && (f(), n.tabindex === 0 && ae(() => { | ||
var I; | ||
(I = u.value) == null || I.focus(); | ||
})), !x && i && (i = !1, t("close")); | ||
return A(() => e.show, (E) => { | ||
E && !i && (d(), o.tabindex === 0 && te(() => { | ||
var p; | ||
(p = u.value) == null || p.focus(); | ||
})), !E && i && (i = !1, t("close")); | ||
}), Ye({ | ||
popupRef: u | ||
}), zo(u, () => e.show && e.lockScroll), Ne("popstate", () => { | ||
e.closeOnPopstate && (h(), a = !1); | ||
}), ce(() => { | ||
e.show && f(); | ||
}), No(u, () => e.show && e.lockScroll), Ne("popstate", () => { | ||
e.closeOnPopstate && (v(), a = !1); | ||
}), ie(() => { | ||
e.show && d(); | ||
}), De(() => { | ||
a && (t("update:show", !0), a = !1); | ||
}), pe(() => { | ||
e.show && e.teleport && (h(), a = !0); | ||
}), qe(Yt, () => e.show), () => e.teleport ? l(Ct, { | ||
e.show && e.teleport && (v(), a = !0); | ||
}), qe(Nt, () => e.show), () => e.teleport ? l(St, { | ||
to: e.teleport | ||
}, { | ||
default: () => [E(), L()] | ||
}) : l(an, null, [E(), L()]); | ||
default: () => [T(), L()] | ||
}) : l(on, null, [T(), L()]); | ||
} | ||
}); | ||
const Vo = q(Uo), [Wt, Pe] = Z("swipe"), Zo = { | ||
const Zo = q(Vo), [Wt, Ce] = Z("swipe"), Go = { | ||
loop: N, | ||
@@ -1062,20 +1065,20 @@ width: D, | ||
vertical: Boolean, | ||
autoplay: ne(0), | ||
duration: ne(500), | ||
autoplay: oe(0), | ||
duration: oe(500), | ||
touchable: N, | ||
lazyRender: Boolean, | ||
initialSwipe: ne(0), | ||
initialSwipe: oe(0), | ||
indicatorColor: String, | ||
showIndicators: N, | ||
stopPropagation: N | ||
}, Ut = Symbol(Wt); | ||
var Go = Y({ | ||
}, Ht = Symbol(Wt); | ||
var Ko = Y({ | ||
name: Wt, | ||
props: Zo, | ||
props: Go, | ||
emits: ["change"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(), i = b(), a = oe({ | ||
const n = y(), i = y(), a = ae({ | ||
rect: null, | ||
@@ -1087,9 +1090,9 @@ width: 0, | ||
swiping: !1 | ||
}), r = at(), { | ||
}), s = at(), { | ||
children: u, | ||
linkChildren: d | ||
} = Kn(Ut), c = S(() => u.length), f = S(() => a[e.vertical ? "height" : "width"]), h = S(() => e.vertical ? r.deltaY.value : r.deltaX.value), m = S(() => a.rect ? (e.vertical ? a.rect.height : a.rect.width) - f.value * c.value : 0), E = S(() => Math.ceil(Math.abs(m.value) / f.value)), O = S(() => c.value * f.value), y = S(() => (a.active + c.value) % c.value), s = S(() => { | ||
linkChildren: f | ||
} = Kn(Ht), c = $(() => u.length), d = $(() => a[e.vertical ? "height" : "width"]), v = $(() => e.vertical ? s.deltaY.value : s.deltaX.value), m = $(() => a.rect ? (e.vertical ? a.rect.height : a.rect.width) - d.value * c.value : 0), T = $(() => d.value ? Math.ceil(Math.abs(m.value) / d.value) : c.value), I = $(() => c.value * d.value), C = $(() => (a.active + c.value) % c.value), r = $(() => { | ||
const w = e.vertical ? "vertical" : "horizontal"; | ||
return r.direction.value === w; | ||
}), g = S(() => { | ||
return s.direction.value === w; | ||
}), h = $(() => { | ||
const w = { | ||
@@ -1099,21 +1102,21 @@ transitionDuration: `${a.swiping ? 0 : e.duration}ms`, | ||
}; | ||
if (f.value) { | ||
const $ = e.vertical ? "height" : "width", C = e.vertical ? "width" : "height"; | ||
w[$] = `${O.value}px`, w[C] = e[C] ? `${e[C]}px` : ""; | ||
if (d.value) { | ||
const x = e.vertical ? "height" : "width", P = e.vertical ? "width" : "height"; | ||
w[x] = `${I.value}px`, w[P] = e[P] ? `${e[P]}px` : ""; | ||
} | ||
return w; | ||
}), B = (w) => { | ||
}), S = (w) => { | ||
const { | ||
active: $ | ||
active: x | ||
} = a; | ||
return w ? e.loop ? J($ + w, -1, c.value) : J($ + w, 0, E.value) : $; | ||
}, F = (w, $ = 0) => { | ||
let C = w * f.value; | ||
e.loop || (C = Math.min(C, -m.value)); | ||
let M = $ - C; | ||
return w ? e.loop ? J(x + w, -1, c.value) : J(x + w, 0, T.value) : x; | ||
}, j = (w, x = 0) => { | ||
let P = w * d.value; | ||
e.loop || (P = Math.min(P, -m.value)); | ||
let M = x - P; | ||
return e.loop || (M = J(M, m.value, 0)), M; | ||
}, L = ({ | ||
pace: w = 0, | ||
offset: $ = 0, | ||
emitChange: C | ||
offset: x = 0, | ||
emitChange: P | ||
}) => { | ||
@@ -1124,15 +1127,15 @@ if (c.value <= 1) | ||
active: M | ||
} = a, X = B(w), fe = F(X, $); | ||
} = a, U = S(w), fe = j(U, x); | ||
if (e.loop) { | ||
if (u[0] && fe !== m.value) { | ||
const Fe = fe < m.value; | ||
u[0].setOffset(Fe ? O.value : 0); | ||
u[0].setOffset(Fe ? I.value : 0); | ||
} | ||
if (u[c.value - 1] && fe !== 0) { | ||
const Fe = fe > 0; | ||
u[c.value - 1].setOffset(Fe ? -O.value : 0); | ||
u[c.value - 1].setOffset(Fe ? -I.value : 0); | ||
} | ||
} | ||
a.active = X, a.offset = fe, C && X !== M && t("change", y.value); | ||
}, x = () => { | ||
a.active = U, a.offset = fe, P && U !== M && t("change", C.value); | ||
}, E = () => { | ||
a.swiping = !0, a.active <= -1 ? L({ | ||
@@ -1143,4 +1146,4 @@ pace: c.value | ||
}); | ||
}, I = () => { | ||
x(), r.reset(), $e(() => { | ||
}, p = () => { | ||
E(), s.reset(), $e(() => { | ||
a.swiping = !1, L({ | ||
@@ -1151,4 +1154,4 @@ pace: -1, | ||
}); | ||
}, P = () => { | ||
x(), r.reset(), $e(() => { | ||
}, _ = () => { | ||
E(), s.reset(), $e(() => { | ||
a.swiping = !1, L({ | ||
@@ -1160,60 +1163,60 @@ pace: 1, | ||
}; | ||
let v; | ||
const T = () => clearTimeout(v), _ = () => { | ||
T(), e.autoplay > 0 && c.value > 1 && (v = setTimeout(() => { | ||
P(), _(); | ||
let z; | ||
const g = () => clearTimeout(z), O = () => { | ||
g(), e.autoplay > 0 && c.value > 1 && (z = setTimeout(() => { | ||
_(), O(); | ||
}, +e.autoplay)); | ||
}, z = (w = +e.initialSwipe) => { | ||
if (!o.value) | ||
}, k = (w = +e.initialSwipe) => { | ||
if (!n.value) | ||
return; | ||
const $ = () => { | ||
var C, M; | ||
if (!mt(o)) { | ||
const X = { | ||
width: o.value.offsetWidth, | ||
height: o.value.offsetHeight | ||
const x = () => { | ||
var P, M; | ||
if (!mt(n)) { | ||
const U = { | ||
width: n.value.offsetWidth, | ||
height: n.value.offsetHeight | ||
}; | ||
a.rect = X, a.width = +((C = e.width) != null ? C : X.width), a.height = +((M = e.height) != null ? M : X.height); | ||
a.rect = U, a.width = +((P = e.width) != null ? P : U.width), a.height = +((M = e.height) != null ? M : U.height); | ||
} | ||
c.value && (w = Math.min(c.value - 1, w)), a.active = w, a.swiping = !0, a.offset = F(w), u.forEach((X) => { | ||
X.setOffset(0); | ||
}), _(); | ||
c.value && (w = Math.min(c.value - 1, w), w === -1 && (w = c.value - 1)), a.active = w, a.swiping = !0, a.offset = j(w), u.forEach((U) => { | ||
U.setOffset(0); | ||
}), O(); | ||
}; | ||
mt(o) ? ae().then($) : $(); | ||
}, W = () => z(a.active); | ||
let U; | ||
const j = (w) => { | ||
!e.touchable || (r.start(w), U = Date.now(), T(), x()); | ||
mt(n) ? te().then(x) : x(); | ||
}, X = () => k(a.active); | ||
let W; | ||
const F = (w) => { | ||
!e.touchable || (s.start(w), W = Date.now(), g(), E()); | ||
}, de = (w) => { | ||
e.touchable && a.swiping && (r.move(w), s.value && (!e.loop && (a.active === 0 && h.value > 0 || a.active === c.value - 1 && h.value < 0) || (be(w, e.stopPropagation), L({ | ||
offset: h.value | ||
e.touchable && a.swiping && (s.move(w), r.value && (!e.loop && (a.active === 0 && v.value > 0 || a.active === c.value - 1 && v.value < 0) || (be(w, e.stopPropagation), L({ | ||
offset: v.value | ||
})))); | ||
}, p = () => { | ||
}, b = () => { | ||
if (!e.touchable || !a.swiping) | ||
return; | ||
const w = Date.now() - U, $ = h.value / w; | ||
if ((Math.abs($) > 0.25 || Math.abs(h.value) > f.value / 2) && s.value) { | ||
const M = e.vertical ? r.offsetY.value : r.offsetX.value; | ||
let X = 0; | ||
e.loop ? X = M > 0 ? h.value > 0 ? -1 : 1 : 0 : X = -Math[h.value > 0 ? "ceil" : "floor"](h.value / f.value), L({ | ||
pace: X, | ||
const w = Date.now() - W, x = v.value / w; | ||
if ((Math.abs(x) > 0.25 || Math.abs(v.value) > d.value / 2) && r.value) { | ||
const M = e.vertical ? s.offsetY.value : s.offsetX.value; | ||
let U = 0; | ||
e.loop ? U = M > 0 ? v.value > 0 ? -1 : 1 : 0 : U = -Math[v.value > 0 ? "ceil" : "floor"](v.value / d.value), L({ | ||
pace: U, | ||
emitChange: !0 | ||
}); | ||
} else | ||
h.value && L({ | ||
v.value && L({ | ||
pace: 0 | ||
}); | ||
a.swiping = !1, _(); | ||
}, R = (w, $ = {}) => { | ||
x(), r.reset(), $e(() => { | ||
let C; | ||
e.loop && w === c.value ? C = a.active === 0 ? 0 : w : C = w % c.value, $.immediate ? $e(() => { | ||
a.swiping = !1, O(); | ||
}, R = (w, x = {}) => { | ||
E(), s.reset(), $e(() => { | ||
let P; | ||
e.loop && w === c.value ? P = a.active === 0 ? 0 : w : P = w % c.value, x.immediate ? $e(() => { | ||
a.swiping = !1; | ||
}) : a.swiping = !1, L({ | ||
pace: C - a.active, | ||
pace: P - a.active, | ||
emitChange: !0 | ||
}); | ||
}); | ||
}, A = (w, $) => { | ||
const C = $ === y.value, M = C ? { | ||
}, B = (w, x) => { | ||
const P = x === C.value, M = P ? { | ||
backgroundColor: e.indicatorColor | ||
@@ -1223,10 +1226,10 @@ } : void 0; | ||
style: M, | ||
class: Pe("indicator", { | ||
active: C | ||
class: Ce("indicator", { | ||
active: P | ||
}) | ||
}, null); | ||
}, G = () => { | ||
if (n.indicator) | ||
return n.indicator({ | ||
active: y.value, | ||
if (o.indicator) | ||
return o.indicator({ | ||
active: C.value, | ||
total: c.value | ||
@@ -1236,21 +1239,21 @@ }); | ||
return l("div", { | ||
class: Pe("indicators", { | ||
class: Ce("indicators", { | ||
vertical: e.vertical | ||
}) | ||
}, [Array(c.value).fill("").map(A)]); | ||
}, [Array(c.value).fill("").map(B)]); | ||
}; | ||
return Ye({ | ||
prev: I, | ||
next: P, | ||
prev: p, | ||
next: _, | ||
state: a, | ||
resize: W, | ||
resize: X, | ||
swipeTo: R | ||
}), d({ | ||
size: f, | ||
}), f({ | ||
size: d, | ||
props: e, | ||
count: c, | ||
activeIndicator: y | ||
}), k(() => e.initialSwipe, (w) => z(+w)), k(c, () => z(a.active)), k(() => e.autoplay, _), k([At, Lt], W), k(no(), (w) => { | ||
w === "visible" ? _() : T(); | ||
}), ce(z), De(() => z(a.active)), ho(() => z(a.active)), pe(T), ze(T), Ne("touchmove", de, { | ||
activeIndicator: C | ||
}), A(() => e.initialSwipe, (w) => k(+w)), A(c, () => k(a.active)), A(() => e.autoplay, O), A([Rt, Bt], X), A(no(), (w) => { | ||
w === "visible" ? O() : g(); | ||
}), ie(k), De(() => k(a.active)), wo(() => k(a.active)), pe(g), ze(g), Ne("touchmove", de, { | ||
target: i | ||
@@ -1260,25 +1263,25 @@ }), () => { | ||
return l("div", { | ||
ref: o, | ||
class: Pe() | ||
ref: n, | ||
class: Ce() | ||
}, [l("div", { | ||
ref: i, | ||
style: g.value, | ||
class: Pe("track", { | ||
style: h.value, | ||
class: Ce("track", { | ||
vertical: e.vertical | ||
}), | ||
onTouchstartPassive: j, | ||
onTouchend: p, | ||
onTouchcancel: p | ||
}, [(w = n.default) == null ? void 0 : w.call(n)]), G()]); | ||
onTouchstartPassive: F, | ||
onTouchend: b, | ||
onTouchcancel: b | ||
}, [(w = o.default) == null ? void 0 : w.call(o)]), G()]); | ||
}; | ||
} | ||
}); | ||
const Ko = q(Go), [Qo, qo] = Z("swipe-item"); | ||
var Jo = Y({ | ||
name: Qo, | ||
const Qo = q(Ko), [qo, Jo] = Z("swipe-item"); | ||
var ea = Y({ | ||
name: qo, | ||
setup(e, { | ||
slots: t | ||
}) { | ||
let n; | ||
const o = oe({ | ||
let o; | ||
const n = ae({ | ||
offset: 0, | ||
@@ -1290,3 +1293,3 @@ inited: !1, | ||
index: a | ||
} = Vn(Ut); | ||
} = Vn(Ht); | ||
if (!i) { | ||
@@ -1296,32 +1299,32 @@ process.env.NODE_ENV !== "production" && console.error("[Vant] <SwipeItem> must be a child component of <Swipe>."); | ||
} | ||
const r = S(() => { | ||
const s = $(() => { | ||
const c = {}, { | ||
vertical: f | ||
vertical: d | ||
} = i.props; | ||
return i.size.value && (c[f ? "height" : "width"] = `${i.size.value}px`), o.offset && (c.transform = `translate${f ? "Y" : "X"}(${o.offset}px)`), c; | ||
}), u = S(() => { | ||
return i.size.value && (c[d ? "height" : "width"] = `${i.size.value}px`), n.offset && (c.transform = `translate${d ? "Y" : "X"}(${n.offset}px)`), c; | ||
}), u = $(() => { | ||
const { | ||
loop: c, | ||
lazyRender: f | ||
lazyRender: d | ||
} = i.props; | ||
if (!f || n) | ||
if (!d || o) | ||
return !0; | ||
if (!o.mounted) | ||
if (!n.mounted) | ||
return !1; | ||
const h = i.activeIndicator.value, m = i.count.value - 1, E = h === 0 && c ? m : h - 1, O = h === m && c ? 0 : h + 1; | ||
return n = a.value === h || a.value === E || a.value === O, n; | ||
}), d = (c) => { | ||
o.offset = c; | ||
const v = i.activeIndicator.value, m = i.count.value - 1, T = v === 0 && c ? m : v - 1, I = v === m && c ? 0 : v + 1; | ||
return o = a.value === v || a.value === T || a.value === I, o; | ||
}), f = (c) => { | ||
n.offset = c; | ||
}; | ||
return ce(() => { | ||
ae(() => { | ||
o.mounted = !0; | ||
return ie(() => { | ||
te(() => { | ||
n.mounted = !0; | ||
}); | ||
}), Ye({ | ||
setOffset: d | ||
setOffset: f | ||
}), () => { | ||
var c; | ||
return l("div", { | ||
class: qo(), | ||
style: r.value | ||
class: Jo(), | ||
style: s.value | ||
}, [u.value ? (c = t.default) == null ? void 0 : c.call(t) : null]); | ||
@@ -1331,3 +1334,3 @@ }; | ||
}); | ||
const ea = q(Jo), [ta, ie] = Z("image"), na = { | ||
const ta = q(ea), [na, re] = Z("image"), oa = { | ||
src: String, | ||
@@ -1345,51 +1348,57 @@ alt: String, | ||
showError: N, | ||
errorIcon: H("photo-fail"), | ||
errorIcon: V("photo-fail"), | ||
iconPrefix: String, | ||
showLoading: N, | ||
loadingIcon: H("photo") | ||
loadingIcon: V("photo") | ||
}; | ||
var oa = Y({ | ||
name: ta, | ||
props: na, | ||
var aa = Y({ | ||
name: na, | ||
props: oa, | ||
emits: ["load", "error"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(!1), i = b(!0), a = b(), { | ||
$Lazyload: r | ||
} = Me().proxy, u = S(() => { | ||
const y = { | ||
width: V(e.width), | ||
height: V(e.height) | ||
const n = y(!1), i = y(!0), a = y(), { | ||
$Lazyload: s | ||
} = Me().proxy, u = $(() => { | ||
const r = { | ||
width: H(e.width), | ||
height: H(e.height) | ||
}; | ||
return te(e.radius) && (y.overflow = "hidden", y.borderRadius = V(e.radius)), y; | ||
return ne(e.radius) && (r.overflow = "hidden", r.borderRadius = H(e.radius)), r; | ||
}); | ||
k(() => e.src, () => { | ||
o.value = !1, i.value = !0; | ||
A(() => e.src, () => { | ||
n.value = !1, i.value = !0; | ||
}); | ||
const d = (y) => { | ||
i.value = !1, t("load", y); | ||
}, c = (y) => { | ||
o.value = !0, i.value = !1, t("error", y); | ||
}, f = (y, s, g) => g ? g() : l(ot, { | ||
name: y, | ||
const f = (r) => { | ||
i.value && (i.value = !1, t("load", r)); | ||
}, c = () => { | ||
const r = new Event("load"); | ||
Object.defineProperty(r, "target", { | ||
value: a.value, | ||
enumerable: !0 | ||
}), f(r); | ||
}, d = (r) => { | ||
n.value = !0, i.value = !1, t("error", r); | ||
}, v = (r, h, S) => S ? S() : l(ot, { | ||
name: r, | ||
size: e.iconSize, | ||
class: s, | ||
class: h, | ||
classPrefix: e.iconPrefix | ||
}, null), h = () => { | ||
}, null), m = () => { | ||
if (i.value && e.showLoading) | ||
return l("div", { | ||
class: ie("loading") | ||
}, [f(e.loadingIcon, ie("loading-icon"), n.loading)]); | ||
if (o.value && e.showError) | ||
class: re("loading") | ||
}, [v(e.loadingIcon, re("loading-icon"), o.loading)]); | ||
if (n.value && e.showError) | ||
return l("div", { | ||
class: ie("error") | ||
}, [f(e.errorIcon, ie("error-icon"), n.error)]); | ||
}, m = () => { | ||
if (o.value || !e.src) | ||
class: re("error") | ||
}, [v(e.errorIcon, re("error-icon"), o.error)]); | ||
}, T = () => { | ||
if (n.value || !e.src) | ||
return; | ||
const y = { | ||
const r = { | ||
alt: e.alt, | ||
class: ie("img"), | ||
class: re("img"), | ||
style: { | ||
@@ -1402,25 +1411,31 @@ objectFit: e.fit, | ||
ref: a | ||
}, y), null), [[rn("lazy"), e.src]]) : l("img", we({ | ||
}, r), null), [[an("lazy"), e.src]]) : l("img", we({ | ||
ref: a, | ||
src: e.src, | ||
onLoad: d, | ||
onError: c | ||
}, y), null); | ||
}, E = ({ | ||
el: y | ||
onLoad: f, | ||
onError: d | ||
}, r), null); | ||
}, I = ({ | ||
el: r | ||
}) => { | ||
const s = () => { | ||
y === a.value && i.value && d(); | ||
const h = () => { | ||
r === a.value && i.value && c(); | ||
}; | ||
a.value ? s() : ae(s); | ||
}, O = ({ | ||
el: y | ||
a.value ? h() : te(h); | ||
}, C = ({ | ||
el: r | ||
}) => { | ||
y === a.value && !o.value && c(); | ||
r === a.value && !n.value && d(); | ||
}; | ||
return r && nt && (r.$on("loaded", E), r.$on("error", O), ze(() => { | ||
r.$off("loaded", E), r.$off("error", O); | ||
})), () => { | ||
var y; | ||
return s && nt && (s.$on("loaded", I), s.$on("error", C), ze(() => { | ||
s.$off("loaded", I), s.$off("error", C); | ||
})), ie(() => { | ||
te(() => { | ||
var r; | ||
(r = a.value) != null && r.complete && c(); | ||
}); | ||
}), () => { | ||
var r; | ||
return l("div", { | ||
class: ie({ | ||
class: re({ | ||
round: e.round, | ||
@@ -1430,8 +1445,8 @@ block: e.block | ||
style: u.value | ||
}, [m(), h(), (y = n.default) == null ? void 0 : y.call(n)]); | ||
}, [T(), m(), (r = o.default) == null ? void 0 : r.call(o)]); | ||
}; | ||
} | ||
}); | ||
const aa = q(oa), It = (e) => Math.sqrt((e[0].clientX - e[1].clientX) ** 2 + (e[0].clientY - e[1].clientY) ** 2), Tt = Z("image-preview")[1]; | ||
var ia = Y({ | ||
const ia = q(aa), Et = (e) => Math.sqrt((e[0].clientX - e[1].clientX) ** 2 + (e[0].clientY - e[1].clientY) ** 2), Xe = Z("image-preview")[1]; | ||
var ra = Y({ | ||
props: { | ||
@@ -1441,12 +1456,13 @@ src: String, | ||
active: Number, | ||
minZoom: Oe(D), | ||
maxZoom: Oe(D), | ||
rootWidth: Oe(Number), | ||
rootHeight: Oe(Number) | ||
minZoom: xe(D), | ||
maxZoom: xe(D), | ||
rootWidth: xe(Number), | ||
rootHeight: xe(Number) | ||
}, | ||
emits: ["scale", "close"], | ||
emits: ["scale", "close", "longPress"], | ||
setup(e, { | ||
emit: t | ||
emit: t, | ||
slots: o | ||
}) { | ||
const n = oe({ | ||
const n = ae({ | ||
scale: 1, | ||
@@ -1460,124 +1476,128 @@ moveX: 0, | ||
displayHeight: 0 | ||
}), o = at(), i = b(), a = S(() => { | ||
}), i = at(), a = y(), s = $(() => { | ||
const { | ||
rootWidth: v, | ||
rootHeight: T | ||
} = e, _ = T / v; | ||
return n.imageRatio > _; | ||
}), r = S(() => { | ||
rootWidth: g, | ||
rootHeight: O | ||
} = e, k = O / g; | ||
return n.imageRatio > k; | ||
}), u = $(() => { | ||
const { | ||
scale: v, | ||
moveX: T, | ||
moveY: _, | ||
moving: z, | ||
scale: g, | ||
moveX: O, | ||
moveY: k, | ||
moving: X, | ||
zooming: W | ||
} = n, U = { | ||
transitionDuration: W || z ? "0s" : ".3s" | ||
} = n, F = { | ||
transitionDuration: W || X ? "0s" : ".3s" | ||
}; | ||
if (v !== 1) { | ||
const j = T / v, de = _ / v; | ||
U.transform = `scale(${v}, ${v}) translate(${j}px, ${de}px)`; | ||
if (g !== 1) { | ||
const de = O / g, b = k / g; | ||
F.transform = `scale(${g}, ${g}) translate(${de}px, ${b}px)`; | ||
} | ||
return U; | ||
}), u = S(() => { | ||
return F; | ||
}), f = $(() => { | ||
if (n.imageRatio) { | ||
const { | ||
rootWidth: v, | ||
rootHeight: T | ||
} = e, _ = a.value ? T / n.imageRatio : v; | ||
return Math.max(0, (n.scale * _ - v) / 2); | ||
rootWidth: g, | ||
rootHeight: O | ||
} = e, k = s.value ? O / n.imageRatio : g; | ||
return Math.max(0, (n.scale * k - g) / 2); | ||
} | ||
return 0; | ||
}), d = S(() => { | ||
}), c = $(() => { | ||
if (n.imageRatio) { | ||
const { | ||
rootWidth: v, | ||
rootHeight: T | ||
} = e, _ = a.value ? T : v * n.imageRatio; | ||
return Math.max(0, (n.scale * _ - T) / 2); | ||
rootWidth: g, | ||
rootHeight: O | ||
} = e, k = s.value ? O : g * n.imageRatio; | ||
return Math.max(0, (n.scale * k - O) / 2); | ||
} | ||
return 0; | ||
}), c = (v) => { | ||
v = J(v, +e.minZoom, +e.maxZoom + 1), v !== n.scale && (n.scale = v, t("scale", { | ||
scale: v, | ||
}), d = (g) => { | ||
g = J(g, +e.minZoom, +e.maxZoom + 1), g !== n.scale && (n.scale = g, t("scale", { | ||
scale: g, | ||
index: e.active | ||
})); | ||
}, f = () => { | ||
c(1), n.moveX = 0, n.moveY = 0; | ||
}, h = () => { | ||
const v = n.scale > 1 ? 1 : 2; | ||
c(v), n.moveX = 0, n.moveY = 0; | ||
}, v = () => { | ||
d(1), n.moveX = 0, n.moveY = 0; | ||
}, m = () => { | ||
const g = n.scale > 1 ? 1 : 2; | ||
d(g), n.moveX = 0, n.moveY = 0; | ||
}; | ||
let m, E, O, y, s, g, B; | ||
const F = (v) => { | ||
let T, I, C, r, h, S, j; | ||
const L = (g) => { | ||
const { | ||
touches: T | ||
} = v, { | ||
offsetX: _ | ||
} = o; | ||
o.start(v), m = T.length, E = n.moveX, O = n.moveY, B = Date.now(), n.moving = m === 1 && n.scale !== 1, n.zooming = m === 2 && !_.value, n.zooming && (y = n.scale, s = It(v.touches)); | ||
}, L = (v) => { | ||
touches: O | ||
} = g, { | ||
offsetX: k | ||
} = i; | ||
i.start(g), T = O.length, I = n.moveX, C = n.moveY, j = Date.now(), n.moving = T === 1 && n.scale !== 1, n.zooming = T === 2 && !k.value, n.zooming && (r = n.scale, h = Et(g.touches)); | ||
}, E = (g) => { | ||
const { | ||
touches: T | ||
} = v; | ||
if (o.move(v), (n.moving || n.zooming) && be(v, !0), n.moving) { | ||
touches: O | ||
} = g; | ||
if (i.move(g), (n.moving || n.zooming) && be(g, !0), n.moving) { | ||
const { | ||
deltaX: _, | ||
deltaY: z | ||
} = o, W = _.value + E, U = z.value + O; | ||
n.moveX = J(W, -u.value, u.value), n.moveY = J(U, -d.value, d.value); | ||
deltaX: k, | ||
deltaY: X | ||
} = i, W = k.value + I, F = X.value + C; | ||
n.moveX = J(W, -f.value, f.value), n.moveY = J(F, -c.value, c.value); | ||
} | ||
if (n.zooming && T.length === 2) { | ||
const _ = It(T), z = y * _ / s; | ||
c(z); | ||
if (n.zooming && O.length === 2) { | ||
const k = Et(O), X = r * k / h; | ||
d(X); | ||
} | ||
}, x = () => { | ||
if (m > 1) | ||
}, p = () => { | ||
if (T > 1) | ||
return; | ||
const { | ||
offsetX: v, | ||
offsetY: T | ||
} = o, _ = Date.now() - B, z = 250, W = 5; | ||
v.value < W && T.value < W && _ < z && (g ? (clearTimeout(g), g = null, h()) : g = setTimeout(() => { | ||
t("close"), g = null; | ||
}, z)); | ||
}, I = (v) => { | ||
let T = !1; | ||
(n.moving || n.zooming) && (T = !0, n.moving && E === n.moveX && O === n.moveY && (T = !1), v.touches.length || (n.zooming && (n.moveX = J(n.moveX, -u.value, u.value), n.moveY = J(n.moveY, -d.value, d.value), n.zooming = !1), n.moving = !1, E = 0, O = 0, y = 1, n.scale < 1 && f(), n.scale > e.maxZoom && (n.scale = +e.maxZoom))), be(v, T), x(), o.reset(); | ||
}, P = (v) => { | ||
offsetX: g, | ||
offsetY: O | ||
} = i, k = Date.now() - j, X = 250, W = 5; | ||
g.value < W && O.value < W && (k < X ? S ? (clearTimeout(S), S = null, m()) : S = setTimeout(() => { | ||
t("close"), S = null; | ||
}, X) : k > ho && t("longPress")); | ||
}, _ = (g) => { | ||
let O = !1; | ||
(n.moving || n.zooming) && (O = !0, n.moving && I === n.moveX && C === n.moveY && (O = !1), g.touches.length || (n.zooming && (n.moveX = J(n.moveX, -f.value, f.value), n.moveY = J(n.moveY, -c.value, c.value), n.zooming = !1), n.moving = !1, I = 0, C = 0, r = 1, n.scale < 1 && v(), n.scale > e.maxZoom && (n.scale = +e.maxZoom))), be(g, O), p(), i.reset(); | ||
}, z = (g) => { | ||
const { | ||
naturalWidth: T, | ||
naturalHeight: _ | ||
} = v.target; | ||
n.imageRatio = _ / T; | ||
naturalWidth: O, | ||
naturalHeight: k | ||
} = g.target; | ||
n.imageRatio = k / O; | ||
}; | ||
return k(() => e.active, f), k(() => e.show, (v) => { | ||
v || f(); | ||
}), Ne("touchmove", L, { | ||
target: S(() => { | ||
var v; | ||
return (v = i.value) == null ? void 0 : v.$el; | ||
return A(() => e.active, v), A(() => e.show, (g) => { | ||
g || v(); | ||
}), Ne("touchmove", E, { | ||
target: $(() => { | ||
var g; | ||
return (g = a.value) == null ? void 0 : g.$el; | ||
}) | ||
}), () => { | ||
const v = { | ||
loading: () => l(Lo, { | ||
const g = { | ||
loading: () => l(Mo, { | ||
type: "spinner" | ||
}, null) | ||
}; | ||
return l(ea, { | ||
ref: i, | ||
class: Tt("swipe-item"), | ||
onTouchstartPassive: F, | ||
onTouchend: I, | ||
onTouchcancel: I | ||
return l(ta, { | ||
ref: a, | ||
class: Xe("swipe-item"), | ||
onTouchstartPassive: L, | ||
onTouchend: _, | ||
onTouchcancel: _ | ||
}, { | ||
default: () => [l(aa, { | ||
default: () => [o.image ? l("div", { | ||
class: Xe("image-wrap") | ||
}, [o.image({ | ||
src: e.src | ||
})]) : l(ia, { | ||
src: e.src, | ||
fit: "contain", | ||
class: Tt("image", { | ||
vertical: a.value | ||
class: Xe("image", { | ||
vertical: s.value | ||
}), | ||
style: r.value, | ||
onLoad: P | ||
}, v)] | ||
style: u.value, | ||
onLoad: z | ||
}, g)] | ||
}); | ||
@@ -1587,8 +1607,8 @@ }; | ||
}); | ||
const [ra, re] = Z("image-preview"), sa = ["show", "transition", "overlayStyle", "closeOnPopstate"], la = { | ||
const [sa, se] = Z("image-preview"), la = ["show", "transition", "overlayStyle", "closeOnPopstate", "teleport"], ca = { | ||
show: Boolean, | ||
loop: N, | ||
images: Hn(), | ||
minZoom: ne(1 / 3), | ||
maxZoom: ne(3), | ||
images: Wn(), | ||
minZoom: oe(1 / 3), | ||
maxZoom: oe(3), | ||
overlay: N, | ||
@@ -1598,3 +1618,3 @@ closeable: Boolean, | ||
className: Re, | ||
closeIcon: H("clear"), | ||
closeIcon: V("clear"), | ||
transition: String, | ||
@@ -1604,17 +1624,18 @@ beforeClose: Function, | ||
overlayStyle: Object, | ||
swipeDuration: ne(300), | ||
startPosition: ne(0), | ||
swipeDuration: oe(300), | ||
startPosition: oe(0), | ||
showIndicators: Boolean, | ||
closeOnPopstate: N, | ||
closeIconPosition: H("top-right") | ||
closeIconPosition: V("top-right"), | ||
teleport: [String, Object] | ||
}; | ||
var ca = Y({ | ||
name: ra, | ||
props: la, | ||
emits: ["scale", "close", "closed", "change", "update:show"], | ||
var ua = Y({ | ||
name: sa, | ||
props: ca, | ||
emits: ["scale", "close", "closed", "change", "longPress", "update:show"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(), i = oe({ | ||
const n = y(), i = ae({ | ||
active: 0, | ||
@@ -1624,30 +1645,30 @@ rootWidth: 0, | ||
}), a = () => { | ||
if (o.value) { | ||
const s = Un(o.value.$el); | ||
i.rootWidth = s.width, i.rootHeight = s.height, o.value.resize(); | ||
if (n.value) { | ||
const r = Un(n.value.$el); | ||
i.rootWidth = r.width, i.rootHeight = r.height, n.value.resize(); | ||
} | ||
}, r = (s) => t("scale", s), u = (s) => t("update:show", s), d = () => { | ||
Nt(e.beforeClose, { | ||
}, s = (r) => t("scale", r), u = (r) => t("update:show", r), f = () => { | ||
zt(e.beforeClose, { | ||
args: [i.active], | ||
done: () => u(!1) | ||
}); | ||
}, c = (s) => { | ||
s !== i.active && (i.active = s, t("change", s)); | ||
}, f = () => { | ||
}, c = (r) => { | ||
r !== i.active && (i.active = r, t("change", r)); | ||
}, d = () => { | ||
if (e.showIndex) | ||
return l("div", { | ||
class: re("index") | ||
}, [n.index ? n.index({ | ||
class: se("index") | ||
}, [o.index ? o.index({ | ||
index: i.active | ||
}) : `${i.active + 1} / ${e.images.length}`]); | ||
}, h = () => { | ||
if (n.cover) | ||
}, v = () => { | ||
if (o.cover) | ||
return l("div", { | ||
class: re("cover") | ||
}, [n.cover()]); | ||
}, m = () => l(Ko, { | ||
ref: o, | ||
class: se("cover") | ||
}, [o.cover()]); | ||
}, m = () => l(Qo, { | ||
ref: n, | ||
lazyRender: !0, | ||
loop: e.loop, | ||
class: re("swipe"), | ||
class: se("swipe"), | ||
duration: e.swipeDuration, | ||
@@ -1659,4 +1680,4 @@ initialSwipe: e.startPosition, | ||
}, { | ||
default: () => [e.images.map((s) => l(ia, { | ||
src: s, | ||
default: () => [e.images.map((r, h) => l(ra, { | ||
src: r, | ||
show: e.show, | ||
@@ -1668,6 +1689,11 @@ active: i.active, | ||
rootHeight: i.rootHeight, | ||
onScale: r, | ||
onClose: d | ||
}, null))] | ||
}), E = () => { | ||
onScale: s, | ||
onClose: f, | ||
onLongPress: () => t("longPress", { | ||
index: h | ||
}) | ||
}, { | ||
image: o.image | ||
}))] | ||
}), T = () => { | ||
if (e.closeable) | ||
@@ -1677,18 +1703,18 @@ return l(ot, { | ||
name: e.closeIcon, | ||
class: [re("close-icon", e.closeIconPosition), zt], | ||
onClick: d | ||
class: [se("close-icon", e.closeIconPosition), Dt], | ||
onClick: f | ||
}, null); | ||
}, O = () => t("closed"), y = (s, g) => { | ||
var B; | ||
return (B = o.value) == null ? void 0 : B.swipeTo(s, g); | ||
}, I = () => t("closed"), C = (r, h) => { | ||
var S; | ||
return (S = n.value) == null ? void 0 : S.swipeTo(r, h); | ||
}; | ||
return Ye({ | ||
swipeTo: y | ||
}), ce(a), k([At, Lt], a), k(() => e.startPosition, (s) => c(+s)), k(() => e.show, (s) => { | ||
swipeTo: C | ||
}), ie(a), A([Rt, Bt], a), A(() => e.startPosition, (r) => c(+r)), A(() => e.show, (r) => { | ||
const { | ||
images: g, | ||
startPosition: B | ||
images: h, | ||
startPosition: S | ||
} = e; | ||
s ? (c(+B), ae(() => { | ||
a(), y(+B, { | ||
r ? (c(+S), te(() => { | ||
a(), C(+S, { | ||
immediate: !0 | ||
@@ -1698,33 +1724,33 @@ }); | ||
index: i.active, | ||
url: g[i.active] | ||
url: h[i.active] | ||
}); | ||
}), () => l(Vo, we({ | ||
class: [re(), e.className], | ||
overlayClass: [re("overlay"), e.overlayClass], | ||
onClosed: O, | ||
}), () => l(Zo, we({ | ||
class: [se(), e.className], | ||
overlayClass: [se("overlay"), e.overlayClass], | ||
onClosed: I, | ||
"onUpdate:show": u | ||
}, Xn(e, sa)), { | ||
default: () => [E(), m(), f(), h()] | ||
}, Xn(e, la)), { | ||
default: () => [T(), m(), d(), v()] | ||
}); | ||
} | ||
}); | ||
const ua = q(ca), da = { | ||
const da = q(ua), fa = { | ||
images: Array, | ||
showModel: Boolean, | ||
imageIndex: Number | ||
}, fa = Y({ | ||
}, va = Y({ | ||
name: "preview-images", | ||
props: da, | ||
props: fa, | ||
emits: ["update:imageIndex", "update:showModel"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(), i = b(e.showModel); | ||
return k(() => e.showModel, (a) => { | ||
const n = y(), i = y(e.showModel); | ||
return A(() => e.showModel, (a) => { | ||
i.value = a; | ||
}), k(() => i.value, (a) => { | ||
}), A(() => i.value, (a) => { | ||
t("update:showModel", a); | ||
}), () => l(ua, { | ||
ref: o, | ||
}), () => l(da, { | ||
ref: n, | ||
show: i.value, | ||
@@ -1741,4 +1767,4 @@ "onUpdate:show": (a) => i.value = a, | ||
} | ||
}), va = ue(fa); | ||
const ma = { | ||
}), ma = ue(va); | ||
const ga = { | ||
urlList: { | ||
@@ -1775,48 +1801,48 @@ type: Array, | ||
} | ||
}, ga = { | ||
}, ha = { | ||
close: () => !0, | ||
switch: (e) => _t(e), | ||
switch: (e) => Ct(e), | ||
"update:showViewer": () => !1 | ||
}; | ||
var ha = typeof global == "object" && global && global.Object === Object && global; | ||
const wa = ha; | ||
var ya = typeof self == "object" && self && self.Object === Object && self, ba = wa || ya || Function("return this")(); | ||
const Vt = ba; | ||
var pa = Vt.Symbol; | ||
const Ae = pa; | ||
var Zt = Object.prototype, Ia = Zt.hasOwnProperty, Ta = Zt.toString, me = Ae ? Ae.toStringTag : void 0; | ||
function Ea(e) { | ||
var t = Ia.call(e, me), n = e[me]; | ||
var wa = typeof global == "object" && global && global.Object === Object && global; | ||
const ya = wa; | ||
var ba = typeof self == "object" && self && self.Object === Object && self, pa = ya || ba || Function("return this")(); | ||
const Ut = pa; | ||
var Ea = Ut.Symbol; | ||
const Be = Ea; | ||
var Vt = Object.prototype, Ta = Vt.hasOwnProperty, Ia = Vt.toString, me = Be ? Be.toStringTag : void 0; | ||
function Oa(e) { | ||
var t = Ta.call(e, me), o = e[me]; | ||
try { | ||
e[me] = void 0; | ||
var o = !0; | ||
var n = !0; | ||
} catch { | ||
} | ||
var i = Ta.call(e); | ||
return o && (t ? e[me] = n : delete e[me]), i; | ||
var i = Ia.call(e); | ||
return n && (t ? e[me] = o : delete e[me]), i; | ||
} | ||
var xa = Object.prototype, Oa = xa.toString; | ||
function $a(e) { | ||
return Oa.call(e); | ||
var xa = Object.prototype, $a = xa.toString; | ||
function Sa(e) { | ||
return $a.call(e); | ||
} | ||
var Sa = "[object Null]", Ca = "[object Undefined]", Et = Ae ? Ae.toStringTag : void 0; | ||
function Pa(e) { | ||
return e == null ? e === void 0 ? Ca : Sa : Et && Et in Object(e) ? Ea(e) : $a(e); | ||
var Pa = "[object Null]", Ca = "[object Undefined]", Tt = Be ? Be.toStringTag : void 0; | ||
function _a(e) { | ||
return e == null ? e === void 0 ? Ca : Pa : Tt && Tt in Object(e) ? Oa(e) : Sa(e); | ||
} | ||
function _a(e) { | ||
function ka(e) { | ||
return e != null && typeof e == "object"; | ||
} | ||
var ka = "[object Symbol]"; | ||
function Ba(e) { | ||
return typeof e == "symbol" || _a(e) && Pa(e) == ka; | ||
var Aa = "[object Symbol]"; | ||
function Ra(e) { | ||
return typeof e == "symbol" || ka(e) && _a(e) == Aa; | ||
} | ||
var Ra = /\s/; | ||
function Aa(e) { | ||
for (var t = e.length; t-- && Ra.test(e.charAt(t)); ) | ||
var Ba = /\s/; | ||
function La(e) { | ||
for (var t = e.length; t-- && Ba.test(e.charAt(t)); ) | ||
; | ||
return t; | ||
} | ||
var La = /^\s+/; | ||
function Ma(e) { | ||
return e && e.slice(0, Aa(e) + 1).replace(La, ""); | ||
var Ma = /^\s+/; | ||
function Da(e) { | ||
return e && e.slice(0, La(e) + 1).replace(Ma, ""); | ||
} | ||
@@ -1827,8 +1853,8 @@ function Le(e) { | ||
} | ||
var xt = 0 / 0, Da = /^[-+]0x[0-9a-f]+$/i, za = /^0b[01]+$/i, Na = /^0o[0-7]+$/i, Ya = parseInt; | ||
var It = 0 / 0, za = /^[-+]0x[0-9a-f]+$/i, Na = /^0b[01]+$/i, Ya = /^0o[0-7]+$/i, Fa = parseInt; | ||
function Ot(e) { | ||
if (typeof e == "number") | ||
return e; | ||
if (Ba(e)) | ||
return xt; | ||
if (Ra(e)) | ||
return It; | ||
if (Le(e)) { | ||
@@ -1840,65 +1866,65 @@ var t = typeof e.valueOf == "function" ? e.valueOf() : e; | ||
return e === 0 ? e : +e; | ||
e = Ma(e); | ||
var n = za.test(e); | ||
return n || Na.test(e) ? Ya(e.slice(2), n ? 2 : 8) : Da.test(e) ? xt : +e; | ||
e = Da(e); | ||
var o = Na.test(e); | ||
return o || Ya.test(e) ? Fa(e.slice(2), o ? 2 : 8) : za.test(e) ? It : +e; | ||
} | ||
var Fa = function() { | ||
return Vt.Date.now(); | ||
var ja = function() { | ||
return Ut.Date.now(); | ||
}; | ||
const He = Fa; | ||
var ja = "Expected a function", Xa = Math.max, Ha = Math.min; | ||
function Wa(e, t, n) { | ||
var o, i, a, r, u, d, c = 0, f = !1, h = !1, m = !0; | ||
const We = ja; | ||
var Xa = "Expected a function", Wa = Math.max, Ha = Math.min; | ||
function Ua(e, t, o) { | ||
var n, i, a, s, u, f, c = 0, d = !1, v = !1, m = !0; | ||
if (typeof e != "function") | ||
throw new TypeError(ja); | ||
t = Ot(t) || 0, Le(n) && (f = !!n.leading, h = "maxWait" in n, a = h ? Xa(Ot(n.maxWait) || 0, t) : a, m = "trailing" in n ? !!n.trailing : m); | ||
function E(I) { | ||
var P = o, v = i; | ||
return o = i = void 0, c = I, r = e.apply(v, P), r; | ||
throw new TypeError(Xa); | ||
t = Ot(t) || 0, Le(o) && (d = !!o.leading, v = "maxWait" in o, a = v ? Wa(Ot(o.maxWait) || 0, t) : a, m = "trailing" in o ? !!o.trailing : m); | ||
function T(p) { | ||
var _ = n, z = i; | ||
return n = i = void 0, c = p, s = e.apply(z, _), s; | ||
} | ||
function O(I) { | ||
return c = I, u = setTimeout(g, t), f ? E(I) : r; | ||
function I(p) { | ||
return c = p, u = setTimeout(h, t), d ? T(p) : s; | ||
} | ||
function y(I) { | ||
var P = I - d, v = I - c, T = t - P; | ||
return h ? Ha(T, a - v) : T; | ||
function C(p) { | ||
var _ = p - f, z = p - c, g = t - _; | ||
return v ? Ha(g, a - z) : g; | ||
} | ||
function s(I) { | ||
var P = I - d, v = I - c; | ||
return d === void 0 || P >= t || P < 0 || h && v >= a; | ||
function r(p) { | ||
var _ = p - f, z = p - c; | ||
return f === void 0 || _ >= t || _ < 0 || v && z >= a; | ||
} | ||
function g() { | ||
var I = He(); | ||
if (s(I)) | ||
return B(I); | ||
u = setTimeout(g, y(I)); | ||
function h() { | ||
var p = We(); | ||
if (r(p)) | ||
return S(p); | ||
u = setTimeout(h, C(p)); | ||
} | ||
function B(I) { | ||
return u = void 0, m && o ? E(I) : (o = i = void 0, r); | ||
function S(p) { | ||
return u = void 0, m && n ? T(p) : (n = i = void 0, s); | ||
} | ||
function F() { | ||
u !== void 0 && clearTimeout(u), c = 0, o = d = i = u = void 0; | ||
function j() { | ||
u !== void 0 && clearTimeout(u), c = 0, n = f = i = u = void 0; | ||
} | ||
function L() { | ||
return u === void 0 ? r : B(He()); | ||
return u === void 0 ? s : S(We()); | ||
} | ||
function x() { | ||
var I = He(), P = s(I); | ||
if (o = arguments, i = this, d = I, P) { | ||
function E() { | ||
var p = We(), _ = r(p); | ||
if (n = arguments, i = this, f = p, _) { | ||
if (u === void 0) | ||
return O(d); | ||
if (h) | ||
return clearTimeout(u), u = setTimeout(g, t), E(d); | ||
return I(f); | ||
if (v) | ||
return clearTimeout(u), u = setTimeout(h, t), T(f); | ||
} | ||
return u === void 0 && (u = setTimeout(g, t)), r; | ||
return u === void 0 && (u = setTimeout(h, t)), s; | ||
} | ||
return x.cancel = F, x.flush = L, x; | ||
return E.cancel = j, E.flush = L, E; | ||
} | ||
var Ua = "Expected a function"; | ||
function We(e, t, n) { | ||
var o = !0, i = !0; | ||
var Va = "Expected a function"; | ||
function He(e, t, o) { | ||
var n = !0, i = !0; | ||
if (typeof e != "function") | ||
throw new TypeError(Ua); | ||
return Le(n) && (o = "leading" in n ? !!n.leading : o, i = "trailing" in n ? !!n.trailing : i), Wa(e, t, { | ||
leading: o, | ||
throw new TypeError(Va); | ||
return Le(o) && (n = "leading" in o ? !!o.leading : n, i = "trailing" in o ? !!o.trailing : i), Ua(e, t, { | ||
leading: n, | ||
maxWait: t, | ||
@@ -1908,3 +1934,3 @@ trailing: i | ||
} | ||
const se = { | ||
const le = { | ||
tab: "Tab", | ||
@@ -1926,19 +1952,19 @@ enter: "Enter", | ||
}, K = "https://wlmvp-1304040775.cos.ap-shanghai.myqcloud.com/frontend/images/connects/default-connect-logo.jpg?imageView2/2/w/140/q/300"; | ||
b(K); | ||
b(K); | ||
b(K); | ||
const Va = b(K); | ||
b(K); | ||
b(K); | ||
const Za = b(K); | ||
b(K); | ||
b(K); | ||
const Ga = Y({ | ||
y(K); | ||
y(K); | ||
y(K); | ||
const Za = y(K); | ||
y(K); | ||
y(K); | ||
const Ga = y(K); | ||
y(K); | ||
y(K); | ||
const Ka = Y({ | ||
name: "RecordImagePreviewPc", | ||
props: ma, | ||
emits: ga, | ||
props: ga, | ||
emits: ha, | ||
setup(e, { | ||
emit: t, | ||
slots: n, | ||
expose: o | ||
slots: o, | ||
expose: n | ||
}) { | ||
@@ -1948,13 +1974,13 @@ const i = { | ||
name: "contain", | ||
icon: it(Va) | ||
icon: it(Za) | ||
}, | ||
ORIGINAL: { | ||
name: "original", | ||
icon: it(Za) | ||
icon: it(Ga) | ||
} | ||
}, a = On() ? "DOMMouseScroll" : "mousewheel", r = b(), u = b([]), d = sn(), c = b(!0), f = b(e.initialIndex); | ||
k(() => e.initialIndex, (p) => { | ||
f.value = p; | ||
}, a = xn() ? "DOMMouseScroll" : "mousewheel", s = y(), u = y([]), f = rn(), c = y(!0), d = y(e.initialIndex); | ||
A(() => e.initialIndex, (b) => { | ||
d.value = b; | ||
}); | ||
const h = ln(i.CONTAIN), m = b({ | ||
const v = sn(i.CONTAIN), m = y({ | ||
scale: 1, | ||
@@ -1965,67 +1991,67 @@ deg: 0, | ||
enableTransition: !1 | ||
}), E = S(() => { | ||
}), T = $(() => { | ||
const { | ||
urlList: p | ||
urlList: b | ||
} = e; | ||
return console.log(p.length <= 1, "urlList"), p.length <= 1; | ||
}), O = S(() => f.value === 0), y = S(() => f.value === e.urlList.length - 1), s = S(() => e.urlList[f.value]), g = S(() => { | ||
return console.log(b.length <= 1, "urlList"), b.length <= 1; | ||
}), I = $(() => d.value === 0), C = $(() => d.value === e.urlList.length - 1), r = $(() => e.urlList[d.value]), h = $(() => { | ||
const { | ||
scale: p, | ||
scale: b, | ||
deg: R, | ||
offsetX: A, | ||
offsetX: B, | ||
offsetY: G, | ||
enableTransition: w | ||
} = m.value; | ||
let $ = A / p, C = G / p; | ||
let x = B / b, P = G / b; | ||
switch (R % 360) { | ||
case 90: | ||
case -270: | ||
[$, C] = [C, -$]; | ||
[x, P] = [P, -x]; | ||
break; | ||
case 180: | ||
case -180: | ||
[$, C] = [-$, -C]; | ||
[x, P] = [-x, -P]; | ||
break; | ||
case 270: | ||
case -90: | ||
[$, C] = [-C, $]; | ||
[x, P] = [-P, x]; | ||
break; | ||
} | ||
const M = { | ||
transform: `scale(${p}) rotate(${R}deg) translate(${$}px, ${C}px)`, | ||
transform: `scale(${b}) rotate(${R}deg) translate(${x}px, ${P}px)`, | ||
transition: w ? "transform .3s" : "" | ||
}; | ||
return h.value.name === i.CONTAIN.name && (M.maxWidth = M.maxHeight = "100%"), M; | ||
return v.value.name === i.CONTAIN.name && (M.maxWidth = M.maxHeight = "100%"), M; | ||
}); | ||
S(() => _t(e.zIndex) ? e.zIndex : 2e3); | ||
function B() { | ||
$(() => Ct(e.zIndex) ? e.zIndex : 2e3); | ||
function S() { | ||
console.log("hiden"), L(), t("update:showViewer"), t("close"); | ||
} | ||
function F() { | ||
const p = We((A) => { | ||
switch (A.code) { | ||
case se.esc: | ||
e.closeOnPressEscape && B(); | ||
function j() { | ||
const b = He((B) => { | ||
switch (B.code) { | ||
case le.esc: | ||
e.closeOnPressEscape && S(); | ||
break; | ||
case se.space: | ||
T(); | ||
case le.space: | ||
g(); | ||
break; | ||
case se.left: | ||
z(); | ||
case le.left: | ||
k(); | ||
break; | ||
case se.up: | ||
U("zoomIn"); | ||
case le.up: | ||
W("zoomIn"); | ||
break; | ||
case se.right: | ||
W(); | ||
case le.right: | ||
X(); | ||
break; | ||
case se.down: | ||
U("zoomOut"); | ||
case le.down: | ||
W("zoomOut"); | ||
break; | ||
} | ||
}), R = We((A) => { | ||
(A.wheelDelta ? A.wheelDelta : -A.detail) > 0 ? U("zoomIn", { | ||
}), R = He((B) => { | ||
(B.wheelDelta ? B.wheelDelta : -B.detail) > 0 ? W("zoomIn", { | ||
zoomRate: 1.2, | ||
enableTransition: !1 | ||
}) : U("zoomOut", { | ||
}) : W("zoomOut", { | ||
zoomRate: 1.2, | ||
@@ -2035,17 +2061,17 @@ enableTransition: !1 | ||
}); | ||
d.run(() => { | ||
Ee(document, "keydown", p), Ee(document, a, R); | ||
f.run(() => { | ||
Ie(document, "keydown", b), Ie(document, a, R); | ||
}); | ||
} | ||
function L() { | ||
d.stop(); | ||
f.stop(); | ||
} | ||
function x() { | ||
function E() { | ||
c.value = !1; | ||
} | ||
function I(p) { | ||
c.value = !1, p.target.alt = K; | ||
function p(b) { | ||
c.value = !1, b.target.alt = K; | ||
} | ||
function P(p) { | ||
if (c.value || p.button !== 0 || !r.value) | ||
function _(b) { | ||
if (c.value || b.button !== 0 || !s.value) | ||
return; | ||
@@ -2055,15 +2081,15 @@ m.value.enableTransition = !1; | ||
offsetX: R, | ||
offsetY: A | ||
} = m.value, G = p.pageX, w = p.pageY, $ = We((M) => { | ||
offsetY: B | ||
} = m.value, G = b.pageX, w = b.pageY, x = He((M) => { | ||
m.value = { | ||
...m.value, | ||
offsetX: R + M.pageX - G, | ||
offsetY: A + M.pageY - w | ||
offsetY: B + M.pageY - w | ||
}; | ||
}), C = Ee(document, "mousemove", $); | ||
Ee(document, "mouseup", () => { | ||
C(); | ||
}), p.preventDefault(); | ||
}), P = Ie(document, "mousemove", x); | ||
Ie(document, "mouseup", () => { | ||
P(); | ||
}), b.preventDefault(); | ||
} | ||
function v() { | ||
function z() { | ||
m.value = { | ||
@@ -2077,23 +2103,23 @@ scale: 1, | ||
} | ||
function T() { | ||
function g() { | ||
if (c.value) | ||
return; | ||
const p = Sn(i), R = Object.values(i), A = h.value.name, w = (R.findIndex(($) => $.name === A) + 1) % p.length; | ||
h.value = i[p[w]], v(); | ||
const b = Sn(i), R = Object.values(i), B = v.value.name, w = (R.findIndex((x) => x.name === B) + 1) % b.length; | ||
v.value = i[b[w]], z(); | ||
} | ||
function _(p) { | ||
function O(b) { | ||
const R = e.urlList.length; | ||
f.value = (p + R) % R; | ||
d.value = (b + R) % R; | ||
} | ||
function z() { | ||
O.value && !e.infinite || _(f.value - 1); | ||
function k() { | ||
I.value && !e.infinite || O(d.value - 1); | ||
} | ||
function W() { | ||
y.value && !e.infinite || _(f.value + 1); | ||
function X() { | ||
C.value && !e.infinite || O(d.value + 1); | ||
} | ||
function U(p, R = {}) { | ||
function W(b, R = {}) { | ||
if (c.value) | ||
return; | ||
const { | ||
zoomRate: A, | ||
zoomRate: B, | ||
rotateDeg: G, | ||
@@ -2107,8 +2133,8 @@ enableTransition: w | ||
}; | ||
switch (p) { | ||
switch (b) { | ||
case "zoomOut": | ||
m.value.scale > 0.2 && (m.value.scale = Number.parseFloat((m.value.scale / A).toFixed(3))); | ||
m.value.scale > 0.2 && (m.value.scale = Number.parseFloat((m.value.scale / B).toFixed(3))); | ||
break; | ||
case "zoomIn": | ||
m.value.scale < 7 && (m.value.scale = Number.parseFloat((m.value.scale * A).toFixed(3))); | ||
m.value.scale < 7 && (m.value.scale = Number.parseFloat((m.value.scale * B).toFixed(3))); | ||
break; | ||
@@ -2124,27 +2150,27 @@ case "clockwise": | ||
} | ||
k(s, () => { | ||
ae(() => { | ||
const p = u.value[0]; | ||
p != null && p.complete || (c.value = !0); | ||
A(r, () => { | ||
te(() => { | ||
const b = u.value[0]; | ||
b != null && b.complete || (c.value = !0); | ||
}); | ||
}), k(f, (p) => { | ||
v(), t("switch", p); | ||
}), ce(() => { | ||
var p, R; | ||
F(), (R = (p = r.value) == null ? void 0 : p.focus) == null || R.call(p); | ||
}), o({ | ||
setActiveItem: _ | ||
}), A(d, (b) => { | ||
z(), t("switch", b); | ||
}), ie(() => { | ||
var b, R; | ||
j(), (R = (b = s.value) == null ? void 0 : b.focus) == null || R.call(b); | ||
}), n({ | ||
setActiveItem: O | ||
}); | ||
const j = "record-image-preview-pc", de = () => E.value ? null : [l("img", { | ||
const F = "record-image-preview-pc", de = () => T.value ? null : [l("img", { | ||
src: Rn, | ||
alt: "", | ||
onClick: () => z() | ||
onClick: () => k() | ||
}, null), l("span", { | ||
class: `${j}-location` | ||
}, [f.value + 1, ke("/"), e.urlList.length]), l("img", { | ||
src: An, | ||
class: `${F}-location` | ||
}, [d.value + 1, ke("/"), e.urlList.length]), l("img", { | ||
src: Bn, | ||
alt: "", | ||
onClick: () => W() | ||
onClick: () => X() | ||
}, null)]; | ||
return () => l(Ct, { | ||
return () => l(St, { | ||
to: "body", | ||
@@ -2158,33 +2184,33 @@ disabled: !e.teleported | ||
default: () => [ye(l("div", { | ||
ref: r, | ||
ref: s, | ||
tabindex: -1, | ||
class: `${j}-wrapper` | ||
class: `${F}-wrapper` | ||
}, [l("div", { | ||
class: `${j}-mask`, | ||
onClick: () => B() | ||
class: `${F}-mask`, | ||
onClick: () => S() | ||
}, null), l("span", { | ||
onClick: () => B(), | ||
class: `${j}-btn ${j}-close` | ||
onClick: () => S(), | ||
class: `${F}-btn ${F}-close` | ||
}, [l("img", { | ||
src: Bn, | ||
src: An, | ||
alt: "" | ||
}, null)]), l("div", { | ||
class: `${j}-btn ${j}-actions` | ||
class: `${F}-btn ${F}-actions` | ||
}, [l("div", { | ||
class: `${j}-actions-inner` | ||
class: `${F}-actions-inner` | ||
}, [de()])]), l("div", { | ||
class: `${j}-canvas` | ||
}, [e.urlList.map((p, R) => ye(l("img", { | ||
ref: (A) => u.value[R] = A, | ||
key: p + "" + R, | ||
src: p + "", | ||
style: g.value, | ||
onLoad: () => x(), | ||
onError: (A) => I(A), | ||
onMousedown: (A) => P(A) | ||
}, null), [[Be, R === f.value]]))]), l("slot", null, null)]), [[Be, e.showViewer]])] | ||
class: `${F}-canvas` | ||
}, [e.urlList.map((b, R) => ye(l("img", { | ||
ref: (B) => u.value[R] = B, | ||
key: b + "" + R, | ||
src: b + "", | ||
style: h.value, | ||
onLoad: () => E(), | ||
onError: (B) => p(B), | ||
onMousedown: (B) => _(B) | ||
}, null), [[Ae, R === d.value]]))]), l("slot", null, null)]), [[Ae, e.showViewer]])] | ||
})] | ||
}); | ||
} | ||
}), Ka = ue(Ga), Qa = { | ||
}), Qa = ue(Ka), qa = { | ||
images: Array, | ||
@@ -2194,31 +2220,31 @@ showModel: Boolean, | ||
hideOnClickModal: Boolean | ||
}, qa = Y({ | ||
}, Ja = Y({ | ||
name: "RecordImagePreview", | ||
props: Qa, | ||
props: qa, | ||
emits: ["update:showModel", "update:imageIndex"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(e.showModel), i = b(e.imageIndex); | ||
k(() => o.value, (r) => { | ||
t("update:showModel", r); | ||
}), k(() => e.showModel, (r) => { | ||
o.value = r; | ||
}), k(() => i.value, (r) => { | ||
t("update:imageIndex", r); | ||
}), k(() => e.imageIndex, (r) => { | ||
i.value = r; | ||
const n = y(e.showModel), i = y(e.imageIndex); | ||
A(() => n.value, (s) => { | ||
t("update:showModel", s); | ||
}), A(() => e.showModel, (s) => { | ||
n.value = s; | ||
}), A(() => i.value, (s) => { | ||
t("update:imageIndex", s); | ||
}), A(() => e.imageIndex, (s) => { | ||
i.value = s; | ||
}); | ||
const a = () => e.images.length ? $n() ? o.value ? l(Ka, { | ||
const a = () => e.images.length ? $n() ? n.value ? l(Qa, { | ||
hideOnClickModal: e.hideOnClickModal, | ||
urlList: e.images, | ||
initialIndex: i.value, | ||
showViewer: o.value, | ||
"onUpdate:showViewer": (r) => o.value = r | ||
}, null) : null : l(va, { | ||
showViewer: n.value, | ||
"onUpdate:showViewer": (s) => n.value = s | ||
}, null) : null : l(ma, { | ||
imageIndex: i.value, | ||
"onUpdate:imageIndex": (r) => i.value = r, | ||
showModel: o.value, | ||
"onUpdate:showModel": (r) => o.value = r, | ||
"onUpdate:imageIndex": (s) => i.value = s, | ||
showModel: n.value, | ||
"onUpdate:showModel": (s) => n.value = s, | ||
images: e.images | ||
@@ -2228,3 +2254,3 @@ }, null) : ""; | ||
} | ||
}), Gt = ue(qa), Ja = { | ||
}), Zt = ue(Ja), ei = { | ||
templateTitle: String, | ||
@@ -2235,17 +2261,18 @@ remark: String, | ||
chat: Object, | ||
attachment_files: Array | ||
}, ee = "buss-preview", _e = `${ee}-title`, Kt = `${ee}-intro`, Ue = `${Kt}-corp`, $t = `${ee}-images`, Q = `${ee}-chat`, le = `${ee}-attachments`, ei = { | ||
attachment_files: Array, | ||
theme: String | ||
}, ee = "buss-preview", _e = `${ee}-title`, Gt = `${ee}-intro`, Ue = `${Gt}-corp`, xt = `${ee}-images`, Q = `${ee}-chat`, ce = `${ee}-attachments`, ti = { | ||
envir: String, | ||
location: String, | ||
needDataFormat: Boolean, | ||
data: Ja | ||
}, ti = Y({ | ||
data: ei | ||
}, ni = Y({ | ||
name: "RecordPreview", | ||
props: ei, | ||
props: ti, | ||
emits: ["toCorp"], | ||
setup(e, { | ||
emit: t, | ||
slots: n | ||
slots: o | ||
}) { | ||
const o = b(!1), i = b(-1), a = (s) => s ? l("div", { | ||
const n = y(!1), i = y(-1), a = (r) => r ? l("div", { | ||
class: `${_e}` | ||
@@ -2256,34 +2283,34 @@ }, [l("div", { | ||
class: `${_e}-span` | ||
}, [s]), l("div", { | ||
}, [r]), l("div", { | ||
class: `${_e}-line` | ||
}, null)]) : "", r = (s) => { | ||
var g; | ||
if (!((g = e.data) != null && g.template_detail)) | ||
return s ? l("div", { | ||
}, null)]) : "", s = (r) => { | ||
var h; | ||
if (!((h = e.data) != null && h.template_detail)) | ||
return r ? l("div", { | ||
class: `${ee}-remark` | ||
}, [s]) : ""; | ||
}, u = (s) => s ? l("div", { | ||
}, [r]) : ""; | ||
}, u = (r) => r ? l("div", { | ||
class: `${ee}-label` | ||
}, [s]) : "", d = (s) => s ? l("div", { | ||
}, [r]) : "", f = (r) => r ? l("div", { | ||
class: `${Ue}`, | ||
onClick: () => c(s) | ||
onClick: () => c(r) | ||
}, [l("img", { | ||
class: `${Ue}-icon`, | ||
src: s.company_image_url || ut | ||
src: r.company_image_url || ut | ||
}, null), l("div", { | ||
class: `${Ue}-name` | ||
}, [s.element_content])]) : "", c = (s) => { | ||
let g = Pt(s.company_id); | ||
t("toCorp", g); | ||
}, f = (s) => s ? l("div", { | ||
class: `${Kt}-text` | ||
}, [s]) : "", h = (s) => { | ||
o.value = !0, i.value = s, console.log("i", s, o.value); | ||
}, m = (s) => s ? l("div", { | ||
class: `${$t}` | ||
}, [s.map((g, B) => l("img", { | ||
onClick: () => h(B), | ||
class: `${$t}-image`, | ||
src: g | ||
}, null))]) : "", E = (s) => s ? l("div", { | ||
}, [r.element_content])]) : "", c = (r) => { | ||
let h = Pt(r.company_id, e.theme); | ||
t("toCorp", h); | ||
}, d = (r) => r ? l("div", { | ||
class: `${Gt}-text` | ||
}, [r]) : "", v = (r) => { | ||
n.value = !0, i.value = r, console.log("i", r, n.value); | ||
}, m = (r) => r ? l("div", { | ||
class: `${xt}` | ||
}, [r.map((h, S) => l("img", { | ||
onClick: () => v(S), | ||
class: `${xt}-image`, | ||
src: h | ||
}, null))]) : "", T = (r) => r ? l("div", { | ||
class: `${Q}` | ||
@@ -2294,11 +2321,11 @@ }, [l("div", { | ||
class: `${Q}-top-title` | ||
}, [s.title]), l("div", { | ||
}, [r.title]), l("div", { | ||
class: `${Q}-top-count` | ||
}, [s.count, ke("\u6761")])]), l("div", { | ||
}, [r.count, ke("\u6761")])]), l("div", { | ||
class: `${Q}-detail` | ||
}, [l("div", { | ||
class: `${Q}-detail-left` | ||
}, [s.details.map((g) => l("div", { | ||
}, [r.details.map((h) => l("div", { | ||
class: `${Q}-detail-left-line` | ||
}, [g.name, ke("\uFF1A"), g.msg_details]))]), l("div", { | ||
}, [h.name, ke("\uFF1A"), h.msg_details]))]), l("div", { | ||
class: `${Q}-detail-right` | ||
@@ -2309,49 +2336,49 @@ }, [l("img", { | ||
src: ut | ||
}, null)])])]) : "", O = (s) => s ? l("div", { | ||
class: le | ||
}, [s.map((g) => l("div", { | ||
class: `${le}-item`, | ||
onClick: () => vn(g) | ||
}, null)])])]) : "", I = (r) => r ? l("div", { | ||
class: ce | ||
}, [r.map((h) => l("div", { | ||
class: `${ce}-item`, | ||
onClick: () => fn(h) | ||
}, [l("img", { | ||
src: kn[g.type], | ||
src: kn[h.type], | ||
alt: "", | ||
class: `${le}-item-img` | ||
class: `${ce}-item-img` | ||
}, null), l("div", { | ||
class: `${le}-item-content` | ||
class: `${ce}-item-content` | ||
}, [l("div", { | ||
class: `${le}-item-content-top` | ||
}, [g.name]), l("div", { | ||
class: `${le}-item-content-bottom` | ||
}, [fn(g.size)])])]))]) : "", y = (s) => s ? l(Gt, { | ||
class: `${ce}-item-content-top` | ||
}, [h.name]), l("div", { | ||
class: `${ce}-item-content-bottom` | ||
}, [dn(h.size)])])]))]) : "", C = (r) => r ? l(Zt, { | ||
imageIndex: i.value, | ||
"onUpdate:imageIndex": (g) => i.value = g, | ||
showModel: o.value, | ||
"onUpdate:showModel": (g) => o.value = g, | ||
"onUpdate:imageIndex": (h) => i.value = h, | ||
showModel: n.value, | ||
"onUpdate:showModel": (h) => n.value = h, | ||
hideOnClickModal: !0, | ||
images: s | ||
images: r | ||
}, null) : ""; | ||
return () => { | ||
var s, g, B, F, L, x, I; | ||
var r, h, S, j, L, E, p; | ||
return l("div", { | ||
class: `${ee}-wrapper` | ||
}, [r((s = e.data) == null ? void 0 : s.remark), a((g = e.data) == null ? void 0 : g.template_detail.template_name), (((B = e.data) == null ? void 0 : B.template_detail.element_content_list) || []).map((P) => l("div", null, [u(P.element_title), P != null && P.company_id ? d(P) : f(P.element_content)])), m((F = e.data) == null ? void 0 : F.images), E((L = e.data) == null ? void 0 : L.chat), O((x = e.data) == null ? void 0 : x.attachment_files), y((I = e.data) == null ? void 0 : I.images)]); | ||
}, [s((r = e.data) == null ? void 0 : r.remark), a((h = e.data) == null ? void 0 : h.template_detail.template_name), (((S = e.data) == null ? void 0 : S.template_detail.element_content_list) || []).map((_) => l("div", null, [u(_.element_title), _ != null && _.company_id ? f(_) : d(_.element_content)])), m((j = e.data) == null ? void 0 : j.images), T((L = e.data) == null ? void 0 : L.chat), I((E = e.data) == null ? void 0 : E.attachment_files), C((p = e.data) == null ? void 0 : p.images)]); | ||
}; | ||
} | ||
}), ni = ue(ti), Qt = [kt, Nn, ni, Gt], qt = function(e) { | ||
Qt.forEach((t) => { | ||
}), oi = ue(ni), Kt = [_t, Nn, oi, Zt], Qt = function(e) { | ||
Kt.forEach((t) => { | ||
e.component(t.name, t); | ||
}); | ||
}; | ||
typeof window < "u" && (window || {}).vue && qt((window || {}).vue); | ||
const ai = { | ||
install: qt, | ||
...Qt | ||
typeof window < "u" && (window || {}).vue && Qt((window || {}).vue); | ||
const ii = { | ||
install: Qt, | ||
...Kt | ||
}; | ||
export { | ||
kt as RecordComment, | ||
Gt as RecordImagePreview, | ||
ni as RecordPreview, | ||
_t as RecordComment, | ||
Zt as RecordImagePreview, | ||
oi as RecordPreview, | ||
Nn as RecordTemplateDetail, | ||
ai as default, | ||
qt as install | ||
ii as default, | ||
Qt as install | ||
}; |
{ | ||
"name": "@wltech/follow-record-card", | ||
"private": false, | ||
"version": "1.0.35", | ||
"version": "1.0.36", | ||
"author": "gamdrag <chenhaijiao@weiling.cn>", | ||
@@ -6,0 +6,0 @@ "type": "module", |
const getCorpDetailUrl = ( | ||
company_id: string, | ||
theme: string | ||
) => { | ||
return `/h5/sliderbar/${location.search}&need_auth=false#/companyDetail?company_id=${company_id}` | ||
return `/h5/sliderbar/${location.search}&need_auth=false&theme=${theme}#/companyDetail?company_id=${company_id}` | ||
@@ -7,0 +8,0 @@ // credit_code=state.companyDetail.credit_code |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
197359
3959