snail.vue 2.0.22 → 2.0.24
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/snail.vue.d.ts +76 -18
- package/dist/snail.vue.js +334 -268
- package/dist/snail.vue.umd.js +334 -268
- package/dist/styles/snail.vue.vue.css +7 -7
- package/package.json +3 -3
package/dist/snail.vue.js
CHANGED
|
@@ -141,7 +141,7 @@ var _sfc_main$E = defineComponent({
|
|
|
141
141
|
const _hoisted_1$m = ["title", "onClick"];
|
|
142
142
|
const _hoisted_2$e = ["type", "checked"];
|
|
143
143
|
const _hoisted_3$9 = ["textContent"];
|
|
144
|
-
const _hoisted_4$
|
|
144
|
+
const _hoisted_4$6 = ["textContent"];
|
|
145
145
|
var _sfc_main$D = defineComponent({
|
|
146
146
|
...{
|
|
147
147
|
name: "Choose",
|
|
@@ -234,7 +234,7 @@ var _sfc_main$D = defineComponent({
|
|
|
234
234
|
key: 3,
|
|
235
235
|
class: "item-des",
|
|
236
236
|
textContent: toDisplayString(node.item.description)
|
|
237
|
-
}, null, 8, _hoisted_4$
|
|
237
|
+
}, null, 8, _hoisted_4$6)) : createCommentVNode("", true)], 14, _hoisted_1$m);
|
|
238
238
|
}), 128))], 2);
|
|
239
239
|
};
|
|
240
240
|
}
|
|
@@ -350,8 +350,8 @@ const _hoisted_2$d = {
|
|
|
350
350
|
const _hoisted_3$8 = {
|
|
351
351
|
class: "input-body"
|
|
352
352
|
};
|
|
353
|
-
const _hoisted_4$
|
|
354
|
-
const _hoisted_5$
|
|
353
|
+
const _hoisted_4$5 = ["type", "value", "readonly", "placeholder", "title"];
|
|
354
|
+
const _hoisted_5$3 = ["title"];
|
|
355
355
|
var _sfc_main$A = defineComponent({
|
|
356
356
|
...{
|
|
357
357
|
name: "Input",
|
|
@@ -413,7 +413,7 @@ var _sfc_main$A = defineComponent({
|
|
|
413
413
|
title: inputModel.value,
|
|
414
414
|
onChange: onValueChange,
|
|
415
415
|
onClick: _cache[0] || (_cache[0] = $event => emits("click"))
|
|
416
|
-
}, null, 40, _hoisted_4$
|
|
416
|
+
}, null, 40, _hoisted_4$5), !!validateRef.value ? (openBlock(), createElementBlock("span", {
|
|
417
417
|
key: 0,
|
|
418
418
|
class: "validate",
|
|
419
419
|
title: validateRef.value
|
|
@@ -422,7 +422,7 @@ var _sfc_main$A = defineComponent({
|
|
|
422
422
|
button: "",
|
|
423
423
|
size: 16,
|
|
424
424
|
color: "red"
|
|
425
|
-
})], 8, _hoisted_5$
|
|
425
|
+
})], 8, _hoisted_5$3)) : createCommentVNode("", true)])], 2);
|
|
426
426
|
};
|
|
427
427
|
}
|
|
428
428
|
});
|
|
@@ -633,11 +633,11 @@ const _hoisted_1$j = {
|
|
|
633
633
|
};
|
|
634
634
|
const _hoisted_2$c = ["textContent"];
|
|
635
635
|
const _hoisted_3$7 = ["inputmode", "placeholder", "title"];
|
|
636
|
-
const _hoisted_4$
|
|
636
|
+
const _hoisted_4$4 = {
|
|
637
637
|
key: 1,
|
|
638
638
|
class: "number-suffix"
|
|
639
639
|
};
|
|
640
|
-
const _hoisted_5$
|
|
640
|
+
const _hoisted_5$2 = ["textContent"];
|
|
641
641
|
const _hoisted_6$2 = ["title", "textContent"];
|
|
642
642
|
const _hoisted_7$1 = ["title", "textContent"];
|
|
643
643
|
var _sfc_main$z = defineComponent({
|
|
@@ -836,10 +836,10 @@ var _sfc_main$z = defineComponent({
|
|
|
836
836
|
button: "",
|
|
837
837
|
size: 20,
|
|
838
838
|
rotate: 90
|
|
839
|
-
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$
|
|
839
|
+
})])], 64)) : createCommentVNode("", true)], 2), unref(hasSuffix) ? (openBlock(), createElementBlock("div", _hoisted_4$4, [createElementVNode("span", {
|
|
840
840
|
class: "ellipsis",
|
|
841
841
|
textContent: toDisplayString(unref(suffix))
|
|
842
|
-
}, null, 8, _hoisted_5$
|
|
842
|
+
}, null, 8, _hoisted_5$2)])) : createCommentVNode("", true), unref(upper) ? (openBlock(), createElementBlock("div", {
|
|
843
843
|
key: 2,
|
|
844
844
|
class: "number-util ellipsis",
|
|
845
845
|
title: upperTextRef.value,
|
|
@@ -1406,7 +1406,153 @@ var _sfc_main$u = defineComponent({
|
|
|
1406
1406
|
}
|
|
1407
1407
|
});
|
|
1408
1408
|
|
|
1409
|
+
function monitScroll(manager, root, options, emiter, classStyleRef) {
|
|
1410
|
+
const scope = useScope();
|
|
1411
|
+
let preStatus = void 0;
|
|
1412
|
+
const observer = useObserver();
|
|
1413
|
+
const timer = useTimer();
|
|
1414
|
+
const reactive = useReactive();
|
|
1415
|
+
function buildClassStyle() {
|
|
1416
|
+
const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item == "x-bar" || item == "y-bar");
|
|
1417
|
+
array.push(...manager.buildClassStyle(options));
|
|
1418
|
+
classStyleRef.value = array;
|
|
1419
|
+
}
|
|
1420
|
+
function refreshScrollInfo() {
|
|
1421
|
+
const status = Object.freeze(manager.getStatus(root));
|
|
1422
|
+
const events = Object.create(null);
|
|
1423
|
+
if (preStatus != void 0) {
|
|
1424
|
+
preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
|
|
1425
|
+
preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
|
|
1426
|
+
if (preStatus.xbar == true && status.xbar == true) {
|
|
1427
|
+
status.left && preStatus.left !== status.left && (events.left = []);
|
|
1428
|
+
status.right && preStatus.right !== status.right && (events.right = []);
|
|
1429
|
+
}
|
|
1430
|
+
if (preStatus.ybar == true && status.ybar == true) {
|
|
1431
|
+
status.top && preStatus.top !== status.top && (events.top = []);
|
|
1432
|
+
status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
|
|
1433
|
+
}
|
|
1434
|
+
}
|
|
1435
|
+
preStatus = status;
|
|
1436
|
+
events.xbar && emiter("xbar", ...events.xbar);
|
|
1437
|
+
events.left && emiter("left");
|
|
1438
|
+
events.right && emiter("right");
|
|
1439
|
+
events.ybar && emiter("ybar", ...events.ybar);
|
|
1440
|
+
events.top && emiter("top");
|
|
1441
|
+
events.bottom && emiter("bottom");
|
|
1442
|
+
{
|
|
1443
|
+
const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item != "x-bar" && item != "y-bar");
|
|
1444
|
+
status.xbar && array.push("x-bar");
|
|
1445
|
+
status.ybar && array.push("y-bar");
|
|
1446
|
+
classStyleRef.value = array;
|
|
1447
|
+
}
|
|
1448
|
+
}
|
|
1449
|
+
buildClassStyle();
|
|
1450
|
+
refreshScrollInfo();
|
|
1451
|
+
reactive.watcher(() => options.scroll, buildClassStyle);
|
|
1452
|
+
reactive.watcher(() => options.barSize, buildClassStyle);
|
|
1453
|
+
observer.onSize(root, refreshScrollInfo);
|
|
1454
|
+
observer.onEvent(root, "scroll", refreshScrollInfo);
|
|
1455
|
+
timer.onInterval(() => {
|
|
1456
|
+
const isChange = preStatus.scrollWidth != root.scrollWidth || preStatus.scrollHeight != root.scrollHeight;
|
|
1457
|
+
isChange && refreshScrollInfo();
|
|
1458
|
+
}, 100);
|
|
1459
|
+
scope.onDestroy(() => {
|
|
1460
|
+
observer.destroyed || observer.destroy();
|
|
1461
|
+
timer.destroyed || timer.destroy();
|
|
1462
|
+
reactive.destroyed || reactive.destroy();
|
|
1463
|
+
});
|
|
1464
|
+
return scope;
|
|
1465
|
+
}
|
|
1466
|
+
|
|
1409
1467
|
var _sfc_main$t = defineComponent({
|
|
1468
|
+
...{
|
|
1469
|
+
name: "Scroll",
|
|
1470
|
+
inheritAttrs: false
|
|
1471
|
+
},
|
|
1472
|
+
__name: "scroll",
|
|
1473
|
+
props: {
|
|
1474
|
+
scroll: {},
|
|
1475
|
+
barSize: {}
|
|
1476
|
+
},
|
|
1477
|
+
emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
|
|
1478
|
+
setup(__props, _ref) {
|
|
1479
|
+
let {
|
|
1480
|
+
expose: __expose,
|
|
1481
|
+
emit: __emit
|
|
1482
|
+
} = _ref;
|
|
1483
|
+
const props = __props;
|
|
1484
|
+
const emits = __emit;
|
|
1485
|
+
const rootDom = useTemplateRef("scroll-root");
|
|
1486
|
+
const manager = useScroll();
|
|
1487
|
+
const classStyleRef = shallowRef();
|
|
1488
|
+
__expose({
|
|
1489
|
+
getStatus() {
|
|
1490
|
+
return manager.getStatus(rootDom.value);
|
|
1491
|
+
},
|
|
1492
|
+
scroll(left, top) {
|
|
1493
|
+
left == void 0 || (rootDom.value.scrollLeft += left);
|
|
1494
|
+
top == void 0 || (rootDom.value.scrollTop += top);
|
|
1495
|
+
},
|
|
1496
|
+
scrollTo(left, top) {
|
|
1497
|
+
left == void 0 || (rootDom.value.scrollLeft = left);
|
|
1498
|
+
top == void 0 || (rootDom.value.scrollTop = top);
|
|
1499
|
+
}
|
|
1500
|
+
});
|
|
1501
|
+
onMounted(() => monitScroll(manager, rootDom.value, props, emits, classStyleRef));
|
|
1502
|
+
return (_ctx, _cache) => {
|
|
1503
|
+
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
1504
|
+
class: ["snail-scroll", classStyleRef.value],
|
|
1505
|
+
ref: "scroll-root"
|
|
1506
|
+
}), [renderSlot(_ctx.$slots, "default")], 16);
|
|
1507
|
+
};
|
|
1508
|
+
}
|
|
1509
|
+
});
|
|
1510
|
+
|
|
1511
|
+
var _sfc_main$s = defineComponent({
|
|
1512
|
+
__name: "wrapper",
|
|
1513
|
+
props: {
|
|
1514
|
+
inPopup: {
|
|
1515
|
+
type: Boolean
|
|
1516
|
+
},
|
|
1517
|
+
header: {},
|
|
1518
|
+
content: {},
|
|
1519
|
+
footer: {}
|
|
1520
|
+
},
|
|
1521
|
+
emits: ["cancel", "confirm"],
|
|
1522
|
+
setup(__props, _ref) {
|
|
1523
|
+
let {
|
|
1524
|
+
emit: __emit
|
|
1525
|
+
} = _ref;
|
|
1526
|
+
const emits = __emit;
|
|
1527
|
+
return (_ctx, _cache) => {
|
|
1528
|
+
return openBlock(), createElementBlock("div", {
|
|
1529
|
+
class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
1530
|
+
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$B, mergeProps({
|
|
1531
|
+
key: 0
|
|
1532
|
+
}, __props.header || {
|
|
1533
|
+
useTo: "dialog",
|
|
1534
|
+
title: "对话框"
|
|
1535
|
+
}, {
|
|
1536
|
+
"use-to": (__props.header ? __props.header.useTo : void 0) || (__props.inPopup ? "dialog" : "page"),
|
|
1537
|
+
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
1538
|
+
}), null, 16, ["use-to"])) : createCommentVNode("", true), createVNode(_sfc_main$t, mergeProps({
|
|
1539
|
+
class: "wrapper-body"
|
|
1540
|
+
}, __props.content || {
|
|
1541
|
+
scroll: "none"
|
|
1542
|
+
}), {
|
|
1543
|
+
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
1544
|
+
_: 3
|
|
1545
|
+
}, 16), __props.footer && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$C, mergeProps({
|
|
1546
|
+
key: 1
|
|
1547
|
+
}, __props.footer || {}, {
|
|
1548
|
+
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
1549
|
+
onConfirm: _cache[2] || (_cache[2] = $event => emits("confirm"))
|
|
1550
|
+
}), null, 16)) : createCommentVNode("", true)], 2);
|
|
1551
|
+
};
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
|
|
1555
|
+
var _sfc_main$r = defineComponent({
|
|
1410
1556
|
...{
|
|
1411
1557
|
name: "DialogContainer",
|
|
1412
1558
|
inheritAttrs: true
|
|
@@ -1437,6 +1583,23 @@ var _sfc_main$t = defineComponent({
|
|
|
1437
1583
|
closePopup,
|
|
1438
1584
|
onBeforeClose
|
|
1439
1585
|
});
|
|
1586
|
+
let fn_onBuildData = void 0;
|
|
1587
|
+
const registerBuildDataFunc = fn => {
|
|
1588
|
+
mustFunction(fn, "fn");
|
|
1589
|
+
fn_onBuildData = fn;
|
|
1590
|
+
};
|
|
1591
|
+
async function onWrapperConfirm() {
|
|
1592
|
+
if (fn_onBuildData != void 0) {
|
|
1593
|
+
const rt = (await wait(fn_onBuildData())) || {
|
|
1594
|
+
success: true,
|
|
1595
|
+
data: void 0
|
|
1596
|
+
};
|
|
1597
|
+
console.log("onBuildData result:", rt);
|
|
1598
|
+
rt.success !== false && closePopup(rt.data);
|
|
1599
|
+
} else {
|
|
1600
|
+
closePopup();
|
|
1601
|
+
}
|
|
1602
|
+
}
|
|
1440
1603
|
onMounted(() => {
|
|
1441
1604
|
onEvent(window, "keyup", event => {
|
|
1442
1605
|
event.key === "Escape" && __props.popupStatus.value == "active" && __props.options.closeOnEscape && closePopup();
|
|
@@ -1448,10 +1611,11 @@ var _sfc_main$t = defineComponent({
|
|
|
1448
1611
|
style: normalizeStyle({
|
|
1449
1612
|
"z-index": __props.zIndex
|
|
1450
1613
|
}),
|
|
1451
|
-
onClick: _cache[
|
|
1614
|
+
onClick: _cache[3] || (_cache[3] = withModifiers($event => {
|
|
1452
1615
|
__props.options.closeOnMask && unref(closePopup)();
|
|
1453
1616
|
}, ["self"]))
|
|
1454
|
-
}, [
|
|
1617
|
+
}, [__props.options.wrapper == void 0 ? (openBlock(), createBlock(_sfc_main$u, mergeProps({
|
|
1618
|
+
key: 0,
|
|
1455
1619
|
class: "dialog-body",
|
|
1456
1620
|
name: __props.options.name,
|
|
1457
1621
|
component: __props.options.component,
|
|
@@ -1461,12 +1625,32 @@ var _sfc_main$t = defineComponent({
|
|
|
1461
1625
|
"popup-status": __props.popupStatus.value,
|
|
1462
1626
|
modelValue: unref(model),
|
|
1463
1627
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = $event => isRef(model) ? model.value = $event : null)
|
|
1464
|
-
}), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])
|
|
1628
|
+
}), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])) : (openBlock(), createBlock(_sfc_main$s, mergeProps({
|
|
1629
|
+
key: 1,
|
|
1630
|
+
class: "dialog-body",
|
|
1631
|
+
"in-popup": true
|
|
1632
|
+
}, __props.options.wrapper, {
|
|
1633
|
+
onCancel: _cache[2] || (_cache[2] = $event => unref(closePopup)()),
|
|
1634
|
+
onConfirm: onWrapperConfirm
|
|
1635
|
+
}), {
|
|
1636
|
+
default: withCtx(() => [createVNode(_sfc_main$u, mergeProps({
|
|
1637
|
+
name: __props.options.name,
|
|
1638
|
+
component: __props.options.component,
|
|
1639
|
+
url: __props.options.url,
|
|
1640
|
+
props: unref(props)
|
|
1641
|
+
}, unref(dialogExtend), {
|
|
1642
|
+
"popup-status": __props.popupStatus.value,
|
|
1643
|
+
modelValue: unref(model),
|
|
1644
|
+
"onUpdate:modelValue": _cache[1] || (_cache[1] = $event => isRef(model) ? model.value = $event : null),
|
|
1645
|
+
"on-build-data": registerBuildDataFunc
|
|
1646
|
+
}), null, 16, ["name", "component", "url", "props", "popup-status", "modelValue"])]),
|
|
1647
|
+
_: 1
|
|
1648
|
+
}, 16))], 6);
|
|
1465
1649
|
};
|
|
1466
1650
|
}
|
|
1467
1651
|
});
|
|
1468
1652
|
|
|
1469
|
-
var _sfc_main$
|
|
1653
|
+
var _sfc_main$q = defineComponent({
|
|
1470
1654
|
...{
|
|
1471
1655
|
name: "FollowContainer",
|
|
1472
1656
|
inheritAttrs: true
|
|
@@ -1604,7 +1788,7 @@ var _sfc_main$s = defineComponent({
|
|
|
1604
1788
|
}
|
|
1605
1789
|
});
|
|
1606
1790
|
|
|
1607
|
-
var _sfc_main$
|
|
1791
|
+
var _sfc_main$p = defineComponent({
|
|
1608
1792
|
...{
|
|
1609
1793
|
name: "PopupContainer",
|
|
1610
1794
|
inheritAttrs: true
|
|
@@ -1647,7 +1831,7 @@ const _hoisted_1$g = {
|
|
|
1647
1831
|
class: "icon"
|
|
1648
1832
|
};
|
|
1649
1833
|
const _hoisted_2$a = ["innerHTML"];
|
|
1650
|
-
var _sfc_main$
|
|
1834
|
+
var _sfc_main$o = defineComponent({
|
|
1651
1835
|
...{
|
|
1652
1836
|
name: "ToastContainer",
|
|
1653
1837
|
inheritAttrs: true
|
|
@@ -1709,7 +1893,7 @@ var _sfc_main$q = defineComponent({
|
|
|
1709
1893
|
|
|
1710
1894
|
function usePopup() {
|
|
1711
1895
|
function popup(options) {
|
|
1712
|
-
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$
|
|
1896
|
+
const scope = checkOptions(options, checkPopup) || popupInCustomContainer(_sfc_main$p, options);
|
|
1713
1897
|
return addScope2Scopes(scope);
|
|
1714
1898
|
}
|
|
1715
1899
|
function dialog(options) {
|
|
@@ -1730,7 +1914,7 @@ function usePopup() {
|
|
|
1730
1914
|
const rt = await hook.runHookAsync("onBeforeClose", {
|
|
1731
1915
|
mode: "one",
|
|
1732
1916
|
order: "desc"
|
|
1733
|
-
});
|
|
1917
|
+
}, data);
|
|
1734
1918
|
isClosing = false;
|
|
1735
1919
|
if (rt.success != true) {
|
|
1736
1920
|
console.warn("run onBeforeClose failed", rt.reason, rt.ex);
|
|
@@ -1742,7 +1926,7 @@ function usePopup() {
|
|
|
1742
1926
|
},
|
|
1743
1927
|
onBeforeClose: fn => hook.register("onBeforeClose", fn)
|
|
1744
1928
|
});
|
|
1745
|
-
const descriptor = openPopup(_sfc_main$
|
|
1929
|
+
const descriptor = openPopup(_sfc_main$r, options, extOptions);
|
|
1746
1930
|
scope = useAsyncScope(deferred.promise);
|
|
1747
1931
|
monitorDialog(descriptor, scope, deferred);
|
|
1748
1932
|
}
|
|
@@ -1760,7 +1944,7 @@ function usePopup() {
|
|
|
1760
1944
|
inPopup: "follow",
|
|
1761
1945
|
target
|
|
1762
1946
|
};
|
|
1763
|
-
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$
|
|
1947
|
+
scope = checkOptions(options, checkFollow) || popupInCustomContainer(_sfc_main$q, options, extOptions);
|
|
1764
1948
|
}
|
|
1765
1949
|
return addScope2Scopes(scope);
|
|
1766
1950
|
}
|
|
@@ -1777,7 +1961,7 @@ function usePopup() {
|
|
|
1777
1961
|
});
|
|
1778
1962
|
}
|
|
1779
1963
|
function toast(type, message, options) {
|
|
1780
|
-
return popupInCustomContainer(_sfc_main$
|
|
1964
|
+
return popupInCustomContainer(_sfc_main$o, {
|
|
1781
1965
|
url: "#ToastContainer",
|
|
1782
1966
|
props: {
|
|
1783
1967
|
...(options || Object.create(null)),
|
|
@@ -1810,7 +1994,7 @@ function usePopup() {
|
|
|
1810
1994
|
},
|
|
1811
1995
|
...extOptions
|
|
1812
1996
|
});
|
|
1813
|
-
const descriptor = openPopup(container || _sfc_main$
|
|
1997
|
+
const descriptor = openPopup(container || _sfc_main$p, options, extOptions);
|
|
1814
1998
|
const scope = useAsyncScope(deferred.promise);
|
|
1815
1999
|
scope.onDestroy(() => destroyPopup(descriptor, deferred));
|
|
1816
2000
|
return scope;
|
|
@@ -1950,7 +2134,7 @@ const _hoisted_1$f = {
|
|
|
1950
2134
|
};
|
|
1951
2135
|
const _hoisted_2$9 = ["src"];
|
|
1952
2136
|
const _hoisted_3$6 = ["textContent"];
|
|
1953
|
-
var _sfc_main$
|
|
2137
|
+
var _sfc_main$n = defineComponent({
|
|
1954
2138
|
...{
|
|
1955
2139
|
name: "Empty",
|
|
1956
2140
|
inheritAttrs: true
|
|
@@ -1979,7 +2163,7 @@ const _hoisted_3$5 = {
|
|
|
1979
2163
|
key: 1,
|
|
1980
2164
|
class: "select-status"
|
|
1981
2165
|
};
|
|
1982
|
-
var _sfc_main$
|
|
2166
|
+
var _sfc_main$m = defineComponent({
|
|
1983
2167
|
...{
|
|
1984
2168
|
name: "SelectNode",
|
|
1985
2169
|
inheritAttrs: true
|
|
@@ -2049,7 +2233,7 @@ var _sfc_main$o = defineComponent({
|
|
|
2049
2233
|
}
|
|
2050
2234
|
});
|
|
2051
2235
|
|
|
2052
|
-
var _sfc_main$
|
|
2236
|
+
var _sfc_main$l = defineComponent({
|
|
2053
2237
|
...{
|
|
2054
2238
|
name: "Select2Popup",
|
|
2055
2239
|
inheritAttrs: true
|
|
@@ -2227,7 +2411,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2227
2411
|
onSearch,
|
|
2228
2412
|
key: "select-search"
|
|
2229
2413
|
}), null, 16)) : createCommentVNode("", true), (openBlock(true), createElementBlock(Fragment, null, renderList(itemsRef.value, item => {
|
|
2230
|
-
return openBlock(), createBlock(_sfc_main$
|
|
2414
|
+
return openBlock(), createBlock(_sfc_main$m, {
|
|
2231
2415
|
key: unref(context).getKey(item),
|
|
2232
2416
|
multiple: __props.multiple,
|
|
2233
2417
|
item,
|
|
@@ -2236,7 +2420,7 @@ var _sfc_main$n = defineComponent({
|
|
|
2236
2420
|
onEnter: onEnterSelectNode,
|
|
2237
2421
|
onClick: onClickSelectNode
|
|
2238
2422
|
}, null, 8, ["multiple", "item", "context"]);
|
|
2239
|
-
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$
|
|
2423
|
+
}), 128)), itemsRef.value.length == 0 ? (openBlock(), createBlock(_sfc_main$n, {
|
|
2240
2424
|
key: 1,
|
|
2241
2425
|
message: "无结果"
|
|
2242
2426
|
})) : createCommentVNode("", true), showClearButtonRef.value ? (openBlock(), createElementBlock("div", {
|
|
@@ -2254,14 +2438,14 @@ const _hoisted_1$d = {
|
|
|
2254
2438
|
};
|
|
2255
2439
|
const _hoisted_2$7 = ["title", "textContent"];
|
|
2256
2440
|
const _hoisted_3$4 = ["textContent"];
|
|
2257
|
-
const _hoisted_4$
|
|
2441
|
+
const _hoisted_4$3 = {
|
|
2258
2442
|
key: 1,
|
|
2259
2443
|
class: "placeholder"
|
|
2260
2444
|
};
|
|
2261
2445
|
onAppCreated((app, type) => {
|
|
2262
|
-
type == "popup" && app.component("SelectPopup", _sfc_main$
|
|
2446
|
+
type == "popup" && app.component("SelectPopup", _sfc_main$l);
|
|
2263
2447
|
});
|
|
2264
|
-
var _sfc_main$
|
|
2448
|
+
var _sfc_main$k = defineComponent({
|
|
2265
2449
|
...{
|
|
2266
2450
|
name: "Select",
|
|
2267
2451
|
inheritAttrs: true
|
|
@@ -2407,12 +2591,12 @@ var _sfc_main$m = defineComponent({
|
|
|
2407
2591
|
button: "",
|
|
2408
2592
|
size: 24,
|
|
2409
2593
|
rotate: 90
|
|
2410
|
-
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$
|
|
2594
|
+
})) : createCommentVNode("", true)], 64)) : (openBlock(), createElementBlock("div", _hoisted_4$3, "暂无可选项"))], 2);
|
|
2411
2595
|
};
|
|
2412
2596
|
}
|
|
2413
2597
|
});
|
|
2414
2598
|
|
|
2415
|
-
var _sfc_main$
|
|
2599
|
+
var _sfc_main$j = defineComponent({
|
|
2416
2600
|
...{
|
|
2417
2601
|
name: "Switch",
|
|
2418
2602
|
inheritAttrs: true
|
|
@@ -2462,7 +2646,7 @@ var _sfc_main$l = defineComponent({
|
|
|
2462
2646
|
});
|
|
2463
2647
|
|
|
2464
2648
|
const _hoisted_1$c = ["readonly", "placeholder", "rows"];
|
|
2465
|
-
var _sfc_main$
|
|
2649
|
+
var _sfc_main$i = defineComponent({
|
|
2466
2650
|
...{
|
|
2467
2651
|
name: "Textarea",
|
|
2468
2652
|
inheritAttrs: true
|
|
@@ -2529,7 +2713,7 @@ var _sfc_main$k = defineComponent({
|
|
|
2529
2713
|
|
|
2530
2714
|
const _hoisted_1$b = ["onClick"];
|
|
2531
2715
|
const _hoisted_2$6 = ["textContent"];
|
|
2532
|
-
var _sfc_main$
|
|
2716
|
+
var _sfc_main$h = defineComponent({
|
|
2533
2717
|
__name: "action-items",
|
|
2534
2718
|
props: {
|
|
2535
2719
|
mode: {},
|
|
@@ -2589,9 +2773,12 @@ const _hoisted_1$a = {
|
|
|
2589
2773
|
const _hoisted_2$5 = {
|
|
2590
2774
|
class: "action-slot flex-cross-center"
|
|
2591
2775
|
};
|
|
2592
|
-
var _sfc_main$
|
|
2776
|
+
var _sfc_main$g = defineComponent({
|
|
2593
2777
|
__name: "action",
|
|
2594
2778
|
props: {
|
|
2779
|
+
disabled: {
|
|
2780
|
+
type: Boolean
|
|
2781
|
+
},
|
|
2595
2782
|
trigger: {},
|
|
2596
2783
|
actions: {}
|
|
2597
2784
|
},
|
|
@@ -2616,21 +2803,23 @@ var _sfc_main$i = defineComponent({
|
|
|
2616
2803
|
popupScope.destroy();
|
|
2617
2804
|
return;
|
|
2618
2805
|
}
|
|
2619
|
-
|
|
2620
|
-
|
|
2621
|
-
|
|
2622
|
-
|
|
2623
|
-
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2806
|
+
if (props.disabled != true) {
|
|
2807
|
+
popupScope = follow(rootDom.value, {
|
|
2808
|
+
component: _sfc_main$h,
|
|
2809
|
+
closeOnEscape: true,
|
|
2810
|
+
closeOnMask: true,
|
|
2811
|
+
closeOnResize: true,
|
|
2812
|
+
closeOnTarget: true,
|
|
2813
|
+
followX: longPress ? ["center", "start", "end"] : ["after", "end", "start", "end", "center"],
|
|
2814
|
+
followY: longPress ? ["center", "after", "before"] : ["after", "before", "center", "end", "after"],
|
|
2815
|
+
props: {
|
|
2816
|
+
mode: "vertical",
|
|
2817
|
+
actions: props.actions
|
|
2818
|
+
}
|
|
2819
|
+
});
|
|
2820
|
+
const code = await popupScope;
|
|
2821
|
+
isStringNotEmpty(code) && emits("trigger", code);
|
|
2822
|
+
}
|
|
2634
2823
|
}
|
|
2635
2824
|
function onMouseDown() {
|
|
2636
2825
|
if (props.trigger == "long-press" && pressStartDate == void 0) {
|
|
@@ -2664,7 +2853,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2664
2853
|
}
|
|
2665
2854
|
});
|
|
2666
2855
|
return (_ctx, _cache) => {
|
|
2667
|
-
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2856
|
+
return openBlock(), createElementBlock("div", _hoisted_1$a, [createElementVNode("div", _hoisted_2$5, [renderSlot(_ctx.$slots, "default")]), __props.trigger == "hover" && __props.disabled != true ? (openBlock(), createBlock(_sfc_main$E, {
|
|
2668
2857
|
key: 0,
|
|
2669
2858
|
class: "hover-tips",
|
|
2670
2859
|
button: "",
|
|
@@ -2681,65 +2870,7 @@ var _sfc_main$i = defineComponent({
|
|
|
2681
2870
|
}
|
|
2682
2871
|
});
|
|
2683
2872
|
|
|
2684
|
-
|
|
2685
|
-
const scope = useScope();
|
|
2686
|
-
let preStatus = void 0;
|
|
2687
|
-
const observer = useObserver();
|
|
2688
|
-
const timer = useTimer();
|
|
2689
|
-
const reactive = useReactive();
|
|
2690
|
-
function buildClassStyle() {
|
|
2691
|
-
const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item == "x-bar" || item == "y-bar");
|
|
2692
|
-
array.push(...manager.buildClassStyle(options));
|
|
2693
|
-
classStyleRef.value = array;
|
|
2694
|
-
}
|
|
2695
|
-
function refreshScrollInfo() {
|
|
2696
|
-
const status = Object.freeze(manager.getStatus(root));
|
|
2697
|
-
const events = Object.create(null);
|
|
2698
|
-
if (preStatus != void 0) {
|
|
2699
|
-
preStatus.xbar != status.xbar && (events.xbar = [status.xbar]);
|
|
2700
|
-
preStatus.ybar != status.ybar && (events.ybar = [status.ybar]);
|
|
2701
|
-
if (preStatus.xbar == true && status.xbar == true) {
|
|
2702
|
-
status.left && preStatus.left !== status.left && (events.left = []);
|
|
2703
|
-
status.right && preStatus.right !== status.right && (events.right = []);
|
|
2704
|
-
}
|
|
2705
|
-
if (preStatus.ybar == true && status.ybar == true) {
|
|
2706
|
-
status.top && preStatus.top !== status.top && (events.top = []);
|
|
2707
|
-
status.bottom && preStatus.bottom !== status.bottom && (events.bottom = []);
|
|
2708
|
-
}
|
|
2709
|
-
}
|
|
2710
|
-
preStatus = status;
|
|
2711
|
-
events.xbar && emiter("xbar", ...events.xbar);
|
|
2712
|
-
events.left && emiter("left");
|
|
2713
|
-
events.right && emiter("right");
|
|
2714
|
-
events.ybar && emiter("ybar", ...events.ybar);
|
|
2715
|
-
events.top && emiter("top");
|
|
2716
|
-
events.bottom && emiter("bottom");
|
|
2717
|
-
{
|
|
2718
|
-
const array = (classStyleRef.value ? [...classStyleRef.value] : []).filter(item => item != "x-bar" && item != "y-bar");
|
|
2719
|
-
status.xbar && array.push("x-bar");
|
|
2720
|
-
status.ybar && array.push("y-bar");
|
|
2721
|
-
classStyleRef.value = array;
|
|
2722
|
-
}
|
|
2723
|
-
}
|
|
2724
|
-
buildClassStyle();
|
|
2725
|
-
refreshScrollInfo();
|
|
2726
|
-
reactive.watcher(() => options.scroll, buildClassStyle);
|
|
2727
|
-
reactive.watcher(() => options.barSize, buildClassStyle);
|
|
2728
|
-
observer.onSize(root, refreshScrollInfo);
|
|
2729
|
-
observer.onEvent(root, "scroll", refreshScrollInfo);
|
|
2730
|
-
timer.onInterval(() => {
|
|
2731
|
-
const isChange = preStatus.scrollWidth != root.scrollWidth || preStatus.scrollHeight != root.scrollHeight;
|
|
2732
|
-
isChange && refreshScrollInfo();
|
|
2733
|
-
}, 100);
|
|
2734
|
-
scope.onDestroy(() => {
|
|
2735
|
-
observer.destroyed || observer.destroy();
|
|
2736
|
-
timer.destroyed || timer.destroy();
|
|
2737
|
-
reactive.destroyed || reactive.destroy();
|
|
2738
|
-
});
|
|
2739
|
-
return scope;
|
|
2740
|
-
}
|
|
2741
|
-
|
|
2742
|
-
var _sfc_main$h = defineComponent({
|
|
2873
|
+
var _sfc_main$f = defineComponent({
|
|
2743
2874
|
...{
|
|
2744
2875
|
name: "Elastic",
|
|
2745
2876
|
inheritAttrs: false
|
|
@@ -2945,7 +3076,7 @@ var _sfc_main$h = defineComponent({
|
|
|
2945
3076
|
}
|
|
2946
3077
|
});
|
|
2947
3078
|
|
|
2948
|
-
var _sfc_main$
|
|
3079
|
+
var _sfc_main$e = defineComponent({
|
|
2949
3080
|
...{
|
|
2950
3081
|
name: "Flex",
|
|
2951
3082
|
inheritAttrs: false
|
|
@@ -3040,20 +3171,13 @@ var _sfc_main$g = defineComponent({
|
|
|
3040
3171
|
}
|
|
3041
3172
|
});
|
|
3042
3173
|
|
|
3043
|
-
const _hoisted_1$9 =
|
|
3044
|
-
class: "fold-header"
|
|
3045
|
-
};
|
|
3174
|
+
const _hoisted_1$9 = ["textContent"];
|
|
3046
3175
|
const _hoisted_2$4 = ["textContent"];
|
|
3047
|
-
const _hoisted_3$3 =
|
|
3048
|
-
const _hoisted_4$3 = {
|
|
3176
|
+
const _hoisted_3$3 = {
|
|
3049
3177
|
key: 1,
|
|
3050
3178
|
class: "status"
|
|
3051
3179
|
};
|
|
3052
|
-
|
|
3053
|
-
class: "fold-body",
|
|
3054
|
-
ref: "foldBody"
|
|
3055
|
-
};
|
|
3056
|
-
var _sfc_main$f = defineComponent({
|
|
3180
|
+
var _sfc_main$d = defineComponent({
|
|
3057
3181
|
...{
|
|
3058
3182
|
name: "Fold",
|
|
3059
3183
|
inheritAttrs: true
|
|
@@ -3064,7 +3188,9 @@ var _sfc_main$f = defineComponent({
|
|
|
3064
3188
|
type: Boolean
|
|
3065
3189
|
},
|
|
3066
3190
|
title: {},
|
|
3067
|
-
subtitle: {}
|
|
3191
|
+
subtitle: {},
|
|
3192
|
+
header: {},
|
|
3193
|
+
body: {}
|
|
3068
3194
|
}, {
|
|
3069
3195
|
"status": {
|
|
3070
3196
|
default: "expand"
|
|
@@ -3084,27 +3210,37 @@ var _sfc_main$f = defineComponent({
|
|
|
3084
3210
|
watcher
|
|
3085
3211
|
} = useReactive();
|
|
3086
3212
|
const statusModel = useModel(__props, "status");
|
|
3087
|
-
|
|
3213
|
+
const foldHeaderDom = useTemplateRef("foldHeader");
|
|
3088
3214
|
const foldBodyDom = useTemplateRef("foldBody");
|
|
3089
|
-
|
|
3215
|
+
const slotHandle = {
|
|
3216
|
+
getStatus: () => statusModel.value,
|
|
3217
|
+
setStatus: value => statusModel.value = value,
|
|
3218
|
+
toggle: () => (onStatusClick(), statusModel.value)
|
|
3219
|
+
};
|
|
3220
|
+
function updateFoldStyle(disableAnimation) {
|
|
3090
3221
|
const isExpand = statusModel.value == "expand";
|
|
3091
3222
|
if (foldBodyDom.value) {
|
|
3092
|
-
const minHeight =
|
|
3223
|
+
const minHeight = foldHeaderDom.value.getBoundingClientRect().height;
|
|
3093
3224
|
const maxHeight = minHeight + foldBodyDom.value.getBoundingClientRect().height;
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
3098
|
-
|
|
3099
|
-
|
|
3100
|
-
|
|
3101
|
-
|
|
3102
|
-
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
|
|
3106
|
-
|
|
3107
|
-
|
|
3225
|
+
const endStyle = {
|
|
3226
|
+
overflow: isExpand ? "" : "hidden",
|
|
3227
|
+
height: isExpand ? "" : `${minHeight}px`
|
|
3228
|
+
};
|
|
3229
|
+
if (disableAnimation === true) {
|
|
3230
|
+
Object.assign(foldBodyDom.value.parentElement.style, endStyle);
|
|
3231
|
+
} else {
|
|
3232
|
+
transition(foldBodyDom.value.parentElement, {
|
|
3233
|
+
from: {
|
|
3234
|
+
transition: "height 0.2s ease",
|
|
3235
|
+
overflow: "hidden",
|
|
3236
|
+
height: `${isExpand ? minHeight : maxHeight}px`
|
|
3237
|
+
},
|
|
3238
|
+
to: {
|
|
3239
|
+
height: `${isExpand ? maxHeight : minHeight}px`
|
|
3240
|
+
},
|
|
3241
|
+
end: endStyle
|
|
3242
|
+
});
|
|
3243
|
+
}
|
|
3108
3244
|
}
|
|
3109
3245
|
}
|
|
3110
3246
|
function onStatusClick() {
|
|
@@ -3120,73 +3256,38 @@ var _sfc_main$f = defineComponent({
|
|
|
3120
3256
|
}
|
|
3121
3257
|
nextTick(() => emits("change", statusModel.value));
|
|
3122
3258
|
}
|
|
3259
|
+
onMounted(() => {
|
|
3260
|
+
statusModel.value != "expand" && updateFoldStyle(true);
|
|
3261
|
+
watcher(statusModel, () => updateFoldStyle(false));
|
|
3262
|
+
});
|
|
3123
3263
|
return (_ctx, _cache) => {
|
|
3124
3264
|
return openBlock(), createElementBlock("div", {
|
|
3125
3265
|
class: normalizeClass(["snail-fold", statusModel.value])
|
|
3126
|
-
}, [createElementVNode("div",
|
|
3266
|
+
}, [createElementVNode("div", {
|
|
3267
|
+
class: normalizeClass(["fold-header", __props.header ? __props.header.class : []]),
|
|
3268
|
+
ref: "foldHeader"
|
|
3269
|
+
}, [renderSlot(_ctx.$slots, "header", normalizeProps(guardReactiveProps(slotHandle)), () => [createElementVNode("div", {
|
|
3127
3270
|
class: "title ellipsis",
|
|
3128
3271
|
textContent: toDisplayString(__props.title)
|
|
3129
|
-
}, null, 8,
|
|
3272
|
+
}, null, 8, _hoisted_1$9), !!__props.subtitle ? (openBlock(), createElementBlock("div", {
|
|
3130
3273
|
key: 0,
|
|
3131
3274
|
class: "subtitle ellipsis",
|
|
3132
3275
|
textContent: toDisplayString(__props.subtitle)
|
|
3133
|
-
}, null, 8,
|
|
3134
|
-
custom: false,
|
|
3276
|
+
}, null, 8, _hoisted_2$4)) : createCommentVNode("", true), __props.disabled != true ? (openBlock(), createElementBlock("div", _hoisted_3$3, [createVNode(_sfc_main$E, {
|
|
3135
3277
|
type: "arrow",
|
|
3136
3278
|
button: "",
|
|
3137
3279
|
title: statusModel.value == "expand" ? "收起" : "展开",
|
|
3138
3280
|
rotate: statusModel.value == "expand" ? -90 : 90,
|
|
3139
3281
|
onClick: onStatusClick
|
|
3140
|
-
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])]), createElementVNode("div",
|
|
3282
|
+
}, null, 8, ["title", "rotate"])])) : createCommentVNode("", true)])], 2), createElementVNode("div", {
|
|
3283
|
+
class: normalizeClass(["fold-body", __props.body ? __props.body.class : []]),
|
|
3284
|
+
ref: "foldBody"
|
|
3285
|
+
}, [renderSlot(_ctx.$slots, "default", normalizeProps(guardReactiveProps(slotHandle)))], 2)], 2);
|
|
3141
3286
|
};
|
|
3142
3287
|
}
|
|
3143
3288
|
});
|
|
3144
3289
|
|
|
3145
|
-
var _sfc_main$
|
|
3146
|
-
...{
|
|
3147
|
-
name: "Scroll",
|
|
3148
|
-
inheritAttrs: false
|
|
3149
|
-
},
|
|
3150
|
-
__name: "scroll",
|
|
3151
|
-
props: {
|
|
3152
|
-
scroll: {},
|
|
3153
|
-
barSize: {}
|
|
3154
|
-
},
|
|
3155
|
-
emits: ["xbar", "left", "right", "ybar", "top", "bottom"],
|
|
3156
|
-
setup(__props, _ref) {
|
|
3157
|
-
let {
|
|
3158
|
-
expose: __expose,
|
|
3159
|
-
emit: __emit
|
|
3160
|
-
} = _ref;
|
|
3161
|
-
const props = __props;
|
|
3162
|
-
const emits = __emit;
|
|
3163
|
-
const rootDom = useTemplateRef("scroll-root");
|
|
3164
|
-
const manager = useScroll();
|
|
3165
|
-
const classStyleRef = shallowRef();
|
|
3166
|
-
__expose({
|
|
3167
|
-
getStatus() {
|
|
3168
|
-
return manager.getStatus(rootDom.value);
|
|
3169
|
-
},
|
|
3170
|
-
scroll(left, top) {
|
|
3171
|
-
left == void 0 || (rootDom.value.scrollLeft += left);
|
|
3172
|
-
top == void 0 || (rootDom.value.scrollTop += top);
|
|
3173
|
-
},
|
|
3174
|
-
scrollTo(left, top) {
|
|
3175
|
-
left == void 0 || (rootDom.value.scrollLeft = left);
|
|
3176
|
-
top == void 0 || (rootDom.value.scrollTop = top);
|
|
3177
|
-
}
|
|
3178
|
-
});
|
|
3179
|
-
onMounted(() => monitScroll(manager, rootDom.value, props, emits, classStyleRef));
|
|
3180
|
-
return (_ctx, _cache) => {
|
|
3181
|
-
return openBlock(), createElementBlock("div", mergeProps(_ctx.$attrs, {
|
|
3182
|
-
class: ["snail-scroll", classStyleRef.value],
|
|
3183
|
-
ref: "scroll-root"
|
|
3184
|
-
}), [renderSlot(_ctx.$slots, "default")], 16);
|
|
3185
|
-
};
|
|
3186
|
-
}
|
|
3187
|
-
});
|
|
3188
|
-
|
|
3189
|
-
var _sfc_main$d = defineComponent({
|
|
3290
|
+
var _sfc_main$c = defineComponent({
|
|
3190
3291
|
__name: "layout",
|
|
3191
3292
|
props: {
|
|
3192
3293
|
mode: {},
|
|
@@ -3202,34 +3303,45 @@ var _sfc_main$d = defineComponent({
|
|
|
3202
3303
|
const map = Object.create(null);
|
|
3203
3304
|
map.main = {
|
|
3204
3305
|
scrollable: props.main && props.main.scroll != void 0,
|
|
3205
|
-
class:
|
|
3306
|
+
class: buildAreaClass("main-area", props.main),
|
|
3206
3307
|
style: void 0
|
|
3207
3308
|
};
|
|
3208
3309
|
if (props.mode == "vertical") {
|
|
3209
3310
|
map.top = {
|
|
3210
3311
|
scrollable: props.top && props.top.scroll != void 0,
|
|
3211
|
-
class:
|
|
3312
|
+
class: buildAreaClass("top-area", props.top),
|
|
3212
3313
|
style: buildHeightStyle(props.top)
|
|
3213
3314
|
};
|
|
3214
3315
|
map.bottom = {
|
|
3215
3316
|
scrollable: props.bottom && props.bottom.scroll != void 0,
|
|
3216
|
-
class:
|
|
3317
|
+
class: buildAreaClass("bottom-area", props.bottom),
|
|
3217
3318
|
style: buildHeightStyle(props.bottom)
|
|
3218
3319
|
};
|
|
3219
3320
|
} else {
|
|
3220
3321
|
map.left = {
|
|
3221
3322
|
scrollable: props.left && props.left.scroll != void 0,
|
|
3222
|
-
class:
|
|
3323
|
+
class: buildAreaClass("left-area", props.left),
|
|
3223
3324
|
style: buildWidthStyle(props.left)
|
|
3224
3325
|
};
|
|
3225
3326
|
map.right = {
|
|
3226
3327
|
scrollable: props.right && props.right.scroll != void 0,
|
|
3227
|
-
class:
|
|
3328
|
+
class: buildAreaClass("right-area", props.right),
|
|
3228
3329
|
style: buildWidthStyle(props.right)
|
|
3229
3330
|
};
|
|
3230
3331
|
}
|
|
3231
3332
|
return map;
|
|
3232
3333
|
});
|
|
3334
|
+
function buildAreaClass(fixedClass, cssClass) {
|
|
3335
|
+
const classArray = [fixedClass];
|
|
3336
|
+
if (cssClass != void 0) {
|
|
3337
|
+
if (isArray(cssClass.class) == true) {
|
|
3338
|
+
classArray.push(...cssClass.class);
|
|
3339
|
+
} else if (isStringNotEmpty(cssClass.class) == true) {
|
|
3340
|
+
classArray.push(cssClass.class);
|
|
3341
|
+
}
|
|
3342
|
+
}
|
|
3343
|
+
return classArray;
|
|
3344
|
+
}
|
|
3233
3345
|
function buildWidthStyle(style) {
|
|
3234
3346
|
return style ? css.buildStyle({
|
|
3235
3347
|
minWidth: style.minWidth,
|
|
@@ -3252,7 +3364,7 @@ var _sfc_main$d = defineComponent({
|
|
|
3252
3364
|
key: item
|
|
3253
3365
|
}, [areaMap.value[item] && _ctx.$slots[item] ? (openBlock(), createElementBlock(Fragment, {
|
|
3254
3366
|
key: 0
|
|
3255
|
-
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$
|
|
3367
|
+
}, [areaMap.value[item].scrollable ? (openBlock(), createBlock(_sfc_main$t, mergeProps({
|
|
3256
3368
|
key: 0,
|
|
3257
3369
|
class: areaMap.value[item].class,
|
|
3258
3370
|
style: areaMap.value[item].style
|
|
@@ -3271,7 +3383,7 @@ var _sfc_main$d = defineComponent({
|
|
|
3271
3383
|
}
|
|
3272
3384
|
});
|
|
3273
3385
|
|
|
3274
|
-
var _sfc_main$
|
|
3386
|
+
var _sfc_main$b = defineComponent({
|
|
3275
3387
|
...{
|
|
3276
3388
|
name: "Sort",
|
|
3277
3389
|
inheritAttrs: true
|
|
@@ -3375,7 +3487,7 @@ var _sfc_main$c = defineComponent({
|
|
|
3375
3487
|
const _hoisted_1$8 = {
|
|
3376
3488
|
class: "table-body"
|
|
3377
3489
|
};
|
|
3378
|
-
var _sfc_main$
|
|
3490
|
+
var _sfc_main$a = defineComponent({
|
|
3379
3491
|
...{
|
|
3380
3492
|
name: "Table",
|
|
3381
3493
|
inheritAttrs: true
|
|
@@ -3395,7 +3507,7 @@ var _sfc_main$b = defineComponent({
|
|
|
3395
3507
|
const hStyleRef = computed(() => css.buildStyle(props.headerStyle));
|
|
3396
3508
|
const fStyleRef = computed(() => css.buildStyle(props.footerStyle));
|
|
3397
3509
|
return (_ctx, _cache) => {
|
|
3398
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3510
|
+
return openBlock(), createBlock(_sfc_main$t, {
|
|
3399
3511
|
class: normalizeClass(["snail-table", {
|
|
3400
3512
|
"start-border": __props.border == true
|
|
3401
3513
|
}]),
|
|
@@ -3415,7 +3527,7 @@ var _sfc_main$b = defineComponent({
|
|
|
3415
3527
|
}
|
|
3416
3528
|
});
|
|
3417
3529
|
|
|
3418
|
-
var _sfc_main$
|
|
3530
|
+
var _sfc_main$9 = defineComponent({
|
|
3419
3531
|
...{
|
|
3420
3532
|
name: "TableRow",
|
|
3421
3533
|
inheritAttrs: true
|
|
@@ -3438,7 +3550,7 @@ var _sfc_main$a = defineComponent({
|
|
|
3438
3550
|
}
|
|
3439
3551
|
});
|
|
3440
3552
|
|
|
3441
|
-
var _sfc_main$
|
|
3553
|
+
var _sfc_main$8 = defineComponent({
|
|
3442
3554
|
...{
|
|
3443
3555
|
name: "TableCol",
|
|
3444
3556
|
inheritAttrs: true
|
|
@@ -3496,7 +3608,7 @@ const _hoisted_4$2 = {
|
|
|
3496
3608
|
class: "snail-tree-children",
|
|
3497
3609
|
ref: "children"
|
|
3498
3610
|
};
|
|
3499
|
-
var _sfc_main$
|
|
3611
|
+
var _sfc_main$7 = defineComponent({
|
|
3500
3612
|
...{
|
|
3501
3613
|
name: "TreeNode",
|
|
3502
3614
|
inheritAttrs: true
|
|
@@ -3642,7 +3754,7 @@ var _sfc_main$8 = defineComponent({
|
|
|
3642
3754
|
const _hoisted_1$6 = {
|
|
3643
3755
|
class: "snail-tree"
|
|
3644
3756
|
};
|
|
3645
|
-
var _sfc_main$
|
|
3757
|
+
var _sfc_main$6 = defineComponent({
|
|
3646
3758
|
...{
|
|
3647
3759
|
name: "Tree",
|
|
3648
3760
|
inheritAttrs: true
|
|
@@ -3680,11 +3792,11 @@ var _sfc_main$7 = defineComponent({
|
|
|
3680
3792
|
key: 0
|
|
3681
3793
|
}, __props.search, {
|
|
3682
3794
|
onSearch
|
|
3683
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$
|
|
3795
|
+
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$t, {
|
|
3684
3796
|
scroll: "y"
|
|
3685
3797
|
}, {
|
|
3686
3798
|
default: withCtx(() => [(openBlock(true), createElementBlock(Fragment, null, renderList(__props.nodes || [], node => {
|
|
3687
|
-
return openBlock(), createBlock(_sfc_main$
|
|
3799
|
+
return openBlock(), createBlock(_sfc_main$7, {
|
|
3688
3800
|
key: unref(context).getKey(node),
|
|
3689
3801
|
node,
|
|
3690
3802
|
parent: void 0,
|
|
@@ -3705,52 +3817,6 @@ var _sfc_main$7 = defineComponent({
|
|
|
3705
3817
|
}
|
|
3706
3818
|
});
|
|
3707
3819
|
|
|
3708
|
-
var _sfc_main$6 = defineComponent({
|
|
3709
|
-
__name: "wrapper",
|
|
3710
|
-
props: {
|
|
3711
|
-
readonly: {
|
|
3712
|
-
type: Boolean
|
|
3713
|
-
},
|
|
3714
|
-
inPopup: {
|
|
3715
|
-
type: Boolean
|
|
3716
|
-
},
|
|
3717
|
-
header: {},
|
|
3718
|
-
content: {},
|
|
3719
|
-
footer: {}
|
|
3720
|
-
},
|
|
3721
|
-
emits: ["cancel", "confirm"],
|
|
3722
|
-
setup(__props, _ref) {
|
|
3723
|
-
let {
|
|
3724
|
-
emit: __emit
|
|
3725
|
-
} = _ref;
|
|
3726
|
-
const emits = __emit;
|
|
3727
|
-
return (_ctx, _cache) => {
|
|
3728
|
-
return openBlock(), createElementBlock("div", {
|
|
3729
|
-
class: normalizeClass(["snail-wrapper", __props.inPopup ? "in-popup" : "in-normal"])
|
|
3730
|
-
}, [__props.header && __props.header.disabled != true ? (openBlock(), createBlock(_sfc_main$B, mergeProps({
|
|
3731
|
-
key: 0
|
|
3732
|
-
}, __props.header || {
|
|
3733
|
-
useTo: "dialog",
|
|
3734
|
-
title: "对话框"
|
|
3735
|
-
}, {
|
|
3736
|
-
onClose: _cache[0] || (_cache[0] = $event => emits("cancel"))
|
|
3737
|
-
}), null, 16)) : createCommentVNode("", true), createVNode(_sfc_main$e, mergeProps({
|
|
3738
|
-
class: "wrapper-body"
|
|
3739
|
-
}, __props.content || {
|
|
3740
|
-
scroll: "none"
|
|
3741
|
-
}), {
|
|
3742
|
-
default: withCtx(() => [renderSlot(_ctx.$slots, "default")]),
|
|
3743
|
-
_: 3
|
|
3744
|
-
}, 16), __props.footer && __props.readonly != true && __props.footer.disabled != true ? (openBlock(), createBlock(_sfc_main$C, mergeProps({
|
|
3745
|
-
key: 1
|
|
3746
|
-
}, __props.footer || {}, {
|
|
3747
|
-
onCancel: _cache[1] || (_cache[1] = $event => emits("cancel")),
|
|
3748
|
-
onConfirm: _cache[2] || (_cache[2] = $event => emits("confirm"))
|
|
3749
|
-
}), null, 16)) : createCommentVNode("", true)], 2);
|
|
3750
|
-
};
|
|
3751
|
-
}
|
|
3752
|
-
});
|
|
3753
|
-
|
|
3754
3820
|
function mount(target, options, onDestroyed) {
|
|
3755
3821
|
mustObject(options, "options");
|
|
3756
3822
|
target instanceof HTMLElement || throwError("target must be a HTMLElement");
|
|
@@ -4045,7 +4111,7 @@ var _sfc_main$4 = defineComponent({
|
|
|
4045
4111
|
}
|
|
4046
4112
|
onMounted(rebuildItems);
|
|
4047
4113
|
return (_ctx, _cache) => {
|
|
4048
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4114
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
4049
4115
|
class: normalizeClass(["time-picker pc", {
|
|
4050
4116
|
"second-disabled": unref(format) != "HH:mm:ss"
|
|
4051
4117
|
}]),
|
|
@@ -4345,7 +4411,7 @@ var _sfc_main$3 = defineComponent({
|
|
|
4345
4411
|
dateRef.value == void 0 && (dateRef.value = electDateValue());
|
|
4346
4412
|
buildPickerItems(stepRef.value, 0);
|
|
4347
4413
|
return (_ctx, _cache) => {
|
|
4348
|
-
return openBlock(), createBlock(_sfc_main$
|
|
4414
|
+
return openBlock(), createBlock(_sfc_main$c, {
|
|
4349
4415
|
class: normalizeClass(["date-picker pc", {
|
|
4350
4416
|
"time-now": __props.pinned && __props.pinned.value == true
|
|
4351
4417
|
}]),
|
|
@@ -4795,7 +4861,7 @@ var _sfc_main = defineComponent({
|
|
|
4795
4861
|
});
|
|
4796
4862
|
|
|
4797
4863
|
const components = {
|
|
4798
|
-
Action: _sfc_main$
|
|
4864
|
+
Action: _sfc_main$g,
|
|
4799
4865
|
Button: _sfc_main$F,
|
|
4800
4866
|
Choose: _sfc_main$D,
|
|
4801
4867
|
Footer: _sfc_main$C,
|
|
@@ -4804,27 +4870,27 @@ const components = {
|
|
|
4804
4870
|
Input: _sfc_main$A,
|
|
4805
4871
|
Number: _sfc_main$z,
|
|
4806
4872
|
Search: _sfc_main$y,
|
|
4807
|
-
Select: _sfc_main$
|
|
4808
|
-
Switch: _sfc_main$
|
|
4809
|
-
Textarea: _sfc_main$
|
|
4873
|
+
Select: _sfc_main$k,
|
|
4874
|
+
Switch: _sfc_main$j,
|
|
4875
|
+
Textarea: _sfc_main$i,
|
|
4810
4876
|
Dynamic: _sfc_main$u,
|
|
4811
|
-
Elastic: _sfc_main$
|
|
4812
|
-
Flex: _sfc_main$
|
|
4813
|
-
Fold: _sfc_main$
|
|
4877
|
+
Elastic: _sfc_main$f,
|
|
4878
|
+
Flex: _sfc_main$e,
|
|
4879
|
+
Fold: _sfc_main$d,
|
|
4814
4880
|
Motion: _sfc_main$w,
|
|
4815
|
-
Layout: _sfc_main$
|
|
4816
|
-
Scroll: _sfc_main$
|
|
4817
|
-
Sort: _sfc_main$
|
|
4818
|
-
Table: _sfc_main$
|
|
4819
|
-
TableRow: _sfc_main$
|
|
4820
|
-
TableCol: _sfc_main$
|
|
4821
|
-
Tree: _sfc_main$
|
|
4822
|
-
Wrapper: _sfc_main$
|
|
4881
|
+
Layout: _sfc_main$c,
|
|
4882
|
+
Scroll: _sfc_main$t,
|
|
4883
|
+
Sort: _sfc_main$b,
|
|
4884
|
+
Table: _sfc_main$a,
|
|
4885
|
+
TableRow: _sfc_main$9,
|
|
4886
|
+
TableCol: _sfc_main$8,
|
|
4887
|
+
Tree: _sfc_main$6,
|
|
4888
|
+
Wrapper: _sfc_main$s,
|
|
4823
4889
|
FlashNumber: _sfc_main$5,
|
|
4824
4890
|
DatePicker: _sfc_main$2,
|
|
4825
4891
|
TimePicker: _sfc_main$1,
|
|
4826
4892
|
DragVerify: _sfc_main,
|
|
4827
|
-
Empty: _sfc_main$
|
|
4893
|
+
Empty: _sfc_main$n,
|
|
4828
4894
|
Loading: _sfc_main$v
|
|
4829
4895
|
};
|
|
4830
4896
|
|