jky-component-lib 0.0.37 → 0.0.45
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/es/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/es/components.d.ts +1 -0
- package/dist/es/components.js +4 -1
- package/dist/es/form/Form.vue.d.ts +237 -0
- package/dist/es/form/Form.vue.js +178 -0
- package/dist/es/form/Form.vue3.js +5 -0
- package/dist/es/form/FormItem.vue.d.ts +6 -0
- package/dist/es/form/FormItem.vue.js +243 -0
- package/dist/es/form/FormItem.vue3.js +5 -0
- package/dist/es/form/index.d.ts +4 -0
- package/dist/es/form/index.js +8 -0
- package/dist/es/form/style.css +14 -0
- package/dist/es/index.js +2 -0
- package/dist/es/menu/Aside.vue.d.ts +17 -0
- package/dist/es/menu/Aside.vue.js +26 -0
- package/dist/es/menu/Menu.vue.d.ts +6 -17
- package/dist/es/menu/Menu.vue.js +25 -7
- package/dist/es/package.json.js +1 -1
- package/dist/es/page-header/PageHeader.vue.js +1 -1
- package/dist/es/page-header/PopoverMenu.vue.d.ts +4 -3
- package/dist/es/page-header/PopoverMenu.vue.js +4 -4
- package/dist/es/style.css +165 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +10 -0
- package/dist/lib/components.d.ts +1 -0
- package/dist/lib/components.js +12 -9
- package/dist/lib/form/Form.vue.d.ts +237 -0
- package/dist/lib/form/Form.vue.js +178 -0
- package/dist/lib/form/Form.vue3.js +5 -0
- package/dist/lib/form/FormItem.vue.d.ts +6 -0
- package/dist/lib/form/FormItem.vue.js +243 -0
- package/dist/lib/form/FormItem.vue3.js +5 -0
- package/dist/lib/form/index.d.ts +4 -0
- package/dist/lib/form/index.js +8 -0
- package/dist/lib/form/style.css +14 -0
- package/dist/lib/index.js +8 -6
- package/dist/lib/menu/Aside.vue.d.ts +17 -0
- package/dist/lib/menu/Aside.vue.js +26 -0
- package/dist/lib/menu/Menu.vue.d.ts +6 -17
- package/dist/lib/menu/Menu.vue.js +24 -6
- package/dist/lib/package.json.js +1 -1
- package/dist/lib/page-header/PageHeader.vue.js +1 -1
- package/dist/lib/page-header/PopoverMenu.vue.d.ts +4 -3
- package/dist/lib/page-header/PopoverMenu.vue.js +4 -4
- package/dist/lib/style.css +165 -0
- package/dist/umd/index.js +637 -29
- package/package.json +1 -1
package/dist/umd/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
(function(global, factory) {
|
|
2
|
-
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("element-plus")) : typeof define === "function" && define.amd ? define(["exports", "vue", "element-plus"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.JkyComponentLib = {}, global.Vue, global.ElementPlus));
|
|
3
|
-
})(this, (function(exports2, vue, ElementPlus) {
|
|
2
|
+
typeof exports === "object" && typeof module !== "undefined" ? factory(exports, require("vue"), require("element-plus"), require("element-plus/es"), require("element-plus/es/components/base/style/css"), require("element-plus/es/components/aside/style/css"), require("element-plus/es/components/scrollbar/style/css")) : typeof define === "function" && define.amd ? define(["exports", "vue", "element-plus", "element-plus/es", "element-plus/es/components/base/style/css", "element-plus/es/components/aside/style/css", "element-plus/es/components/scrollbar/style/css"], factory) : (global = typeof globalThis !== "undefined" ? globalThis : global || self, factory(global.JkyComponentLib = {}, global.Vue, global.ElementPlus, global.es));
|
|
3
|
+
})(this, (function(exports2, vue, ElementPlus, es) {
|
|
4
4
|
"use strict";var __defProp = Object.defineProperty;
|
|
5
5
|
var __defProps = Object.defineProperties;
|
|
6
6
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
@@ -20,6 +20,26 @@ var __spreadValues = (a, b) => {
|
|
|
20
20
|
return a;
|
|
21
21
|
};
|
|
22
22
|
var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
|
|
23
|
+
var __async = (__this, __arguments, generator) => {
|
|
24
|
+
return new Promise((resolve, reject) => {
|
|
25
|
+
var fulfilled = (value) => {
|
|
26
|
+
try {
|
|
27
|
+
step(generator.next(value));
|
|
28
|
+
} catch (e) {
|
|
29
|
+
reject(e);
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
var rejected = (value) => {
|
|
33
|
+
try {
|
|
34
|
+
step(generator.throw(value));
|
|
35
|
+
} catch (e) {
|
|
36
|
+
reject(e);
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
var step = (x) => x.done ? resolve(x.value) : Promise.resolve(x.value).then(fulfilled, rejected);
|
|
40
|
+
step((generator = generator.apply(__this, __arguments)).next());
|
|
41
|
+
});
|
|
42
|
+
};
|
|
23
43
|
|
|
24
44
|
var __vite_style__ = document.createElement("style");
|
|
25
45
|
__vite_style__.textContent = `
|
|
@@ -243,6 +263,34 @@ to {
|
|
|
243
263
|
.jky-button-nav-dropdown {
|
|
244
264
|
/* 不覆盖任何样式,保持 el-dropdown-menu 默认样式 */
|
|
245
265
|
}
|
|
266
|
+
/* Form 组件样式 */
|
|
267
|
+
.jky-form {
|
|
268
|
+
/* 表单容器样式 */
|
|
269
|
+
}
|
|
270
|
+
.jky-form__title {
|
|
271
|
+
/* 表单标题样式 */
|
|
272
|
+
}
|
|
273
|
+
/* FormItem 组件样式 */
|
|
274
|
+
.jky-form-item {
|
|
275
|
+
/* 表单项容器样式 */
|
|
276
|
+
}
|
|
277
|
+
.jky-form-item__title {
|
|
278
|
+
/* 表单项标题样式(无 label 时) */
|
|
279
|
+
}
|
|
280
|
+
/* Form 组件样式 */
|
|
281
|
+
.jky-form {
|
|
282
|
+
/* 表单容器样式 */
|
|
283
|
+
}
|
|
284
|
+
.jky-form__title {
|
|
285
|
+
/* 表单标题样式 */
|
|
286
|
+
}
|
|
287
|
+
/* FormItem 组件样式 */
|
|
288
|
+
.jky-form-item {
|
|
289
|
+
/* 表单项容器样式 */
|
|
290
|
+
}
|
|
291
|
+
.jky-form-item__title {
|
|
292
|
+
/* 表单项标题样式(无 label 时) */
|
|
293
|
+
}
|
|
246
294
|
/* Menu 组件样式 - 使用 CSS 变量实现主题化 */
|
|
247
295
|
|
|
248
296
|
/* 1. 定义 CSS 变量 */
|
|
@@ -500,6 +548,19 @@ img {
|
|
|
500
548
|
--tw-border-style: solid;
|
|
501
549
|
--tw-font-weight: initial;
|
|
502
550
|
--tw-outline-style: solid;
|
|
551
|
+
--tw-blur: initial;
|
|
552
|
+
--tw-brightness: initial;
|
|
553
|
+
--tw-contrast: initial;
|
|
554
|
+
--tw-grayscale: initial;
|
|
555
|
+
--tw-hue-rotate: initial;
|
|
556
|
+
--tw-invert: initial;
|
|
557
|
+
--tw-opacity: initial;
|
|
558
|
+
--tw-saturate: initial;
|
|
559
|
+
--tw-sepia: initial;
|
|
560
|
+
--tw-drop-shadow: initial;
|
|
561
|
+
--tw-drop-shadow-color: initial;
|
|
562
|
+
--tw-drop-shadow-alpha: 100%;
|
|
563
|
+
--tw-drop-shadow-size: initial;
|
|
503
564
|
}
|
|
504
565
|
}
|
|
505
566
|
}
|
|
@@ -512,9 +573,11 @@ img {
|
|
|
512
573
|
"Courier New", monospace;
|
|
513
574
|
--color-red-500: oklch(63.7% .237 25.331);
|
|
514
575
|
--color-green-500: oklch(72.3% .219 149.579);
|
|
576
|
+
--color-blue-500: oklch(62.3% .214 259.815);
|
|
515
577
|
--color-blue-600: oklch(54.6% .245 262.881);
|
|
516
578
|
--color-purple-500: oklch(62.7% .265 303.9);
|
|
517
579
|
--color-gray-100: oklch(96.7% .003 264.542);
|
|
580
|
+
--color-gray-300: oklch(87.2% .01 258.338);
|
|
518
581
|
--color-gray-600: oklch(44.6% .03 256.802);
|
|
519
582
|
--color-white: #fff;
|
|
520
583
|
--spacing: .25rem;
|
|
@@ -528,7 +591,9 @@ img {
|
|
|
528
591
|
--text-xl--line-height: calc(1.75 / 1.25);
|
|
529
592
|
--text-2xl: 1.5rem;
|
|
530
593
|
--text-2xl--line-height: calc(2 / 1.5);
|
|
594
|
+
--font-weight-medium: 500;
|
|
531
595
|
--font-weight-semibold: 600;
|
|
596
|
+
--radius-md: .375rem;
|
|
532
597
|
--default-transition-duration: .15s;
|
|
533
598
|
--default-transition-timing-function: cubic-bezier(.4, 0, .2, 1);
|
|
534
599
|
--default-font-family: var(--font-sans);
|
|
@@ -790,6 +855,10 @@ img {
|
|
|
790
855
|
visibility: collapse;
|
|
791
856
|
}
|
|
792
857
|
|
|
858
|
+
.fixed {
|
|
859
|
+
position: fixed;
|
|
860
|
+
}
|
|
861
|
+
|
|
793
862
|
.sticky {
|
|
794
863
|
position: sticky;
|
|
795
864
|
}
|
|
@@ -798,10 +867,26 @@ img {
|
|
|
798
867
|
inset-inline-start: var(--spacing);
|
|
799
868
|
}
|
|
800
869
|
|
|
870
|
+
.top-0 {
|
|
871
|
+
top: calc(var(--spacing) * 0);
|
|
872
|
+
}
|
|
873
|
+
|
|
801
874
|
.top-2 {
|
|
802
875
|
top: calc(var(--spacing) * 2);
|
|
803
876
|
}
|
|
804
877
|
|
|
878
|
+
.left-0 {
|
|
879
|
+
left: calc(var(--spacing) * 0);
|
|
880
|
+
}
|
|
881
|
+
|
|
882
|
+
.z-999 {
|
|
883
|
+
z-index: 999;
|
|
884
|
+
}
|
|
885
|
+
|
|
886
|
+
.mt-4 {
|
|
887
|
+
margin-top: calc(var(--spacing) * 4);
|
|
888
|
+
}
|
|
889
|
+
|
|
805
890
|
.mr-2 {
|
|
806
891
|
margin-right: calc(var(--spacing) * 2);
|
|
807
892
|
}
|
|
@@ -1370,6 +1455,10 @@ img {
|
|
|
1370
1455
|
width: calc(var(--spacing) * 20);
|
|
1371
1456
|
}
|
|
1372
1457
|
|
|
1458
|
+
.w-fit {
|
|
1459
|
+
width: fit-content;
|
|
1460
|
+
}
|
|
1461
|
+
|
|
1373
1462
|
.w-fit\\! {
|
|
1374
1463
|
width: fit-content !important;
|
|
1375
1464
|
}
|
|
@@ -1378,6 +1467,10 @@ img {
|
|
|
1378
1467
|
width: 100%;
|
|
1379
1468
|
}
|
|
1380
1469
|
|
|
1470
|
+
.flex-1 {
|
|
1471
|
+
flex: 1;
|
|
1472
|
+
}
|
|
1473
|
+
|
|
1381
1474
|
.transform {
|
|
1382
1475
|
transform: var(--tw-rotate-x, ) var(--tw-rotate-y, ) var(--tw-rotate-z, ) var(--tw-skew-x, ) var(--tw-skew-y, );
|
|
1383
1476
|
}
|
|
@@ -1406,6 +1499,10 @@ img {
|
|
|
1406
1499
|
justify-content: space-around;
|
|
1407
1500
|
}
|
|
1408
1501
|
|
|
1502
|
+
.justify-end {
|
|
1503
|
+
justify-content: flex-end;
|
|
1504
|
+
}
|
|
1505
|
+
|
|
1409
1506
|
.gap-2 {
|
|
1410
1507
|
gap: calc(var(--spacing) * 2);
|
|
1411
1508
|
}
|
|
@@ -1426,10 +1523,18 @@ img {
|
|
|
1426
1523
|
margin-block-end: calc(calc(var(--spacing) * 6) * calc(1 - var(--tw-space-y-reverse)));
|
|
1427
1524
|
}
|
|
1428
1525
|
|
|
1526
|
+
.rounded {
|
|
1527
|
+
border-radius: .25rem;
|
|
1528
|
+
}
|
|
1529
|
+
|
|
1429
1530
|
.rounded-full {
|
|
1430
1531
|
border-radius: 3.40282e38px;
|
|
1431
1532
|
}
|
|
1432
1533
|
|
|
1534
|
+
.rounded-md {
|
|
1535
|
+
border-radius: var(--radius-md);
|
|
1536
|
+
}
|
|
1537
|
+
|
|
1433
1538
|
.border {
|
|
1434
1539
|
border-style: var(--tw-border-style);
|
|
1435
1540
|
border-width: 1px;
|
|
@@ -1439,10 +1544,22 @@ img {
|
|
|
1439
1544
|
background-color: var(--my-var);
|
|
1440
1545
|
}
|
|
1441
1546
|
|
|
1547
|
+
.bg-blue-500 {
|
|
1548
|
+
background-color: var(--color-blue-500);
|
|
1549
|
+
}
|
|
1550
|
+
|
|
1551
|
+
.bg-gray-100 {
|
|
1552
|
+
background-color: var(--color-gray-100);
|
|
1553
|
+
}
|
|
1554
|
+
|
|
1442
1555
|
.bg-gray-100\\! {
|
|
1443
1556
|
background-color: var(--color-gray-100) !important;
|
|
1444
1557
|
}
|
|
1445
1558
|
|
|
1559
|
+
.bg-gray-300 {
|
|
1560
|
+
background-color: var(--color-gray-300);
|
|
1561
|
+
}
|
|
1562
|
+
|
|
1446
1563
|
.bg-green-500\\! {
|
|
1447
1564
|
background-color: var(--color-green-500) !important;
|
|
1448
1565
|
}
|
|
@@ -1455,6 +1572,10 @@ img {
|
|
|
1455
1572
|
background-color: var(--color-red-500) !important;
|
|
1456
1573
|
}
|
|
1457
1574
|
|
|
1575
|
+
.bg-white {
|
|
1576
|
+
background-color: var(--color-white);
|
|
1577
|
+
}
|
|
1578
|
+
|
|
1458
1579
|
.p-2 {
|
|
1459
1580
|
padding: calc(var(--spacing) * 2);
|
|
1460
1581
|
}
|
|
@@ -1463,6 +1584,22 @@ img {
|
|
|
1463
1584
|
padding: calc(var(--spacing) * 4);
|
|
1464
1585
|
}
|
|
1465
1586
|
|
|
1587
|
+
.px-4 {
|
|
1588
|
+
padding-inline: calc(var(--spacing) * 4);
|
|
1589
|
+
}
|
|
1590
|
+
|
|
1591
|
+
.py-2 {
|
|
1592
|
+
padding-block: calc(var(--spacing) * 2);
|
|
1593
|
+
}
|
|
1594
|
+
|
|
1595
|
+
.pr-0 {
|
|
1596
|
+
padding-right: calc(var(--spacing) * 0);
|
|
1597
|
+
}
|
|
1598
|
+
|
|
1599
|
+
.pb-0 {
|
|
1600
|
+
padding-bottom: calc(var(--spacing) * 0);
|
|
1601
|
+
}
|
|
1602
|
+
|
|
1466
1603
|
.text-center {
|
|
1467
1604
|
text-align: center;
|
|
1468
1605
|
}
|
|
@@ -1492,6 +1629,11 @@ img {
|
|
|
1492
1629
|
line-height: var(--tw-leading, var(--text-xl--line-height));
|
|
1493
1630
|
}
|
|
1494
1631
|
|
|
1632
|
+
.font-medium {
|
|
1633
|
+
--tw-font-weight: var(--font-weight-medium);
|
|
1634
|
+
font-weight: var(--font-weight-medium);
|
|
1635
|
+
}
|
|
1636
|
+
|
|
1495
1637
|
.font-semibold {
|
|
1496
1638
|
--tw-font-weight: var(--font-weight-semibold);
|
|
1497
1639
|
font-weight: var(--font-weight-semibold);
|
|
@@ -1534,6 +1676,11 @@ img {
|
|
|
1534
1676
|
outline-width: 1px;
|
|
1535
1677
|
}
|
|
1536
1678
|
|
|
1679
|
+
.blur {
|
|
1680
|
+
--tw-blur: blur(8px);
|
|
1681
|
+
filter: var(--tw-blur, ) var(--tw-brightness, ) var(--tw-contrast, ) var(--tw-grayscale, ) var(--tw-hue-rotate, ) var(--tw-invert, ) var(--tw-saturate, ) var(--tw-sepia, ) var(--tw-drop-shadow, );
|
|
1682
|
+
}
|
|
1683
|
+
|
|
1537
1684
|
.transition {
|
|
1538
1685
|
transition-property: color, background-color, border-color, outline-color, text-decoration-color, fill, stroke, --tw-gradient-from, --tw-gradient-via, --tw-gradient-to, opacity, box-shadow, transform, translate, scale, rotate, filter, -webkit-backdrop-filter, backdrop-filter, display, content-visibility, overlay, pointer-events;
|
|
1539
1686
|
transition-timing-function: var(--tw-ease, var(--default-transition-timing-function));
|
|
@@ -1608,9 +1755,75 @@ img {
|
|
|
1608
1755
|
inherits: false;
|
|
1609
1756
|
initial-value: solid;
|
|
1610
1757
|
}
|
|
1758
|
+
|
|
1759
|
+
@property --tw-blur {
|
|
1760
|
+
syntax: "*";
|
|
1761
|
+
inherits: false
|
|
1762
|
+
}
|
|
1763
|
+
|
|
1764
|
+
@property --tw-brightness {
|
|
1765
|
+
syntax: "*";
|
|
1766
|
+
inherits: false
|
|
1767
|
+
}
|
|
1768
|
+
|
|
1769
|
+
@property --tw-contrast {
|
|
1770
|
+
syntax: "*";
|
|
1771
|
+
inherits: false
|
|
1772
|
+
}
|
|
1773
|
+
|
|
1774
|
+
@property --tw-grayscale {
|
|
1775
|
+
syntax: "*";
|
|
1776
|
+
inherits: false
|
|
1777
|
+
}
|
|
1778
|
+
|
|
1779
|
+
@property --tw-hue-rotate {
|
|
1780
|
+
syntax: "*";
|
|
1781
|
+
inherits: false
|
|
1782
|
+
}
|
|
1783
|
+
|
|
1784
|
+
@property --tw-invert {
|
|
1785
|
+
syntax: "*";
|
|
1786
|
+
inherits: false
|
|
1787
|
+
}
|
|
1788
|
+
|
|
1789
|
+
@property --tw-opacity {
|
|
1790
|
+
syntax: "*";
|
|
1791
|
+
inherits: false
|
|
1792
|
+
}
|
|
1793
|
+
|
|
1794
|
+
@property --tw-saturate {
|
|
1795
|
+
syntax: "*";
|
|
1796
|
+
inherits: false
|
|
1797
|
+
}
|
|
1798
|
+
|
|
1799
|
+
@property --tw-sepia {
|
|
1800
|
+
syntax: "*";
|
|
1801
|
+
inherits: false
|
|
1802
|
+
}
|
|
1803
|
+
|
|
1804
|
+
@property --tw-drop-shadow {
|
|
1805
|
+
syntax: "*";
|
|
1806
|
+
inherits: false
|
|
1807
|
+
}
|
|
1808
|
+
|
|
1809
|
+
@property --tw-drop-shadow-color {
|
|
1810
|
+
syntax: "*";
|
|
1811
|
+
inherits: false
|
|
1812
|
+
}
|
|
1813
|
+
|
|
1814
|
+
@property --tw-drop-shadow-alpha {
|
|
1815
|
+
syntax: "<percentage>";
|
|
1816
|
+
inherits: false;
|
|
1817
|
+
initial-value: 100%;
|
|
1818
|
+
}
|
|
1819
|
+
|
|
1820
|
+
@property --tw-drop-shadow-size {
|
|
1821
|
+
syntax: "*";
|
|
1822
|
+
inherits: false
|
|
1823
|
+
}
|
|
1611
1824
|
/*$vite$:1*/`;
|
|
1612
1825
|
document.head.appendChild(__vite_style__);
|
|
1613
|
-
const version$1 = "0.0.
|
|
1826
|
+
const version$1 = "0.0.45";
|
|
1614
1827
|
const INSTALLED_KEY = Symbol("INSTALLED_KEY");
|
|
1615
1828
|
function createInstaller(components2 = []) {
|
|
1616
1829
|
const install2 = (app, options) => {
|
|
@@ -1636,20 +1849,20 @@ img {
|
|
|
1636
1849
|
});
|
|
1637
1850
|
return main;
|
|
1638
1851
|
}
|
|
1639
|
-
const _hoisted_1$
|
|
1640
|
-
const _hoisted_2$
|
|
1852
|
+
const _hoisted_1$5 = ["disabled"];
|
|
1853
|
+
const _hoisted_2$3 = {
|
|
1641
1854
|
key: 0,
|
|
1642
1855
|
class: "jky-button__loading"
|
|
1643
1856
|
};
|
|
1644
|
-
const _hoisted_3$
|
|
1857
|
+
const _hoisted_3$3 = {
|
|
1645
1858
|
key: 0,
|
|
1646
1859
|
class: "jky-button__icon"
|
|
1647
1860
|
};
|
|
1648
|
-
const _hoisted_4$
|
|
1861
|
+
const _hoisted_4$3 = {
|
|
1649
1862
|
key: 1,
|
|
1650
1863
|
class: "jky-button__icon"
|
|
1651
1864
|
};
|
|
1652
|
-
const _sfc_main$
|
|
1865
|
+
const _sfc_main$8 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
1653
1866
|
name: "JkyButton"
|
|
1654
1867
|
}), {
|
|
1655
1868
|
__name: "Button",
|
|
@@ -1682,7 +1895,7 @@ img {
|
|
|
1682
1895
|
disabled: __props.disabled || __props.loading,
|
|
1683
1896
|
onClick: handleClick
|
|
1684
1897
|
}, [
|
|
1685
|
-
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$
|
|
1898
|
+
__props.loading ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_2$3, [..._cache[0] || (_cache[0] = [
|
|
1686
1899
|
vue.createElementVNode("svg", {
|
|
1687
1900
|
class: "loading-spinner",
|
|
1688
1901
|
viewBox: "0 0 50 50"
|
|
@@ -1708,7 +1921,7 @@ img {
|
|
|
1708
1921
|
])
|
|
1709
1922
|
], -1)
|
|
1710
1923
|
])])) : __props.icon ? (vue.openBlock(), vue.createElementBlock(vue.Fragment, { key: 1 }, [
|
|
1711
|
-
__props.iconPosition === "prefix" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$
|
|
1924
|
+
__props.iconPosition === "prefix" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$3, [
|
|
1712
1925
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1713
1926
|
vue.createElementVNode("span", {
|
|
1714
1927
|
class: vue.normalizeClass(__props.icon)
|
|
@@ -1716,7 +1929,7 @@ img {
|
|
|
1716
1929
|
])
|
|
1717
1930
|
])) : vue.createCommentVNode("", true),
|
|
1718
1931
|
vue.renderSlot(_ctx.$slots, "default"),
|
|
1719
|
-
__props.iconPosition === "suffix" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$
|
|
1932
|
+
__props.iconPosition === "suffix" ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$3, [
|
|
1720
1933
|
vue.renderSlot(_ctx.$slots, "icon", {}, () => [
|
|
1721
1934
|
vue.createElementVNode("span", {
|
|
1722
1935
|
class: vue.normalizeClass(__props.icon)
|
|
@@ -1727,13 +1940,13 @@ img {
|
|
|
1727
1940
|
vue.renderSlot(_ctx.$slots, "icon"),
|
|
1728
1941
|
vue.renderSlot(_ctx.$slots, "default")
|
|
1729
1942
|
], 64))
|
|
1730
|
-
], 10, _hoisted_1$
|
|
1943
|
+
], 10, _hoisted_1$5);
|
|
1731
1944
|
};
|
|
1732
1945
|
}
|
|
1733
1946
|
}));
|
|
1734
|
-
const JkyButton = installWithSFC(_sfc_main$
|
|
1735
|
-
const _hoisted_1$
|
|
1736
|
-
const _sfc_main$
|
|
1947
|
+
const JkyButton = installWithSFC(_sfc_main$8);
|
|
1948
|
+
const _hoisted_1$4 = { class: "jky-button-nav flex flex-wrap items-center gap-2" };
|
|
1949
|
+
const _sfc_main$7 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
1737
1950
|
name: "JkyButtonNav"
|
|
1738
1951
|
}), {
|
|
1739
1952
|
__name: "ButtonNav",
|
|
@@ -1774,7 +1987,7 @@ img {
|
|
|
1774
1987
|
}
|
|
1775
1988
|
}
|
|
1776
1989
|
return (_ctx, _cache) => {
|
|
1777
|
-
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$
|
|
1990
|
+
return vue.openBlock(), vue.createElementBlock("div", _hoisted_1$4, [
|
|
1778
1991
|
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(visibleItems.value, (item) => {
|
|
1779
1992
|
return vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElButton), {
|
|
1780
1993
|
key: item.value,
|
|
@@ -1854,15 +2067,390 @@ img {
|
|
|
1854
2067
|
};
|
|
1855
2068
|
}
|
|
1856
2069
|
}));
|
|
1857
|
-
const JkyButtonNav = installWithSFC(_sfc_main$
|
|
1858
|
-
const
|
|
1859
|
-
|
|
2070
|
+
const JkyButtonNav = installWithSFC(_sfc_main$7);
|
|
2071
|
+
const _hoisted_1$3 = {
|
|
2072
|
+
key: 0,
|
|
2073
|
+
class: "jky-form-item__title mb-2 text-base font-medium"
|
|
2074
|
+
};
|
|
2075
|
+
const _hoisted_2$2 = {
|
|
2076
|
+
key: 0,
|
|
2077
|
+
class: "flex items-center"
|
|
2078
|
+
};
|
|
2079
|
+
const _hoisted_3$2 = {
|
|
2080
|
+
key: 0,
|
|
2081
|
+
class: "mr-2"
|
|
2082
|
+
};
|
|
2083
|
+
const _hoisted_4$2 = {
|
|
2084
|
+
key: 1,
|
|
2085
|
+
class: "ml-2"
|
|
2086
|
+
};
|
|
2087
|
+
const _sfc_main$6 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
2088
|
+
name: "JkyFormItem",
|
|
1860
2089
|
inheritAttrs: false
|
|
2090
|
+
}), {
|
|
2091
|
+
__name: "FormItem",
|
|
2092
|
+
props: {
|
|
2093
|
+
field: {},
|
|
2094
|
+
config: {},
|
|
2095
|
+
model: {},
|
|
2096
|
+
readonly: { type: Boolean, default: false },
|
|
2097
|
+
disabled: { type: Boolean, default: false },
|
|
2098
|
+
label: {},
|
|
2099
|
+
labelWidth: {},
|
|
2100
|
+
labelPosition: {},
|
|
2101
|
+
prop: {},
|
|
2102
|
+
required: { type: Boolean },
|
|
2103
|
+
rules: {},
|
|
2104
|
+
error: {},
|
|
2105
|
+
validateStatus: {},
|
|
2106
|
+
for: {},
|
|
2107
|
+
inlineMessage: { type: Boolean },
|
|
2108
|
+
showMessage: { type: Boolean },
|
|
2109
|
+
size: {}
|
|
2110
|
+
},
|
|
2111
|
+
setup(__props) {
|
|
2112
|
+
const props = __props;
|
|
2113
|
+
const componentProps = vue.computed(() => {
|
|
2114
|
+
const configProps = props.config.componentProps;
|
|
2115
|
+
if (!configProps) {
|
|
2116
|
+
return {};
|
|
2117
|
+
}
|
|
2118
|
+
if (typeof configProps === "function") {
|
|
2119
|
+
return configProps({
|
|
2120
|
+
model: props.model,
|
|
2121
|
+
field: props.field,
|
|
2122
|
+
$form: props.model
|
|
2123
|
+
});
|
|
2124
|
+
}
|
|
2125
|
+
return configProps;
|
|
2126
|
+
});
|
|
2127
|
+
const modelValue = vue.computed({
|
|
2128
|
+
get: () => props.model[props.field],
|
|
2129
|
+
set: (_val) => {
|
|
2130
|
+
}
|
|
2131
|
+
});
|
|
2132
|
+
const isHidden = vue.computed(() => {
|
|
2133
|
+
if (typeof props.config.hidden === "function") {
|
|
2134
|
+
return props.config.hidden({
|
|
2135
|
+
model: props.model,
|
|
2136
|
+
field: props.field,
|
|
2137
|
+
$form: props.model
|
|
2138
|
+
});
|
|
2139
|
+
}
|
|
2140
|
+
return props.config.hidden || false;
|
|
2141
|
+
});
|
|
2142
|
+
const spanClass = vue.computed(() => {
|
|
2143
|
+
const span = props.config.span || 12;
|
|
2144
|
+
return `col-span-${span}`;
|
|
2145
|
+
});
|
|
2146
|
+
function renderComponent(type) {
|
|
2147
|
+
var _a, _b, _c;
|
|
2148
|
+
const commonProps = __spreadValues({
|
|
2149
|
+
"modelValue": modelValue.value,
|
|
2150
|
+
"onUpdate:modelValue": (_val) => {
|
|
2151
|
+
},
|
|
2152
|
+
"placeholder": props.config.placeholder,
|
|
2153
|
+
"disabled": props.disabled || props.config.disabled || props.readonly,
|
|
2154
|
+
"clearable": (_a = props.config.clearable) != null ? _a : true
|
|
2155
|
+
}, componentProps.value);
|
|
2156
|
+
switch (type) {
|
|
2157
|
+
case "input":
|
|
2158
|
+
return vue.h(ElementPlus.ElInput, __spreadProps(__spreadValues({}, commonProps), {
|
|
2159
|
+
prefixIcon: props.config.prefixIcon,
|
|
2160
|
+
suffixIcon: props.config.suffixIcon
|
|
2161
|
+
}));
|
|
2162
|
+
case "textarea":
|
|
2163
|
+
return vue.h(ElementPlus.ElInput, __spreadProps(__spreadValues({}, commonProps), {
|
|
2164
|
+
type: "textarea",
|
|
2165
|
+
rows: 4
|
|
2166
|
+
}));
|
|
2167
|
+
case "select": {
|
|
2168
|
+
const options = props.config.options || [];
|
|
2169
|
+
return vue.h(
|
|
2170
|
+
ElementPlus.ElSelect,
|
|
2171
|
+
__spreadProps(__spreadValues({}, commonProps), {
|
|
2172
|
+
multiple: props.config.multiple,
|
|
2173
|
+
filterable: props.config.filterable
|
|
2174
|
+
}),
|
|
2175
|
+
{
|
|
2176
|
+
default: () => options.map(
|
|
2177
|
+
(option) => vue.h(ElementPlus.ElOption, {
|
|
2178
|
+
key: option.value,
|
|
2179
|
+
label: option.label,
|
|
2180
|
+
value: option.value,
|
|
2181
|
+
disabled: option.disabled
|
|
2182
|
+
})
|
|
2183
|
+
)
|
|
2184
|
+
}
|
|
2185
|
+
);
|
|
2186
|
+
}
|
|
2187
|
+
case "datepicker":
|
|
2188
|
+
return vue.h(ElementPlus.ElDatePicker, __spreadProps(__spreadValues({}, commonProps), {
|
|
2189
|
+
type: "date"
|
|
2190
|
+
}));
|
|
2191
|
+
case "datetime-picker":
|
|
2192
|
+
return vue.h(ElementPlus.ElDatePicker, __spreadProps(__spreadValues({}, commonProps), {
|
|
2193
|
+
type: "datetime"
|
|
2194
|
+
}));
|
|
2195
|
+
case "time-picker":
|
|
2196
|
+
return vue.h(ElementPlus.ElTimePicker, __spreadValues({}, commonProps));
|
|
2197
|
+
case "time-select":
|
|
2198
|
+
return vue.h(ElementPlus.ElTimeSelect, __spreadValues({}, commonProps));
|
|
2199
|
+
case "radio-group": {
|
|
2200
|
+
const options = props.config.options || [];
|
|
2201
|
+
return vue.h(
|
|
2202
|
+
ElementPlus.ElRadioGroup,
|
|
2203
|
+
__spreadValues({}, commonProps),
|
|
2204
|
+
{
|
|
2205
|
+
default: () => options.map(
|
|
2206
|
+
(option) => vue.h(ElementPlus.ElRadio, {
|
|
2207
|
+
key: option.value,
|
|
2208
|
+
label: option.value,
|
|
2209
|
+
disabled: option.disabled
|
|
2210
|
+
}, {
|
|
2211
|
+
default: () => option.label
|
|
2212
|
+
})
|
|
2213
|
+
)
|
|
2214
|
+
}
|
|
2215
|
+
);
|
|
2216
|
+
}
|
|
2217
|
+
case "checkbox-group": {
|
|
2218
|
+
const options = props.config.options || [];
|
|
2219
|
+
return vue.h(
|
|
2220
|
+
ElementPlus.ElCheckboxGroup,
|
|
2221
|
+
__spreadValues({}, commonProps),
|
|
2222
|
+
{
|
|
2223
|
+
default: () => options.map(
|
|
2224
|
+
(option) => vue.h(ElementPlus.ElCheckbox, {
|
|
2225
|
+
key: option.value,
|
|
2226
|
+
label: option.value,
|
|
2227
|
+
disabled: option.disabled
|
|
2228
|
+
}, {
|
|
2229
|
+
default: () => option.label
|
|
2230
|
+
})
|
|
2231
|
+
)
|
|
2232
|
+
}
|
|
2233
|
+
);
|
|
2234
|
+
}
|
|
2235
|
+
case "switch":
|
|
2236
|
+
return vue.h(ElementPlus.ElSwitch, __spreadValues({}, commonProps));
|
|
2237
|
+
case "slider":
|
|
2238
|
+
return vue.h(ElementPlus.ElSlider, __spreadValues({}, commonProps));
|
|
2239
|
+
case "cascader":
|
|
2240
|
+
return vue.h(ElementPlus.ElCascader, __spreadProps(__spreadValues({}, commonProps), {
|
|
2241
|
+
options: props.config.options
|
|
2242
|
+
}));
|
|
2243
|
+
case "color-picker":
|
|
2244
|
+
return vue.h(ElementPlus.ElColorPicker, __spreadValues({}, commonProps));
|
|
2245
|
+
case "rate":
|
|
2246
|
+
return vue.h(ElementPlus.ElRate, __spreadValues({}, commonProps));
|
|
2247
|
+
case "input-number":
|
|
2248
|
+
return vue.h(ElementPlus.ElInputNumber, __spreadValues({}, commonProps));
|
|
2249
|
+
case "custom":
|
|
2250
|
+
return (_c = (_b = props.config).render) == null ? void 0 : _c.call(_b, commonProps);
|
|
2251
|
+
default:
|
|
2252
|
+
return vue.h(ElementPlus.ElInput, commonProps);
|
|
2253
|
+
}
|
|
2254
|
+
}
|
|
2255
|
+
return (_ctx, _cache) => {
|
|
2256
|
+
var _a, _b, _c, _d, _e;
|
|
2257
|
+
return vue.withDirectives((vue.openBlock(), vue.createElementBlock("div", {
|
|
2258
|
+
class: vue.normalizeClass([[
|
|
2259
|
+
__props.config.className,
|
|
2260
|
+
spanClass.value,
|
|
2261
|
+
((_a = __props.config.responsiveSpan) == null ? void 0 : _a.xs) ? `xs:col-span-${__props.config.responsiveSpan.xs}` : "",
|
|
2262
|
+
((_b = __props.config.responsiveSpan) == null ? void 0 : _b.sm) ? `sm:col-span-${__props.config.responsiveSpan.sm}` : "",
|
|
2263
|
+
((_c = __props.config.responsiveSpan) == null ? void 0 : _c.md) ? `md:col-span-${__props.config.responsiveSpan.md}` : "",
|
|
2264
|
+
((_d = __props.config.responsiveSpan) == null ? void 0 : _d.lg) ? `lg:col-span-${__props.config.responsiveSpan.lg}` : "",
|
|
2265
|
+
((_e = __props.config.responsiveSpan) == null ? void 0 : _e.xl) ? `xl:col-span-${__props.config.responsiveSpan.xl}` : ""
|
|
2266
|
+
], "jky-form-item"])
|
|
2267
|
+
}, [
|
|
2268
|
+
__props.config.title && !__props.config.label ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$3, vue.toDisplayString(__props.config.title), 1)) : (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElFormItem), vue.mergeProps({
|
|
2269
|
+
key: 1,
|
|
2270
|
+
label: __props.config.label,
|
|
2271
|
+
prop: __props.field,
|
|
2272
|
+
rules: __props.config.rules,
|
|
2273
|
+
required: __props.config.required
|
|
2274
|
+
}, _ctx.$attrs), {
|
|
2275
|
+
default: vue.withCtx(() => [
|
|
2276
|
+
__props.config.prepend || __props.config.append ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_2$2, [
|
|
2277
|
+
__props.config.prepend ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_3$2, vue.toDisplayString(__props.config.prepend), 1)) : vue.createCommentVNode("", true),
|
|
2278
|
+
(vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderComponent(__props.config.type || "input")))),
|
|
2279
|
+
__props.config.append ? (vue.openBlock(), vue.createElementBlock("span", _hoisted_4$2, vue.toDisplayString(__props.config.append), 1)) : vue.createCommentVNode("", true)
|
|
2280
|
+
])) : (vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderComponent(__props.config.type || "input")), { key: 1 }))
|
|
2281
|
+
]),
|
|
2282
|
+
_: 1
|
|
2283
|
+
}, 16, ["label", "prop", "rules", "required"]))
|
|
2284
|
+
], 2)), [
|
|
2285
|
+
[vue.vShow, !isHidden.value]
|
|
2286
|
+
]);
|
|
2287
|
+
};
|
|
2288
|
+
}
|
|
2289
|
+
}));
|
|
2290
|
+
const _hoisted_1$2 = {
|
|
2291
|
+
key: 0,
|
|
2292
|
+
class: "jky-form__title mb-4 text-xl font-semibold"
|
|
2293
|
+
};
|
|
2294
|
+
const _sfc_main$5 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
2295
|
+
name: "JkyForm"
|
|
2296
|
+
}), {
|
|
2297
|
+
__name: "Form",
|
|
2298
|
+
props: /* @__PURE__ */ vue.mergeModels({
|
|
2299
|
+
modelValue: {},
|
|
2300
|
+
items: {},
|
|
2301
|
+
showTitle: { type: Boolean, default: false },
|
|
2302
|
+
title: {},
|
|
2303
|
+
gutter: { default: 0 },
|
|
2304
|
+
defaultSpan: { default: 24 },
|
|
2305
|
+
responsive: { type: Boolean, default: true },
|
|
2306
|
+
className: {},
|
|
2307
|
+
readonly: { type: Boolean },
|
|
2308
|
+
disabled: { type: Boolean },
|
|
2309
|
+
watchDeep: { type: Boolean, default: true },
|
|
2310
|
+
onValidate: {},
|
|
2311
|
+
model: {},
|
|
2312
|
+
rules: {},
|
|
2313
|
+
labelPosition: { default: "right" },
|
|
2314
|
+
requireAsteriskPosition: {},
|
|
2315
|
+
labelWidth: { default: "100" },
|
|
2316
|
+
labelSuffix: {},
|
|
2317
|
+
inline: { type: Boolean },
|
|
2318
|
+
inlineMessage: { type: Boolean },
|
|
2319
|
+
statusIcon: { type: Boolean },
|
|
2320
|
+
showMessage: { type: Boolean },
|
|
2321
|
+
validateOnRuleChange: { type: Boolean },
|
|
2322
|
+
hideRequiredAsterisk: { type: Boolean },
|
|
2323
|
+
scrollToError: { type: Boolean },
|
|
2324
|
+
scrollIntoViewOptions: { type: Boolean },
|
|
2325
|
+
size: { default: "default" }
|
|
2326
|
+
}, {
|
|
2327
|
+
"modelValue": { required: true, default: () => ({}) },
|
|
2328
|
+
"modelModifiers": {}
|
|
2329
|
+
}),
|
|
2330
|
+
emits: /* @__PURE__ */ vue.mergeModels(["change", "validate"], ["update:modelValue"]),
|
|
2331
|
+
setup(__props, { expose: __expose, emit: __emit }) {
|
|
2332
|
+
const props = __props;
|
|
2333
|
+
const emit = __emit;
|
|
2334
|
+
const modelValue = vue.useModel(__props, "modelValue");
|
|
2335
|
+
const formRef = vue.ref();
|
|
2336
|
+
const formClass = vue.computed(() => {
|
|
2337
|
+
return [
|
|
2338
|
+
"jky-form",
|
|
2339
|
+
props.className
|
|
2340
|
+
].filter(Boolean).join(" ");
|
|
2341
|
+
});
|
|
2342
|
+
vue.watch(
|
|
2343
|
+
() => props.modelValue,
|
|
2344
|
+
(newVal, oldVal) => {
|
|
2345
|
+
if (newVal !== oldVal) {
|
|
2346
|
+
emit("change", __spreadValues({}, newVal));
|
|
2347
|
+
}
|
|
2348
|
+
},
|
|
2349
|
+
{ deep: props.watchDeep }
|
|
2350
|
+
);
|
|
2351
|
+
function validate(callback) {
|
|
2352
|
+
return __async(this, null, function* () {
|
|
2353
|
+
var _a;
|
|
2354
|
+
try {
|
|
2355
|
+
yield (_a = formRef.value) == null ? void 0 : _a.validate();
|
|
2356
|
+
emit("validate", { valid: true });
|
|
2357
|
+
callback == null ? void 0 : callback(true, void 0);
|
|
2358
|
+
return true;
|
|
2359
|
+
} catch (error) {
|
|
2360
|
+
emit("validate", { valid: false, fields: error.fields });
|
|
2361
|
+
callback == null ? void 0 : callback(false, error.fields);
|
|
2362
|
+
return false;
|
|
2363
|
+
}
|
|
2364
|
+
});
|
|
2365
|
+
}
|
|
2366
|
+
function resetFields() {
|
|
2367
|
+
var _a;
|
|
2368
|
+
(_a = formRef.value) == null ? void 0 : _a.resetFields();
|
|
2369
|
+
}
|
|
2370
|
+
function clearValidate(props2) {
|
|
2371
|
+
var _a;
|
|
2372
|
+
(_a = formRef.value) == null ? void 0 : _a.clearValidate(props2);
|
|
2373
|
+
}
|
|
2374
|
+
function getFormInstance() {
|
|
2375
|
+
return formRef.value;
|
|
2376
|
+
}
|
|
2377
|
+
__expose({
|
|
2378
|
+
validate,
|
|
2379
|
+
resetFields,
|
|
2380
|
+
clearValidate,
|
|
2381
|
+
getFormInstance
|
|
2382
|
+
});
|
|
2383
|
+
return (_ctx, _cache) => {
|
|
2384
|
+
return vue.openBlock(), vue.createElementBlock("div", {
|
|
2385
|
+
class: vue.normalizeClass(formClass.value)
|
|
2386
|
+
}, [
|
|
2387
|
+
__props.showTitle && __props.title ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$2, vue.toDisplayString(__props.title), 1)) : vue.createCommentVNode("", true),
|
|
2388
|
+
vue.createVNode(vue.unref(ElementPlus.ElForm), vue.mergeProps({
|
|
2389
|
+
ref_key: "formRef",
|
|
2390
|
+
ref: formRef,
|
|
2391
|
+
model: modelValue.value,
|
|
2392
|
+
"label-width": __props.labelWidth,
|
|
2393
|
+
"label-position": __props.labelPosition,
|
|
2394
|
+
size: __props.size
|
|
2395
|
+
}, _ctx.$attrs), {
|
|
2396
|
+
default: vue.withCtx(() => [
|
|
2397
|
+
vue.createElementVNode("div", {
|
|
2398
|
+
class: "grid",
|
|
2399
|
+
style: vue.normalizeStyle({
|
|
2400
|
+
gridTemplateColumns: "repeat(12, minmax(0, 1fr))",
|
|
2401
|
+
gap: `${__props.gutter}px`
|
|
2402
|
+
})
|
|
2403
|
+
}, [
|
|
2404
|
+
(vue.openBlock(true), vue.createElementBlock(vue.Fragment, null, vue.renderList(__props.items, (item) => {
|
|
2405
|
+
return vue.openBlock(), vue.createBlock(_sfc_main$6, {
|
|
2406
|
+
key: item.field,
|
|
2407
|
+
field: item.field,
|
|
2408
|
+
config: item,
|
|
2409
|
+
model: modelValue.value,
|
|
2410
|
+
readonly: __props.readonly,
|
|
2411
|
+
disabled: __props.disabled
|
|
2412
|
+
}, null, 8, ["field", "config", "model", "readonly", "disabled"]);
|
|
2413
|
+
}), 128))
|
|
2414
|
+
], 4)
|
|
2415
|
+
]),
|
|
2416
|
+
_: 1
|
|
2417
|
+
}, 16, ["model", "label-width", "label-position", "size"])
|
|
2418
|
+
], 2);
|
|
2419
|
+
};
|
|
2420
|
+
}
|
|
2421
|
+
}));
|
|
2422
|
+
const JkyForm = installWithSFC(_sfc_main$5);
|
|
2423
|
+
const _export_sfc = (sfc, props) => {
|
|
2424
|
+
const target = sfc.__vccOpts || sfc;
|
|
2425
|
+
for (const [key, val] of props) {
|
|
2426
|
+
target[key] = val;
|
|
2427
|
+
}
|
|
2428
|
+
return target;
|
|
2429
|
+
};
|
|
2430
|
+
const _sfc_main$4 = {};
|
|
2431
|
+
function _sfc_render(_ctx, _cache) {
|
|
2432
|
+
const _component_el_scrollbar = es.ElScrollbar;
|
|
2433
|
+
const _component_el_aside = es.ElAside;
|
|
2434
|
+
return vue.openBlock(), vue.createBlock(_component_el_aside, { class: "w-fit pr-0 pb-0 h-full" }, {
|
|
2435
|
+
default: vue.withCtx(() => [
|
|
2436
|
+
vue.createVNode(_component_el_scrollbar, { class: "bg-white rounded-md" }, {
|
|
2437
|
+
default: vue.withCtx(() => [
|
|
2438
|
+
vue.renderSlot(_ctx.$slots, "default")
|
|
2439
|
+
]),
|
|
2440
|
+
_: 3
|
|
2441
|
+
})
|
|
2442
|
+
]),
|
|
2443
|
+
_: 3
|
|
2444
|
+
});
|
|
2445
|
+
}
|
|
2446
|
+
const Aside = /* @__PURE__ */ _export_sfc(_sfc_main$4, [["render", _sfc_render]]);
|
|
2447
|
+
const _sfc_main$3 = /* @__PURE__ */ vue.defineComponent(__spreadProps(__spreadValues({}, {
|
|
2448
|
+
name: "JkyMenu"
|
|
1861
2449
|
}), {
|
|
1862
2450
|
__name: "Menu",
|
|
1863
2451
|
props: {
|
|
2452
|
+
aside: { type: Boolean, default: false },
|
|
1864
2453
|
menuData: { default: () => [] },
|
|
1865
|
-
modelValue: {},
|
|
1866
2454
|
mode: {},
|
|
1867
2455
|
defaultActive: {},
|
|
1868
2456
|
defaultOpeneds: {},
|
|
@@ -1886,6 +2474,7 @@ img {
|
|
|
1886
2474
|
persistent: { type: Boolean }
|
|
1887
2475
|
},
|
|
1888
2476
|
setup(__props) {
|
|
2477
|
+
const props = __props;
|
|
1889
2478
|
function renderMenuItem(item) {
|
|
1890
2479
|
var _a;
|
|
1891
2480
|
return vue.h(
|
|
@@ -1929,16 +2518,33 @@ img {
|
|
|
1929
2518
|
return renderMenuItem(item);
|
|
1930
2519
|
}
|
|
1931
2520
|
return (_ctx, _cache) => {
|
|
1932
|
-
return vue.openBlock(), vue.createBlock(
|
|
2521
|
+
return __props.aside ? (vue.openBlock(), vue.createBlock(Aside, { key: 0 }, {
|
|
2522
|
+
default: vue.withCtx(() => [
|
|
2523
|
+
vue.createVNode(vue.unref(ElementPlus.ElMenu), vue.mergeProps({ class: "jky-menu" }, __spreadValues(__spreadValues({}, props), _ctx.$attrs)), {
|
|
2524
|
+
default: vue.withCtx(() => [
|
|
2525
|
+
__props.menuData && __props.menuData.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(__props.menuData, (item) => {
|
|
2526
|
+
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderMenuNode(item)), {
|
|
2527
|
+
key: item.index || item.id
|
|
2528
|
+
});
|
|
2529
|
+
}), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
2530
|
+
]),
|
|
2531
|
+
_: 3
|
|
2532
|
+
}, 16)
|
|
2533
|
+
]),
|
|
2534
|
+
_: 3
|
|
2535
|
+
})) : (vue.openBlock(), vue.createBlock(vue.unref(ElementPlus.ElMenu), vue.mergeProps({
|
|
2536
|
+
key: 1,
|
|
2537
|
+
class: "jky-menu"
|
|
2538
|
+
}, __spreadValues(__spreadValues({}, props), _ctx.$attrs)), {
|
|
1933
2539
|
default: vue.withCtx(() => [
|
|
1934
2540
|
__props.menuData && __props.menuData.length > 0 ? (vue.openBlock(true), vue.createElementBlock(vue.Fragment, { key: 0 }, vue.renderList(__props.menuData, (item) => {
|
|
1935
2541
|
return vue.openBlock(), vue.createBlock(vue.resolveDynamicComponent(renderMenuNode(item)), {
|
|
1936
|
-
key: item.index
|
|
2542
|
+
key: item.index || item.id
|
|
1937
2543
|
});
|
|
1938
2544
|
}), 128)) : vue.renderSlot(_ctx.$slots, "default", { key: 1 })
|
|
1939
2545
|
]),
|
|
1940
2546
|
_: 3
|
|
1941
|
-
}, 16);
|
|
2547
|
+
}, 16));
|
|
1942
2548
|
};
|
|
1943
2549
|
}
|
|
1944
2550
|
}));
|
|
@@ -1965,7 +2571,8 @@ img {
|
|
|
1965
2571
|
elButtonType: {},
|
|
1966
2572
|
width: { default: 400 },
|
|
1967
2573
|
trigger: { default: "click" },
|
|
1968
|
-
highlightCurrent: { type: Boolean, default: true }
|
|
2574
|
+
highlightCurrent: { type: Boolean, default: true },
|
|
2575
|
+
placement: { default: "bottom-start" }
|
|
1969
2576
|
},
|
|
1970
2577
|
setup(__props) {
|
|
1971
2578
|
const props = __props;
|
|
@@ -1981,8 +2588,7 @@ img {
|
|
|
1981
2588
|
var _a;
|
|
1982
2589
|
return ((_a = __props.menus) == null ? void 0 : _a.length) ? (vue.openBlock(), vue.createElementBlock("div", _hoisted_1$1, [
|
|
1983
2590
|
vue.createVNode(vue.unref(ElementPlus.ElPopover), {
|
|
1984
|
-
|
|
1985
|
-
placement: "bottom-start",
|
|
2591
|
+
placement: __props.placement,
|
|
1986
2592
|
class: "h-full",
|
|
1987
2593
|
trigger: __props.trigger,
|
|
1988
2594
|
width: __props.width
|
|
@@ -2022,7 +2628,7 @@ img {
|
|
|
2022
2628
|
])
|
|
2023
2629
|
]),
|
|
2024
2630
|
_: 1
|
|
2025
|
-
}, 8, ["trigger", "width"])
|
|
2631
|
+
}, 8, ["placement", "trigger", "width"])
|
|
2026
2632
|
])) : vue.createCommentVNode("", true);
|
|
2027
2633
|
};
|
|
2028
2634
|
}
|
|
@@ -2207,7 +2813,7 @@ img {
|
|
|
2207
2813
|
key: 1,
|
|
2208
2814
|
"ref-name": "更多",
|
|
2209
2815
|
"ref-icon-class": "icon-[mdi--format-list-bulleted]"
|
|
2210
|
-
}, __props.popover), null, 16)) : vue.createCommentVNode("", true),
|
|
2816
|
+
}, __props.popover, { placement: "bottom" }), null, 16)) : vue.createCommentVNode("", true),
|
|
2211
2817
|
vue.createVNode(vue.unref(ElementPlus.ElDropdown), {
|
|
2212
2818
|
trigger: "hover",
|
|
2213
2819
|
onCommand: handleCommand
|
|
@@ -2307,7 +2913,8 @@ img {
|
|
|
2307
2913
|
JkyButton,
|
|
2308
2914
|
JkyButtonNav,
|
|
2309
2915
|
JkyPageHeader,
|
|
2310
|
-
JkyMenu
|
|
2916
|
+
JkyMenu,
|
|
2917
|
+
JkyForm
|
|
2311
2918
|
];
|
|
2312
2919
|
function JkyComponentLibResolver() {
|
|
2313
2920
|
return {
|
|
@@ -2331,6 +2938,7 @@ img {
|
|
|
2331
2938
|
exports2.JkyButton = JkyButton;
|
|
2332
2939
|
exports2.JkyButtonNav = JkyButtonNav;
|
|
2333
2940
|
exports2.JkyComponentLibResolver = JkyComponentLibResolver;
|
|
2941
|
+
exports2.JkyForm = JkyForm;
|
|
2334
2942
|
exports2.JkyMenu = JkyMenu;
|
|
2335
2943
|
exports2.JkyPageHeader = JkyPageHeader;
|
|
2336
2944
|
exports2.JkySayHello = JkySayHello;
|