next-element-vue 0.2.6 → 0.2.9
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/index.css +4 -3
- package/dist/index.js +1076 -120
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +1063 -117
- package/dist/index.umd.min.js +3 -3
- package/dist/packages/components/crud-table-virtualized/src/index.test.d.ts +2 -2
- package/dist/packages/components/labelimg/index.d.ts +118 -0
- package/dist/packages/components/labelimg/src/config.d.ts +4 -0
- package/dist/packages/components/labelimg/src/hooks/canvas-context-hook.d.ts +59 -0
- package/dist/packages/components/labelimg/src/index.d.ts +69 -0
- package/dist/packages/components/labelimg/src/preview.d.ts +51 -0
- package/dist/packages/components/labelimg/src/widgets/canvas-context.d.ts +34 -0
- package/dist/packages/components/labelimg/src/widgets/contextmenu-label.d.ts +38 -0
- package/dist/packages/components/labelimg/src/widgets/draggable-rect.d.ts +52 -0
- package/dist/packages/components/labelimg/src/widgets/right-label.d.ts +28 -0
- package/dist/packages/components/spin-loading/src/index.d.ts +1 -0
- package/dist/packages/components.d.ts +1 -0
- package/dist/packages/hooks/use-locale/index.d.ts +3 -0
- package/dist/packages/locale/lang/en.d.ts +5 -0
- package/dist/packages/locale/lang/zh-cn.d.ts +5 -0
- package/dist/packages/locale/lang/zh-tw.d.ts +5 -0
- package/package.json +1 -55
package/dist/index.umd.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 作 者:huangteng
|
|
4
4
|
* 邮 箱:htengweb@163.com
|
|
5
|
-
* 当前版本:0.2.
|
|
6
|
-
* 发布日期:2024-06-
|
|
5
|
+
* 当前版本:0.2.9 v
|
|
6
|
+
* 发布日期:2024-06-14
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -789,6 +789,11 @@
|
|
|
789
789
|
tabsRight: "关闭右侧",
|
|
790
790
|
tabsAll: "关闭全部",
|
|
791
791
|
systemSetting: "系统配置"
|
|
792
|
+
},
|
|
793
|
+
labelimg: {
|
|
794
|
+
saveTxt: "保存中...",
|
|
795
|
+
emptyLabelText: "暂无标签数据",
|
|
796
|
+
confirmDeleteLabel: "确定要删除该标注吗?"
|
|
792
797
|
}
|
|
793
798
|
}
|
|
794
799
|
}, enLocale = {
|
|
@@ -858,6 +863,11 @@
|
|
|
858
863
|
tabsRight: "close right",
|
|
859
864
|
tabsAll: "close all",
|
|
860
865
|
systemSetting: "system setting"
|
|
866
|
+
},
|
|
867
|
+
labelimg: {
|
|
868
|
+
saveTxt: "saving...",
|
|
869
|
+
emptyLabelText: "No label data",
|
|
870
|
+
confirmDeleteLabel: "Are you sure you want to delete this annotation?"
|
|
861
871
|
}
|
|
862
872
|
}
|
|
863
873
|
}, zhtwLocale = {
|
|
@@ -927,6 +937,11 @@
|
|
|
927
937
|
tabsRight: "關閉右側",
|
|
928
938
|
tabsAll: "關閉全部",
|
|
929
939
|
systemSetting: "系統配置"
|
|
940
|
+
},
|
|
941
|
+
labelimg: {
|
|
942
|
+
saveTxt: "保存中...",
|
|
943
|
+
emptyLabelText: "暂无标签数据",
|
|
944
|
+
confirmDeleteLabel: "确定要删除该标注吗?"
|
|
930
945
|
}
|
|
931
946
|
}
|
|
932
947
|
};
|
|
@@ -1055,7 +1070,7 @@
|
|
|
1055
1070
|
}, extra) for (const [key, comp] of Object.entries(extra)) main[key] = comp;
|
|
1056
1071
|
return main;
|
|
1057
1072
|
}, slots_config_headerMenu = "header-menu", slots_config_headerToolsPrefix = "header-tools-prefix", slots_config_headerToolsSuffix = "header-tools-suffix";
|
|
1058
|
-
var defaultConfig$
|
|
1073
|
+
var defaultConfig$4 = {
|
|
1059
1074
|
logo: "",
|
|
1060
1075
|
title: "Next Element Vue",
|
|
1061
1076
|
userName: "Admin",
|
|
@@ -1099,7 +1114,7 @@
|
|
|
1099
1114
|
isDark: !1
|
|
1100
1115
|
}
|
|
1101
1116
|
};
|
|
1102
|
-
const ns$
|
|
1117
|
+
const ns$k = useNamespace("text-ellipsis");
|
|
1103
1118
|
const NextTextEllipsis = withInstall(vue.defineComponent({
|
|
1104
1119
|
name: "NextTextEllipsis",
|
|
1105
1120
|
props: {
|
|
@@ -1145,7 +1160,7 @@
|
|
|
1145
1160
|
}
|
|
1146
1161
|
};
|
|
1147
1162
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
1148
|
-
class: [ ns$
|
|
1163
|
+
class: [ ns$k.b(), props.class ],
|
|
1149
1164
|
style: setWidth.value,
|
|
1150
1165
|
onMouseenter: onMouseenter
|
|
1151
1166
|
}, [ isTip.value ? vue.createVNode(elementPlus.ElTooltip, {
|
|
@@ -1155,11 +1170,11 @@
|
|
|
1155
1170
|
disabled: props.disabled
|
|
1156
1171
|
}, {
|
|
1157
1172
|
default: () => [ vue.createVNode("span", {
|
|
1158
|
-
class: ns$
|
|
1173
|
+
class: ns$k.e("text"),
|
|
1159
1174
|
ref: ellipsisRef
|
|
1160
1175
|
}, [ slots.default ? slots.default() : props.content ]) ]
|
|
1161
1176
|
}) : vue.createVNode("span", {
|
|
1162
|
-
class: ns$
|
|
1177
|
+
class: ns$k.e("text"),
|
|
1163
1178
|
ref: ellipsisRef
|
|
1164
1179
|
}, [ slots.default ? slots.default() : props.content ]) ]) ]);
|
|
1165
1180
|
}
|
|
@@ -1194,7 +1209,29 @@
|
|
|
1194
1209
|
}, null, -1) ];
|
|
1195
1210
|
var arrow_down_default = export_helper_default(arrow_down_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1196
1211
|
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_16, _hoisted_36);
|
|
1197
|
-
} ], [ "__file", "arrow-down.vue" ] ]),
|
|
1212
|
+
} ], [ "__file", "arrow-down.vue" ] ]), arrow_left_vue_vue_type_script_lang_default = {
|
|
1213
|
+
name: "ArrowLeft"
|
|
1214
|
+
}, _hoisted_18 = {
|
|
1215
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1216
|
+
viewBox: "0 0 1024 1024"
|
|
1217
|
+
}, _hoisted_38 = [ vue.createElementVNode("path", {
|
|
1218
|
+
fill: "currentColor",
|
|
1219
|
+
d: "M609.408 149.376 277.76 489.6a32 32 0 0 0 0 44.672l331.648 340.352a29.12 29.12 0 0 0 41.728 0 30.592 30.592 0 0 0 0-42.752L339.264 511.936l311.872-319.872a30.592 30.592 0 0 0 0-42.688 29.12 29.12 0 0 0-41.728 0z"
|
|
1220
|
+
}, null, -1) ];
|
|
1221
|
+
var arrow_left_default = export_helper_default(arrow_left_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1222
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_18, _hoisted_38);
|
|
1223
|
+
} ], [ "__file", "arrow-left.vue" ] ]), arrow_right_vue_vue_type_script_lang_default = {
|
|
1224
|
+
name: "ArrowRight"
|
|
1225
|
+
}, _hoisted_110 = {
|
|
1226
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1227
|
+
viewBox: "0 0 1024 1024"
|
|
1228
|
+
}, _hoisted_310 = [ vue.createElementVNode("path", {
|
|
1229
|
+
fill: "currentColor",
|
|
1230
|
+
d: "M340.864 149.312a30.592 30.592 0 0 0 0 42.752L652.736 512 340.864 831.872a30.592 30.592 0 0 0 0 42.752 29.12 29.12 0 0 0 41.728 0L714.24 534.336a32 32 0 0 0 0-44.672L382.592 149.376a29.12 29.12 0 0 0-41.728 0z"
|
|
1231
|
+
}, null, -1) ];
|
|
1232
|
+
var arrow_right_default = export_helper_default(arrow_right_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1233
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_110, _hoisted_310);
|
|
1234
|
+
} ], [ "__file", "arrow-right.vue" ] ]), arrow_up_vue_vue_type_script_lang_default = {
|
|
1198
1235
|
name: "ArrowUp"
|
|
1199
1236
|
}, _hoisted_112 = {
|
|
1200
1237
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2460,7 +2497,7 @@
|
|
|
2460
2497
|
}, null) ]
|
|
2461
2498
|
}))) ]) ]);
|
|
2462
2499
|
}
|
|
2463
|
-
}), ns$
|
|
2500
|
+
}), ns$j = useNamespace("menu");
|
|
2464
2501
|
const NextMenu = withInstall(vue.defineComponent({
|
|
2465
2502
|
name: "NextMenu",
|
|
2466
2503
|
props: {
|
|
@@ -2487,13 +2524,13 @@
|
|
|
2487
2524
|
}
|
|
2488
2525
|
},
|
|
2489
2526
|
setup(props) {
|
|
2490
|
-
vue.provide("ns", ns$
|
|
2527
|
+
vue.provide("ns", ns$j);
|
|
2491
2528
|
const router = vue.getCurrentInstance().appContext.config.globalProperties.$router, currentPath = router.currentRoute?.value.fullPath, activePath = vue.ref(currentPath);
|
|
2492
2529
|
vue.watch((() => router.currentRoute?.value), (to => {
|
|
2493
2530
|
activePath.value = to.fullPath;
|
|
2494
2531
|
}));
|
|
2495
2532
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(elementPlus.ElMenu, {
|
|
2496
|
-
class: [ ns$
|
|
2533
|
+
class: [ ns$j.b(), props.className ],
|
|
2497
2534
|
style: props.style,
|
|
2498
2535
|
defaultActive: activePath.value,
|
|
2499
2536
|
router: props.router,
|
|
@@ -2501,7 +2538,7 @@
|
|
|
2501
2538
|
ellipsis: !0
|
|
2502
2539
|
}, {
|
|
2503
2540
|
default: () => [ vue.createVNode(vue.Fragment, null, [ props.menuTree.map((item => item.children?.length ? valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElSubMenu, {
|
|
2504
|
-
"popper-class": ns$
|
|
2541
|
+
"popper-class": ns$j.b("popper"),
|
|
2505
2542
|
index: item.path || item.id,
|
|
2506
2543
|
teleported: !0
|
|
2507
2544
|
}, {
|
|
@@ -2512,7 +2549,7 @@
|
|
|
2512
2549
|
menuData: item.children
|
|
2513
2550
|
}, null)
|
|
2514
2551
|
}) : valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElMenuItem, {
|
|
2515
|
-
"popper-class": ns$
|
|
2552
|
+
"popper-class": ns$j.b("popper"),
|
|
2516
2553
|
index: item.path
|
|
2517
2554
|
}, {
|
|
2518
2555
|
default: () => [ vue.createVNode(MenuItemTitle, {
|
|
@@ -2538,19 +2575,19 @@
|
|
|
2538
2575
|
}) ]);
|
|
2539
2576
|
}
|
|
2540
2577
|
});
|
|
2541
|
-
const ns$
|
|
2578
|
+
const ns$i = useNamespace("layout-defaults");
|
|
2542
2579
|
var defaults = vue.defineComponent({
|
|
2543
2580
|
props: {},
|
|
2544
|
-
setup: () => (vue.provide("ns", ns$
|
|
2581
|
+
setup: () => (vue.provide("ns", ns$i), {}),
|
|
2545
2582
|
render() {
|
|
2546
2583
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2547
2584
|
slots.menu;
|
|
2548
2585
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2549
2586
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2550
|
-
class: ns$
|
|
2587
|
+
class: ns$i.b()
|
|
2551
2588
|
}, {
|
|
2552
2589
|
default: () => [ vue.createVNode(Sidebar$2, null, null), vue.createVNode("div", {
|
|
2553
|
-
class: [ ns$
|
|
2590
|
+
class: [ ns$i.b("content") ]
|
|
2554
2591
|
}, [ vue.createVNode(Header$3, null, null), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2555
2592
|
tabs: _config.tabs,
|
|
2556
2593
|
activeTab: _config.activeTab,
|
|
@@ -2558,7 +2595,7 @@
|
|
|
2558
2595
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2559
2596
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2560
2597
|
}, null) : null, vue.createVNode("main", {
|
|
2561
|
-
class: [ ns$
|
|
2598
|
+
class: [ ns$i.bf("main"), ns$i.is("layout-tabs", isTabs.value) ]
|
|
2562
2599
|
}, [ slots.default?.() ]) ]) ]
|
|
2563
2600
|
});
|
|
2564
2601
|
}
|
|
@@ -2588,10 +2625,10 @@
|
|
|
2588
2625
|
}) ]) ]) ]);
|
|
2589
2626
|
}
|
|
2590
2627
|
});
|
|
2591
|
-
const ns$
|
|
2628
|
+
const ns$h = useNamespace("layout-transverse");
|
|
2592
2629
|
var transverse = vue.defineComponent({
|
|
2593
2630
|
props: {},
|
|
2594
|
-
setup: () => (vue.provide("ns", ns$
|
|
2631
|
+
setup: () => (vue.provide("ns", ns$h), {}),
|
|
2595
2632
|
render() {
|
|
2596
2633
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2597
2634
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2608,7 +2645,7 @@
|
|
|
2608
2645
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2609
2646
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2610
2647
|
}, null) : null, vue.createVNode("main", {
|
|
2611
|
-
class: [ ns$
|
|
2648
|
+
class: [ ns$h.b("main"), ns$h.is("layout-tabs", isTabs.value) ]
|
|
2612
2649
|
}, [ slots.default?.() ]) ]);
|
|
2613
2650
|
var s;
|
|
2614
2651
|
}
|
|
@@ -2647,10 +2684,10 @@
|
|
|
2647
2684
|
}, null) ]);
|
|
2648
2685
|
}
|
|
2649
2686
|
});
|
|
2650
|
-
const ns$
|
|
2687
|
+
const ns$g = useNamespace("layout-columns");
|
|
2651
2688
|
var columns = vue.defineComponent({
|
|
2652
2689
|
props: {},
|
|
2653
|
-
setup: () => (vue.provide("ns", ns$
|
|
2690
|
+
setup: () => (vue.provide("ns", ns$g), {}),
|
|
2654
2691
|
render() {
|
|
2655
2692
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2656
2693
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2658,11 +2695,11 @@
|
|
|
2658
2695
|
slots[slots_config_headerToolsSuffix] && (__slots_header[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2659
2696
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2660
2697
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2661
|
-
class: ns$
|
|
2698
|
+
class: ns$g.b()
|
|
2662
2699
|
}, {
|
|
2663
2700
|
default: () => {
|
|
2664
2701
|
return [ vue.createVNode(Sidebar$1, null, null), vue.createVNode("div", {
|
|
2665
|
-
class: [ ns$
|
|
2702
|
+
class: [ ns$g.b("content") ]
|
|
2666
2703
|
}, [ vue.createVNode(Header$1, null, (s = __slots_header, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header : {
|
|
2667
2704
|
default: () => [ __slots_header ]
|
|
2668
2705
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
@@ -2672,7 +2709,7 @@
|
|
|
2672
2709
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2673
2710
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2674
2711
|
}, null) : null, vue.createVNode("main", {
|
|
2675
|
-
class: [ ns$
|
|
2712
|
+
class: [ ns$g.bf("main"), ns$g.is("layout-tabs", isTabs.value) ]
|
|
2676
2713
|
}, [ slots.default?.() ]) ]) ];
|
|
2677
2714
|
var s;
|
|
2678
2715
|
}
|
|
@@ -2715,20 +2752,20 @@
|
|
|
2715
2752
|
}) ]);
|
|
2716
2753
|
}
|
|
2717
2754
|
});
|
|
2718
|
-
const ns$
|
|
2755
|
+
const ns$f = useNamespace("layout-classic");
|
|
2719
2756
|
var classic = vue.defineComponent({
|
|
2720
2757
|
props: {},
|
|
2721
|
-
setup: () => (vue.provide("ns", ns$
|
|
2722
|
-
ns: ns$
|
|
2758
|
+
setup: () => (vue.provide("ns", ns$f), {
|
|
2759
|
+
ns: ns$f
|
|
2723
2760
|
}),
|
|
2724
2761
|
render() {
|
|
2725
2762
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2726
2763
|
slots.menu;
|
|
2727
2764
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2728
2765
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header, null, null), vue.createVNode("div", {
|
|
2729
|
-
class: [ ns$
|
|
2766
|
+
class: [ ns$f.b("content"), ns$f.is("layout-tabs", isTabs.value) ]
|
|
2730
2767
|
}, [ vue.createVNode(Sidebar, null, null), vue.createVNode("div", {
|
|
2731
|
-
class: ns$
|
|
2768
|
+
class: ns$f.b("container")
|
|
2732
2769
|
}, [ _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2733
2770
|
tabs: _config.tabs,
|
|
2734
2771
|
activeTab: _config.activeTab,
|
|
@@ -2736,11 +2773,11 @@
|
|
|
2736
2773
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2737
2774
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2738
2775
|
}, null) : null, vue.createVNode("main", {
|
|
2739
|
-
class: [ ns$
|
|
2776
|
+
class: [ ns$f.b("main") ]
|
|
2740
2777
|
}, [ slots.default?.() ]) ]) ]) ]);
|
|
2741
2778
|
}
|
|
2742
2779
|
});
|
|
2743
|
-
const ns$
|
|
2780
|
+
const ns$e = useNamespace("layout"), layouts = {
|
|
2744
2781
|
defaults: vue.markRaw(defaults),
|
|
2745
2782
|
transverse: vue.markRaw(transverse),
|
|
2746
2783
|
columns: vue.markRaw(columns),
|
|
@@ -2766,8 +2803,8 @@
|
|
|
2766
2803
|
},
|
|
2767
2804
|
emits: [ "changeLanguage", "changeUserDropdown", "changeOptions", "tabsChange", "tabsSelect", "tabsClose" ],
|
|
2768
2805
|
setup(props, {slots: slots, emit: emit}) {
|
|
2769
|
-
const _config = vue.ref(mergeWith(defaultConfig$
|
|
2770
|
-
vue.provide("options", _config.value), vue.provide("__ns__", ns$
|
|
2806
|
+
const _config = vue.ref(mergeWith(defaultConfig$4, props.options, customizerCoverArray));
|
|
2807
|
+
vue.provide("options", _config.value), vue.provide("__ns__", ns$e), vue.provide("__emit__", emit),
|
|
2771
2808
|
vue.provide("__slots__", slots);
|
|
2772
2809
|
const updateOptions = cfg => {
|
|
2773
2810
|
_config.value = mergeWith(_config.value, cfg, customizerCoverArray), updateThemeColorCssVar(_config.value?.setting),
|
|
@@ -2791,14 +2828,14 @@
|
|
|
2791
2828
|
const _activeSlots = {};
|
|
2792
2829
|
for (const key in slots) Object.prototype.hasOwnProperty.call(slots, key) && (_activeSlots[key] = () => slots[key]?.());
|
|
2793
2830
|
return vue.createVNode("div", {
|
|
2794
|
-
class: [ ns$
|
|
2831
|
+
class: [ ns$e.b(), props.className ],
|
|
2795
2832
|
style: props.style
|
|
2796
2833
|
}, [ vue.h(activeLayout.value, {}, {
|
|
2797
2834
|
..._activeSlots
|
|
2798
2835
|
}) ]);
|
|
2799
2836
|
}
|
|
2800
|
-
})), ns$
|
|
2801
|
-
var Element$
|
|
2837
|
+
})), ns$d = useNamespace("tabs");
|
|
2838
|
+
var Element$8 = vue.defineComponent({
|
|
2802
2839
|
name: "NextTabs",
|
|
2803
2840
|
props: {
|
|
2804
2841
|
activeTab: {
|
|
@@ -2867,12 +2904,12 @@
|
|
|
2867
2904
|
tabsView.value.push(activeRoute)), emit("change", activeIndex.value, tabsView.value, "add");
|
|
2868
2905
|
}));
|
|
2869
2906
|
const renderContent = () => vue.createVNode("nav", {
|
|
2870
|
-
class: ns$
|
|
2907
|
+
class: ns$d.b()
|
|
2871
2908
|
}, [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
2872
2909
|
default: () => [ vue.createVNode("ul", {
|
|
2873
|
-
class: ns$
|
|
2910
|
+
class: ns$d.b("list")
|
|
2874
2911
|
}, [ tabsView.value.map(((tab, index) => tab ? vue.createVNode("li", {
|
|
2875
|
-
class: [ "tab-item", ns$
|
|
2912
|
+
class: [ "tab-item", ns$d.is("active", activeIndex.value === index) ],
|
|
2876
2913
|
onClick: event => onClickTabItem(event, tab, index)
|
|
2877
2914
|
}, [ vue.createVNode("i", {
|
|
2878
2915
|
class: [ "tab-icon", tab.meta?.icon ]
|
|
@@ -2903,11 +2940,11 @@
|
|
|
2903
2940
|
onCommand: onChange
|
|
2904
2941
|
}, {
|
|
2905
2942
|
default: () => vue.createVNode("span", {
|
|
2906
|
-
class: ns$
|
|
2943
|
+
class: ns$d.b("tab-more")
|
|
2907
2944
|
}, [ vue.createVNode("i", {
|
|
2908
|
-
class: [ ns$
|
|
2945
|
+
class: [ ns$d.be("tab-more", "box"), ns$d.be("tab-more", "top") ]
|
|
2909
2946
|
}, null), vue.createVNode("i", {
|
|
2910
|
-
class: [ ns$
|
|
2947
|
+
class: [ ns$d.be("tab-more", "box"), ns$d.be("tab-more", "bottom") ]
|
|
2911
2948
|
}, null) ]),
|
|
2912
2949
|
dropdown: () => vue.createVNode(elementPlus.ElDropdownMenu, null, {
|
|
2913
2950
|
default: () => [ vue.createVNode(elementPlus.ElDropdownItem, {
|
|
@@ -2940,7 +2977,7 @@
|
|
|
2940
2977
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
2941
2978
|
}
|
|
2942
2979
|
});
|
|
2943
|
-
const NextTabs = withInstall(Element$
|
|
2980
|
+
const NextTabs = withInstall(Element$8), ns$c = useNamespace("container");
|
|
2944
2981
|
const NextContainer = withInstall(vue.defineComponent({
|
|
2945
2982
|
name: "NextContainer",
|
|
2946
2983
|
props: {
|
|
@@ -2978,21 +3015,24 @@
|
|
|
2978
3015
|
}), style;
|
|
2979
3016
|
}));
|
|
2980
3017
|
return () => props.scrollbar ? vue.createVNode(elementPlus.ElScrollbar, {
|
|
2981
|
-
class: [ ns$
|
|
3018
|
+
class: [ ns$c.b(), props.className ],
|
|
2982
3019
|
style: props.style
|
|
2983
3020
|
}, {
|
|
2984
3021
|
default: () => [ slots.default?.() ]
|
|
2985
3022
|
}) : vue.createVNode("div", {
|
|
2986
|
-
class: [ ns$
|
|
3023
|
+
class: [ ns$c.b(), props.className ],
|
|
2987
3024
|
style: {
|
|
2988
3025
|
...styles.value,
|
|
2989
3026
|
...props.style
|
|
2990
3027
|
}
|
|
2991
3028
|
}, [ props.card ? vue.createVNode("div", {
|
|
2992
|
-
class: ns$
|
|
3029
|
+
class: ns$c.b("card")
|
|
2993
3030
|
}, [ slots.default?.() ]) : slots.default?.() ]);
|
|
2994
3031
|
}
|
|
2995
3032
|
}));
|
|
3033
|
+
function isEqual(value, other) {
|
|
3034
|
+
return baseIsEqual(value, other);
|
|
3035
|
+
}
|
|
2996
3036
|
var defaultPropsConfig = {
|
|
2997
3037
|
className: {
|
|
2998
3038
|
type: String,
|
|
@@ -3060,7 +3100,7 @@
|
|
|
3060
3100
|
}
|
|
3061
3101
|
};
|
|
3062
3102
|
const header_menu_slots_key = [ "menu-left-prefix", "menu-left-suffix", "menu-right-prefix", "menu-right-suffix" ], operation_column_slots_key = [ "operation-column-prefix", "operation-column-suffix" ];
|
|
3063
|
-
var defaultConfig$
|
|
3103
|
+
var defaultConfig$3 = {
|
|
3064
3104
|
initLoadData: !0,
|
|
3065
3105
|
defaultContentHeight: 300,
|
|
3066
3106
|
fullscreenchangeContentHeight: !1,
|
|
@@ -3106,8 +3146,8 @@
|
|
|
3106
3146
|
formSpan: 12,
|
|
3107
3147
|
formColumnMinWidth: 350
|
|
3108
3148
|
};
|
|
3109
|
-
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$
|
|
3110
|
-
var
|
|
3149
|
+
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$b = useNamespace("spin-loading");
|
|
3150
|
+
var NextSpinLoading$1 = vue.defineComponent({
|
|
3111
3151
|
name: "NextSpinLoading",
|
|
3112
3152
|
props: {
|
|
3113
3153
|
className: {
|
|
@@ -3127,32 +3167,36 @@
|
|
|
3127
3167
|
default: ""
|
|
3128
3168
|
}
|
|
3129
3169
|
},
|
|
3130
|
-
setup() {
|
|
3131
|
-
const {t: t} = useLocale();
|
|
3132
|
-
return {
|
|
3133
|
-
|
|
3170
|
+
setup(props, {expose: expose}) {
|
|
3171
|
+
const {t: t} = useLocale(), elementInstance = vue.ref();
|
|
3172
|
+
return expose({
|
|
3173
|
+
elementInstance: elementInstance
|
|
3174
|
+
}), {
|
|
3175
|
+
t: t,
|
|
3176
|
+
elementInstance: elementInstance
|
|
3134
3177
|
};
|
|
3135
3178
|
},
|
|
3136
3179
|
render() {
|
|
3137
3180
|
const _t = this.t, slots = this.$slots, props = this.$props, loadingText = props.tip || _t("next.loading");
|
|
3138
3181
|
return vue.createVNode("div", {
|
|
3139
|
-
|
|
3182
|
+
ref: "elementInstance",
|
|
3183
|
+
class: [ ns$b.b(), props.className ],
|
|
3140
3184
|
style: props.style
|
|
3141
|
-
}, [ props.loading ? vue.createVNode("div", {
|
|
3142
|
-
class: ns$
|
|
3185
|
+
}, [ slots.default?.(), props.loading ? vue.createVNode("div", {
|
|
3186
|
+
class: ns$b.b("mask")
|
|
3143
3187
|
}, [ vue.createVNode("span", {
|
|
3144
|
-
class: ns$
|
|
3188
|
+
class: ns$b.b("mask-dot")
|
|
3145
3189
|
}, [ vue.createVNode("i", {
|
|
3146
|
-
class: ns$
|
|
3190
|
+
class: ns$b.be("mask", "dot-item")
|
|
3147
3191
|
}, null), vue.createVNode("i", {
|
|
3148
|
-
class: ns$
|
|
3192
|
+
class: ns$b.be("mask", "dot-item")
|
|
3149
3193
|
}, null), vue.createVNode("i", {
|
|
3150
|
-
class: ns$
|
|
3194
|
+
class: ns$b.be("mask", "dot-item")
|
|
3151
3195
|
}, null), vue.createVNode("i", {
|
|
3152
|
-
class: ns$
|
|
3196
|
+
class: ns$b.be("mask", "dot-item")
|
|
3153
3197
|
}, null) ]), vue.createVNode("span", {
|
|
3154
|
-
class: ns$
|
|
3155
|
-
}, [ loadingText ]) ]) : null
|
|
3198
|
+
class: ns$b.be("mask", "text")
|
|
3199
|
+
}, [ loadingText ]) ]) : null ]);
|
|
3156
3200
|
}
|
|
3157
3201
|
}), SearchColumn = vue.defineComponent({
|
|
3158
3202
|
name: "SearchColumn",
|
|
@@ -3824,7 +3868,7 @@
|
|
|
3824
3868
|
}, null) ]);
|
|
3825
3869
|
}
|
|
3826
3870
|
});
|
|
3827
|
-
const ns$
|
|
3871
|
+
const ns$a = useNamespace("dialog");
|
|
3828
3872
|
var NextDialog$1 = vue.defineComponent({
|
|
3829
3873
|
name: "NextDialog",
|
|
3830
3874
|
props: {
|
|
@@ -3889,7 +3933,7 @@
|
|
|
3889
3933
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(elementPlus.ElDialog, {
|
|
3890
3934
|
modelValue: visible.value,
|
|
3891
3935
|
"onUpdate:modelValue": $event => visible.value = $event,
|
|
3892
|
-
class: ns$
|
|
3936
|
+
class: ns$a.b(),
|
|
3893
3937
|
title: props.title,
|
|
3894
3938
|
appendToBody: props.appendToBody,
|
|
3895
3939
|
"destroy-on-close": !0,
|
|
@@ -3906,12 +3950,12 @@
|
|
|
3906
3950
|
}, {
|
|
3907
3951
|
default: () => [ slots.default?.() ],
|
|
3908
3952
|
header: ({close: close, titleId: titleId, titleClass: titleClass}) => vue.createVNode("div", {
|
|
3909
|
-
class: ns$
|
|
3953
|
+
class: ns$a.b("header")
|
|
3910
3954
|
}, [ vue.createVNode("h4", {
|
|
3911
3955
|
id: titleId,
|
|
3912
3956
|
class: titleClass
|
|
3913
3957
|
}, [ props.title ]), vue.createVNode("div", {
|
|
3914
|
-
class: ns$
|
|
3958
|
+
class: ns$a.e("header-right")
|
|
3915
3959
|
}, [ props.fullscreenBtn && vue.createVNode("span", {
|
|
3916
3960
|
class: "icon-fullscreen",
|
|
3917
3961
|
onClick: () => isFullscreen.value = !isFullscreen.value
|
|
@@ -3943,7 +3987,7 @@
|
|
|
3943
3987
|
settingBtn: !0,
|
|
3944
3988
|
operations: !1
|
|
3945
3989
|
};
|
|
3946
|
-
var defaultConfig$
|
|
3990
|
+
var defaultConfig$2 = {
|
|
3947
3991
|
size: "default",
|
|
3948
3992
|
colSpan: 8,
|
|
3949
3993
|
labelWidth: "6em",
|
|
@@ -3957,7 +4001,7 @@
|
|
|
3957
4001
|
submitText: null,
|
|
3958
4002
|
resetText: null
|
|
3959
4003
|
};
|
|
3960
|
-
const ns$
|
|
4004
|
+
const ns$9 = useNamespace("form");
|
|
3961
4005
|
var NumberRangePicker = vue.defineComponent({
|
|
3962
4006
|
name: "NumberRangePicker",
|
|
3963
4007
|
props: {
|
|
@@ -3996,7 +4040,7 @@
|
|
|
3996
4040
|
}));
|
|
3997
4041
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
3998
4042
|
ref: numberRangeRef,
|
|
3999
|
-
class: ns$
|
|
4043
|
+
class: ns$9.e("number-range")
|
|
4000
4044
|
}, [ vue.createVNode(elementPlus.ElInputNumber, {
|
|
4001
4045
|
modelValue: startNumber.value,
|
|
4002
4046
|
"onUpdate:modelValue": $event => startNumber.value = $event,
|
|
@@ -4006,7 +4050,7 @@
|
|
|
4006
4050
|
disabled: disabled,
|
|
4007
4051
|
onChange: onChangeStart
|
|
4008
4052
|
}, null), vue.createVNode("span", {
|
|
4009
|
-
class: ns$
|
|
4053
|
+
class: ns$9.em("number-range", "division")
|
|
4010
4054
|
}, [ t("next.date.rangeSeparator") ]), vue.createVNode(elementPlus.ElInputNumber, {
|
|
4011
4055
|
modelValue: endNumber.value,
|
|
4012
4056
|
"onUpdate:modelValue": $event => endNumber.value = $event,
|
|
@@ -4022,7 +4066,7 @@
|
|
|
4022
4066
|
function _isSlot$3(s) {
|
|
4023
4067
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s);
|
|
4024
4068
|
}
|
|
4025
|
-
const ns$
|
|
4069
|
+
const ns$8 = useNamespace("form"), InputTableSelect = vue.defineComponent({
|
|
4026
4070
|
name: "InputTableSelect",
|
|
4027
4071
|
props: {
|
|
4028
4072
|
modelValue: {
|
|
@@ -4050,7 +4094,7 @@
|
|
|
4050
4094
|
},
|
|
4051
4095
|
emits: [ "select" ],
|
|
4052
4096
|
setup(props, {emit: emit}) {
|
|
4053
|
-
const {t: t} = useLocale(), _disabled = props.disabled, _column = props.column, _placeholder = _column.placeholder || t("next.form.select") + _column.label, _tableDefaultConfig = deepClone(defaultConfig$
|
|
4097
|
+
const {t: t} = useLocale(), _disabled = props.disabled, _column = props.column, _placeholder = _column.placeholder || t("next.form.select") + _column.label, _tableDefaultConfig = deepClone(defaultConfig$3), _tableSelectConfig = deepClone(tableSelectConfig), _options = merge$1(_tableDefaultConfig, _tableSelectConfig, _column.tableSelect), tableSelectDialog = vue.reactive({
|
|
4054
4098
|
visible: !1,
|
|
4055
4099
|
title: _column.label + t("next.form.tableSelect"),
|
|
4056
4100
|
dialogWidth: _options.dialogWidth
|
|
@@ -4121,18 +4165,18 @@
|
|
|
4121
4165
|
}, renderContent = () => {
|
|
4122
4166
|
let _slot, _slot2;
|
|
4123
4167
|
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
4124
|
-
class: [ "el-input", ns$
|
|
4168
|
+
class: [ "el-input", ns$8.e("input-table"), ns$8.is("disabled", _disabled) ]
|
|
4125
4169
|
}, [ vue.createVNode("div", {
|
|
4126
4170
|
class: "el-input__wrapper"
|
|
4127
4171
|
}, [ tags?.value.length ? vue.createVNode("span", {
|
|
4128
|
-
class: ns$
|
|
4172
|
+
class: ns$8.em("input-table", "value")
|
|
4129
4173
|
}, [ tags.value.map(((tag, index) => vue.createVNode(elementPlus.ElTag, {
|
|
4130
4174
|
closable: !_disabled,
|
|
4131
4175
|
onClose: () => _onCloseTag(0, index)
|
|
4132
4176
|
}, {
|
|
4133
4177
|
default: () => [ tag.label ]
|
|
4134
4178
|
}))), tagsMore?.value?.length ? vue.createVNode(elementPlus.ElTooltip, {
|
|
4135
|
-
"popper-class": ns$
|
|
4179
|
+
"popper-class": ns$8.e("tooltip-tags"),
|
|
4136
4180
|
placement: "bottom",
|
|
4137
4181
|
effect: "light"
|
|
4138
4182
|
}, {
|
|
@@ -4146,10 +4190,10 @@
|
|
|
4146
4190
|
default: () => [ tag.label ]
|
|
4147
4191
|
})))
|
|
4148
4192
|
}) : null ]) : vue.createVNode("span", {
|
|
4149
|
-
class: ns$
|
|
4193
|
+
class: ns$8.em("input-table", "placeholder")
|
|
4150
4194
|
}, [ _placeholder ]) ]), vue.createVNode(elementPlus.ElButton, {
|
|
4151
4195
|
type: "primary",
|
|
4152
|
-
class: ns$
|
|
4196
|
+
class: ns$8.em("input-table", "append"),
|
|
4153
4197
|
disabled: _disabled,
|
|
4154
4198
|
icon: search_default,
|
|
4155
4199
|
onClick: onClickTableDialog
|
|
@@ -4163,7 +4207,7 @@
|
|
|
4163
4207
|
onClose: onCloseTableDialog
|
|
4164
4208
|
}, {
|
|
4165
4209
|
default: () => [ vue.createVNode("div", {
|
|
4166
|
-
class: ns$
|
|
4210
|
+
class: ns$8.em("input-table", "content")
|
|
4167
4211
|
}, [ vue.createVNode(elementPlus.ElRadioGroup, {
|
|
4168
4212
|
modelValue: sinleSelection.value
|
|
4169
4213
|
}, {
|
|
@@ -4186,7 +4230,7 @@
|
|
|
4186
4230
|
}) ]
|
|
4187
4231
|
}) ]
|
|
4188
4232
|
}) ]), vue.createVNode("div", {
|
|
4189
|
-
class: ns$
|
|
4233
|
+
class: ns$8.em("input-table", "footer")
|
|
4190
4234
|
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
4191
4235
|
onClick: onResetTableSelect
|
|
4192
4236
|
}, _isSlot$3(_slot = t("next.form.reset")) ? _slot : {
|
|
@@ -4202,7 +4246,7 @@
|
|
|
4202
4246
|
};
|
|
4203
4247
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
4204
4248
|
}
|
|
4205
|
-
}), ns$
|
|
4249
|
+
}), ns$7 = useNamespace("form");
|
|
4206
4250
|
var UploadImage = vue.defineComponent({
|
|
4207
4251
|
name: "UploadImage",
|
|
4208
4252
|
props: {
|
|
@@ -4250,7 +4294,7 @@
|
|
|
4250
4294
|
let urls = [];
|
|
4251
4295
|
return "string" == typeof value ? urls = [ value ] : "[object Array]" === Object.prototype.toString.call(value) && (urls = value),
|
|
4252
4296
|
urls = urls.filter((url => !!url)), urls.length ? vue.createVNode(elementPlus.ElImage, {
|
|
4253
|
-
class: ns$
|
|
4297
|
+
class: ns$7.e("preview-image"),
|
|
4254
4298
|
src: urls[0],
|
|
4255
4299
|
previewSrcList: urls,
|
|
4256
4300
|
"preview-teleported": !0,
|
|
@@ -4265,7 +4309,7 @@
|
|
|
4265
4309
|
})
|
|
4266
4310
|
}) : null;
|
|
4267
4311
|
})(), _disabled ? null : vue.createVNode(elementPlus.ElUpload, {
|
|
4268
|
-
class: [ ns$
|
|
4312
|
+
class: [ ns$7.b("upload-image"), props.className ],
|
|
4269
4313
|
style: props.style,
|
|
4270
4314
|
"list-type": props.listType,
|
|
4271
4315
|
"auto-upload": !1,
|
|
@@ -4390,8 +4434,8 @@
|
|
|
4390
4434
|
}, null) ]);
|
|
4391
4435
|
}
|
|
4392
4436
|
});
|
|
4393
|
-
const ns$
|
|
4394
|
-
var Element$
|
|
4437
|
+
const ns$6 = useNamespace("form");
|
|
4438
|
+
var Element$6 = vue.defineComponent({
|
|
4395
4439
|
name: "NextForm",
|
|
4396
4440
|
props: {
|
|
4397
4441
|
options: {
|
|
@@ -4409,7 +4453,7 @@
|
|
|
4409
4453
|
},
|
|
4410
4454
|
emits: [ "submit", "close", "reset" ],
|
|
4411
4455
|
setup(props, {slots: slots, emit: emit, expose: expose}) {
|
|
4412
|
-
const _config = deepClone(defaultConfig$
|
|
4456
|
+
const _config = deepClone(defaultConfig$2), options = vue.reactive(merge$1(_config, props.options)), _isEditing = vue.computed((() => "boolean" != typeof options.isEditing || options.isEditing)), {t: t} = useLocale(), colSpan = vue.ref(options.colSpan), formDatum = vue.reactive(props.formDatum) || {}, formParams = vue.reactive(merge$1({}, formDatum)), _formColumns = vue.ref([]), formRules = vue.reactive({});
|
|
4413
4457
|
vue.watch((() => [ props.columns, props.formDatum ]), (() => {
|
|
4414
4458
|
(() => {
|
|
4415
4459
|
const columns = props.columns;
|
|
@@ -4753,7 +4797,7 @@
|
|
|
4753
4797
|
let _slot;
|
|
4754
4798
|
return vue.createVNode(elementPlus.ElForm, {
|
|
4755
4799
|
ref: ruleFormRef,
|
|
4756
|
-
class: ns$
|
|
4800
|
+
class: ns$6.b(),
|
|
4757
4801
|
inline: !1,
|
|
4758
4802
|
model: formParams,
|
|
4759
4803
|
size: options.size
|
|
@@ -4774,7 +4818,7 @@
|
|
|
4774
4818
|
}, {
|
|
4775
4819
|
label: () => column.label ? vue.createVNode(vue.Fragment, null, [ vue.createVNode(NextTextEllipsis, {
|
|
4776
4820
|
content: t(column.label),
|
|
4777
|
-
class: ns$
|
|
4821
|
+
class: ns$6.e("item-label")
|
|
4778
4822
|
}, null), column.tip ? vue.createVNode(elementPlus.ElTooltip, {
|
|
4779
4823
|
effect: "dark",
|
|
4780
4824
|
content: column.tip,
|
|
@@ -4794,7 +4838,7 @@
|
|
|
4794
4838
|
}))), "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? _slot : {
|
|
4795
4839
|
default: () => [ _slot ]
|
|
4796
4840
|
})), _isEditing.value && options.showFooter ? vue.createVNode("div", {
|
|
4797
|
-
class: ns$
|
|
4841
|
+
class: ns$6.e("footer")
|
|
4798
4842
|
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
4799
4843
|
type: "primary",
|
|
4800
4844
|
loading: submitLoading.value,
|
|
@@ -4813,7 +4857,7 @@
|
|
|
4813
4857
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
4814
4858
|
}
|
|
4815
4859
|
});
|
|
4816
|
-
const NextTreeSelect = withInstall(treeSelect), NextForm = withInstall(Element$
|
|
4860
|
+
const NextTreeSelect = withInstall(treeSelect), NextForm = withInstall(Element$6);
|
|
4817
4861
|
var AddEditForm = vue.defineComponent({
|
|
4818
4862
|
name: "AddEditForm",
|
|
4819
4863
|
props: {
|
|
@@ -4867,17 +4911,17 @@
|
|
|
4867
4911
|
function _isSlot(s) {
|
|
4868
4912
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s);
|
|
4869
4913
|
}
|
|
4870
|
-
const ns$
|
|
4871
|
-
var Element$
|
|
4914
|
+
const ns$5 = useNamespace("crud-table");
|
|
4915
|
+
var Element$5 = vue.defineComponent({
|
|
4872
4916
|
name: "NextCrudTable",
|
|
4873
4917
|
props: defaultPropsConfig,
|
|
4874
4918
|
emits: [ "confirm-search", "clear-search", "change-pagination", "selection-change", "row-click", "row-contextmenu", "row-dblclick", "cell-click", "cell-dblclick", "cell-contextmenu", "cell-mouse-enter", "cell-mouse-leave", "expand-change", "click-add-edit", "close-add-edit", "view-add-edit", "delete-rows", "delete-row", "submit-form" ],
|
|
4875
4919
|
setup(props, {emit: emit, slots: slots, expose: expose}) {
|
|
4876
|
-
const _config = deepClone(defaultConfig$
|
|
4920
|
+
const _config = deepClone(defaultConfig$3), _options = vue.computed((() => {
|
|
4877
4921
|
const cfg = vue.unref(props.options);
|
|
4878
4922
|
return merge$1(_config, cfg);
|
|
4879
4923
|
})), options = vue.unref(_options);
|
|
4880
|
-
vue.provide("options", vue.computed((() => _options.value))), vue.provide("ns", ns$
|
|
4924
|
+
vue.provide("options", vue.computed((() => _options.value))), vue.provide("ns", ns$5);
|
|
4881
4925
|
const {t: t} = useLocale(), _columns = vue.ref(options.columns), _searchColumns = vue.ref([]), _formColumns = vue.ref([]), _updateColumnsAll = ops => {
|
|
4882
4926
|
((options, cb) => {
|
|
4883
4927
|
const _columns = vue.reactive(options.columns), _loadDicData = col => {
|
|
@@ -4999,7 +5043,7 @@
|
|
|
4999
5043
|
return params;
|
|
5000
5044
|
})()), onConfirmSearch = searchParams => {
|
|
5001
5045
|
const params = deepClone(vue.toRaw(searchParams));
|
|
5002
|
-
|
|
5046
|
+
isEqual(_searchFormParams.value, params) || (props.page.pageIndex = 1, _searchFormParams.value = params),
|
|
5003
5047
|
emit("confirm-search", params);
|
|
5004
5048
|
}, onClearSearch = () => {
|
|
5005
5049
|
emit("clear-search");
|
|
@@ -5118,11 +5162,11 @@
|
|
|
5118
5162
|
});
|
|
5119
5163
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5120
5164
|
ref: crudTableRef,
|
|
5121
|
-
class: [ ns$
|
|
5165
|
+
class: [ ns$5.b(), props.className ],
|
|
5122
5166
|
style: props.style
|
|
5123
5167
|
}, [ options.showSearchForm || options.showHeaderMenu ? vue.createVNode("header", {
|
|
5124
5168
|
ref: headerRef,
|
|
5125
|
-
class: ns$
|
|
5169
|
+
class: ns$5.b("header")
|
|
5126
5170
|
}, [ options.showSearchForm && vue.createVNode(HeaderSearch, {
|
|
5127
5171
|
columns: _searchColumns.value,
|
|
5128
5172
|
onZoomResize: updateTableContentHeight,
|
|
@@ -5136,12 +5180,12 @@
|
|
|
5136
5180
|
onClickRefresh: onClickRefresh
|
|
5137
5181
|
}, _isSlot(headerMenu_solts) ? headerMenu_solts : {
|
|
5138
5182
|
default: () => [ headerMenu_solts ]
|
|
5139
|
-
}), slots["table-head-tip"]?.() ]) : null, vue.createVNode(
|
|
5183
|
+
}), slots["table-head-tip"]?.() ]) : null, vue.createVNode(NextSpinLoading$1, {
|
|
5140
5184
|
loading: props.loading
|
|
5141
5185
|
}, {
|
|
5142
5186
|
default: () => [ vue.createVNode("div", {
|
|
5143
5187
|
ref: tableRef,
|
|
5144
|
-
class: ns$
|
|
5188
|
+
class: ns$5.b("content")
|
|
5145
5189
|
}, [ vue.createVNode(elementPlus.ElTable, {
|
|
5146
5190
|
data: tableData.value,
|
|
5147
5191
|
height: tableContentHeight.value,
|
|
@@ -5204,7 +5248,7 @@
|
|
|
5204
5248
|
}) ]) ]
|
|
5205
5249
|
}), options.isPagination ? vue.createVNode("div", {
|
|
5206
5250
|
ref: footerRef,
|
|
5207
|
-
class: ns$
|
|
5251
|
+
class: ns$5.b("footer")
|
|
5208
5252
|
}, [ vue.createVNode(FooterPagination, {
|
|
5209
5253
|
page: props.page,
|
|
5210
5254
|
onChange: onChangePagination
|
|
@@ -5230,7 +5274,7 @@
|
|
|
5230
5274
|
}) ]) ]) ]);
|
|
5231
5275
|
}
|
|
5232
5276
|
});
|
|
5233
|
-
const NextCrudTable = withInstall(Element$
|
|
5277
|
+
const NextCrudTable = withInstall(Element$5);
|
|
5234
5278
|
var propsConfig = {
|
|
5235
5279
|
className: {
|
|
5236
5280
|
type: String,
|
|
@@ -5260,13 +5304,13 @@
|
|
|
5260
5304
|
total: 0
|
|
5261
5305
|
})
|
|
5262
5306
|
}
|
|
5263
|
-
}, defaultConfig = {};
|
|
5264
|
-
const ns$
|
|
5307
|
+
}, defaultConfig$1 = {};
|
|
5308
|
+
const ns$4 = useNamespace("crud-table-virtualized");
|
|
5265
5309
|
const NextCrudTableVirtualized = withInstall(vue.defineComponent({
|
|
5266
5310
|
name: "NextCrudTableVirtualized",
|
|
5267
5311
|
props: propsConfig,
|
|
5268
5312
|
setup(props, {emit: emit}) {
|
|
5269
|
-
const _config = deepClone(defaultConfig), _options = vue.computed((() => {
|
|
5313
|
+
const _config = deepClone(defaultConfig$1), _options = vue.computed((() => {
|
|
5270
5314
|
const cfg = vue.unref(props.options);
|
|
5271
5315
|
return merge$1(_config, cfg);
|
|
5272
5316
|
})), options = vue.unref(_options);
|
|
@@ -5281,7 +5325,7 @@
|
|
|
5281
5325
|
emit("close-add-edit");
|
|
5282
5326
|
};
|
|
5283
5327
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5284
|
-
class: [ ns$
|
|
5328
|
+
class: [ ns$4.b(), props.className ]
|
|
5285
5329
|
}, [ vue.createVNode(NextSpinLoading, null, null), vue.createVNode(NextDialog, {
|
|
5286
5330
|
modelValue: addEditDialog.visible,
|
|
5287
5331
|
"onUpdate:modelValue": $event => addEditDialog.visible = $event,
|
|
@@ -5292,7 +5336,7 @@
|
|
|
5292
5336
|
onClose: onCloseAddEditDialog
|
|
5293
5337
|
}, null) ]) ]);
|
|
5294
5338
|
}
|
|
5295
|
-
})), NextSpinLoading = withInstall(
|
|
5339
|
+
})), NextSpinLoading = withInstall(NextSpinLoading$1), ns$3 = useNamespace("upload");
|
|
5296
5340
|
const NextUpload = withInstall(vue.defineComponent({
|
|
5297
5341
|
name: "NextUpload",
|
|
5298
5342
|
props: {
|
|
@@ -5326,7 +5370,7 @@
|
|
|
5326
5370
|
const slots = this.$slots, props = this.$props, emit = this.$emit, _t = this.t, uploadfilesPreview = vue.ref([]), body = document.getElementsByTagName("body")[0];
|
|
5327
5371
|
let previewImagesContainer = null;
|
|
5328
5372
|
return vue.createVNode(elementPlus.ElUpload, {
|
|
5329
|
-
class: [ ns$
|
|
5373
|
+
class: [ ns$3.b(), props.className ],
|
|
5330
5374
|
style: props.style,
|
|
5331
5375
|
"list-type": props.listType,
|
|
5332
5376
|
"auto-upload": !1,
|
|
@@ -5364,8 +5408,8 @@
|
|
|
5364
5408
|
})
|
|
5365
5409
|
});
|
|
5366
5410
|
}
|
|
5367
|
-
})), ns = useNamespace("video-player");
|
|
5368
|
-
var Element$
|
|
5411
|
+
})), ns$2 = useNamespace("video-player");
|
|
5412
|
+
var Element$2 = vue.defineComponent({
|
|
5369
5413
|
name: "NextVideoPlayer",
|
|
5370
5414
|
props: {
|
|
5371
5415
|
className: {
|
|
@@ -5438,7 +5482,7 @@
|
|
|
5438
5482
|
if (!classNames || !classNames.length) throw new Error("模型类别不能未空!");
|
|
5439
5483
|
container.innerHTML = "", tf__namespace.loadGraphModel(modelUrl).then((model => {
|
|
5440
5484
|
const canvas = document.createElement("canvas");
|
|
5441
|
-
canvas.className = ns.b("recongition"), container.appendChild(canvas);
|
|
5485
|
+
canvas.className = ns$2.b("recongition"), container.appendChild(canvas);
|
|
5442
5486
|
const ctx = canvas.getContext("2d"), detect_ctx = document.createElement("canvas").getContext("2d");
|
|
5443
5487
|
video.ontimeupdate = () => {
|
|
5444
5488
|
const {videoWidth: videoWidth, videoHeight: videoHeight, offsetTop: offsetTop, offsetLeft: offsetLeft} = video;
|
|
@@ -5609,17 +5653,916 @@
|
|
|
5609
5653
|
});
|
|
5610
5654
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5611
5655
|
ref: videoBoxRef,
|
|
5612
|
-
class: [ ns.b(), props.className ],
|
|
5656
|
+
class: [ ns$2.b(), props.className ],
|
|
5613
5657
|
style: props.style
|
|
5614
5658
|
}, null) ]);
|
|
5615
5659
|
}
|
|
5616
5660
|
});
|
|
5617
|
-
const NextVideoPlayer = withInstall(Element$
|
|
5661
|
+
const NextVideoPlayer = withInstall(Element$2);
|
|
5618
5662
|
const NextDragResize = withInstall(vue.defineComponent({
|
|
5619
5663
|
name: "NextDragResize",
|
|
5620
5664
|
props: {},
|
|
5621
5665
|
setup: () => () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(vue.Fragment, null, null) ])
|
|
5622
|
-
}))
|
|
5666
|
+
})), colors = [ "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc" ], convertToLabel = rect => {
|
|
5667
|
+
const label_type = rect.type, x_center = rect.startX + rect.rectWidth / 2, y_center = rect.startY + rect.rectHeight / 2;
|
|
5668
|
+
return [ label_type, parseFloat((x_center / rect.canvasWidth).toFixed(6)), parseFloat((y_center / rect.canvasHeight).toFixed(6)), parseFloat((rect.rectWidth / rect.canvasWidth).toFixed(6)), parseFloat((rect.rectHeight / rect.canvasHeight).toFixed(6)) ];
|
|
5669
|
+
}, canvertToCanvas = (labelData, canvasWidth, canvasHeight) => {
|
|
5670
|
+
const [label_type, x_center, y_center, width, height] = labelData, rectWidth = width * canvasWidth, rectHeight = height * canvasHeight, startX = x_center * canvasWidth - rectWidth / 2, startY = y_center * canvasHeight - rectHeight / 2;
|
|
5671
|
+
return {
|
|
5672
|
+
type: label_type,
|
|
5673
|
+
startX: Math.ceil(startX),
|
|
5674
|
+
startY: Math.ceil(startY),
|
|
5675
|
+
rectWidth: Math.ceil(rectWidth),
|
|
5676
|
+
rectHeight: Math.ceil(rectHeight),
|
|
5677
|
+
canvasWidth: canvasWidth,
|
|
5678
|
+
canvasHeight: canvasHeight
|
|
5679
|
+
};
|
|
5680
|
+
};
|
|
5681
|
+
var ContextMenuLabel = vue.defineComponent({
|
|
5682
|
+
props: {
|
|
5683
|
+
labelRect: {
|
|
5684
|
+
type: Object,
|
|
5685
|
+
default: () => ({})
|
|
5686
|
+
},
|
|
5687
|
+
classes: {
|
|
5688
|
+
type: Array,
|
|
5689
|
+
default: () => []
|
|
5690
|
+
},
|
|
5691
|
+
activateRect: {
|
|
5692
|
+
type: Object,
|
|
5693
|
+
default: null
|
|
5694
|
+
}
|
|
5695
|
+
},
|
|
5696
|
+
emits: [ "close", "select", "delete" ],
|
|
5697
|
+
setup(props, {emit: emit}) {
|
|
5698
|
+
const ns = vue.inject("ns", {}), onClose = () => {
|
|
5699
|
+
emit("close");
|
|
5700
|
+
}, onDelete = () => {
|
|
5701
|
+
emit("delete", props.activateRect);
|
|
5702
|
+
}, activateIndex = vue.ref();
|
|
5703
|
+
vue.watch((() => props.activateRect), (() => {
|
|
5704
|
+
const {type: type} = props.activateRect;
|
|
5705
|
+
activateIndex.value = isValueExist(type) ? type : null;
|
|
5706
|
+
}), {
|
|
5707
|
+
deep: !0,
|
|
5708
|
+
immediate: !0
|
|
5709
|
+
});
|
|
5710
|
+
const labelRectWidthHeight = vue.ref({
|
|
5711
|
+
width: 0,
|
|
5712
|
+
height: 0
|
|
5713
|
+
});
|
|
5714
|
+
vue.onMounted((() => {
|
|
5715
|
+
const {clientWidth: clientWidth, clientHeight: clientHeight} = labelMenuRef.value;
|
|
5716
|
+
labelRectWidthHeight.value.width = clientWidth, labelRectWidthHeight.value.height = clientHeight;
|
|
5717
|
+
}));
|
|
5718
|
+
const labelMenuRef = vue.ref(), labelStyleFixed = vue.computed((() => {
|
|
5719
|
+
const {left: left, top: top, canvasHeight: canvasHeight} = props.labelRect, height_diff = top + labelRectWidthHeight.value.height - canvasHeight;
|
|
5720
|
+
let y = top;
|
|
5721
|
+
return height_diff > 0 && (y -= height_diff), {
|
|
5722
|
+
top: y + "px",
|
|
5723
|
+
left: left + "px"
|
|
5724
|
+
};
|
|
5725
|
+
})), renderContent = () => vue.createVNode("div", {
|
|
5726
|
+
ref: labelMenuRef,
|
|
5727
|
+
class: [ ns.b("contextmenu-label") ],
|
|
5728
|
+
style: labelStyleFixed.value
|
|
5729
|
+
}, [ vue.createVNode("div", {
|
|
5730
|
+
class: "label-head"
|
|
5731
|
+
}, [ vue.createVNode("span", {
|
|
5732
|
+
style: "padding-right: 30px"
|
|
5733
|
+
}, [ vue.createTextVNode("标签选择") ]), vue.createVNode(elementPlus.ElIcon, {
|
|
5734
|
+
size: 16,
|
|
5735
|
+
onClick: onClose
|
|
5736
|
+
}, {
|
|
5737
|
+
default: () => [ vue.createVNode(close_default, null, null) ]
|
|
5738
|
+
}) ]), vue.createVNode("ul", {
|
|
5739
|
+
class: "label-main"
|
|
5740
|
+
}, [ props.classes.map(((name, index) => vue.createVNode("li", {
|
|
5741
|
+
key: index,
|
|
5742
|
+
onClick: () => (index => {
|
|
5743
|
+
activateIndex.value = index, emit("select", index);
|
|
5744
|
+
})(index),
|
|
5745
|
+
class: {
|
|
5746
|
+
"activate-label": activateIndex.value === index
|
|
5747
|
+
}
|
|
5748
|
+
}, [ vue.createVNode("span", {
|
|
5749
|
+
style: {
|
|
5750
|
+
"background-color": colors[index % colors.length]
|
|
5751
|
+
},
|
|
5752
|
+
class: "label-line"
|
|
5753
|
+
}, null), vue.createVNode("span", null, [ name ]) ]))) ]), isValueExist(activateIndex.value) ? vue.createVNode("div", {
|
|
5754
|
+
style: "margin: 10px auto 0"
|
|
5755
|
+
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
5756
|
+
icon: delete_default,
|
|
5757
|
+
plain: !0,
|
|
5758
|
+
size: "small",
|
|
5759
|
+
type: "danger",
|
|
5760
|
+
onClick: onDelete
|
|
5761
|
+
}, {
|
|
5762
|
+
default: () => [ vue.createTextVNode("删除标注框") ]
|
|
5763
|
+
}) ]) : null ]);
|
|
5764
|
+
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
5765
|
+
}
|
|
5766
|
+
});
|
|
5767
|
+
const {hexToRgb: hexToRgb} = useChangeColor();
|
|
5768
|
+
var DraggableRect = vue.defineComponent({
|
|
5769
|
+
props: {
|
|
5770
|
+
parentEl: {
|
|
5771
|
+
type: Object,
|
|
5772
|
+
default: null
|
|
5773
|
+
},
|
|
5774
|
+
rect: {
|
|
5775
|
+
type: Object,
|
|
5776
|
+
default: () => ({})
|
|
5777
|
+
},
|
|
5778
|
+
color: {
|
|
5779
|
+
type: String,
|
|
5780
|
+
default: null
|
|
5781
|
+
}
|
|
5782
|
+
},
|
|
5783
|
+
emits: [ "draggle-resize", "contextmenu" ],
|
|
5784
|
+
setup(props, {emit: emit}) {
|
|
5785
|
+
const isDraggle = vue.ref(!1), isResizeCorner = vue.ref({
|
|
5786
|
+
topLeft: !1,
|
|
5787
|
+
topCenter: !1,
|
|
5788
|
+
topRight: !1,
|
|
5789
|
+
leftCenter: !1,
|
|
5790
|
+
rightCenter: !1,
|
|
5791
|
+
bottomLeft: !1,
|
|
5792
|
+
bottomCenter: !1,
|
|
5793
|
+
bottomRight: !1
|
|
5794
|
+
}), draggleOffset = vue.ref({
|
|
5795
|
+
diff_x: null,
|
|
5796
|
+
diff_y: null
|
|
5797
|
+
});
|
|
5798
|
+
let parentRect = {};
|
|
5799
|
+
const rect = vue.toRef(props.rect), onMouseup = e => {
|
|
5800
|
+
e.preventDefault(), e.stopPropagation(), isDraggle.value = !1, isResizeCorner.value.topLeft = !1,
|
|
5801
|
+
isResizeCorner.value.topCenter = !1, isResizeCorner.value.topRight = !1, isResizeCorner.value.leftCenter = !1,
|
|
5802
|
+
isResizeCorner.value.rightCenter = !1, isResizeCorner.value.bottomLeft = !1, isResizeCorner.value.bottomCenter = !1,
|
|
5803
|
+
isResizeCorner.value.bottomRight = !1, emit("draggle-resize", rect.value);
|
|
5804
|
+
}, onMousemove = e => {
|
|
5805
|
+
if (isDraggle.value) {
|
|
5806
|
+
const newLeft = e.clientX - parentRect.left - draggleOffset.value.diff_x, newTop = e.clientY - parentRect.top - draggleOffset.value.diff_y;
|
|
5807
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5808
|
+
rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5809
|
+
}
|
|
5810
|
+
if (isResizeCorner.value.bottomCenter) {
|
|
5811
|
+
let newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5812
|
+
newHeight < 30 && (newHeight = 30), newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5813
|
+
rect.value.rectHeight = newHeight;
|
|
5814
|
+
}
|
|
5815
|
+
if (isResizeCorner.value.topCenter) {
|
|
5816
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5817
|
+
if (newTop < 0) return;
|
|
5818
|
+
if (newHeight < 30) return;
|
|
5819
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5820
|
+
}
|
|
5821
|
+
if (isResizeCorner.value.leftCenter) {
|
|
5822
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth;
|
|
5823
|
+
if (newLeft < 0) return;
|
|
5824
|
+
if (newWidth < 30) return;
|
|
5825
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5826
|
+
rect.value.rectWidth = newWidth;
|
|
5827
|
+
}
|
|
5828
|
+
if (isResizeCorner.value.rightCenter) {
|
|
5829
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX;
|
|
5830
|
+
newWidth < 30 && (newWidth = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5831
|
+
rect.value.rectWidth = newWidth;
|
|
5832
|
+
}
|
|
5833
|
+
if (isResizeCorner.value.bottomRight) {
|
|
5834
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX, newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5835
|
+
newWidth < 30 && (newWidth = 30), newHeight < 30 && (newHeight = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5836
|
+
newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5837
|
+
rect.value.rectWidth = newWidth, rect.value.rectHeight = newHeight;
|
|
5838
|
+
}
|
|
5839
|
+
if (isResizeCorner.value.bottomLeft) {
|
|
5840
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth, newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5841
|
+
if (newLeft < 0) return;
|
|
5842
|
+
if (newWidth < 30) return;
|
|
5843
|
+
newHeight < 30 && (newHeight = 30), newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5844
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5845
|
+
rect.value.rectWidth = newWidth, rect.value.rectHeight = newHeight;
|
|
5846
|
+
}
|
|
5847
|
+
if (isResizeCorner.value.topLeft) {
|
|
5848
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5849
|
+
if (newTop < 0) return;
|
|
5850
|
+
if (newHeight < 30) return;
|
|
5851
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5852
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth;
|
|
5853
|
+
if (newLeft < 0) return;
|
|
5854
|
+
if (newWidth < 30) return;
|
|
5855
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5856
|
+
rect.value.rectWidth = newWidth;
|
|
5857
|
+
}
|
|
5858
|
+
if (isResizeCorner.value.topRight) {
|
|
5859
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5860
|
+
if (newTop < 0) return;
|
|
5861
|
+
if (newHeight < 30) return;
|
|
5862
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5863
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX;
|
|
5864
|
+
newWidth < 30 && (newWidth = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5865
|
+
rect.value.rectWidth = newWidth;
|
|
5866
|
+
}
|
|
5867
|
+
};
|
|
5868
|
+
return vue.onMounted((() => {
|
|
5869
|
+
parentRect = props.parentEl.getBoundingClientRect(), document.addEventListener("mousemove", onMousemove),
|
|
5870
|
+
document.addEventListener("mouseup", onMouseup);
|
|
5871
|
+
})), vue.onUnmounted((() => {
|
|
5872
|
+
document.removeEventListener("mousemove", onMousemove, !1), document.removeEventListener("mouseup", onMouseup, !1);
|
|
5873
|
+
})), {
|
|
5874
|
+
onMousedown: e => {
|
|
5875
|
+
e.preventDefault(), isDraggle.value = !0, draggleOffset.value.diff_x = e.offsetX,
|
|
5876
|
+
draggleOffset.value.diff_y = e.offsetY;
|
|
5877
|
+
},
|
|
5878
|
+
onMouseup: onMouseup,
|
|
5879
|
+
onContextmenu: e => {
|
|
5880
|
+
e.preventDefault(), emit("contextmenu", e, rect.value);
|
|
5881
|
+
},
|
|
5882
|
+
rect: rect,
|
|
5883
|
+
onMousedownDot: (e, corner) => {
|
|
5884
|
+
e.preventDefault(), e.stopPropagation(), isResizeCorner.value[corner] = !0;
|
|
5885
|
+
}
|
|
5886
|
+
};
|
|
5887
|
+
},
|
|
5888
|
+
render() {
|
|
5889
|
+
const _ns = vue.inject("ns", {}), props = this.$props;
|
|
5890
|
+
return vue.createVNode("div", {
|
|
5891
|
+
class: [ _ns.b("draggable-rect") ],
|
|
5892
|
+
style: (() => {
|
|
5893
|
+
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = this.rect, style = {
|
|
5894
|
+
top: startY + "px",
|
|
5895
|
+
left: startX + "px",
|
|
5896
|
+
width: rectWidth + "px",
|
|
5897
|
+
height: rectHeight + "px"
|
|
5898
|
+
}, color = props.color;
|
|
5899
|
+
if (color) {
|
|
5900
|
+
const rgb_color = hexToRgb(color);
|
|
5901
|
+
rgb_color && (style.backgroundColor = `rgba(${rgb_color[0]},${rgb_color[1]},${rgb_color[2]}, 0.5)`);
|
|
5902
|
+
}
|
|
5903
|
+
return style;
|
|
5904
|
+
})(),
|
|
5905
|
+
onMousedown: this.onMousedown,
|
|
5906
|
+
onMouseup: this.onMouseup,
|
|
5907
|
+
onContextmenu: this.onContextmenu
|
|
5908
|
+
}, [ vue.createVNode("ul", {
|
|
5909
|
+
class: [ _ns.be("draggable-rect", "resize") ]
|
|
5910
|
+
}, [ vue.createVNode("li", {
|
|
5911
|
+
class: "top-left",
|
|
5912
|
+
onMousedown: event => this.onMousedownDot(event, "topLeft")
|
|
5913
|
+
}, null), vue.createVNode("li", {
|
|
5914
|
+
class: "top-center",
|
|
5915
|
+
onMousedown: event => this.onMousedownDot(event, "topCenter")
|
|
5916
|
+
}, null), vue.createVNode("li", {
|
|
5917
|
+
class: "top-right",
|
|
5918
|
+
onMousedown: event => this.onMousedownDot(event, "topRight")
|
|
5919
|
+
}, null), vue.createVNode("li", {
|
|
5920
|
+
class: "left-center",
|
|
5921
|
+
onMousedown: event => this.onMousedownDot(event, "leftCenter")
|
|
5922
|
+
}, null), vue.createVNode("li", {
|
|
5923
|
+
class: "right-center",
|
|
5924
|
+
onMousedown: event => this.onMousedownDot(event, "rightCenter")
|
|
5925
|
+
}, null), vue.createVNode("li", {
|
|
5926
|
+
class: "bottom-left",
|
|
5927
|
+
onMousedown: event => this.onMousedownDot(event, "bottomLeft")
|
|
5928
|
+
}, null), vue.createVNode("li", {
|
|
5929
|
+
class: "bottom-center",
|
|
5930
|
+
onMousedown: event => this.onMousedownDot(event, "bottomCenter")
|
|
5931
|
+
}, null), vue.createVNode("li", {
|
|
5932
|
+
class: "bottom-right",
|
|
5933
|
+
onMousedown: event => this.onMousedownDot(event, "bottomRight")
|
|
5934
|
+
}, null) ]) ]);
|
|
5935
|
+
}
|
|
5936
|
+
}), CanvasContext = vue.defineComponent({
|
|
5937
|
+
name: "NextCanvasContext",
|
|
5938
|
+
props: {
|
|
5939
|
+
classes: {
|
|
5940
|
+
type: Array,
|
|
5941
|
+
default: () => []
|
|
5942
|
+
},
|
|
5943
|
+
contextClientHeight: {
|
|
5944
|
+
type: Number,
|
|
5945
|
+
default: null
|
|
5946
|
+
},
|
|
5947
|
+
rowInfo: {
|
|
5948
|
+
type: Object,
|
|
5949
|
+
default: () => ({})
|
|
5950
|
+
}
|
|
5951
|
+
},
|
|
5952
|
+
emits: [ "change" ],
|
|
5953
|
+
setup(props, {emit: emit, expose: expose}) {
|
|
5954
|
+
const ns = vue.inject("ns", {}), _emit = vue.inject("_emit", null), canvasMainRef = vue.ref(), canvasBaseRef = vue.ref(), canvasRectRef = vue.ref(), labels = vue.ref([]), drawBaseCanvas = vue.ref({}), formatLabelsType = () => {
|
|
5955
|
+
const _labels = deepClone(labels.value);
|
|
5956
|
+
let yolo_label = [];
|
|
5957
|
+
return {
|
|
5958
|
+
rects: _labels.map((rect => {
|
|
5959
|
+
delete rect.typeName;
|
|
5960
|
+
const label_rect = convertToLabel(rect);
|
|
5961
|
+
return yolo_label.push(label_rect.join(" ")), vue.toRaw(rect);
|
|
5962
|
+
})),
|
|
5963
|
+
label_txt: yolo_label.join("\n")
|
|
5964
|
+
};
|
|
5965
|
+
}, loadingImage = vue.ref(!1), renderImageLabel = rowInfo => {
|
|
5966
|
+
labels.value = (rowInfo => rowInfo.labels ? rowInfo.labels.map((rect => {
|
|
5967
|
+
const typeName = props.classes[rect.type];
|
|
5968
|
+
return typeName && (rect.typeName = typeName), rect;
|
|
5969
|
+
})) : [])(rowInfo);
|
|
5970
|
+
const clientHeight = canvasMainRef.value?.clientHeight, ctx = canvasBaseRef.value?.getContext("2d");
|
|
5971
|
+
if (rowInfo?.imageSrc) {
|
|
5972
|
+
const image = new Image;
|
|
5973
|
+
image.src = rowInfo.imageSrc, loadingImage.value = !0, image.onload = () => {
|
|
5974
|
+
loadingImage.value = !1;
|
|
5975
|
+
const {width: width, height: height} = image, canvasHeight = clientHeight, scaleFactor = parseFloat((canvasHeight / height).toFixed(3)), canvasWidth = Math.ceil(width * scaleFactor);
|
|
5976
|
+
((canvasWidth, canvasHeight) => {
|
|
5977
|
+
canvasMainRef.value.style.width = canvasWidth + "px", canvasMainRef.value.style.height = canvasHeight + "px",
|
|
5978
|
+
canvasBaseRef.value.width = canvasWidth, canvasBaseRef.value.height = canvasHeight,
|
|
5979
|
+
canvasBaseRef.value.style.width = canvasWidth + "px", canvasBaseRef.value.style.height = canvasHeight + "px",
|
|
5980
|
+
canvasRectRef.value.width = canvasWidth, canvasRectRef.value.height = canvasHeight,
|
|
5981
|
+
canvasRectRef.value.style.width = canvasWidth + "px", canvasRectRef.value.style.height = canvasHeight + "px";
|
|
5982
|
+
})(canvasWidth, canvasHeight), labels.value = ((labels, canvasHeight) => {
|
|
5983
|
+
let scale_rects = [];
|
|
5984
|
+
for (let i = 0; i < labels.length; i++) {
|
|
5985
|
+
const rect = labels[i], scale = parseFloat((canvasHeight / rect.canvasHeight).toFixed(3));
|
|
5986
|
+
scale && (rect.startX = Math.ceil(rect.startX * scale), rect.startY = Math.ceil(rect.startY * scale),
|
|
5987
|
+
rect.rectWidth = Math.ceil(rect.rectWidth * scale), rect.rectHeight = Math.ceil(rect.rectHeight * scale),
|
|
5988
|
+
rect.canvasWidth = Math.ceil(rect.canvasWidth * scale), rect.canvasHeight = canvasHeight),
|
|
5989
|
+
scale_rects.push(rect);
|
|
5990
|
+
}
|
|
5991
|
+
return scale_rects;
|
|
5992
|
+
})(labels.value, canvasHeight);
|
|
5993
|
+
const {updateLabels: updateLabels, addDrawRect: addDrawRect, hitCanvasLabel: hitCanvasLabel} = (options => {
|
|
5994
|
+
const {ctx: ctx, labels: labels, image: image, canvasWidth: canvasWidth, canvasHeight: canvasHeight} = options, updateLabels = () => {
|
|
5995
|
+
ctx.clearRect(0, 0, canvasWidth, canvasHeight), ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight);
|
|
5996
|
+
for (let i = 0; i < labels.length; i++) {
|
|
5997
|
+
const rect = labels[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight, type: type} = rect, color = colors[type % colors.length];
|
|
5998
|
+
if (ctx.font = "bold 14px serif", ctx.textBaseline = "top", ctx.save(), ctx.strokeStyle = color,
|
|
5999
|
+
ctx.strokeRect(startX, startY, rectWidth, rectHeight), isValueExist(rect.typeName) || isValueExist(rect.type)) {
|
|
6000
|
+
const text = rect.typeName || rect.type;
|
|
6001
|
+
ctx.fillStyle = color, ctx.fillText(text, startX + 6, startY + 6);
|
|
6002
|
+
}
|
|
6003
|
+
ctx.restore();
|
|
6004
|
+
}
|
|
6005
|
+
};
|
|
6006
|
+
return updateLabels(), {
|
|
6007
|
+
updateLabels: updateLabels,
|
|
6008
|
+
addDrawRect: (rect, color = "#f30635") => {
|
|
6009
|
+
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
6010
|
+
ctx.strokeStyle = color, ctx.strokeRect(startX, startY, rectWidth, rectHeight);
|
|
6011
|
+
},
|
|
6012
|
+
hitCanvasLabel: (x, y) => {
|
|
6013
|
+
let hit_rect = null, hit_index = null, color = null;
|
|
6014
|
+
for (let i = 0; i < labels.length; i++) {
|
|
6015
|
+
const rect = labels[i], {type: type, startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
6016
|
+
x >= startX && x <= startX + rectWidth && y >= startY && y <= startY + rectHeight && (hit_rect = rect,
|
|
6017
|
+
hit_index = i, color = colors[type]);
|
|
6018
|
+
}
|
|
6019
|
+
return {
|
|
6020
|
+
hit_rect: hit_rect,
|
|
6021
|
+
hit_index: hit_index,
|
|
6022
|
+
color: color
|
|
6023
|
+
};
|
|
6024
|
+
}
|
|
6025
|
+
};
|
|
6026
|
+
})({
|
|
6027
|
+
canvas: canvasBaseRef.value,
|
|
6028
|
+
ctx: ctx,
|
|
6029
|
+
image: image,
|
|
6030
|
+
canvasWidth: canvasWidth,
|
|
6031
|
+
canvasHeight: canvasHeight,
|
|
6032
|
+
labels: labels.value,
|
|
6033
|
+
scaleFactor: scaleFactor
|
|
6034
|
+
});
|
|
6035
|
+
drawBaseCanvas.value.updateLabels = updateLabels, drawBaseCanvas.value.addDrawRect = addDrawRect,
|
|
6036
|
+
drawBaseCanvas.value.hitCanvasLabel = hitCanvasLabel;
|
|
6037
|
+
const {clearCanvas: clearCanvas} = ((canvas, callback, keyW) => {
|
|
6038
|
+
const canvasWidth = canvas.width, canvasHeight = canvas.height, ctx = canvas?.getContext("2d"), clearCanvas = () => {
|
|
6039
|
+
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
6040
|
+
};
|
|
6041
|
+
clearCanvas();
|
|
6042
|
+
let startX, startY, endX, endY, isDrawing = !1, isRectDraw = !1, isWKeyPressed = !1;
|
|
6043
|
+
document.addEventListener("keydown", (event => {
|
|
6044
|
+
"KeyW" === event.code && (isWKeyPressed = !0, canvas.style.cursor = "crosshair",
|
|
6045
|
+
canvas.style.zIndex = "11", keyW && keyW());
|
|
6046
|
+
})), document.addEventListener("keyup", (event => {
|
|
6047
|
+
isDrawing || "KeyW" === event.code && (isWKeyPressed = !1, canvas.style.cursor = "unset",
|
|
6048
|
+
canvas.style.zIndex = "0");
|
|
6049
|
+
})), canvas.addEventListener("mousedown", (e => {
|
|
6050
|
+
isWKeyPressed && (isDrawing = !0, startX = e.offsetX, startY = e.offsetY);
|
|
6051
|
+
})), canvas.addEventListener("mousemove", (e => {
|
|
6052
|
+
isDrawing && isWKeyPressed && (isRectDraw = !0, endX = e.offsetX, endY = e.offsetY,
|
|
6053
|
+
drawRect());
|
|
6054
|
+
})), canvas.addEventListener("mouseup", (() => {
|
|
6055
|
+
if (!isRectDraw) return;
|
|
6056
|
+
isDrawing = !1, isWKeyPressed = !1, canvas.style.cursor = "unset", canvas.style.zIndex = "0";
|
|
6057
|
+
const rectWidth = Math.abs(endX - startX), rectHeight = Math.abs(endY - startY);
|
|
6058
|
+
startX > endX && (startX = endX), startY > endY && (startY = endY), callback && callback({
|
|
6059
|
+
startX: startX,
|
|
6060
|
+
startY: startY,
|
|
6061
|
+
rectWidth: rectWidth,
|
|
6062
|
+
rectHeight: rectHeight,
|
|
6063
|
+
canvasWidth: canvasWidth,
|
|
6064
|
+
canvasHeight: canvasHeight
|
|
6065
|
+
}, {
|
|
6066
|
+
endX: endX,
|
|
6067
|
+
endY: endY
|
|
6068
|
+
}), isRectDraw = !1;
|
|
6069
|
+
}));
|
|
6070
|
+
const drawRect = (color = "#f30635") => {
|
|
6071
|
+
clearCanvas(), ctx.strokeStyle = color, ctx.strokeRect(startX, startY, endX - startX, endY - startY);
|
|
6072
|
+
};
|
|
6073
|
+
return {
|
|
6074
|
+
canvas: canvas,
|
|
6075
|
+
ctx: ctx,
|
|
6076
|
+
clearCanvas: clearCanvas,
|
|
6077
|
+
drawRect: drawRect
|
|
6078
|
+
};
|
|
6079
|
+
})(canvasRectRef.value, ((rect, {endX: endX, endY: endY}) => {
|
|
6080
|
+
activate_add_label.value = rect, drawBaseCanvas.value.addDrawRect(rect), updateContextmenuLabelFixed(endX, endY, rect);
|
|
6081
|
+
}), (() => {
|
|
6082
|
+
onCloseDraggableRectFixed();
|
|
6083
|
+
}));
|
|
6084
|
+
drawBaseCanvas.value.clearCanvasRect = clearCanvas;
|
|
6085
|
+
}, image.onerror = () => {
|
|
6086
|
+
loadingImage.value = !1;
|
|
6087
|
+
};
|
|
6088
|
+
}
|
|
6089
|
+
canvasBaseRef.value.addEventListener("contextmenu", (e => {
|
|
6090
|
+
e.preventDefault();
|
|
6091
|
+
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6092
|
+
onCloseContentmenuLabel(), onCloseDraggableRectFixed(), hit_rect && vue.nextTick((() => {
|
|
6093
|
+
updateContextmenuLabelFixed(x, y, hit_rect);
|
|
6094
|
+
}));
|
|
6095
|
+
})), canvasBaseRef.value.addEventListener("click", (e => {
|
|
6096
|
+
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect, hit_index: hit_index, color: color} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6097
|
+
onCloseDraggableRectFixed(), onCloseContentmenuLabel(), hit_rect && vue.nextTick((() => {
|
|
6098
|
+
updateDraggableRectFixed(x, y, hit_rect, hit_index, color);
|
|
6099
|
+
}));
|
|
6100
|
+
}));
|
|
6101
|
+
};
|
|
6102
|
+
vue.onMounted((() => {
|
|
6103
|
+
vue.watch((() => props.rowInfo), (info => {
|
|
6104
|
+
const rowInfo = vue.toRaw(info);
|
|
6105
|
+
renderImageLabel(rowInfo);
|
|
6106
|
+
}), {
|
|
6107
|
+
deep: !0,
|
|
6108
|
+
immediate: !0
|
|
6109
|
+
}), vue.watch((() => props.contextClientHeight), (height => {
|
|
6110
|
+
if (valueExist(height)) {
|
|
6111
|
+
canvasMainRef.value.style.height = height + "px";
|
|
6112
|
+
const rowInfo = vue.toRaw(props.rowInfo);
|
|
6113
|
+
renderImageLabel(rowInfo);
|
|
6114
|
+
}
|
|
6115
|
+
}));
|
|
6116
|
+
}));
|
|
6117
|
+
const contextmenuLabelFixed = vue.ref({
|
|
6118
|
+
show: !1,
|
|
6119
|
+
top: 0,
|
|
6120
|
+
left: 0,
|
|
6121
|
+
activateRect: null
|
|
6122
|
+
}), updateContextmenuLabelFixed = (x, y, rect) => {
|
|
6123
|
+
contextmenuLabelFixed.value.show = !0, contextmenuLabelFixed.value.left = x, contextmenuLabelFixed.value.top = y,
|
|
6124
|
+
contextmenuLabelFixed.value.canvasWidth = canvasBaseRef.value.width, contextmenuLabelFixed.value.canvasHeight = canvasBaseRef.value.height,
|
|
6125
|
+
contextmenuLabelFixed.value.activateRect = rect, activate_add_label.value = rect;
|
|
6126
|
+
}, onCloseContentmenuLabel = () => {
|
|
6127
|
+
contextmenuLabelFixed.value.show = !1, contextmenuLabelFixed.value.top = 0, contextmenuLabelFixed.value.left = 0,
|
|
6128
|
+
contextmenuLabelFixed.value.activateRect = null, activate_add_label.value = null,
|
|
6129
|
+
drawBaseCanvas.value.updateLabels(), drawBaseCanvas.value.clearCanvasRect();
|
|
6130
|
+
}, contextmenuLabelRect = vue.computed((() => {
|
|
6131
|
+
const {top: top, left: left, canvasWidth: canvasWidth, canvasHeight: canvasHeight} = contextmenuLabelFixed.value;
|
|
6132
|
+
return {
|
|
6133
|
+
top: top,
|
|
6134
|
+
left: left,
|
|
6135
|
+
canvasWidth: canvasWidth,
|
|
6136
|
+
canvasHeight: canvasHeight
|
|
6137
|
+
};
|
|
6138
|
+
})), draggableRectFixed = vue.ref({
|
|
6139
|
+
show: !1,
|
|
6140
|
+
top: 0,
|
|
6141
|
+
left: 0,
|
|
6142
|
+
width: 0,
|
|
6143
|
+
height: 0,
|
|
6144
|
+
activateRect: null,
|
|
6145
|
+
activateIndex: null,
|
|
6146
|
+
color: null
|
|
6147
|
+
}), updateDraggableRectFixed = (x, y, rect, index, color) => {
|
|
6148
|
+
draggableRectFixed.value.show = !0, draggableRectFixed.value.top = y, draggableRectFixed.value.left = x,
|
|
6149
|
+
draggableRectFixed.value.width = rect.rectWidth, draggableRectFixed.value.height = rect.rectHeight,
|
|
6150
|
+
draggableRectFixed.value.activateRect = rect, draggableRectFixed.value.activateIndex = index,
|
|
6151
|
+
draggableRectFixed.value.color = color;
|
|
6152
|
+
}, onCloseDraggableRectFixed = () => {
|
|
6153
|
+
draggableRectFixed.value.show = !1, draggableRectFixed.value.top = 0, draggableRectFixed.value.left = 0,
|
|
6154
|
+
draggableRectFixed.value.width = 0, draggableRectFixed.value.height = 0, draggableRectFixed.value.activateRect = null,
|
|
6155
|
+
draggableRectFixed.value.activateIndex = null, draggableRectFixed.value.color = null;
|
|
6156
|
+
}, onDraggleRectResize = rect => {
|
|
6157
|
+
draggableRectFixed.value.activateRect = rect, drawBaseCanvas.value.updateLabels();
|
|
6158
|
+
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6159
|
+
i > -1 && labels.value.splice(i, 1, rect);
|
|
6160
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6161
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6162
|
+
}, onContextmenuDraggable = (e, rect) => {
|
|
6163
|
+
e.preventDefault();
|
|
6164
|
+
const rect_x = e.offsetX, rect_y = e.offsetY, x = rect_x + rect.startX, y = rect_y + rect.startY;
|
|
6165
|
+
onCloseContentmenuLabel(), vue.nextTick((() => {
|
|
6166
|
+
updateContextmenuLabelFixed(x, y, rect);
|
|
6167
|
+
}));
|
|
6168
|
+
}, activate_add_label = vue.ref(), onSelectLabel = type => {
|
|
6169
|
+
activate_add_label.value.type = type;
|
|
6170
|
+
const typeName = props.classes[type];
|
|
6171
|
+
typeName && (activate_add_label.value.typeName = typeName);
|
|
6172
|
+
const i = labels.value.findIndex((o => isEqual(o, activate_add_label.value)));
|
|
6173
|
+
i > -1 ? labels.value.splice(i, 1, activate_add_label.value) : labels.value.push(activate_add_label.value),
|
|
6174
|
+
onCloseContentmenuLabel();
|
|
6175
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6176
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6177
|
+
}, onDeleteLabel = rect => {
|
|
6178
|
+
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6179
|
+
labels.value.splice(i, 1), onCloseContentmenuLabel(), onCloseDraggableRectFixed(),
|
|
6180
|
+
drawBaseCanvas.value.updateLabels();
|
|
6181
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6182
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6183
|
+
};
|
|
6184
|
+
expose({
|
|
6185
|
+
onCloseDraggableRectFixed: onCloseDraggableRectFixed,
|
|
6186
|
+
onCloseContentmenuLabel: onCloseContentmenuLabel,
|
|
6187
|
+
onSelectedLabel: (rect, index) => {
|
|
6188
|
+
onCloseDraggableRectFixed(), vue.nextTick((() => {
|
|
6189
|
+
const {startX: x, startY: y, type: type} = rect;
|
|
6190
|
+
updateDraggableRectFixed(x, y, rect, index, colors[type]);
|
|
6191
|
+
}));
|
|
6192
|
+
},
|
|
6193
|
+
onDeleteLabel: onDeleteLabel
|
|
6194
|
+
});
|
|
6195
|
+
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(NextSpinLoading, {
|
|
6196
|
+
loading: loadingImage.value,
|
|
6197
|
+
class: [ ns.b("loading") ]
|
|
6198
|
+
}, {
|
|
6199
|
+
default: () => [ vue.createVNode("div", {
|
|
6200
|
+
ref: canvasMainRef,
|
|
6201
|
+
class: [ ns.b("canvas") ]
|
|
6202
|
+
}, [ vue.createVNode("canvas", {
|
|
6203
|
+
ref: canvasBaseRef,
|
|
6204
|
+
class: [ ns.be("canvas", "context") ]
|
|
6205
|
+
}, null), vue.createVNode("canvas", {
|
|
6206
|
+
ref: canvasRectRef,
|
|
6207
|
+
class: [ ns.be("canvas", "rect") ]
|
|
6208
|
+
}, null), contextmenuLabelFixed.value.show ? vue.createVNode(ContextMenuLabel, {
|
|
6209
|
+
labelRect: contextmenuLabelRect.value,
|
|
6210
|
+
classes: props.classes,
|
|
6211
|
+
activateRect: contextmenuLabelFixed.value.activateRect,
|
|
6212
|
+
onClose: onCloseContentmenuLabel,
|
|
6213
|
+
onSelect: onSelectLabel,
|
|
6214
|
+
onDelete: onDeleteLabel
|
|
6215
|
+
}, null) : null, draggableRectFixed.value.show ? vue.createVNode(DraggableRect, {
|
|
6216
|
+
parentEl: canvasMainRef.value,
|
|
6217
|
+
rect: draggableRectFixed.value.activateRect,
|
|
6218
|
+
color: draggableRectFixed.value.color,
|
|
6219
|
+
onDraggleResize: onDraggleRectResize,
|
|
6220
|
+
onContextmenu: onContextmenuDraggable
|
|
6221
|
+
}, null) : null ]) ]
|
|
6222
|
+
}) ]);
|
|
6223
|
+
}
|
|
6224
|
+
}), RightLabel = vue.defineComponent({
|
|
6225
|
+
props: {
|
|
6226
|
+
classes: {
|
|
6227
|
+
type: Array,
|
|
6228
|
+
default: () => []
|
|
6229
|
+
},
|
|
6230
|
+
labels: {
|
|
6231
|
+
type: Array,
|
|
6232
|
+
default: () => []
|
|
6233
|
+
}
|
|
6234
|
+
},
|
|
6235
|
+
emits: [ "delete", "select" ],
|
|
6236
|
+
setup(props, {emit: emit}) {
|
|
6237
|
+
const {t: t} = useLocale(), ns = vue.inject("ns", {}), labels = vue.ref([]);
|
|
6238
|
+
vue.watch((() => props.labels), (rects => {
|
|
6239
|
+
const _rects = vue.toRaw(rects);
|
|
6240
|
+
labels.value = (labels => labels.length ? labels.map((rect => {
|
|
6241
|
+
const typeName = props.classes[rect.type];
|
|
6242
|
+
return typeName && (rect.typeName = typeName), rect;
|
|
6243
|
+
})) : [])(_rects);
|
|
6244
|
+
}), {
|
|
6245
|
+
deep: !0,
|
|
6246
|
+
immediate: !0
|
|
6247
|
+
});
|
|
6248
|
+
const renderContent = () => vue.createVNode("div", {
|
|
6249
|
+
class: [ ns.b("right") ]
|
|
6250
|
+
}, [ labels.value.length ? vue.createVNode("ul", null, [ labels.value.map(((rect, index) => vue.createVNode("li", {
|
|
6251
|
+
key: index,
|
|
6252
|
+
onClick: () => ((rect, index) => {
|
|
6253
|
+
emit("select", rect, index);
|
|
6254
|
+
})(rect, index)
|
|
6255
|
+
}, [ vue.createVNode("div", null, [ vue.createVNode("span", {
|
|
6256
|
+
style: {
|
|
6257
|
+
"background-color": colors[rect.type]
|
|
6258
|
+
},
|
|
6259
|
+
class: "label-line"
|
|
6260
|
+
}, null), vue.createVNode("span", null, [ rect.typeName ]) ]), vue.createVNode(elementPlus.ElPopconfirm, {
|
|
6261
|
+
title: t("next.labelimg.confirmDeleteLabel"),
|
|
6262
|
+
width: 180,
|
|
6263
|
+
onConfirm: () => (rect => {
|
|
6264
|
+
emit("delete", rect);
|
|
6265
|
+
})(rect)
|
|
6266
|
+
}, {
|
|
6267
|
+
reference: () => vue.createVNode(elementPlus.ElIcon, {
|
|
6268
|
+
size: 16,
|
|
6269
|
+
color: "#ff0000",
|
|
6270
|
+
onClick: event => {
|
|
6271
|
+
event.preventDefault(), event.stopPropagation();
|
|
6272
|
+
}
|
|
6273
|
+
}, {
|
|
6274
|
+
default: () => [ vue.createVNode(delete_default, null, null) ]
|
|
6275
|
+
})
|
|
6276
|
+
}) ]))) ]) : vue.createVNode(elementPlus.ElEmpty, {
|
|
6277
|
+
"image-size": 120,
|
|
6278
|
+
description: t("next.labelimg.emptyLabelText")
|
|
6279
|
+
}, null) ]);
|
|
6280
|
+
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
6281
|
+
}
|
|
6282
|
+
}), defaultConfig = {
|
|
6283
|
+
mainContentHeight: 600
|
|
6284
|
+
};
|
|
6285
|
+
const ns$1 = useNamespace("labelimg");
|
|
6286
|
+
var Element = vue.defineComponent({
|
|
6287
|
+
name: "NextLabelimg",
|
|
6288
|
+
props: {
|
|
6289
|
+
className: {
|
|
6290
|
+
type: String,
|
|
6291
|
+
default: ""
|
|
6292
|
+
},
|
|
6293
|
+
style: {
|
|
6294
|
+
type: Object,
|
|
6295
|
+
default: () => ({
|
|
6296
|
+
position: "unset"
|
|
6297
|
+
})
|
|
6298
|
+
},
|
|
6299
|
+
rowKey: {
|
|
6300
|
+
type: String,
|
|
6301
|
+
default: "id"
|
|
6302
|
+
},
|
|
6303
|
+
options: {
|
|
6304
|
+
type: Object,
|
|
6305
|
+
default: () => ({})
|
|
6306
|
+
},
|
|
6307
|
+
classes: {
|
|
6308
|
+
type: Array,
|
|
6309
|
+
default: () => []
|
|
6310
|
+
},
|
|
6311
|
+
data: {
|
|
6312
|
+
type: Array,
|
|
6313
|
+
default: () => []
|
|
6314
|
+
}
|
|
6315
|
+
},
|
|
6316
|
+
emits: [ "change", "save", "prev-click", "next-click" ],
|
|
6317
|
+
setup(props, {emit: emit, slots: slots, expose: expose}) {
|
|
6318
|
+
const {t: t} = useLocale(), _config = deepClone(defaultConfig), _options = vue.computed((() => {
|
|
6319
|
+
const cfg = vue.unref(props.options);
|
|
6320
|
+
return merge$1(_config, cfg);
|
|
6321
|
+
})), options = vue.unref(_options);
|
|
6322
|
+
vue.provide("ns", ns$1), vue.provide("_emit", emit);
|
|
6323
|
+
const activateNodeIndex = vue.ref(0), classes = vue.ref(props.classes), labelImages = vue.ref(deepClone(props.data));
|
|
6324
|
+
vue.watch((() => props.data), (data => {
|
|
6325
|
+
labelImages.value = deepClone(data);
|
|
6326
|
+
}), {
|
|
6327
|
+
deep: !0
|
|
6328
|
+
}), vue.watch((() => props.data.length), (() => {
|
|
6329
|
+
activateNodeIndex.value = 0;
|
|
6330
|
+
})), vue.watch((() => props.classes), (val => {
|
|
6331
|
+
classes.value = val;
|
|
6332
|
+
}), {
|
|
6333
|
+
deep: !0
|
|
6334
|
+
});
|
|
6335
|
+
const currentNode = vue.computed((() => {
|
|
6336
|
+
if (!labelImages.value) return {};
|
|
6337
|
+
const node = labelImages.value[activateNodeIndex.value] || {};
|
|
6338
|
+
return deepClone(node);
|
|
6339
|
+
})), activateNodeLabels = vue.ref(currentNode.value.labels || []);
|
|
6340
|
+
vue.watch((() => currentNode.value), (() => {
|
|
6341
|
+
activateNodeLabels.value = currentNode.value.labels || [];
|
|
6342
|
+
}));
|
|
6343
|
+
const onChangeNodeRect = rects => {
|
|
6344
|
+
currentNode.value.labels = rects, activateNodeLabels.value = rects;
|
|
6345
|
+
}, loading = vue.ref(!1), formatNodeLabels = () => {
|
|
6346
|
+
const node = currentNode.value;
|
|
6347
|
+
let yolo_label = [];
|
|
6348
|
+
return node.labels.forEach((rect => {
|
|
6349
|
+
delete rect.typeName;
|
|
6350
|
+
const label_rect = convertToLabel(rect);
|
|
6351
|
+
yolo_label.push(label_rect.join(" "));
|
|
6352
|
+
})), {
|
|
6353
|
+
node: node,
|
|
6354
|
+
label_txt: yolo_label.join("\n")
|
|
6355
|
+
};
|
|
6356
|
+
}, isChangeNodeLabels = () => isEqual(labelImages.value[activateNodeIndex.value].labels, currentNode.value.labels), switchKeydownAD = e => {
|
|
6357
|
+
const imageLength = labelImages.value.length;
|
|
6358
|
+
"KeyD" === e.code ? (activateNodeIndex.value++, activateNodeIndex.value >= imageLength && (activateNodeIndex.value = 0)) : "KeyA" === e.code && (activateNodeIndex.value--,
|
|
6359
|
+
activateNodeIndex.value < 0 && (activateNodeIndex.value = imageLength - 1));
|
|
6360
|
+
}, onKeydownPrevNext = e => {
|
|
6361
|
+
if (loading.value) return;
|
|
6362
|
+
if (![ "KeyA", "KeyD" ].includes(e.code)) return;
|
|
6363
|
+
loading.value = !0;
|
|
6364
|
+
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6365
|
+
if (canvasContextRef.value.onCloseDraggableRectFixed(), isChangeNodeLabels()) return switchKeydownAD(e),
|
|
6366
|
+
void (loading.value = !1);
|
|
6367
|
+
emit("save", {
|
|
6368
|
+
node: node,
|
|
6369
|
+
label_txt: label_txt
|
|
6370
|
+
}, (imageItem => {
|
|
6371
|
+
labelImages.value[activateNodeIndex.value] = imageItem || node, switchKeydownAD(e),
|
|
6372
|
+
loading.value = !1;
|
|
6373
|
+
}), (() => {
|
|
6374
|
+
loading.value = !1;
|
|
6375
|
+
}));
|
|
6376
|
+
}, onChangeActivateNode = index => {
|
|
6377
|
+
if (loading.value) return;
|
|
6378
|
+
loading.value = !0;
|
|
6379
|
+
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6380
|
+
if (canvasContextRef.value.onCloseDraggableRectFixed(), isChangeNodeLabels()) return activateNodeIndex.value = index,
|
|
6381
|
+
void (loading.value = !1);
|
|
6382
|
+
emit("save", {
|
|
6383
|
+
node: node,
|
|
6384
|
+
label_txt: label_txt
|
|
6385
|
+
}, (imageItem => {
|
|
6386
|
+
labelImages.value[activateNodeIndex.value] = imageItem || node, activateNodeIndex.value = index,
|
|
6387
|
+
loading.value = !1;
|
|
6388
|
+
}), (() => {
|
|
6389
|
+
loading.value = !1;
|
|
6390
|
+
}));
|
|
6391
|
+
}, onPaginationPrev = () => {
|
|
6392
|
+
const imageLength = labelImages.value.length;
|
|
6393
|
+
let i = activateNodeIndex.value - 1;
|
|
6394
|
+
i < 0 && (i = imageLength - 1), onChangeActivateNode(i), emit("prev-click");
|
|
6395
|
+
}, onPaginationNext = () => {
|
|
6396
|
+
const imageLength = labelImages.value.length;
|
|
6397
|
+
let i = activateNodeIndex.value + 1;
|
|
6398
|
+
i >= imageLength && (i = 0), onChangeActivateNode(i), emit("next-click");
|
|
6399
|
+
}, canvasContextRef = vue.ref(), layoutLabelRef = vue.ref(), headerRef = vue.ref(), mainRef = vue.ref(), footerRef = vue.ref(), mainContentHeight = vue.ref(options.mainContentHeight);
|
|
6400
|
+
vue.onMounted((() => {
|
|
6401
|
+
document.addEventListener("keydown", onKeydownPrevNext), elementResize(layoutLabelRef.value, (() => {
|
|
6402
|
+
vue.nextTick((() => {
|
|
6403
|
+
layoutLabelRef.value.style.position = "unset";
|
|
6404
|
+
const contentHeight = (layoutLabelRef.value?.clientHeight || 0) - ((headerRef.value?.clientHeight || 0) + (footerRef.value?.clientHeight || 0));
|
|
6405
|
+
mainContentHeight.value = contentHeight;
|
|
6406
|
+
}));
|
|
6407
|
+
}));
|
|
6408
|
+
})), vue.onUnmounted((() => {
|
|
6409
|
+
document.removeEventListener("keydown", onKeydownPrevNext);
|
|
6410
|
+
}));
|
|
6411
|
+
const onSelectLabelNode = (rect, index) => {
|
|
6412
|
+
canvasContextRef.value.onSelectedLabel(rect, index);
|
|
6413
|
+
}, onDeleteLabelNode = rect => {
|
|
6414
|
+
canvasContextRef.value.onDeleteLabel(rect);
|
|
6415
|
+
};
|
|
6416
|
+
expose({
|
|
6417
|
+
convertToLabel: convertToLabel,
|
|
6418
|
+
canvertToCanvas: canvertToCanvas
|
|
6419
|
+
});
|
|
6420
|
+
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
6421
|
+
ref: layoutLabelRef,
|
|
6422
|
+
class: [ ns$1.b(), props.className ],
|
|
6423
|
+
style: {
|
|
6424
|
+
...props.style
|
|
6425
|
+
}
|
|
6426
|
+
}, [ vue.createVNode(NextSpinLoading$1, {
|
|
6427
|
+
loading: loading.value,
|
|
6428
|
+
tip: t("next.labelimg.saveTxt"),
|
|
6429
|
+
class: [ ns$1.b("loading") ]
|
|
6430
|
+
}, {
|
|
6431
|
+
default: () => [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
6432
|
+
default: () => [ vue.createVNode("header", {
|
|
6433
|
+
ref: headerRef,
|
|
6434
|
+
class: [ ns$1.b("header") ]
|
|
6435
|
+
}, [ slots.header ? slots.header() : vue.createVNode(vue.Fragment, null, [ vue.createVNode("ul", null, null), vue.createVNode("ul", null, null) ]) ]), vue.createVNode("div", {
|
|
6436
|
+
ref: mainRef,
|
|
6437
|
+
class: [ ns$1.b("main") ],
|
|
6438
|
+
style: {
|
|
6439
|
+
height: mainContentHeight.value + "px"
|
|
6440
|
+
}
|
|
6441
|
+
}, [ vue.createVNode("div", {
|
|
6442
|
+
class: [ ns$1.be("main", "content") ]
|
|
6443
|
+
}, [ vue.createVNode(CanvasContext, {
|
|
6444
|
+
ref: canvasContextRef,
|
|
6445
|
+
contextClientHeight: mainContentHeight.value,
|
|
6446
|
+
classes: classes.value,
|
|
6447
|
+
rowInfo: currentNode.value,
|
|
6448
|
+
onChange: onChangeNodeRect
|
|
6449
|
+
}, null) ]), vue.createVNode(RightLabel, {
|
|
6450
|
+
classes: classes.value,
|
|
6451
|
+
labels: activateNodeLabels.value,
|
|
6452
|
+
onDelete: onDeleteLabelNode,
|
|
6453
|
+
onSelect: onSelectLabelNode
|
|
6454
|
+
}, null) ]), vue.createVNode("footer", {
|
|
6455
|
+
ref: footerRef,
|
|
6456
|
+
class: [ ns$1.b("footer") ]
|
|
6457
|
+
}, [ vue.createVNode("div", {
|
|
6458
|
+
class: [ ns$1.be("footer", "left") ]
|
|
6459
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
6460
|
+
size: 24,
|
|
6461
|
+
color: "#797979",
|
|
6462
|
+
onClick: onPaginationPrev
|
|
6463
|
+
}, {
|
|
6464
|
+
default: () => [ vue.createVNode(arrow_left_default, null, null) ]
|
|
6465
|
+
}) ]), vue.createVNode("div", {
|
|
6466
|
+
class: [ ns$1.be("footer", "center") ]
|
|
6467
|
+
}, [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
6468
|
+
default: () => [ vue.createVNode("ul", {
|
|
6469
|
+
class: [ ns$1.bem("footer", "center", "list") ]
|
|
6470
|
+
}, [ labelImages.value.map(((item, index) => vue.createVNode("li", {
|
|
6471
|
+
key: index,
|
|
6472
|
+
onClick: () => onChangeActivateNode(index),
|
|
6473
|
+
class: {
|
|
6474
|
+
"is-activate": activateNodeIndex.value === index
|
|
6475
|
+
}
|
|
6476
|
+
}, [ vue.createVNode(elementPlus.ElImage, {
|
|
6477
|
+
style: "height: 100%",
|
|
6478
|
+
src: item.imageSrc,
|
|
6479
|
+
"zoom-rate": 1.2,
|
|
6480
|
+
"max-scale": 2,
|
|
6481
|
+
"min-scale": .2,
|
|
6482
|
+
fit: "cover"
|
|
6483
|
+
}, null) ]))) ]) ]
|
|
6484
|
+
}) ]), vue.createVNode("div", {
|
|
6485
|
+
class: [ ns$1.be("footer", "right") ]
|
|
6486
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
6487
|
+
size: 24,
|
|
6488
|
+
color: "#797979",
|
|
6489
|
+
onClick: onPaginationNext
|
|
6490
|
+
}, {
|
|
6491
|
+
default: () => [ vue.createVNode(arrow_right_default, null, null) ]
|
|
6492
|
+
}) ]) ]) ]
|
|
6493
|
+
}) ]
|
|
6494
|
+
}) ]) ]);
|
|
6495
|
+
}
|
|
6496
|
+
});
|
|
6497
|
+
const ns = useNamespace("labelimg-preview");
|
|
6498
|
+
var preview = vue.defineComponent({
|
|
6499
|
+
name: "NextLabelimgPreview",
|
|
6500
|
+
props: {
|
|
6501
|
+
className: {
|
|
6502
|
+
type: String,
|
|
6503
|
+
default: ""
|
|
6504
|
+
},
|
|
6505
|
+
style: {
|
|
6506
|
+
type: Object,
|
|
6507
|
+
default: () => ({})
|
|
6508
|
+
},
|
|
6509
|
+
src: {
|
|
6510
|
+
type: String,
|
|
6511
|
+
default: ""
|
|
6512
|
+
},
|
|
6513
|
+
classes: {
|
|
6514
|
+
type: Array,
|
|
6515
|
+
default: () => []
|
|
6516
|
+
},
|
|
6517
|
+
labels: {
|
|
6518
|
+
type: Array,
|
|
6519
|
+
default: () => []
|
|
6520
|
+
}
|
|
6521
|
+
},
|
|
6522
|
+
setup(props) {
|
|
6523
|
+
const canvasBaseRef = vue.ref(), classes = vue.ref(deepClone(props.classes)), labels = vue.ref(deepClone(props.labels)), renderImageAndLabel = () => {
|
|
6524
|
+
if (props.src) {
|
|
6525
|
+
const ctx = canvasBaseRef.value?.getContext("2d"), image = new Image;
|
|
6526
|
+
image.src = props.src, image.onload = () => {
|
|
6527
|
+
const {width: width, height: height} = image, canvasHeight = height, scaleFactor = canvasHeight / height, canvasWidth = Math.ceil(width * scaleFactor);
|
|
6528
|
+
((canvasWidth, canvasHeight) => {
|
|
6529
|
+
canvasBaseRef.value.width = canvasWidth, canvasBaseRef.value.height = canvasHeight,
|
|
6530
|
+
canvasBaseRef.value.style.width = canvasWidth + "px", canvasBaseRef.value.style.height = canvasHeight + "px";
|
|
6531
|
+
})(canvasWidth, canvasHeight), ctx.clearRect(0, 0, canvasWidth, canvasHeight), ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight);
|
|
6532
|
+
for (let i = 0; i < labels.value.length; i++) {
|
|
6533
|
+
const rect = labels.value[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight, type: type} = rect, color = colors[type % colors.length];
|
|
6534
|
+
if (ctx.font = "bold 14px serif", ctx.textBaseline = "top", ctx.save(), ctx.strokeStyle = color,
|
|
6535
|
+
ctx.strokeRect(startX, startY, rectWidth, rectHeight), !isValueExist(rect.typeName)) {
|
|
6536
|
+
const typeName = classes.value[rect.type];
|
|
6537
|
+
typeName && (rect.typeName = typeName);
|
|
6538
|
+
}
|
|
6539
|
+
if (isValueExist(rect.typeName) || isValueExist(rect.type)) {
|
|
6540
|
+
const text = rect.typeName || rect.type;
|
|
6541
|
+
ctx.fillStyle = color, ctx.fillText(text, startX + 6, startY + 6);
|
|
6542
|
+
}
|
|
6543
|
+
ctx.restore();
|
|
6544
|
+
}
|
|
6545
|
+
};
|
|
6546
|
+
}
|
|
6547
|
+
};
|
|
6548
|
+
vue.onMounted((() => {
|
|
6549
|
+
vue.watch((() => props.src), (() => {
|
|
6550
|
+
renderImageAndLabel();
|
|
6551
|
+
}), {
|
|
6552
|
+
immediate: !0
|
|
6553
|
+
});
|
|
6554
|
+
}));
|
|
6555
|
+
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
6556
|
+
class: [ ns.b(), props.className ],
|
|
6557
|
+
style: {
|
|
6558
|
+
...props.style
|
|
6559
|
+
}
|
|
6560
|
+
}, [ vue.createVNode("canvas", {
|
|
6561
|
+
ref: canvasBaseRef
|
|
6562
|
+
}, null) ]) ]);
|
|
6563
|
+
}
|
|
6564
|
+
});
|
|
6565
|
+
const NextLabelimg = withInstall(Element), NextLabelimgPreview = withInstall(preview);
|
|
5623
6566
|
var components = Object.freeze({
|
|
5624
6567
|
__proto__: null,
|
|
5625
6568
|
NextContainer: NextContainer,
|
|
@@ -5628,6 +6571,8 @@
|
|
|
5628
6571
|
NextDialog: NextDialog,
|
|
5629
6572
|
NextDragResize: NextDragResize,
|
|
5630
6573
|
NextForm: NextForm,
|
|
6574
|
+
NextLabelimg: NextLabelimg,
|
|
6575
|
+
NextLabelimgPreview: NextLabelimgPreview,
|
|
5631
6576
|
NextLayout: NextLayout,
|
|
5632
6577
|
NextMenu: NextMenu,
|
|
5633
6578
|
NextSpinLoading: NextSpinLoading,
|
|
@@ -5678,11 +6623,12 @@
|
|
|
5678
6623
|
})(app);
|
|
5679
6624
|
};
|
|
5680
6625
|
var index = {
|
|
5681
|
-
version: "0.2.
|
|
6626
|
+
version: "0.2.9",
|
|
5682
6627
|
install: install
|
|
5683
6628
|
};
|
|
5684
6629
|
exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable, exports.NextCrudTableVirtualized = NextCrudTableVirtualized,
|
|
5685
6630
|
exports.NextDialog = NextDialog, exports.NextDragResize = NextDragResize, exports.NextForm = NextForm,
|
|
6631
|
+
exports.NextLabelimg = NextLabelimg, exports.NextLabelimgPreview = NextLabelimgPreview,
|
|
5686
6632
|
exports.NextLayout = NextLayout, exports.NextMenu = NextMenu, exports.NextSpinLoading = NextSpinLoading,
|
|
5687
6633
|
exports.NextTabs = NextTabs, exports.NextTextEllipsis = NextTextEllipsis, exports.NextTreeSelect = NextTreeSelect,
|
|
5688
6634
|
exports.NextUpload = NextUpload, exports.NextVideoPlayer = NextVideoPlayer, exports.buildLocaleContext = buildLocaleContext,
|
|
@@ -5723,7 +6669,7 @@
|
|
|
5723
6669
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
5724
6670
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
5725
6671
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
5726
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.2.
|
|
6672
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.2.9",
|
|
5727
6673
|
Object.defineProperty(exports, "__esModule", {
|
|
5728
6674
|
value: !0
|
|
5729
6675
|
});
|