dpzvc3-ui 3.2.2 → 3.2.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/dpzvc3-ui.cjs.js +4 -170
- package/dist/dpzvc3-ui.cjs.js.map +1 -1
- package/dist/dpzvc3-ui.cjs.min.js +1 -1
- package/dist/dpzvc3-ui.es.js +3 -169
- package/dist/dpzvc3-ui.es.js.map +1 -1
- package/dist/dpzvc3-ui.es.min.js +1 -2
- package/dist/dpzvc3-ui.umd.js +5 -172
- package/dist/dpzvc3-ui.umd.js.map +1 -1
- package/dist/dpzvc3-ui.umd.min.js +1 -1
- package/dist/styles/components/actionSheet.css +1 -1
- package/dist/styles/components/popup.css +1 -1
- package/dist/styles/dpzvc3.css +1 -1
- package/dist/styles/utils/animation.css +1 -1
- package/dist/types/components/actionSheet/actionSheet.d.ts.map +1 -1
- package/package.json +7 -3
package/dist/dpzvc3-ui.cjs.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: "Module" } });
|
|
3
3
|
const vue = require("vue");
|
|
4
|
+
const vueRouter = require("vue-router");
|
|
4
5
|
const SPINNERS = ["blade", "snake", "double-bounce", "triple-bounce", "fading-circle"];
|
|
5
6
|
const SPINNER_MAP = {
|
|
6
7
|
blade: vue.defineAsyncComponent(() => Promise.resolve().then(() => require("./blade-DWu70HR2.js"))),
|
|
@@ -1514,174 +1515,6 @@ Swipe.install = (app) => {
|
|
|
1514
1515
|
app.component("Swipe", Swipe);
|
|
1515
1516
|
};
|
|
1516
1517
|
const _Swipe = Swipe;
|
|
1517
|
-
const isBrowser = typeof document !== "undefined";
|
|
1518
|
-
const noop = () => {
|
|
1519
|
-
};
|
|
1520
|
-
const isArray = Array.isArray;
|
|
1521
|
-
function warn$1(msg) {
|
|
1522
|
-
const args = Array.from(arguments).slice(1);
|
|
1523
|
-
console.warn.apply(console, ["[Vue Router warn]: " + msg].concat(args));
|
|
1524
|
-
}
|
|
1525
|
-
function isSameRouteRecord(a2, b2) {
|
|
1526
|
-
return (a2.aliasOf || a2) === (b2.aliasOf || b2);
|
|
1527
|
-
}
|
|
1528
|
-
function isSameRouteLocationParams(a2, b2) {
|
|
1529
|
-
if (Object.keys(a2).length !== Object.keys(b2).length) return false;
|
|
1530
|
-
for (var key in a2) if (!isSameRouteLocationParamsValue(a2[key], b2[key])) return false;
|
|
1531
|
-
return true;
|
|
1532
|
-
}
|
|
1533
|
-
function isSameRouteLocationParamsValue(a2, b2) {
|
|
1534
|
-
return isArray(a2) ? isEquivalentArray(a2, b2) : isArray(b2) ? isEquivalentArray(b2, a2) : a2?.valueOf() === b2?.valueOf();
|
|
1535
|
-
}
|
|
1536
|
-
function isEquivalentArray(a2, b2) {
|
|
1537
|
-
return isArray(b2) ? a2.length === b2.length && a2.every((value, i2) => value === b2[i2]) : a2.length === 1 && a2[0] === b2;
|
|
1538
|
-
}
|
|
1539
|
-
function isRouteLocation(route) {
|
|
1540
|
-
return typeof route === "string" || route && typeof route === "object";
|
|
1541
|
-
}
|
|
1542
|
-
/* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "navigation failure" : "");
|
|
1543
|
-
/* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "router view location matched" : "");
|
|
1544
|
-
/* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "router view depth" : "");
|
|
1545
|
-
const routerKey = /* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "router" : "");
|
|
1546
|
-
const routeLocationKey = /* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "route location" : "");
|
|
1547
|
-
/* @__PURE__ */ Symbol(process.env.NODE_ENV !== "production" ? "router view location" : "");
|
|
1548
|
-
function useLink(props) {
|
|
1549
|
-
const router = vue.inject(routerKey);
|
|
1550
|
-
const currentRoute = vue.inject(routeLocationKey);
|
|
1551
|
-
let hasPrevious = false;
|
|
1552
|
-
let previousTo = null;
|
|
1553
|
-
const route = vue.computed(() => {
|
|
1554
|
-
const to = vue.unref(props.to);
|
|
1555
|
-
if (process.env.NODE_ENV !== "production" && (!hasPrevious || to !== previousTo)) {
|
|
1556
|
-
if (!isRouteLocation(to)) if (hasPrevious) warn$1(`Invalid value for prop "to" in useLink()
|
|
1557
|
-
- to:`, to, `
|
|
1558
|
-
- previous to:`, previousTo, `
|
|
1559
|
-
- props:`, props);
|
|
1560
|
-
else warn$1(`Invalid value for prop "to" in useLink()
|
|
1561
|
-
- to:`, to, `
|
|
1562
|
-
- props:`, props);
|
|
1563
|
-
previousTo = to;
|
|
1564
|
-
hasPrevious = true;
|
|
1565
|
-
}
|
|
1566
|
-
return router.resolve(to);
|
|
1567
|
-
});
|
|
1568
|
-
const activeRecordIndex = vue.computed(() => {
|
|
1569
|
-
const { matched } = route.value;
|
|
1570
|
-
const { length } = matched;
|
|
1571
|
-
const routeMatched = matched[length - 1];
|
|
1572
|
-
const currentMatched = currentRoute.matched;
|
|
1573
|
-
if (!routeMatched || !currentMatched.length) return -1;
|
|
1574
|
-
const index = currentMatched.findIndex(isSameRouteRecord.bind(null, routeMatched));
|
|
1575
|
-
if (index > -1) return index;
|
|
1576
|
-
const parentRecordPath = getOriginalPath(matched[length - 2]);
|
|
1577
|
-
return length > 1 && getOriginalPath(routeMatched) === parentRecordPath && currentMatched[currentMatched.length - 1].path !== parentRecordPath ? currentMatched.findIndex(isSameRouteRecord.bind(null, matched[length - 2])) : index;
|
|
1578
|
-
});
|
|
1579
|
-
const isActive = vue.computed(() => activeRecordIndex.value > -1 && includesParams(currentRoute.params, route.value.params));
|
|
1580
|
-
const isExactActive = vue.computed(() => activeRecordIndex.value > -1 && activeRecordIndex.value === currentRoute.matched.length - 1 && isSameRouteLocationParams(currentRoute.params, route.value.params));
|
|
1581
|
-
function navigate(e2 = {}) {
|
|
1582
|
-
if (guardEvent(e2)) {
|
|
1583
|
-
const p2 = router[vue.unref(props.replace) ? "replace" : "push"](vue.unref(props.to)).catch(noop);
|
|
1584
|
-
if (props.viewTransition && typeof document !== "undefined" && "startViewTransition" in document) document.startViewTransition(() => p2);
|
|
1585
|
-
return p2;
|
|
1586
|
-
}
|
|
1587
|
-
return Promise.resolve();
|
|
1588
|
-
}
|
|
1589
|
-
if ((process.env.NODE_ENV !== "production" || false) && isBrowser) {
|
|
1590
|
-
const instance2 = vue.getCurrentInstance();
|
|
1591
|
-
if (instance2) {
|
|
1592
|
-
const linkContextDevtools = {
|
|
1593
|
-
route: route.value,
|
|
1594
|
-
isActive: isActive.value,
|
|
1595
|
-
isExactActive: isExactActive.value,
|
|
1596
|
-
error: null
|
|
1597
|
-
};
|
|
1598
|
-
instance2.__vrl_devtools = instance2.__vrl_devtools || [];
|
|
1599
|
-
instance2.__vrl_devtools.push(linkContextDevtools);
|
|
1600
|
-
vue.watchEffect(() => {
|
|
1601
|
-
linkContextDevtools.route = route.value;
|
|
1602
|
-
linkContextDevtools.isActive = isActive.value;
|
|
1603
|
-
linkContextDevtools.isExactActive = isExactActive.value;
|
|
1604
|
-
linkContextDevtools.error = isRouteLocation(vue.unref(props.to)) ? null : 'Invalid "to" value';
|
|
1605
|
-
}, { flush: "post" });
|
|
1606
|
-
}
|
|
1607
|
-
}
|
|
1608
|
-
return {
|
|
1609
|
-
route,
|
|
1610
|
-
href: vue.computed(() => route.value.href),
|
|
1611
|
-
isActive,
|
|
1612
|
-
isExactActive,
|
|
1613
|
-
navigate
|
|
1614
|
-
};
|
|
1615
|
-
}
|
|
1616
|
-
function preferSingleVNode(vnodes) {
|
|
1617
|
-
return vnodes.length === 1 ? vnodes[0] : vnodes;
|
|
1618
|
-
}
|
|
1619
|
-
const RouterLinkImpl = /* @__PURE__ */ vue.defineComponent({
|
|
1620
|
-
name: "RouterLink",
|
|
1621
|
-
compatConfig: { MODE: 3 },
|
|
1622
|
-
props: {
|
|
1623
|
-
to: {
|
|
1624
|
-
type: [String, Object],
|
|
1625
|
-
required: true
|
|
1626
|
-
},
|
|
1627
|
-
replace: Boolean,
|
|
1628
|
-
activeClass: String,
|
|
1629
|
-
exactActiveClass: String,
|
|
1630
|
-
custom: Boolean,
|
|
1631
|
-
ariaCurrentValue: {
|
|
1632
|
-
type: String,
|
|
1633
|
-
default: "page"
|
|
1634
|
-
},
|
|
1635
|
-
viewTransition: Boolean
|
|
1636
|
-
},
|
|
1637
|
-
useLink,
|
|
1638
|
-
setup(props, { slots }) {
|
|
1639
|
-
const link = vue.reactive(useLink(props));
|
|
1640
|
-
const { options } = vue.inject(routerKey);
|
|
1641
|
-
const elClass = vue.computed(() => ({
|
|
1642
|
-
[getLinkClass(props.activeClass, options.linkActiveClass, "router-link-active")]: link.isActive,
|
|
1643
|
-
[getLinkClass(props.exactActiveClass, options.linkExactActiveClass, "router-link-exact-active")]: link.isExactActive
|
|
1644
|
-
}));
|
|
1645
|
-
return () => {
|
|
1646
|
-
const children = slots.default && preferSingleVNode(slots.default(link));
|
|
1647
|
-
return props.custom ? children : vue.h("a", {
|
|
1648
|
-
"aria-current": link.isExactActive ? props.ariaCurrentValue : null,
|
|
1649
|
-
href: link.href,
|
|
1650
|
-
onClick: link.navigate,
|
|
1651
|
-
class: elClass.value
|
|
1652
|
-
}, children);
|
|
1653
|
-
};
|
|
1654
|
-
}
|
|
1655
|
-
});
|
|
1656
|
-
const RouterLink = RouterLinkImpl;
|
|
1657
|
-
function guardEvent(e2) {
|
|
1658
|
-
if (e2.metaKey || e2.altKey || e2.ctrlKey || e2.shiftKey) return;
|
|
1659
|
-
if (e2.defaultPrevented) return;
|
|
1660
|
-
if (e2.button !== void 0 && e2.button !== 0) return;
|
|
1661
|
-
if (e2.currentTarget && e2.currentTarget.getAttribute) {
|
|
1662
|
-
const target = e2.currentTarget.getAttribute("target");
|
|
1663
|
-
if (/\b_blank\b/i.test(target)) return;
|
|
1664
|
-
}
|
|
1665
|
-
if (e2.preventDefault) e2.preventDefault();
|
|
1666
|
-
return true;
|
|
1667
|
-
}
|
|
1668
|
-
function includesParams(outer, inner) {
|
|
1669
|
-
for (const key in inner) {
|
|
1670
|
-
const innerValue = inner[key];
|
|
1671
|
-
const outerValue = outer[key];
|
|
1672
|
-
if (typeof innerValue === "string") {
|
|
1673
|
-
if (innerValue !== outerValue) return false;
|
|
1674
|
-
} else if (!isArray(outerValue) || outerValue.length !== innerValue.length || innerValue.some((value, i2) => value.valueOf() !== outerValue[i2].valueOf())) return false;
|
|
1675
|
-
}
|
|
1676
|
-
return true;
|
|
1677
|
-
}
|
|
1678
|
-
function getOriginalPath(record) {
|
|
1679
|
-
return record ? record.aliasOf ? record.aliasOf.path : record.path : "";
|
|
1680
|
-
}
|
|
1681
|
-
const getLinkClass = (propClass, globalClass, defaultClass) => propClass != null ? propClass : globalClass != null ? globalClass : defaultClass;
|
|
1682
|
-
function useRouter() {
|
|
1683
|
-
return vue.inject(routerKey);
|
|
1684
|
-
}
|
|
1685
1518
|
const prefixCls$d = "dpzvc3-tab";
|
|
1686
1519
|
const Tab = /* @__PURE__ */ vue.defineComponent({
|
|
1687
1520
|
name: "Dpzvc3Tab",
|
|
@@ -1740,7 +1573,7 @@ const Tab = /* @__PURE__ */ vue.defineComponent({
|
|
|
1740
1573
|
"class": cls
|
|
1741
1574
|
}, [vue.createVNode("span", {
|
|
1742
1575
|
"innerHTML": iconHtml
|
|
1743
|
-
}, null), vue.createVNode("p", null, [item.name])]) : vue.createVNode(RouterLink, {
|
|
1576
|
+
}, null), vue.createVNode("p", null, [item.name])]) : vue.createVNode(vueRouter.RouterLink, {
|
|
1744
1577
|
"to": item.path,
|
|
1745
1578
|
"class": cls
|
|
1746
1579
|
}, {
|
|
@@ -4148,6 +3981,7 @@ const ActionSheet = /* @__PURE__ */ vue.defineComponent({
|
|
|
4148
3981
|
"modelValue": visible.value,
|
|
4149
3982
|
"onUpdate:modelValue": ($event) => visible.value = $event,
|
|
4150
3983
|
"position": "bottom",
|
|
3984
|
+
"maskClosable": false,
|
|
4151
3985
|
"styles": {
|
|
4152
3986
|
background: "transparent"
|
|
4153
3987
|
}
|
|
@@ -4856,7 +4690,7 @@ const Cell = /* @__PURE__ */ vue.defineComponent({
|
|
|
4856
4690
|
emit,
|
|
4857
4691
|
slots
|
|
4858
4692
|
}) {
|
|
4859
|
-
const router = useRouter();
|
|
4693
|
+
const router = vueRouter.useRouter();
|
|
4860
4694
|
const toLink = vue.computed(() => {
|
|
4861
4695
|
if (typeof window === "undefined") {
|
|
4862
4696
|
return "";
|