next-element-vue 0.2.6 → 0.2.8
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 +3 -2
- package/dist/index.js +793 -106
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +792 -111
- package/dist/index.umd.min.js +3 -3
- package/dist/packages/components/labelimg/index.d.ts +44 -0
- package/dist/packages/components/labelimg/src/hooks/canvas-context-hook.d.ts +52 -0
- package/dist/packages/components/labelimg/src/index.d.ts +44 -0
- package/dist/packages/components/labelimg/src/widgets/canvas-context.d.ts +23 -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 +43 -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 +3 -0
- package/dist/packages/locale/lang/zh-cn.d.ts +3 -0
- package/dist/packages/locale/lang/zh-tw.d.ts +3 -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.8 v
|
|
6
|
+
* 发布日期:2024-06-12
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -789,6 +789,9 @@
|
|
|
789
789
|
tabsRight: "关闭右侧",
|
|
790
790
|
tabsAll: "关闭全部",
|
|
791
791
|
systemSetting: "系统配置"
|
|
792
|
+
},
|
|
793
|
+
labelimg: {
|
|
794
|
+
saveTxt: "保存中..."
|
|
792
795
|
}
|
|
793
796
|
}
|
|
794
797
|
}, enLocale = {
|
|
@@ -858,6 +861,9 @@
|
|
|
858
861
|
tabsRight: "close right",
|
|
859
862
|
tabsAll: "close all",
|
|
860
863
|
systemSetting: "system setting"
|
|
864
|
+
},
|
|
865
|
+
labelimg: {
|
|
866
|
+
saveTxt: "saving..."
|
|
861
867
|
}
|
|
862
868
|
}
|
|
863
869
|
}, zhtwLocale = {
|
|
@@ -927,6 +933,9 @@
|
|
|
927
933
|
tabsRight: "關閉右側",
|
|
928
934
|
tabsAll: "關閉全部",
|
|
929
935
|
systemSetting: "系統配置"
|
|
936
|
+
},
|
|
937
|
+
labelimg: {
|
|
938
|
+
saveTxt: "保存中..."
|
|
930
939
|
}
|
|
931
940
|
}
|
|
932
941
|
};
|
|
@@ -1099,7 +1108,7 @@
|
|
|
1099
1108
|
isDark: !1
|
|
1100
1109
|
}
|
|
1101
1110
|
};
|
|
1102
|
-
const ns$
|
|
1111
|
+
const ns$j = useNamespace("text-ellipsis");
|
|
1103
1112
|
const NextTextEllipsis = withInstall(vue.defineComponent({
|
|
1104
1113
|
name: "NextTextEllipsis",
|
|
1105
1114
|
props: {
|
|
@@ -1145,7 +1154,7 @@
|
|
|
1145
1154
|
}
|
|
1146
1155
|
};
|
|
1147
1156
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
1148
|
-
class: [ ns$
|
|
1157
|
+
class: [ ns$j.b(), props.class ],
|
|
1149
1158
|
style: setWidth.value,
|
|
1150
1159
|
onMouseenter: onMouseenter
|
|
1151
1160
|
}, [ isTip.value ? vue.createVNode(elementPlus.ElTooltip, {
|
|
@@ -1155,11 +1164,11 @@
|
|
|
1155
1164
|
disabled: props.disabled
|
|
1156
1165
|
}, {
|
|
1157
1166
|
default: () => [ vue.createVNode("span", {
|
|
1158
|
-
class: ns$
|
|
1167
|
+
class: ns$j.e("text"),
|
|
1159
1168
|
ref: ellipsisRef
|
|
1160
1169
|
}, [ slots.default ? slots.default() : props.content ]) ]
|
|
1161
1170
|
}) : vue.createVNode("span", {
|
|
1162
|
-
class: ns$
|
|
1171
|
+
class: ns$j.e("text"),
|
|
1163
1172
|
ref: ellipsisRef
|
|
1164
1173
|
}, [ slots.default ? slots.default() : props.content ]) ]) ]);
|
|
1165
1174
|
}
|
|
@@ -1194,7 +1203,29 @@
|
|
|
1194
1203
|
}, null, -1) ];
|
|
1195
1204
|
var arrow_down_default = export_helper_default(arrow_down_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1196
1205
|
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_16, _hoisted_36);
|
|
1197
|
-
} ], [ "__file", "arrow-down.vue" ] ]),
|
|
1206
|
+
} ], [ "__file", "arrow-down.vue" ] ]), arrow_left_vue_vue_type_script_lang_default = {
|
|
1207
|
+
name: "ArrowLeft"
|
|
1208
|
+
}, _hoisted_18 = {
|
|
1209
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1210
|
+
viewBox: "0 0 1024 1024"
|
|
1211
|
+
}, _hoisted_38 = [ vue.createElementVNode("path", {
|
|
1212
|
+
fill: "currentColor",
|
|
1213
|
+
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"
|
|
1214
|
+
}, null, -1) ];
|
|
1215
|
+
var arrow_left_default = export_helper_default(arrow_left_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1216
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_18, _hoisted_38);
|
|
1217
|
+
} ], [ "__file", "arrow-left.vue" ] ]), arrow_right_vue_vue_type_script_lang_default = {
|
|
1218
|
+
name: "ArrowRight"
|
|
1219
|
+
}, _hoisted_110 = {
|
|
1220
|
+
xmlns: "http://www.w3.org/2000/svg",
|
|
1221
|
+
viewBox: "0 0 1024 1024"
|
|
1222
|
+
}, _hoisted_310 = [ vue.createElementVNode("path", {
|
|
1223
|
+
fill: "currentColor",
|
|
1224
|
+
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"
|
|
1225
|
+
}, null, -1) ];
|
|
1226
|
+
var arrow_right_default = export_helper_default(arrow_right_vue_vue_type_script_lang_default, [ [ "render", function(_ctx, _cache, $props, $setup, $data, $options) {
|
|
1227
|
+
return vue.openBlock(), vue.createElementBlock("svg", _hoisted_110, _hoisted_310);
|
|
1228
|
+
} ], [ "__file", "arrow-right.vue" ] ]), arrow_up_vue_vue_type_script_lang_default = {
|
|
1198
1229
|
name: "ArrowUp"
|
|
1199
1230
|
}, _hoisted_112 = {
|
|
1200
1231
|
xmlns: "http://www.w3.org/2000/svg",
|
|
@@ -2460,7 +2491,7 @@
|
|
|
2460
2491
|
}, null) ]
|
|
2461
2492
|
}))) ]) ]);
|
|
2462
2493
|
}
|
|
2463
|
-
}), ns$
|
|
2494
|
+
}), ns$i = useNamespace("menu");
|
|
2464
2495
|
const NextMenu = withInstall(vue.defineComponent({
|
|
2465
2496
|
name: "NextMenu",
|
|
2466
2497
|
props: {
|
|
@@ -2487,13 +2518,13 @@
|
|
|
2487
2518
|
}
|
|
2488
2519
|
},
|
|
2489
2520
|
setup(props) {
|
|
2490
|
-
vue.provide("ns", ns$
|
|
2521
|
+
vue.provide("ns", ns$i);
|
|
2491
2522
|
const router = vue.getCurrentInstance().appContext.config.globalProperties.$router, currentPath = router.currentRoute?.value.fullPath, activePath = vue.ref(currentPath);
|
|
2492
2523
|
vue.watch((() => router.currentRoute?.value), (to => {
|
|
2493
2524
|
activePath.value = to.fullPath;
|
|
2494
2525
|
}));
|
|
2495
2526
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(elementPlus.ElMenu, {
|
|
2496
|
-
class: [ ns$
|
|
2527
|
+
class: [ ns$i.b(), props.className ],
|
|
2497
2528
|
style: props.style,
|
|
2498
2529
|
defaultActive: activePath.value,
|
|
2499
2530
|
router: props.router,
|
|
@@ -2501,7 +2532,7 @@
|
|
|
2501
2532
|
ellipsis: !0
|
|
2502
2533
|
}, {
|
|
2503
2534
|
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$
|
|
2535
|
+
"popper-class": ns$i.b("popper"),
|
|
2505
2536
|
index: item.path || item.id,
|
|
2506
2537
|
teleported: !0
|
|
2507
2538
|
}, {
|
|
@@ -2512,7 +2543,7 @@
|
|
|
2512
2543
|
menuData: item.children
|
|
2513
2544
|
}, null)
|
|
2514
2545
|
}) : valueExist(item.meta?.isHide, !1) ? null : vue.createVNode(elementPlus.ElMenuItem, {
|
|
2515
|
-
"popper-class": ns$
|
|
2546
|
+
"popper-class": ns$i.b("popper"),
|
|
2516
2547
|
index: item.path
|
|
2517
2548
|
}, {
|
|
2518
2549
|
default: () => [ vue.createVNode(MenuItemTitle, {
|
|
@@ -2538,19 +2569,19 @@
|
|
|
2538
2569
|
}) ]);
|
|
2539
2570
|
}
|
|
2540
2571
|
});
|
|
2541
|
-
const ns$
|
|
2572
|
+
const ns$h = useNamespace("layout-defaults");
|
|
2542
2573
|
var defaults = vue.defineComponent({
|
|
2543
2574
|
props: {},
|
|
2544
|
-
setup: () => (vue.provide("ns", ns$
|
|
2575
|
+
setup: () => (vue.provide("ns", ns$h), {}),
|
|
2545
2576
|
render() {
|
|
2546
2577
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2547
2578
|
slots.menu;
|
|
2548
2579
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2549
2580
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2550
|
-
class: ns$
|
|
2581
|
+
class: ns$h.b()
|
|
2551
2582
|
}, {
|
|
2552
2583
|
default: () => [ vue.createVNode(Sidebar$2, null, null), vue.createVNode("div", {
|
|
2553
|
-
class: [ ns$
|
|
2584
|
+
class: [ ns$h.b("content") ]
|
|
2554
2585
|
}, [ vue.createVNode(Header$3, null, null), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2555
2586
|
tabs: _config.tabs,
|
|
2556
2587
|
activeTab: _config.activeTab,
|
|
@@ -2558,7 +2589,7 @@
|
|
|
2558
2589
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2559
2590
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2560
2591
|
}, null) : null, vue.createVNode("main", {
|
|
2561
|
-
class: [ ns$
|
|
2592
|
+
class: [ ns$h.bf("main"), ns$h.is("layout-tabs", isTabs.value) ]
|
|
2562
2593
|
}, [ slots.default?.() ]) ]) ]
|
|
2563
2594
|
});
|
|
2564
2595
|
}
|
|
@@ -2588,10 +2619,10 @@
|
|
|
2588
2619
|
}) ]) ]) ]);
|
|
2589
2620
|
}
|
|
2590
2621
|
});
|
|
2591
|
-
const ns$
|
|
2622
|
+
const ns$g = useNamespace("layout-transverse");
|
|
2592
2623
|
var transverse = vue.defineComponent({
|
|
2593
2624
|
props: {},
|
|
2594
|
-
setup: () => (vue.provide("ns", ns$
|
|
2625
|
+
setup: () => (vue.provide("ns", ns$g), {}),
|
|
2595
2626
|
render() {
|
|
2596
2627
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2597
2628
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2608,7 +2639,7 @@
|
|
|
2608
2639
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2609
2640
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2610
2641
|
}, null) : null, vue.createVNode("main", {
|
|
2611
|
-
class: [ ns$
|
|
2642
|
+
class: [ ns$g.b("main"), ns$g.is("layout-tabs", isTabs.value) ]
|
|
2612
2643
|
}, [ slots.default?.() ]) ]);
|
|
2613
2644
|
var s;
|
|
2614
2645
|
}
|
|
@@ -2647,10 +2678,10 @@
|
|
|
2647
2678
|
}, null) ]);
|
|
2648
2679
|
}
|
|
2649
2680
|
});
|
|
2650
|
-
const ns$
|
|
2681
|
+
const ns$f = useNamespace("layout-columns");
|
|
2651
2682
|
var columns = vue.defineComponent({
|
|
2652
2683
|
props: {},
|
|
2653
|
-
setup: () => (vue.provide("ns", ns$
|
|
2684
|
+
setup: () => (vue.provide("ns", ns$f), {}),
|
|
2654
2685
|
render() {
|
|
2655
2686
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {}), __slots_header = {};
|
|
2656
2687
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2658,11 +2689,11 @@
|
|
|
2658
2689
|
slots[slots_config_headerToolsSuffix] && (__slots_header[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2659
2690
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2660
2691
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2661
|
-
class: ns$
|
|
2692
|
+
class: ns$f.b()
|
|
2662
2693
|
}, {
|
|
2663
2694
|
default: () => {
|
|
2664
2695
|
return [ vue.createVNode(Sidebar$1, null, null), vue.createVNode("div", {
|
|
2665
|
-
class: [ ns$
|
|
2696
|
+
class: [ ns$f.b("content") ]
|
|
2666
2697
|
}, [ vue.createVNode(Header$1, null, (s = __slots_header, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header : {
|
|
2667
2698
|
default: () => [ __slots_header ]
|
|
2668
2699
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
@@ -2672,7 +2703,7 @@
|
|
|
2672
2703
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2673
2704
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2674
2705
|
}, null) : null, vue.createVNode("main", {
|
|
2675
|
-
class: [ ns$
|
|
2706
|
+
class: [ ns$f.bf("main"), ns$f.is("layout-tabs", isTabs.value) ]
|
|
2676
2707
|
}, [ slots.default?.() ]) ]) ];
|
|
2677
2708
|
var s;
|
|
2678
2709
|
}
|
|
@@ -2715,20 +2746,20 @@
|
|
|
2715
2746
|
}) ]);
|
|
2716
2747
|
}
|
|
2717
2748
|
});
|
|
2718
|
-
const ns$
|
|
2749
|
+
const ns$e = useNamespace("layout-classic");
|
|
2719
2750
|
var classic = vue.defineComponent({
|
|
2720
2751
|
props: {},
|
|
2721
|
-
setup: () => (vue.provide("ns", ns$
|
|
2722
|
-
ns: ns$
|
|
2752
|
+
setup: () => (vue.provide("ns", ns$e), {
|
|
2753
|
+
ns: ns$e
|
|
2723
2754
|
}),
|
|
2724
2755
|
render() {
|
|
2725
2756
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2726
2757
|
slots.menu;
|
|
2727
2758
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2728
2759
|
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$
|
|
2760
|
+
class: [ ns$e.b("content"), ns$e.is("layout-tabs", isTabs.value) ]
|
|
2730
2761
|
}, [ vue.createVNode(Sidebar, null, null), vue.createVNode("div", {
|
|
2731
|
-
class: ns$
|
|
2762
|
+
class: ns$e.b("container")
|
|
2732
2763
|
}, [ _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2733
2764
|
tabs: _config.tabs,
|
|
2734
2765
|
activeTab: _config.activeTab,
|
|
@@ -2736,11 +2767,11 @@
|
|
|
2736
2767
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2737
2768
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2738
2769
|
}, null) : null, vue.createVNode("main", {
|
|
2739
|
-
class: [ ns$
|
|
2770
|
+
class: [ ns$e.b("main") ]
|
|
2740
2771
|
}, [ slots.default?.() ]) ]) ]) ]);
|
|
2741
2772
|
}
|
|
2742
2773
|
});
|
|
2743
|
-
const ns$
|
|
2774
|
+
const ns$d = useNamespace("layout"), layouts = {
|
|
2744
2775
|
defaults: vue.markRaw(defaults),
|
|
2745
2776
|
transverse: vue.markRaw(transverse),
|
|
2746
2777
|
columns: vue.markRaw(columns),
|
|
@@ -2767,7 +2798,7 @@
|
|
|
2767
2798
|
emits: [ "changeLanguage", "changeUserDropdown", "changeOptions", "tabsChange", "tabsSelect", "tabsClose" ],
|
|
2768
2799
|
setup(props, {slots: slots, emit: emit}) {
|
|
2769
2800
|
const _config = vue.ref(mergeWith(defaultConfig$3, props.options, customizerCoverArray));
|
|
2770
|
-
vue.provide("options", _config.value), vue.provide("__ns__", ns$
|
|
2801
|
+
vue.provide("options", _config.value), vue.provide("__ns__", ns$d), vue.provide("__emit__", emit),
|
|
2771
2802
|
vue.provide("__slots__", slots);
|
|
2772
2803
|
const updateOptions = cfg => {
|
|
2773
2804
|
_config.value = mergeWith(_config.value, cfg, customizerCoverArray), updateThemeColorCssVar(_config.value?.setting),
|
|
@@ -2791,14 +2822,14 @@
|
|
|
2791
2822
|
const _activeSlots = {};
|
|
2792
2823
|
for (const key in slots) Object.prototype.hasOwnProperty.call(slots, key) && (_activeSlots[key] = () => slots[key]?.());
|
|
2793
2824
|
return vue.createVNode("div", {
|
|
2794
|
-
class: [ ns$
|
|
2825
|
+
class: [ ns$d.b(), props.className ],
|
|
2795
2826
|
style: props.style
|
|
2796
2827
|
}, [ vue.h(activeLayout.value, {}, {
|
|
2797
2828
|
..._activeSlots
|
|
2798
2829
|
}) ]);
|
|
2799
2830
|
}
|
|
2800
|
-
})), ns$
|
|
2801
|
-
var Element$
|
|
2831
|
+
})), ns$c = useNamespace("tabs");
|
|
2832
|
+
var Element$8 = vue.defineComponent({
|
|
2802
2833
|
name: "NextTabs",
|
|
2803
2834
|
props: {
|
|
2804
2835
|
activeTab: {
|
|
@@ -2867,12 +2898,12 @@
|
|
|
2867
2898
|
tabsView.value.push(activeRoute)), emit("change", activeIndex.value, tabsView.value, "add");
|
|
2868
2899
|
}));
|
|
2869
2900
|
const renderContent = () => vue.createVNode("nav", {
|
|
2870
|
-
class: ns$
|
|
2901
|
+
class: ns$c.b()
|
|
2871
2902
|
}, [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
2872
2903
|
default: () => [ vue.createVNode("ul", {
|
|
2873
|
-
class: ns$
|
|
2904
|
+
class: ns$c.b("list")
|
|
2874
2905
|
}, [ tabsView.value.map(((tab, index) => tab ? vue.createVNode("li", {
|
|
2875
|
-
class: [ "tab-item", ns$
|
|
2906
|
+
class: [ "tab-item", ns$c.is("active", activeIndex.value === index) ],
|
|
2876
2907
|
onClick: event => onClickTabItem(event, tab, index)
|
|
2877
2908
|
}, [ vue.createVNode("i", {
|
|
2878
2909
|
class: [ "tab-icon", tab.meta?.icon ]
|
|
@@ -2903,11 +2934,11 @@
|
|
|
2903
2934
|
onCommand: onChange
|
|
2904
2935
|
}, {
|
|
2905
2936
|
default: () => vue.createVNode("span", {
|
|
2906
|
-
class: ns$
|
|
2937
|
+
class: ns$c.b("tab-more")
|
|
2907
2938
|
}, [ vue.createVNode("i", {
|
|
2908
|
-
class: [ ns$
|
|
2939
|
+
class: [ ns$c.be("tab-more", "box"), ns$c.be("tab-more", "top") ]
|
|
2909
2940
|
}, null), vue.createVNode("i", {
|
|
2910
|
-
class: [ ns$
|
|
2941
|
+
class: [ ns$c.be("tab-more", "box"), ns$c.be("tab-more", "bottom") ]
|
|
2911
2942
|
}, null) ]),
|
|
2912
2943
|
dropdown: () => vue.createVNode(elementPlus.ElDropdownMenu, null, {
|
|
2913
2944
|
default: () => [ vue.createVNode(elementPlus.ElDropdownItem, {
|
|
@@ -2940,7 +2971,7 @@
|
|
|
2940
2971
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
2941
2972
|
}
|
|
2942
2973
|
});
|
|
2943
|
-
const NextTabs = withInstall(Element$
|
|
2974
|
+
const NextTabs = withInstall(Element$8), ns$b = useNamespace("container");
|
|
2944
2975
|
const NextContainer = withInstall(vue.defineComponent({
|
|
2945
2976
|
name: "NextContainer",
|
|
2946
2977
|
props: {
|
|
@@ -2978,21 +3009,24 @@
|
|
|
2978
3009
|
}), style;
|
|
2979
3010
|
}));
|
|
2980
3011
|
return () => props.scrollbar ? vue.createVNode(elementPlus.ElScrollbar, {
|
|
2981
|
-
class: [ ns$
|
|
3012
|
+
class: [ ns$b.b(), props.className ],
|
|
2982
3013
|
style: props.style
|
|
2983
3014
|
}, {
|
|
2984
3015
|
default: () => [ slots.default?.() ]
|
|
2985
3016
|
}) : vue.createVNode("div", {
|
|
2986
|
-
class: [ ns$
|
|
3017
|
+
class: [ ns$b.b(), props.className ],
|
|
2987
3018
|
style: {
|
|
2988
3019
|
...styles.value,
|
|
2989
3020
|
...props.style
|
|
2990
3021
|
}
|
|
2991
3022
|
}, [ props.card ? vue.createVNode("div", {
|
|
2992
|
-
class: ns$
|
|
3023
|
+
class: ns$b.b("card")
|
|
2993
3024
|
}, [ slots.default?.() ]) : slots.default?.() ]);
|
|
2994
3025
|
}
|
|
2995
3026
|
}));
|
|
3027
|
+
function isEqual(value, other) {
|
|
3028
|
+
return baseIsEqual(value, other);
|
|
3029
|
+
}
|
|
2996
3030
|
var defaultPropsConfig = {
|
|
2997
3031
|
className: {
|
|
2998
3032
|
type: String,
|
|
@@ -3106,8 +3140,8 @@
|
|
|
3106
3140
|
formSpan: 12,
|
|
3107
3141
|
formColumnMinWidth: 350
|
|
3108
3142
|
};
|
|
3109
|
-
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$
|
|
3110
|
-
var
|
|
3143
|
+
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$a = useNamespace("spin-loading");
|
|
3144
|
+
var NextSpinLoading$1 = vue.defineComponent({
|
|
3111
3145
|
name: "NextSpinLoading",
|
|
3112
3146
|
props: {
|
|
3113
3147
|
className: {
|
|
@@ -3136,23 +3170,23 @@
|
|
|
3136
3170
|
render() {
|
|
3137
3171
|
const _t = this.t, slots = this.$slots, props = this.$props, loadingText = props.tip || _t("next.loading");
|
|
3138
3172
|
return vue.createVNode("div", {
|
|
3139
|
-
class: [ ns$
|
|
3173
|
+
class: [ ns$a.b(), props.className ],
|
|
3140
3174
|
style: props.style
|
|
3141
|
-
}, [ props.loading ? vue.createVNode("div", {
|
|
3142
|
-
class: ns$
|
|
3175
|
+
}, [ slots.default?.(), props.loading ? vue.createVNode("div", {
|
|
3176
|
+
class: ns$a.b("mask")
|
|
3143
3177
|
}, [ vue.createVNode("span", {
|
|
3144
|
-
class: ns$
|
|
3178
|
+
class: ns$a.b("mask-dot")
|
|
3145
3179
|
}, [ vue.createVNode("i", {
|
|
3146
|
-
class: ns$
|
|
3180
|
+
class: ns$a.be("mask", "dot-item")
|
|
3147
3181
|
}, null), vue.createVNode("i", {
|
|
3148
|
-
class: ns$
|
|
3182
|
+
class: ns$a.be("mask", "dot-item")
|
|
3149
3183
|
}, null), vue.createVNode("i", {
|
|
3150
|
-
class: ns$
|
|
3184
|
+
class: ns$a.be("mask", "dot-item")
|
|
3151
3185
|
}, null), vue.createVNode("i", {
|
|
3152
|
-
class: ns$
|
|
3186
|
+
class: ns$a.be("mask", "dot-item")
|
|
3153
3187
|
}, null) ]), vue.createVNode("span", {
|
|
3154
|
-
class: ns$
|
|
3155
|
-
}, [ loadingText ]) ]) : null
|
|
3188
|
+
class: ns$a.be("mask", "text")
|
|
3189
|
+
}, [ loadingText ]) ]) : null ]);
|
|
3156
3190
|
}
|
|
3157
3191
|
}), SearchColumn = vue.defineComponent({
|
|
3158
3192
|
name: "SearchColumn",
|
|
@@ -3824,7 +3858,7 @@
|
|
|
3824
3858
|
}, null) ]);
|
|
3825
3859
|
}
|
|
3826
3860
|
});
|
|
3827
|
-
const ns$
|
|
3861
|
+
const ns$9 = useNamespace("dialog");
|
|
3828
3862
|
var NextDialog$1 = vue.defineComponent({
|
|
3829
3863
|
name: "NextDialog",
|
|
3830
3864
|
props: {
|
|
@@ -3889,7 +3923,7 @@
|
|
|
3889
3923
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(elementPlus.ElDialog, {
|
|
3890
3924
|
modelValue: visible.value,
|
|
3891
3925
|
"onUpdate:modelValue": $event => visible.value = $event,
|
|
3892
|
-
class: ns$
|
|
3926
|
+
class: ns$9.b(),
|
|
3893
3927
|
title: props.title,
|
|
3894
3928
|
appendToBody: props.appendToBody,
|
|
3895
3929
|
"destroy-on-close": !0,
|
|
@@ -3906,12 +3940,12 @@
|
|
|
3906
3940
|
}, {
|
|
3907
3941
|
default: () => [ slots.default?.() ],
|
|
3908
3942
|
header: ({close: close, titleId: titleId, titleClass: titleClass}) => vue.createVNode("div", {
|
|
3909
|
-
class: ns$
|
|
3943
|
+
class: ns$9.b("header")
|
|
3910
3944
|
}, [ vue.createVNode("h4", {
|
|
3911
3945
|
id: titleId,
|
|
3912
3946
|
class: titleClass
|
|
3913
3947
|
}, [ props.title ]), vue.createVNode("div", {
|
|
3914
|
-
class: ns$
|
|
3948
|
+
class: ns$9.e("header-right")
|
|
3915
3949
|
}, [ props.fullscreenBtn && vue.createVNode("span", {
|
|
3916
3950
|
class: "icon-fullscreen",
|
|
3917
3951
|
onClick: () => isFullscreen.value = !isFullscreen.value
|
|
@@ -3957,7 +3991,7 @@
|
|
|
3957
3991
|
submitText: null,
|
|
3958
3992
|
resetText: null
|
|
3959
3993
|
};
|
|
3960
|
-
const ns$
|
|
3994
|
+
const ns$8 = useNamespace("form");
|
|
3961
3995
|
var NumberRangePicker = vue.defineComponent({
|
|
3962
3996
|
name: "NumberRangePicker",
|
|
3963
3997
|
props: {
|
|
@@ -3996,7 +4030,7 @@
|
|
|
3996
4030
|
}));
|
|
3997
4031
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
3998
4032
|
ref: numberRangeRef,
|
|
3999
|
-
class: ns$
|
|
4033
|
+
class: ns$8.e("number-range")
|
|
4000
4034
|
}, [ vue.createVNode(elementPlus.ElInputNumber, {
|
|
4001
4035
|
modelValue: startNumber.value,
|
|
4002
4036
|
"onUpdate:modelValue": $event => startNumber.value = $event,
|
|
@@ -4006,7 +4040,7 @@
|
|
|
4006
4040
|
disabled: disabled,
|
|
4007
4041
|
onChange: onChangeStart
|
|
4008
4042
|
}, null), vue.createVNode("span", {
|
|
4009
|
-
class: ns$
|
|
4043
|
+
class: ns$8.em("number-range", "division")
|
|
4010
4044
|
}, [ t("next.date.rangeSeparator") ]), vue.createVNode(elementPlus.ElInputNumber, {
|
|
4011
4045
|
modelValue: endNumber.value,
|
|
4012
4046
|
"onUpdate:modelValue": $event => endNumber.value = $event,
|
|
@@ -4022,7 +4056,7 @@
|
|
|
4022
4056
|
function _isSlot$3(s) {
|
|
4023
4057
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s);
|
|
4024
4058
|
}
|
|
4025
|
-
const ns$
|
|
4059
|
+
const ns$7 = useNamespace("form"), InputTableSelect = vue.defineComponent({
|
|
4026
4060
|
name: "InputTableSelect",
|
|
4027
4061
|
props: {
|
|
4028
4062
|
modelValue: {
|
|
@@ -4121,18 +4155,18 @@
|
|
|
4121
4155
|
}, renderContent = () => {
|
|
4122
4156
|
let _slot, _slot2;
|
|
4123
4157
|
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
4124
|
-
class: [ "el-input", ns$
|
|
4158
|
+
class: [ "el-input", ns$7.e("input-table"), ns$7.is("disabled", _disabled) ]
|
|
4125
4159
|
}, [ vue.createVNode("div", {
|
|
4126
4160
|
class: "el-input__wrapper"
|
|
4127
4161
|
}, [ tags?.value.length ? vue.createVNode("span", {
|
|
4128
|
-
class: ns$
|
|
4162
|
+
class: ns$7.em("input-table", "value")
|
|
4129
4163
|
}, [ tags.value.map(((tag, index) => vue.createVNode(elementPlus.ElTag, {
|
|
4130
4164
|
closable: !_disabled,
|
|
4131
4165
|
onClose: () => _onCloseTag(0, index)
|
|
4132
4166
|
}, {
|
|
4133
4167
|
default: () => [ tag.label ]
|
|
4134
4168
|
}))), tagsMore?.value?.length ? vue.createVNode(elementPlus.ElTooltip, {
|
|
4135
|
-
"popper-class": ns$
|
|
4169
|
+
"popper-class": ns$7.e("tooltip-tags"),
|
|
4136
4170
|
placement: "bottom",
|
|
4137
4171
|
effect: "light"
|
|
4138
4172
|
}, {
|
|
@@ -4146,10 +4180,10 @@
|
|
|
4146
4180
|
default: () => [ tag.label ]
|
|
4147
4181
|
})))
|
|
4148
4182
|
}) : null ]) : vue.createVNode("span", {
|
|
4149
|
-
class: ns$
|
|
4183
|
+
class: ns$7.em("input-table", "placeholder")
|
|
4150
4184
|
}, [ _placeholder ]) ]), vue.createVNode(elementPlus.ElButton, {
|
|
4151
4185
|
type: "primary",
|
|
4152
|
-
class: ns$
|
|
4186
|
+
class: ns$7.em("input-table", "append"),
|
|
4153
4187
|
disabled: _disabled,
|
|
4154
4188
|
icon: search_default,
|
|
4155
4189
|
onClick: onClickTableDialog
|
|
@@ -4163,7 +4197,7 @@
|
|
|
4163
4197
|
onClose: onCloseTableDialog
|
|
4164
4198
|
}, {
|
|
4165
4199
|
default: () => [ vue.createVNode("div", {
|
|
4166
|
-
class: ns$
|
|
4200
|
+
class: ns$7.em("input-table", "content")
|
|
4167
4201
|
}, [ vue.createVNode(elementPlus.ElRadioGroup, {
|
|
4168
4202
|
modelValue: sinleSelection.value
|
|
4169
4203
|
}, {
|
|
@@ -4186,7 +4220,7 @@
|
|
|
4186
4220
|
}) ]
|
|
4187
4221
|
}) ]
|
|
4188
4222
|
}) ]), vue.createVNode("div", {
|
|
4189
|
-
class: ns$
|
|
4223
|
+
class: ns$7.em("input-table", "footer")
|
|
4190
4224
|
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
4191
4225
|
onClick: onResetTableSelect
|
|
4192
4226
|
}, _isSlot$3(_slot = t("next.form.reset")) ? _slot : {
|
|
@@ -4202,7 +4236,7 @@
|
|
|
4202
4236
|
};
|
|
4203
4237
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
4204
4238
|
}
|
|
4205
|
-
}), ns$
|
|
4239
|
+
}), ns$6 = useNamespace("form");
|
|
4206
4240
|
var UploadImage = vue.defineComponent({
|
|
4207
4241
|
name: "UploadImage",
|
|
4208
4242
|
props: {
|
|
@@ -4250,7 +4284,7 @@
|
|
|
4250
4284
|
let urls = [];
|
|
4251
4285
|
return "string" == typeof value ? urls = [ value ] : "[object Array]" === Object.prototype.toString.call(value) && (urls = value),
|
|
4252
4286
|
urls = urls.filter((url => !!url)), urls.length ? vue.createVNode(elementPlus.ElImage, {
|
|
4253
|
-
class: ns$
|
|
4287
|
+
class: ns$6.e("preview-image"),
|
|
4254
4288
|
src: urls[0],
|
|
4255
4289
|
previewSrcList: urls,
|
|
4256
4290
|
"preview-teleported": !0,
|
|
@@ -4265,7 +4299,7 @@
|
|
|
4265
4299
|
})
|
|
4266
4300
|
}) : null;
|
|
4267
4301
|
})(), _disabled ? null : vue.createVNode(elementPlus.ElUpload, {
|
|
4268
|
-
class: [ ns$
|
|
4302
|
+
class: [ ns$6.b("upload-image"), props.className ],
|
|
4269
4303
|
style: props.style,
|
|
4270
4304
|
"list-type": props.listType,
|
|
4271
4305
|
"auto-upload": !1,
|
|
@@ -4390,8 +4424,8 @@
|
|
|
4390
4424
|
}, null) ]);
|
|
4391
4425
|
}
|
|
4392
4426
|
});
|
|
4393
|
-
const ns$
|
|
4394
|
-
var Element$
|
|
4427
|
+
const ns$5 = useNamespace("form");
|
|
4428
|
+
var Element$6 = vue.defineComponent({
|
|
4395
4429
|
name: "NextForm",
|
|
4396
4430
|
props: {
|
|
4397
4431
|
options: {
|
|
@@ -4753,7 +4787,7 @@
|
|
|
4753
4787
|
let _slot;
|
|
4754
4788
|
return vue.createVNode(elementPlus.ElForm, {
|
|
4755
4789
|
ref: ruleFormRef,
|
|
4756
|
-
class: ns$
|
|
4790
|
+
class: ns$5.b(),
|
|
4757
4791
|
inline: !1,
|
|
4758
4792
|
model: formParams,
|
|
4759
4793
|
size: options.size
|
|
@@ -4774,7 +4808,7 @@
|
|
|
4774
4808
|
}, {
|
|
4775
4809
|
label: () => column.label ? vue.createVNode(vue.Fragment, null, [ vue.createVNode(NextTextEllipsis, {
|
|
4776
4810
|
content: t(column.label),
|
|
4777
|
-
class: ns$
|
|
4811
|
+
class: ns$5.e("item-label")
|
|
4778
4812
|
}, null), column.tip ? vue.createVNode(elementPlus.ElTooltip, {
|
|
4779
4813
|
effect: "dark",
|
|
4780
4814
|
content: column.tip,
|
|
@@ -4794,7 +4828,7 @@
|
|
|
4794
4828
|
}))), "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? _slot : {
|
|
4795
4829
|
default: () => [ _slot ]
|
|
4796
4830
|
})), _isEditing.value && options.showFooter ? vue.createVNode("div", {
|
|
4797
|
-
class: ns$
|
|
4831
|
+
class: ns$5.e("footer")
|
|
4798
4832
|
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
4799
4833
|
type: "primary",
|
|
4800
4834
|
loading: submitLoading.value,
|
|
@@ -4813,7 +4847,7 @@
|
|
|
4813
4847
|
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
4814
4848
|
}
|
|
4815
4849
|
});
|
|
4816
|
-
const NextTreeSelect = withInstall(treeSelect), NextForm = withInstall(Element$
|
|
4850
|
+
const NextTreeSelect = withInstall(treeSelect), NextForm = withInstall(Element$6);
|
|
4817
4851
|
var AddEditForm = vue.defineComponent({
|
|
4818
4852
|
name: "AddEditForm",
|
|
4819
4853
|
props: {
|
|
@@ -4867,8 +4901,8 @@
|
|
|
4867
4901
|
function _isSlot(s) {
|
|
4868
4902
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s);
|
|
4869
4903
|
}
|
|
4870
|
-
const ns$
|
|
4871
|
-
var Element$
|
|
4904
|
+
const ns$4 = useNamespace("crud-table");
|
|
4905
|
+
var Element$5 = vue.defineComponent({
|
|
4872
4906
|
name: "NextCrudTable",
|
|
4873
4907
|
props: defaultPropsConfig,
|
|
4874
4908
|
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" ],
|
|
@@ -4877,7 +4911,7 @@
|
|
|
4877
4911
|
const cfg = vue.unref(props.options);
|
|
4878
4912
|
return merge$1(_config, cfg);
|
|
4879
4913
|
})), options = vue.unref(_options);
|
|
4880
|
-
vue.provide("options", vue.computed((() => _options.value))), vue.provide("ns", ns$
|
|
4914
|
+
vue.provide("options", vue.computed((() => _options.value))), vue.provide("ns", ns$4);
|
|
4881
4915
|
const {t: t} = useLocale(), _columns = vue.ref(options.columns), _searchColumns = vue.ref([]), _formColumns = vue.ref([]), _updateColumnsAll = ops => {
|
|
4882
4916
|
((options, cb) => {
|
|
4883
4917
|
const _columns = vue.reactive(options.columns), _loadDicData = col => {
|
|
@@ -4999,7 +5033,7 @@
|
|
|
4999
5033
|
return params;
|
|
5000
5034
|
})()), onConfirmSearch = searchParams => {
|
|
5001
5035
|
const params = deepClone(vue.toRaw(searchParams));
|
|
5002
|
-
|
|
5036
|
+
isEqual(_searchFormParams.value, params) || (props.page.pageIndex = 1, _searchFormParams.value = params),
|
|
5003
5037
|
emit("confirm-search", params);
|
|
5004
5038
|
}, onClearSearch = () => {
|
|
5005
5039
|
emit("clear-search");
|
|
@@ -5118,11 +5152,11 @@
|
|
|
5118
5152
|
});
|
|
5119
5153
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5120
5154
|
ref: crudTableRef,
|
|
5121
|
-
class: [ ns$
|
|
5155
|
+
class: [ ns$4.b(), props.className ],
|
|
5122
5156
|
style: props.style
|
|
5123
5157
|
}, [ options.showSearchForm || options.showHeaderMenu ? vue.createVNode("header", {
|
|
5124
5158
|
ref: headerRef,
|
|
5125
|
-
class: ns$
|
|
5159
|
+
class: ns$4.b("header")
|
|
5126
5160
|
}, [ options.showSearchForm && vue.createVNode(HeaderSearch, {
|
|
5127
5161
|
columns: _searchColumns.value,
|
|
5128
5162
|
onZoomResize: updateTableContentHeight,
|
|
@@ -5136,12 +5170,12 @@
|
|
|
5136
5170
|
onClickRefresh: onClickRefresh
|
|
5137
5171
|
}, _isSlot(headerMenu_solts) ? headerMenu_solts : {
|
|
5138
5172
|
default: () => [ headerMenu_solts ]
|
|
5139
|
-
}), slots["table-head-tip"]?.() ]) : null, vue.createVNode(
|
|
5173
|
+
}), slots["table-head-tip"]?.() ]) : null, vue.createVNode(NextSpinLoading$1, {
|
|
5140
5174
|
loading: props.loading
|
|
5141
5175
|
}, {
|
|
5142
5176
|
default: () => [ vue.createVNode("div", {
|
|
5143
5177
|
ref: tableRef,
|
|
5144
|
-
class: ns$
|
|
5178
|
+
class: ns$4.b("content")
|
|
5145
5179
|
}, [ vue.createVNode(elementPlus.ElTable, {
|
|
5146
5180
|
data: tableData.value,
|
|
5147
5181
|
height: tableContentHeight.value,
|
|
@@ -5204,7 +5238,7 @@
|
|
|
5204
5238
|
}) ]) ]
|
|
5205
5239
|
}), options.isPagination ? vue.createVNode("div", {
|
|
5206
5240
|
ref: footerRef,
|
|
5207
|
-
class: ns$
|
|
5241
|
+
class: ns$4.b("footer")
|
|
5208
5242
|
}, [ vue.createVNode(FooterPagination, {
|
|
5209
5243
|
page: props.page,
|
|
5210
5244
|
onChange: onChangePagination
|
|
@@ -5230,7 +5264,7 @@
|
|
|
5230
5264
|
}) ]) ]) ]);
|
|
5231
5265
|
}
|
|
5232
5266
|
});
|
|
5233
|
-
const NextCrudTable = withInstall(Element$
|
|
5267
|
+
const NextCrudTable = withInstall(Element$5);
|
|
5234
5268
|
var propsConfig = {
|
|
5235
5269
|
className: {
|
|
5236
5270
|
type: String,
|
|
@@ -5261,7 +5295,7 @@
|
|
|
5261
5295
|
})
|
|
5262
5296
|
}
|
|
5263
5297
|
}, defaultConfig = {};
|
|
5264
|
-
const ns$
|
|
5298
|
+
const ns$3 = useNamespace("crud-table-virtualized");
|
|
5265
5299
|
const NextCrudTableVirtualized = withInstall(vue.defineComponent({
|
|
5266
5300
|
name: "NextCrudTableVirtualized",
|
|
5267
5301
|
props: propsConfig,
|
|
@@ -5281,7 +5315,7 @@
|
|
|
5281
5315
|
emit("close-add-edit");
|
|
5282
5316
|
};
|
|
5283
5317
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5284
|
-
class: [ ns$
|
|
5318
|
+
class: [ ns$3.b(), props.className ]
|
|
5285
5319
|
}, [ vue.createVNode(NextSpinLoading, null, null), vue.createVNode(NextDialog, {
|
|
5286
5320
|
modelValue: addEditDialog.visible,
|
|
5287
5321
|
"onUpdate:modelValue": $event => addEditDialog.visible = $event,
|
|
@@ -5292,7 +5326,7 @@
|
|
|
5292
5326
|
onClose: onCloseAddEditDialog
|
|
5293
5327
|
}, null) ]) ]);
|
|
5294
5328
|
}
|
|
5295
|
-
})), NextSpinLoading = withInstall(
|
|
5329
|
+
})), NextSpinLoading = withInstall(NextSpinLoading$1), ns$2 = useNamespace("upload");
|
|
5296
5330
|
const NextUpload = withInstall(vue.defineComponent({
|
|
5297
5331
|
name: "NextUpload",
|
|
5298
5332
|
props: {
|
|
@@ -5326,7 +5360,7 @@
|
|
|
5326
5360
|
const slots = this.$slots, props = this.$props, emit = this.$emit, _t = this.t, uploadfilesPreview = vue.ref([]), body = document.getElementsByTagName("body")[0];
|
|
5327
5361
|
let previewImagesContainer = null;
|
|
5328
5362
|
return vue.createVNode(elementPlus.ElUpload, {
|
|
5329
|
-
class: [ ns$
|
|
5363
|
+
class: [ ns$2.b(), props.className ],
|
|
5330
5364
|
style: props.style,
|
|
5331
5365
|
"list-type": props.listType,
|
|
5332
5366
|
"auto-upload": !1,
|
|
@@ -5364,8 +5398,8 @@
|
|
|
5364
5398
|
})
|
|
5365
5399
|
});
|
|
5366
5400
|
}
|
|
5367
|
-
})), ns = useNamespace("video-player");
|
|
5368
|
-
var Element$
|
|
5401
|
+
})), ns$1 = useNamespace("video-player");
|
|
5402
|
+
var Element$2 = vue.defineComponent({
|
|
5369
5403
|
name: "NextVideoPlayer",
|
|
5370
5404
|
props: {
|
|
5371
5405
|
className: {
|
|
@@ -5438,7 +5472,7 @@
|
|
|
5438
5472
|
if (!classNames || !classNames.length) throw new Error("模型类别不能未空!");
|
|
5439
5473
|
container.innerHTML = "", tf__namespace.loadGraphModel(modelUrl).then((model => {
|
|
5440
5474
|
const canvas = document.createElement("canvas");
|
|
5441
|
-
canvas.className = ns.b("recongition"), container.appendChild(canvas);
|
|
5475
|
+
canvas.className = ns$1.b("recongition"), container.appendChild(canvas);
|
|
5442
5476
|
const ctx = canvas.getContext("2d"), detect_ctx = document.createElement("canvas").getContext("2d");
|
|
5443
5477
|
video.ontimeupdate = () => {
|
|
5444
5478
|
const {videoWidth: videoWidth, videoHeight: videoHeight, offsetTop: offsetTop, offsetLeft: offsetLeft} = video;
|
|
@@ -5609,17 +5643,662 @@
|
|
|
5609
5643
|
});
|
|
5610
5644
|
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
5611
5645
|
ref: videoBoxRef,
|
|
5612
|
-
class: [ ns.b(), props.className ],
|
|
5646
|
+
class: [ ns$1.b(), props.className ],
|
|
5613
5647
|
style: props.style
|
|
5614
5648
|
}, null) ]);
|
|
5615
5649
|
}
|
|
5616
5650
|
});
|
|
5617
|
-
const NextVideoPlayer = withInstall(Element$
|
|
5651
|
+
const NextVideoPlayer = withInstall(Element$2);
|
|
5618
5652
|
const NextDragResize = withInstall(vue.defineComponent({
|
|
5619
5653
|
name: "NextDragResize",
|
|
5620
5654
|
props: {},
|
|
5621
5655
|
setup: () => () => vue.createVNode(vue.Fragment, null, [ vue.createVNode(vue.Fragment, null, null) ])
|
|
5622
|
-
}))
|
|
5656
|
+
})), colors = [ "#5470c6", "#91cc75", "#fac858", "#ee6666", "#73c0de", "#3ba272", "#fc8452", "#9a60b4", "#ea7ccc" ], convertToLabel = rect => {
|
|
5657
|
+
const label_type = rect.type, x_center = rect.startX + rect.rectWidth / 2, y_center = rect.startY + rect.rectHeight / 2;
|
|
5658
|
+
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)) ];
|
|
5659
|
+
}, canvertToCanvas = (labelData, canvasWidth, canvasHeight) => {
|
|
5660
|
+
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;
|
|
5661
|
+
return {
|
|
5662
|
+
type: label_type,
|
|
5663
|
+
startX: Math.ceil(startX),
|
|
5664
|
+
startY: Math.ceil(startY),
|
|
5665
|
+
rectWidth: Math.ceil(rectWidth),
|
|
5666
|
+
rectHeight: Math.ceil(rectHeight),
|
|
5667
|
+
canvasWidth: canvasWidth,
|
|
5668
|
+
canvasHeight: canvasHeight
|
|
5669
|
+
};
|
|
5670
|
+
};
|
|
5671
|
+
var ContextMenuLabel = vue.defineComponent({
|
|
5672
|
+
props: {
|
|
5673
|
+
labelRect: {
|
|
5674
|
+
type: Object,
|
|
5675
|
+
default: () => ({})
|
|
5676
|
+
},
|
|
5677
|
+
classes: {
|
|
5678
|
+
type: Array,
|
|
5679
|
+
default: () => []
|
|
5680
|
+
},
|
|
5681
|
+
activateRect: {
|
|
5682
|
+
type: Object,
|
|
5683
|
+
default: null
|
|
5684
|
+
}
|
|
5685
|
+
},
|
|
5686
|
+
emits: [ "close", "select", "delete" ],
|
|
5687
|
+
setup(props, {emit: emit}) {
|
|
5688
|
+
const ns = vue.inject("ns", {}), onClose = () => {
|
|
5689
|
+
emit("close");
|
|
5690
|
+
}, onDelete = () => {
|
|
5691
|
+
emit("delete", props.activateRect);
|
|
5692
|
+
}, activateIndex = vue.ref();
|
|
5693
|
+
vue.watch((() => props.activateRect), (() => {
|
|
5694
|
+
const {type: type} = props.activateRect;
|
|
5695
|
+
activateIndex.value = isValueExist(type) ? type : null;
|
|
5696
|
+
}), {
|
|
5697
|
+
deep: !0,
|
|
5698
|
+
immediate: !0
|
|
5699
|
+
});
|
|
5700
|
+
const labelRectWidthHeight = vue.ref({
|
|
5701
|
+
width: 0,
|
|
5702
|
+
height: 0
|
|
5703
|
+
});
|
|
5704
|
+
vue.onMounted((() => {
|
|
5705
|
+
const {clientWidth: clientWidth, clientHeight: clientHeight} = labelMenuRef.value;
|
|
5706
|
+
labelRectWidthHeight.value.width = clientWidth, labelRectWidthHeight.value.height = clientHeight;
|
|
5707
|
+
}));
|
|
5708
|
+
const labelMenuRef = vue.ref(), labelStyleFixed = vue.computed((() => {
|
|
5709
|
+
const {left: left, top: top, canvasHeight: canvasHeight} = props.labelRect, height_diff = top + labelRectWidthHeight.value.height - canvasHeight;
|
|
5710
|
+
let y = top;
|
|
5711
|
+
return height_diff > 0 && (y -= height_diff), {
|
|
5712
|
+
top: y + "px",
|
|
5713
|
+
left: left + "px"
|
|
5714
|
+
};
|
|
5715
|
+
})), renderContent = () => vue.createVNode("div", {
|
|
5716
|
+
ref: labelMenuRef,
|
|
5717
|
+
class: [ ns.b("contextmenu-label") ],
|
|
5718
|
+
style: labelStyleFixed.value
|
|
5719
|
+
}, [ vue.createVNode("div", {
|
|
5720
|
+
class: "label-head"
|
|
5721
|
+
}, [ vue.createVNode("span", {
|
|
5722
|
+
style: "padding-right: 30px"
|
|
5723
|
+
}, [ vue.createTextVNode("标签选择") ]), vue.createVNode(elementPlus.ElIcon, {
|
|
5724
|
+
size: 16,
|
|
5725
|
+
onClick: onClose
|
|
5726
|
+
}, {
|
|
5727
|
+
default: () => [ vue.createVNode(close_default, null, null) ]
|
|
5728
|
+
}) ]), vue.createVNode("ul", {
|
|
5729
|
+
class: "label-main"
|
|
5730
|
+
}, [ props.classes.map(((name, index) => vue.createVNode("li", {
|
|
5731
|
+
key: index,
|
|
5732
|
+
onClick: () => (index => {
|
|
5733
|
+
activateIndex.value = index, emit("select", index);
|
|
5734
|
+
})(index),
|
|
5735
|
+
class: {
|
|
5736
|
+
"activate-label": activateIndex.value === index
|
|
5737
|
+
}
|
|
5738
|
+
}, [ vue.createVNode("span", {
|
|
5739
|
+
style: {
|
|
5740
|
+
"background-color": colors[index]
|
|
5741
|
+
},
|
|
5742
|
+
class: "label-line"
|
|
5743
|
+
}, null), vue.createVNode("span", null, [ name ]) ]))) ]), isValueExist(activateIndex.value) ? vue.createVNode("div", {
|
|
5744
|
+
style: "margin: 10px auto 0"
|
|
5745
|
+
}, [ vue.createVNode(elementPlus.ElButton, {
|
|
5746
|
+
icon: delete_default,
|
|
5747
|
+
plain: !0,
|
|
5748
|
+
size: "small",
|
|
5749
|
+
type: "danger",
|
|
5750
|
+
onClick: onDelete
|
|
5751
|
+
}, {
|
|
5752
|
+
default: () => [ vue.createTextVNode("删除标注框") ]
|
|
5753
|
+
}) ]) : null ]);
|
|
5754
|
+
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
5755
|
+
}
|
|
5756
|
+
}), DraggableRect = vue.defineComponent({
|
|
5757
|
+
props: {
|
|
5758
|
+
parentEl: {
|
|
5759
|
+
type: Object,
|
|
5760
|
+
default: null
|
|
5761
|
+
},
|
|
5762
|
+
rect: {
|
|
5763
|
+
type: Object,
|
|
5764
|
+
default: () => ({})
|
|
5765
|
+
}
|
|
5766
|
+
},
|
|
5767
|
+
emits: [ "draggle-resize", "contextmenu" ],
|
|
5768
|
+
setup(props, {emit: emit}) {
|
|
5769
|
+
const isDraggle = vue.ref(!1), isResizeCorner = vue.ref({
|
|
5770
|
+
topLeft: !1,
|
|
5771
|
+
topCenter: !1,
|
|
5772
|
+
topRight: !1,
|
|
5773
|
+
leftCenter: !1,
|
|
5774
|
+
rightCenter: !1,
|
|
5775
|
+
bottomLeft: !1,
|
|
5776
|
+
bottomCenter: !1,
|
|
5777
|
+
bottomRight: !1
|
|
5778
|
+
}), draggleOffset = vue.ref({
|
|
5779
|
+
diff_x: null,
|
|
5780
|
+
diff_y: null
|
|
5781
|
+
});
|
|
5782
|
+
let parentRect = {};
|
|
5783
|
+
const rect = vue.toRef(props.rect), onMouseup = e => {
|
|
5784
|
+
e.preventDefault(), e.stopPropagation(), isDraggle.value = !1, isResizeCorner.value.topLeft = !1,
|
|
5785
|
+
isResizeCorner.value.topCenter = !1, isResizeCorner.value.topRight = !1, isResizeCorner.value.leftCenter = !1,
|
|
5786
|
+
isResizeCorner.value.rightCenter = !1, isResizeCorner.value.bottomLeft = !1, isResizeCorner.value.bottomCenter = !1,
|
|
5787
|
+
isResizeCorner.value.bottomRight = !1, emit("draggle-resize", rect.value);
|
|
5788
|
+
}, onMousemove = e => {
|
|
5789
|
+
if (isDraggle.value) {
|
|
5790
|
+
const newLeft = e.clientX - parentRect.left - draggleOffset.value.diff_x, newTop = e.clientY - parentRect.top - draggleOffset.value.diff_y;
|
|
5791
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5792
|
+
rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5793
|
+
}
|
|
5794
|
+
if (isResizeCorner.value.bottomCenter) {
|
|
5795
|
+
let newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5796
|
+
newHeight < 30 && (newHeight = 30), newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5797
|
+
rect.value.rectHeight = newHeight;
|
|
5798
|
+
}
|
|
5799
|
+
if (isResizeCorner.value.topCenter) {
|
|
5800
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5801
|
+
if (newTop < 0) return;
|
|
5802
|
+
if (newHeight < 30) return;
|
|
5803
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5804
|
+
}
|
|
5805
|
+
if (isResizeCorner.value.leftCenter) {
|
|
5806
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth;
|
|
5807
|
+
if (newLeft < 0) return;
|
|
5808
|
+
if (newWidth < 30) return;
|
|
5809
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5810
|
+
rect.value.rectWidth = newWidth;
|
|
5811
|
+
}
|
|
5812
|
+
if (isResizeCorner.value.rightCenter) {
|
|
5813
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX;
|
|
5814
|
+
newWidth < 30 && (newWidth = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5815
|
+
rect.value.rectWidth = newWidth;
|
|
5816
|
+
}
|
|
5817
|
+
if (isResizeCorner.value.bottomRight) {
|
|
5818
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX, newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5819
|
+
newWidth < 30 && (newWidth = 30), newHeight < 30 && (newHeight = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5820
|
+
newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5821
|
+
rect.value.rectWidth = newWidth, rect.value.rectHeight = newHeight;
|
|
5822
|
+
}
|
|
5823
|
+
if (isResizeCorner.value.bottomLeft) {
|
|
5824
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth, newHeight = e.clientY - parentRect.top - rect.value.startY;
|
|
5825
|
+
if (newLeft < 0) return;
|
|
5826
|
+
if (newWidth < 30) return;
|
|
5827
|
+
newHeight < 30 && (newHeight = 30), newHeight + rect.value.startY > parentRect.height && (newHeight = parentRect.height - rect.value.startY),
|
|
5828
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5829
|
+
rect.value.rectWidth = newWidth, rect.value.rectHeight = newHeight;
|
|
5830
|
+
}
|
|
5831
|
+
if (isResizeCorner.value.topLeft) {
|
|
5832
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5833
|
+
if (newTop < 0) return;
|
|
5834
|
+
if (newHeight < 30) return;
|
|
5835
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5836
|
+
let newLeft = e.clientX - parentRect.left, newWidth = rect.value.startX - newLeft + rect.value.rectWidth;
|
|
5837
|
+
if (newLeft < 0) return;
|
|
5838
|
+
if (newWidth < 30) return;
|
|
5839
|
+
rect.value.startX = Math.max(0, Math.min(newLeft, parentRect.width - rect.value.rectWidth)),
|
|
5840
|
+
rect.value.rectWidth = newWidth;
|
|
5841
|
+
}
|
|
5842
|
+
if (isResizeCorner.value.topRight) {
|
|
5843
|
+
let newTop = e.clientY - parentRect.top, newHeight = rect.value.startY - newTop + rect.value.rectHeight;
|
|
5844
|
+
if (newTop < 0) return;
|
|
5845
|
+
if (newHeight < 30) return;
|
|
5846
|
+
rect.value.rectHeight = newHeight, rect.value.startY = Math.max(0, Math.min(newTop, parentRect.height - rect.value.rectHeight));
|
|
5847
|
+
let newWidth = e.clientX - parentRect.left - rect.value.startX;
|
|
5848
|
+
newWidth < 30 && (newWidth = 30), newWidth + rect.value.startX > parentRect.width && (newWidth = parentRect.width - rect.value.startX),
|
|
5849
|
+
rect.value.rectWidth = newWidth;
|
|
5850
|
+
}
|
|
5851
|
+
};
|
|
5852
|
+
return vue.onMounted((() => {
|
|
5853
|
+
parentRect = props.parentEl.getBoundingClientRect(), document.addEventListener("mousemove", onMousemove),
|
|
5854
|
+
document.addEventListener("mouseup", onMouseup);
|
|
5855
|
+
})), vue.onUnmounted((() => {
|
|
5856
|
+
document.removeEventListener("mousemove", onMousemove, !1), document.removeEventListener("mouseup", onMouseup, !1);
|
|
5857
|
+
})), {
|
|
5858
|
+
onMousedown: e => {
|
|
5859
|
+
e.preventDefault(), isDraggle.value = !0, draggleOffset.value.diff_x = e.offsetX,
|
|
5860
|
+
draggleOffset.value.diff_y = e.offsetY;
|
|
5861
|
+
},
|
|
5862
|
+
onMouseup: onMouseup,
|
|
5863
|
+
onContextmenu: e => {
|
|
5864
|
+
e.preventDefault(), emit("contextmenu", e, rect.value);
|
|
5865
|
+
},
|
|
5866
|
+
rect: rect,
|
|
5867
|
+
onMousedownDot: (e, corner) => {
|
|
5868
|
+
e.preventDefault(), e.stopPropagation(), isResizeCorner.value[corner] = !0;
|
|
5869
|
+
}
|
|
5870
|
+
};
|
|
5871
|
+
},
|
|
5872
|
+
render() {
|
|
5873
|
+
const _ns = vue.inject("ns", {});
|
|
5874
|
+
return vue.createVNode("div", {
|
|
5875
|
+
class: [ _ns.b("draggable-rect") ],
|
|
5876
|
+
style: (() => {
|
|
5877
|
+
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = this.rect;
|
|
5878
|
+
return {
|
|
5879
|
+
top: startY + "px",
|
|
5880
|
+
left: startX + "px",
|
|
5881
|
+
width: rectWidth + "px",
|
|
5882
|
+
height: rectHeight + "px"
|
|
5883
|
+
};
|
|
5884
|
+
})(),
|
|
5885
|
+
onMousedown: this.onMousedown,
|
|
5886
|
+
onMouseup: this.onMouseup,
|
|
5887
|
+
onContextmenu: this.onContextmenu
|
|
5888
|
+
}, [ vue.createVNode("ul", {
|
|
5889
|
+
class: [ _ns.be("draggable-rect", "resize") ]
|
|
5890
|
+
}, [ vue.createVNode("li", {
|
|
5891
|
+
class: "top-left",
|
|
5892
|
+
onMousedown: event => this.onMousedownDot(event, "topLeft")
|
|
5893
|
+
}, null), vue.createVNode("li", {
|
|
5894
|
+
class: "top-center",
|
|
5895
|
+
onMousedown: event => this.onMousedownDot(event, "topCenter")
|
|
5896
|
+
}, null), vue.createVNode("li", {
|
|
5897
|
+
class: "top-right",
|
|
5898
|
+
onMousedown: event => this.onMousedownDot(event, "topRight")
|
|
5899
|
+
}, null), vue.createVNode("li", {
|
|
5900
|
+
class: "left-center",
|
|
5901
|
+
onMousedown: event => this.onMousedownDot(event, "leftCenter")
|
|
5902
|
+
}, null), vue.createVNode("li", {
|
|
5903
|
+
class: "right-center",
|
|
5904
|
+
onMousedown: event => this.onMousedownDot(event, "rightCenter")
|
|
5905
|
+
}, null), vue.createVNode("li", {
|
|
5906
|
+
class: "bottom-left",
|
|
5907
|
+
onMousedown: event => this.onMousedownDot(event, "bottomLeft")
|
|
5908
|
+
}, null), vue.createVNode("li", {
|
|
5909
|
+
class: "bottom-center",
|
|
5910
|
+
onMousedown: event => this.onMousedownDot(event, "bottomCenter")
|
|
5911
|
+
}, null), vue.createVNode("li", {
|
|
5912
|
+
class: "bottom-right",
|
|
5913
|
+
onMousedown: event => this.onMousedownDot(event, "bottomRight")
|
|
5914
|
+
}, null) ]) ]);
|
|
5915
|
+
}
|
|
5916
|
+
}), CanvasContext = vue.defineComponent({
|
|
5917
|
+
name: "NextCanvasContext",
|
|
5918
|
+
props: {
|
|
5919
|
+
classes: {
|
|
5920
|
+
type: Array,
|
|
5921
|
+
default: () => []
|
|
5922
|
+
},
|
|
5923
|
+
rowInfo: {
|
|
5924
|
+
type: Object,
|
|
5925
|
+
default: () => ({})
|
|
5926
|
+
}
|
|
5927
|
+
},
|
|
5928
|
+
setup(props) {
|
|
5929
|
+
const ns = vue.inject("ns", {}), _emit = vue.inject("_emit", null), canvasMainRef = vue.ref(), canvasBaseRef = vue.ref(), canvasRectRef = vue.ref(), formatLabelsType = () => {
|
|
5930
|
+
const _labels = deepClone(labels.value);
|
|
5931
|
+
let yolo_label = [];
|
|
5932
|
+
return {
|
|
5933
|
+
rects: _labels.map((rect => {
|
|
5934
|
+
delete rect.typeName;
|
|
5935
|
+
const label_rect = convertToLabel(rect);
|
|
5936
|
+
return yolo_label.push(label_rect.join(" ")), vue.toRaw(rect);
|
|
5937
|
+
})),
|
|
5938
|
+
label_txt: yolo_label.join("\n")
|
|
5939
|
+
};
|
|
5940
|
+
}, labels = vue.ref([]), drawBaseCanvas = vue.ref({}), renderImageLabel = rowInfo => {
|
|
5941
|
+
labels.value = (rowInfo => rowInfo.labels ? rowInfo.labels.map((rect => {
|
|
5942
|
+
const typeName = props.classes[rect.type];
|
|
5943
|
+
return typeName && (rect.typeName = typeName), rect;
|
|
5944
|
+
})) : [])(rowInfo);
|
|
5945
|
+
const clientHeight = canvasMainRef.value?.clientHeight, ctx = canvasBaseRef.value?.getContext("2d");
|
|
5946
|
+
if (rowInfo?.imageSrc) {
|
|
5947
|
+
const image = new Image;
|
|
5948
|
+
image.src = rowInfo.imageSrc, image.onload = () => {
|
|
5949
|
+
const {width: width, height: height} = image, canvasHeight = clientHeight, scaleFactor = canvasHeight / height, canvasWidth = Math.ceil(width * scaleFactor);
|
|
5950
|
+
((canvasWidth, canvasHeight) => {
|
|
5951
|
+
canvasMainRef.value.style.width = canvasWidth + "px", canvasMainRef.value.style.height = canvasHeight + "px",
|
|
5952
|
+
canvasBaseRef.value.width = canvasWidth, canvasBaseRef.value.height = canvasHeight,
|
|
5953
|
+
canvasBaseRef.value.style.width = canvasWidth + "px", canvasBaseRef.value.style.height = canvasHeight + "px",
|
|
5954
|
+
canvasRectRef.value.width = canvasWidth, canvasRectRef.value.height = canvasHeight,
|
|
5955
|
+
canvasRectRef.value.style.width = canvasWidth + "px", canvasRectRef.value.style.height = canvasHeight + "px";
|
|
5956
|
+
})(canvasWidth, canvasHeight);
|
|
5957
|
+
const {updateLabels: updateLabels, addDrawRect: addDrawRect, hitCanvasLabel: hitCanvasLabel} = (options => {
|
|
5958
|
+
const {ctx: ctx, labels: labels, image: image, canvasWidth: canvasWidth, canvasHeight: canvasHeight} = options, updateLabels = () => {
|
|
5959
|
+
ctx.clearRect(0, 0, canvasWidth, canvasHeight), ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight);
|
|
5960
|
+
for (let i = 0; i < labels.length; i++) {
|
|
5961
|
+
const rect = labels[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight, type: type} = rect, color = colors[type % colors.length];
|
|
5962
|
+
if (ctx.font = "bold 14px serif", ctx.textBaseline = "top", ctx.save(), ctx.strokeStyle = color,
|
|
5963
|
+
ctx.strokeRect(startX, startY, rectWidth, rectHeight), isValueExist(rect.typeName) || isValueExist(rect.type)) {
|
|
5964
|
+
const text = rect.typeName || rect.type;
|
|
5965
|
+
ctx.fillStyle = color, ctx.fillText(text, startX + 6, startY + 6);
|
|
5966
|
+
}
|
|
5967
|
+
ctx.restore();
|
|
5968
|
+
}
|
|
5969
|
+
};
|
|
5970
|
+
return updateLabels(), {
|
|
5971
|
+
updateLabels: updateLabels,
|
|
5972
|
+
addDrawRect: (rect, color = "#f30635") => {
|
|
5973
|
+
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
5974
|
+
ctx.strokeStyle = color, ctx.strokeRect(startX, startY, rectWidth, rectHeight);
|
|
5975
|
+
},
|
|
5976
|
+
hitCanvasLabel: (x, y) => {
|
|
5977
|
+
let hit_rect = null, hit_index = null;
|
|
5978
|
+
for (let i = 0; i < labels.length; i++) {
|
|
5979
|
+
const rect = labels[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
5980
|
+
x >= startX && x <= startX + rectWidth && y >= startY && y <= startY + rectHeight && (hit_rect = rect,
|
|
5981
|
+
hit_index = i);
|
|
5982
|
+
}
|
|
5983
|
+
return {
|
|
5984
|
+
hit_rect: hit_rect,
|
|
5985
|
+
hit_index: hit_index
|
|
5986
|
+
};
|
|
5987
|
+
}
|
|
5988
|
+
};
|
|
5989
|
+
})({
|
|
5990
|
+
canvas: canvasBaseRef.value,
|
|
5991
|
+
ctx: ctx,
|
|
5992
|
+
image: image,
|
|
5993
|
+
canvasWidth: canvasWidth,
|
|
5994
|
+
canvasHeight: canvasHeight,
|
|
5995
|
+
labels: labels.value
|
|
5996
|
+
});
|
|
5997
|
+
drawBaseCanvas.value.updateLabels = updateLabels, drawBaseCanvas.value.addDrawRect = addDrawRect,
|
|
5998
|
+
drawBaseCanvas.value.hitCanvasLabel = hitCanvasLabel;
|
|
5999
|
+
const {clearCanvas: clearCanvas} = ((canvas, callback) => {
|
|
6000
|
+
const canvasWidth = canvas.width, canvasHeight = canvas.height, ctx = canvas?.getContext("2d"), clearCanvas = () => {
|
|
6001
|
+
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
6002
|
+
};
|
|
6003
|
+
clearCanvas();
|
|
6004
|
+
let startX, startY, endX, endY, isDrawing = !1, isRectDraw = !1, isWKeyPressed = !1;
|
|
6005
|
+
document.addEventListener("keydown", (event => {
|
|
6006
|
+
"w" === event.key && (isWKeyPressed = !0, canvas.style.cursor = "crosshair", canvas.style.zIndex = "11");
|
|
6007
|
+
})), document.addEventListener("keyup", (event => {
|
|
6008
|
+
"w" === event.key && (isWKeyPressed = !1, canvas.style.cursor = "unset", canvas.style.zIndex = "0");
|
|
6009
|
+
})), canvas.addEventListener("mousedown", (e => {
|
|
6010
|
+
isWKeyPressed && (isDrawing = !0, startX = e.offsetX, startY = e.offsetY);
|
|
6011
|
+
})), canvas.addEventListener("mousemove", (e => {
|
|
6012
|
+
isDrawing && isWKeyPressed && (isRectDraw = !0, endX = e.offsetX, endY = e.offsetY,
|
|
6013
|
+
drawRect());
|
|
6014
|
+
})), canvas.addEventListener("mouseup", (() => {
|
|
6015
|
+
if (!isRectDraw) return;
|
|
6016
|
+
isDrawing = !1, isWKeyPressed = !1;
|
|
6017
|
+
const rectWidth = Math.abs(endX - startX), rectHeight = Math.abs(endY - startY);
|
|
6018
|
+
startX > endX && (startX = endX), startY > endY && (startY = endY), callback && callback({
|
|
6019
|
+
startX: startX,
|
|
6020
|
+
startY: startY,
|
|
6021
|
+
rectWidth: rectWidth,
|
|
6022
|
+
rectHeight: rectHeight,
|
|
6023
|
+
canvasWidth: canvasWidth,
|
|
6024
|
+
canvasHeight: canvasHeight
|
|
6025
|
+
}, {
|
|
6026
|
+
endX: endX,
|
|
6027
|
+
endY: endY
|
|
6028
|
+
}), isRectDraw = !1;
|
|
6029
|
+
}));
|
|
6030
|
+
const drawRect = (color = "#f30635") => {
|
|
6031
|
+
clearCanvas(), ctx.strokeStyle = color, ctx.strokeRect(startX, startY, endX - startX, endY - startY);
|
|
6032
|
+
};
|
|
6033
|
+
return {
|
|
6034
|
+
canvas: canvas,
|
|
6035
|
+
ctx: ctx,
|
|
6036
|
+
clearCanvas: clearCanvas,
|
|
6037
|
+
drawRect: drawRect
|
|
6038
|
+
};
|
|
6039
|
+
})(canvasRectRef.value, ((rect, {endX: endX, endY: endY}) => {
|
|
6040
|
+
activate_add_label.value = rect, drawBaseCanvas.value.addDrawRect(rect), updateContextmenuLabelFixed(endX, endY, rect);
|
|
6041
|
+
}));
|
|
6042
|
+
drawBaseCanvas.value.clearCanvasRect = clearCanvas;
|
|
6043
|
+
};
|
|
6044
|
+
}
|
|
6045
|
+
canvasBaseRef.value.addEventListener("contextmenu", (e => {
|
|
6046
|
+
e.preventDefault();
|
|
6047
|
+
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6048
|
+
onCloseContentmenuLabel(), onCloseDraggableRectFixed(), hit_rect && vue.nextTick((() => {
|
|
6049
|
+
updateContextmenuLabelFixed(x, y, hit_rect);
|
|
6050
|
+
}));
|
|
6051
|
+
})), canvasBaseRef.value.addEventListener("click", (e => {
|
|
6052
|
+
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect, hit_index: hit_index} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6053
|
+
onCloseDraggableRectFixed(), onCloseContentmenuLabel(), hit_rect && vue.nextTick((() => {
|
|
6054
|
+
updateDraggableRectFixed(x, y, hit_rect, hit_index);
|
|
6055
|
+
}));
|
|
6056
|
+
}));
|
|
6057
|
+
};
|
|
6058
|
+
vue.onMounted((() => {
|
|
6059
|
+
vue.watch((() => props.rowInfo), (info => {
|
|
6060
|
+
const rowInfo = vue.toRaw(info);
|
|
6061
|
+
renderImageLabel(rowInfo);
|
|
6062
|
+
}), {
|
|
6063
|
+
deep: !0,
|
|
6064
|
+
immediate: !0
|
|
6065
|
+
});
|
|
6066
|
+
}));
|
|
6067
|
+
const contextmenuLabelFixed = vue.ref({
|
|
6068
|
+
show: !1,
|
|
6069
|
+
top: 0,
|
|
6070
|
+
left: 0,
|
|
6071
|
+
activateRect: null
|
|
6072
|
+
}), updateContextmenuLabelFixed = (x, y, rect) => {
|
|
6073
|
+
contextmenuLabelFixed.value.show = !0, contextmenuLabelFixed.value.left = x, contextmenuLabelFixed.value.top = y,
|
|
6074
|
+
contextmenuLabelFixed.value.canvasWidth = canvasBaseRef.value.width, contextmenuLabelFixed.value.canvasHeight = canvasBaseRef.value.height,
|
|
6075
|
+
contextmenuLabelFixed.value.activateRect = rect, activate_add_label.value = rect;
|
|
6076
|
+
}, onCloseContentmenuLabel = () => {
|
|
6077
|
+
contextmenuLabelFixed.value.show = !1, contextmenuLabelFixed.value.top = 0, contextmenuLabelFixed.value.left = 0,
|
|
6078
|
+
contextmenuLabelFixed.value.activateRect = null, activate_add_label.value = null,
|
|
6079
|
+
drawBaseCanvas.value.updateLabels(), drawBaseCanvas.value.clearCanvasRect();
|
|
6080
|
+
}, contextmenuLabelRect = vue.computed((() => {
|
|
6081
|
+
const {top: top, left: left, canvasWidth: canvasWidth, canvasHeight: canvasHeight} = contextmenuLabelFixed.value;
|
|
6082
|
+
return {
|
|
6083
|
+
top: top,
|
|
6084
|
+
left: left,
|
|
6085
|
+
canvasWidth: canvasWidth,
|
|
6086
|
+
canvasHeight: canvasHeight
|
|
6087
|
+
};
|
|
6088
|
+
})), draggableRectFixed = vue.ref({
|
|
6089
|
+
show: !1,
|
|
6090
|
+
top: 0,
|
|
6091
|
+
left: 0,
|
|
6092
|
+
width: 0,
|
|
6093
|
+
height: 0,
|
|
6094
|
+
activateRect: null,
|
|
6095
|
+
activateIndex: null
|
|
6096
|
+
}), updateDraggableRectFixed = (x, y, rect, index) => {
|
|
6097
|
+
draggableRectFixed.value.show = !0, draggableRectFixed.value.top = y, draggableRectFixed.value.left = x,
|
|
6098
|
+
draggableRectFixed.value.width = rect.rectWidth, draggableRectFixed.value.height = rect.rectHeight,
|
|
6099
|
+
draggableRectFixed.value.activateRect = rect, draggableRectFixed.value.activateIndex = index;
|
|
6100
|
+
}, onCloseDraggableRectFixed = () => {
|
|
6101
|
+
draggableRectFixed.value.show = !1, draggableRectFixed.value.top = 0, draggableRectFixed.value.left = 0,
|
|
6102
|
+
draggableRectFixed.value.width = 0, draggableRectFixed.value.height = 0, draggableRectFixed.value.activateRect = null,
|
|
6103
|
+
draggableRectFixed.value.activateIndex = null;
|
|
6104
|
+
}, onDraggleRectResize = rect => {
|
|
6105
|
+
draggableRectFixed.value.activateRect = rect, drawBaseCanvas.value.updateLabels();
|
|
6106
|
+
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6107
|
+
i > -1 && labels.value.splice(i, 1, rect);
|
|
6108
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6109
|
+
_emit("change", rects, label_txt);
|
|
6110
|
+
}, onContextmenuDraggable = (e, rect) => {
|
|
6111
|
+
e.preventDefault();
|
|
6112
|
+
const rect_x = e.offsetX, rect_y = e.offsetY, x = rect_x + rect.startX, y = rect_y + rect.startY;
|
|
6113
|
+
onCloseContentmenuLabel(), vue.nextTick((() => {
|
|
6114
|
+
updateContextmenuLabelFixed(x, y, rect);
|
|
6115
|
+
}));
|
|
6116
|
+
}, activate_add_label = vue.ref(), onSelectLabel = type => {
|
|
6117
|
+
activate_add_label.value.type = type;
|
|
6118
|
+
const typeName = props.classes[type];
|
|
6119
|
+
typeName && (activate_add_label.value.typeName = typeName);
|
|
6120
|
+
const i = labels.value.findIndex((o => isEqual(o, activate_add_label.value)));
|
|
6121
|
+
i > -1 ? labels.value.splice(i, 1, activate_add_label.value) : labels.value.push(activate_add_label.value),
|
|
6122
|
+
onCloseContentmenuLabel();
|
|
6123
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6124
|
+
_emit("change", rects, label_txt);
|
|
6125
|
+
}, onDeleteLabel = rect => {
|
|
6126
|
+
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6127
|
+
labels.value.splice(i, 1), onCloseContentmenuLabel(), onCloseDraggableRectFixed(),
|
|
6128
|
+
drawBaseCanvas.value.updateLabels();
|
|
6129
|
+
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6130
|
+
_emit("change", rects, label_txt);
|
|
6131
|
+
};
|
|
6132
|
+
return () => vue.createVNode(vue.Fragment, null, [ vue.createVNode("div", {
|
|
6133
|
+
ref: canvasMainRef,
|
|
6134
|
+
class: [ ns.b("canvas") ]
|
|
6135
|
+
}, [ vue.createVNode("canvas", {
|
|
6136
|
+
ref: canvasBaseRef,
|
|
6137
|
+
class: [ ns.be("canvas", "context") ]
|
|
6138
|
+
}, null), vue.createVNode("canvas", {
|
|
6139
|
+
ref: canvasRectRef,
|
|
6140
|
+
class: [ ns.be("canvas", "rect") ]
|
|
6141
|
+
}, null), contextmenuLabelFixed.value.show ? vue.createVNode(ContextMenuLabel, {
|
|
6142
|
+
labelRect: contextmenuLabelRect.value,
|
|
6143
|
+
classes: props.classes,
|
|
6144
|
+
activateRect: contextmenuLabelFixed.value.activateRect,
|
|
6145
|
+
onClose: onCloseContentmenuLabel,
|
|
6146
|
+
onSelect: onSelectLabel,
|
|
6147
|
+
onDelete: onDeleteLabel
|
|
6148
|
+
}, null) : null, draggableRectFixed.value.show ? vue.createVNode(DraggableRect, {
|
|
6149
|
+
parentEl: canvasMainRef.value,
|
|
6150
|
+
rect: draggableRectFixed.value.activateRect,
|
|
6151
|
+
onDraggleResize: onDraggleRectResize,
|
|
6152
|
+
onContextmenu: onContextmenuDraggable
|
|
6153
|
+
}, null) : null ]) ]);
|
|
6154
|
+
}
|
|
6155
|
+
});
|
|
6156
|
+
const ns = useNamespace("labelimg");
|
|
6157
|
+
var Element = vue.defineComponent({
|
|
6158
|
+
name: "NextLabelimg",
|
|
6159
|
+
props: {
|
|
6160
|
+
className: {
|
|
6161
|
+
type: String,
|
|
6162
|
+
default: ""
|
|
6163
|
+
},
|
|
6164
|
+
style: {
|
|
6165
|
+
type: Object,
|
|
6166
|
+
default: () => ({})
|
|
6167
|
+
},
|
|
6168
|
+
options: {
|
|
6169
|
+
type: Object,
|
|
6170
|
+
default: () => ({
|
|
6171
|
+
classes: [],
|
|
6172
|
+
list: []
|
|
6173
|
+
})
|
|
6174
|
+
}
|
|
6175
|
+
},
|
|
6176
|
+
emits: [ "change", "save", "prev-click", "next-click" ],
|
|
6177
|
+
setup(props, {emit: emit, slots: slots, expose: expose}) {
|
|
6178
|
+
const {t: t} = useLocale();
|
|
6179
|
+
vue.provide("ns", ns), vue.provide("_emit", emit);
|
|
6180
|
+
const {classes: classes, list: list} = props.options, activateNodeIndex = vue.ref(0), currentNode = vue.computed((() => {
|
|
6181
|
+
if (!list) return {};
|
|
6182
|
+
return list[activateNodeIndex.value] || {};
|
|
6183
|
+
})), imageLength = list.length, loading = vue.ref(!1), formatNodeLabels = () => {
|
|
6184
|
+
const node = deepClone(currentNode.value);
|
|
6185
|
+
let yolo_label = [];
|
|
6186
|
+
return node.labels.forEach((rect => {
|
|
6187
|
+
delete rect.typeName;
|
|
6188
|
+
const label_rect = convertToLabel(rect);
|
|
6189
|
+
yolo_label.push(label_rect.join(" "));
|
|
6190
|
+
})), {
|
|
6191
|
+
node: node,
|
|
6192
|
+
label_txt: yolo_label.join("\n")
|
|
6193
|
+
};
|
|
6194
|
+
}, onKeydownPrevNext = e => {
|
|
6195
|
+
if (loading.value) return;
|
|
6196
|
+
if (![ "KeyA", "KeyD" ].includes(e.code)) return;
|
|
6197
|
+
loading.value = !0;
|
|
6198
|
+
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6199
|
+
emit("save", {
|
|
6200
|
+
node: node,
|
|
6201
|
+
label_txt: label_txt
|
|
6202
|
+
}, (() => {
|
|
6203
|
+
"KeyD" === e.code ? (activateNodeIndex.value++, activateNodeIndex.value >= imageLength && (activateNodeIndex.value = 0)) : "KeyA" === e.code && (activateNodeIndex.value--,
|
|
6204
|
+
activateNodeIndex.value < 0 && (activateNodeIndex.value = imageLength - 1)), loading.value = !1;
|
|
6205
|
+
}), (() => {
|
|
6206
|
+
loading.value = !1;
|
|
6207
|
+
}));
|
|
6208
|
+
}, onPaginationPrev = () => {
|
|
6209
|
+
emit("prev-click");
|
|
6210
|
+
}, onPaginationNext = () => {
|
|
6211
|
+
emit("next-click");
|
|
6212
|
+
}, layoutRef = vue.ref(), headerRef = vue.ref(), mainRef = vue.ref(), footerRef = vue.ref(), mainContentHeight = vue.ref(500);
|
|
6213
|
+
vue.onMounted((() => {
|
|
6214
|
+
document.addEventListener("keydown", onKeydownPrevNext), elementResize(layoutRef.value, (() => {
|
|
6215
|
+
vue.nextTick((() => {
|
|
6216
|
+
const contentHeight = (layoutRef.value?.clientHeight || 0) - ((headerRef.value?.clientHeight || 0) + (footerRef.value?.clientHeight || 0));
|
|
6217
|
+
mainContentHeight.value = contentHeight;
|
|
6218
|
+
}));
|
|
6219
|
+
}));
|
|
6220
|
+
})), vue.onUnmounted((() => {
|
|
6221
|
+
document.removeEventListener("keydown", onKeydownPrevNext);
|
|
6222
|
+
})), expose({
|
|
6223
|
+
convertToLabel: convertToLabel,
|
|
6224
|
+
canvertToCanvas: canvertToCanvas
|
|
6225
|
+
});
|
|
6226
|
+
const renderContent = () => vue.createVNode("div", {
|
|
6227
|
+
ref: layoutRef,
|
|
6228
|
+
class: [ ns.b(), props.className ],
|
|
6229
|
+
style: {
|
|
6230
|
+
...props.style
|
|
6231
|
+
}
|
|
6232
|
+
}, [ vue.createVNode(NextSpinLoading$1, {
|
|
6233
|
+
loading: loading.value,
|
|
6234
|
+
tip: t("next.labelimg.saveTxt"),
|
|
6235
|
+
class: [ ns.b("loading") ]
|
|
6236
|
+
}, {
|
|
6237
|
+
default: () => [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
6238
|
+
default: () => [ vue.createVNode("header", {
|
|
6239
|
+
ref: headerRef,
|
|
6240
|
+
class: [ ns.b("header") ]
|
|
6241
|
+
}, [ slots.header ? slots.header() : vue.createVNode(vue.Fragment, null, [ vue.createVNode("ul", null, null), vue.createVNode("ul", null, null) ]) ]), vue.createVNode("div", {
|
|
6242
|
+
ref: mainRef,
|
|
6243
|
+
class: [ ns.b("main") ]
|
|
6244
|
+
}, [ vue.createVNode(CanvasContext, {
|
|
6245
|
+
classes: classes,
|
|
6246
|
+
rowInfo: currentNode.value
|
|
6247
|
+
}, null) ]), vue.createVNode("footer", {
|
|
6248
|
+
ref: footerRef,
|
|
6249
|
+
class: [ ns.b("footer") ]
|
|
6250
|
+
}, [ vue.createVNode("div", {
|
|
6251
|
+
class: [ ns.be("footer", "left") ]
|
|
6252
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
6253
|
+
size: 24,
|
|
6254
|
+
onClick: onPaginationPrev
|
|
6255
|
+
}, {
|
|
6256
|
+
default: () => [ vue.createVNode(arrow_left_default, null, null) ]
|
|
6257
|
+
}) ]), vue.createVNode("div", {
|
|
6258
|
+
class: [ ns.be("footer", "center") ]
|
|
6259
|
+
}, [ vue.createVNode(elementPlus.ElScrollbar, null, {
|
|
6260
|
+
default: () => [ vue.createVNode("ul", {
|
|
6261
|
+
class: [ ns.bem("footer", "center", "list") ]
|
|
6262
|
+
}, [ list.map(((item, index) => vue.createVNode("li", {
|
|
6263
|
+
key: index,
|
|
6264
|
+
onClick: () => (index => {
|
|
6265
|
+
if (loading.value) return;
|
|
6266
|
+
loading.value = !0;
|
|
6267
|
+
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6268
|
+
emit("save", {
|
|
6269
|
+
node: node,
|
|
6270
|
+
label_txt: label_txt
|
|
6271
|
+
}, (() => {
|
|
6272
|
+
activateNodeIndex.value = index, loading.value = !1;
|
|
6273
|
+
}), (() => {
|
|
6274
|
+
loading.value = !1;
|
|
6275
|
+
}));
|
|
6276
|
+
})(index),
|
|
6277
|
+
class: {
|
|
6278
|
+
"is-activate": activateNodeIndex.value === index
|
|
6279
|
+
}
|
|
6280
|
+
}, [ vue.createVNode(elementPlus.ElImage, {
|
|
6281
|
+
style: "height: 100%",
|
|
6282
|
+
src: item.imageSrc,
|
|
6283
|
+
"zoom-rate": 1.2,
|
|
6284
|
+
"max-scale": 2,
|
|
6285
|
+
"min-scale": .2,
|
|
6286
|
+
fit: "cover"
|
|
6287
|
+
}, null) ]))) ]) ]
|
|
6288
|
+
}) ]), vue.createVNode("div", {
|
|
6289
|
+
class: [ ns.be("footer", "right") ]
|
|
6290
|
+
}, [ vue.createVNode(elementPlus.ElIcon, {
|
|
6291
|
+
size: 24,
|
|
6292
|
+
onClick: onPaginationNext
|
|
6293
|
+
}, {
|
|
6294
|
+
default: () => [ vue.createVNode(arrow_right_default, null, null) ]
|
|
6295
|
+
}) ]) ]) ]
|
|
6296
|
+
}) ]
|
|
6297
|
+
}) ]);
|
|
6298
|
+
return () => vue.createVNode(vue.Fragment, null, [ renderContent() ]);
|
|
6299
|
+
}
|
|
6300
|
+
});
|
|
6301
|
+
const NextLabelimg = withInstall(Element);
|
|
5623
6302
|
var components = Object.freeze({
|
|
5624
6303
|
__proto__: null,
|
|
5625
6304
|
NextContainer: NextContainer,
|
|
@@ -5628,6 +6307,7 @@
|
|
|
5628
6307
|
NextDialog: NextDialog,
|
|
5629
6308
|
NextDragResize: NextDragResize,
|
|
5630
6309
|
NextForm: NextForm,
|
|
6310
|
+
NextLabelimg: NextLabelimg,
|
|
5631
6311
|
NextLayout: NextLayout,
|
|
5632
6312
|
NextMenu: NextMenu,
|
|
5633
6313
|
NextSpinLoading: NextSpinLoading,
|
|
@@ -5678,18 +6358,19 @@
|
|
|
5678
6358
|
})(app);
|
|
5679
6359
|
};
|
|
5680
6360
|
var index = {
|
|
5681
|
-
version: "0.2.
|
|
6361
|
+
version: "0.2.8",
|
|
5682
6362
|
install: install
|
|
5683
6363
|
};
|
|
5684
6364
|
exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable, exports.NextCrudTableVirtualized = NextCrudTableVirtualized,
|
|
5685
6365
|
exports.NextDialog = NextDialog, exports.NextDragResize = NextDragResize, exports.NextForm = NextForm,
|
|
5686
|
-
exports.
|
|
5687
|
-
exports.
|
|
5688
|
-
exports.
|
|
5689
|
-
exports.
|
|
5690
|
-
exports.
|
|
5691
|
-
exports.
|
|
5692
|
-
exports.
|
|
6366
|
+
exports.NextLabelimg = NextLabelimg, exports.NextLayout = NextLayout, exports.NextMenu = NextMenu,
|
|
6367
|
+
exports.NextSpinLoading = NextSpinLoading, exports.NextTabs = NextTabs, exports.NextTextEllipsis = NextTextEllipsis,
|
|
6368
|
+
exports.NextTreeSelect = NextTreeSelect, exports.NextUpload = NextUpload, exports.NextVideoPlayer = NextVideoPlayer,
|
|
6369
|
+
exports.buildLocaleContext = buildLocaleContext, exports.buildTranslator = buildTranslator,
|
|
6370
|
+
exports.default = index, exports.defaultNamespace = "next", exports.install = install,
|
|
6371
|
+
exports.localeContextKey = localeContextKey, exports.localeLang = localeLang, exports.namespaceContextKey = namespaceContextKey,
|
|
6372
|
+
exports.nextUseCssTheme = nextUseCssTheme, exports.nextUseCssVar = nextUseCssVar,
|
|
6373
|
+
exports.translate = translate, exports.updateThemeColor = color => {
|
|
5693
6374
|
color && nextUseCssTheme("--el-color-primary", color);
|
|
5694
6375
|
}, exports.updateThemeColorCssVar = updateThemeColorCssVar, exports.useDetectVideo = () => ({
|
|
5695
6376
|
detectVideoFrameImage: ({container: container, video: video, modelUrl: modelUrl, classNames: classNames, classInput: classInput = []}, success, error) => modelUrl ? classNames ? void tf__namespace.loadGraphModel(modelUrl).then((model => {
|
|
@@ -5723,7 +6404,7 @@
|
|
|
5723
6404
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
5724
6405
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
5725
6406
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
5726
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.2.
|
|
6407
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.2.8",
|
|
5727
6408
|
Object.defineProperty(exports, "__esModule", {
|
|
5728
6409
|
value: !0
|
|
5729
6410
|
});
|