next-element-vue 0.2.8 → 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 +2 -2
- package/dist/index.js +483 -214
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +485 -220
- 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 +84 -10
- package/dist/packages/components/labelimg/src/config.d.ts +4 -0
- package/dist/packages/components/labelimg/src/hooks/canvas-context-hook.d.ts +8 -1
- package/dist/packages/components/labelimg/src/index.d.ts +35 -10
- package/dist/packages/components/labelimg/src/preview.d.ts +51 -0
- package/dist/packages/components/labelimg/src/widgets/canvas-context.d.ts +13 -2
- package/dist/packages/components/labelimg/src/widgets/draggable-rect.d.ts +9 -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/locale/lang/en.d.ts +2 -0
- package/dist/packages/locale/lang/zh-cn.d.ts +2 -0
- package/dist/packages/locale/lang/zh-tw.d.ts +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,14 +2,14 @@
|
|
|
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
|
|
|
10
10
|
import { getCurrentInstance, inject, ref, computed, unref, isRef, defineComponent, createVNode, Fragment, openBlock, createElementBlock, createElementVNode, reactive, createTextVNode, resolveComponent, Teleport, isVNode, onUnmounted, provide, watch, markRaw, watchEffect, h, onMounted, toRaw, render, nextTick, toRef } from "vue";
|
|
11
11
|
|
|
12
|
-
import { localeContextKey as localeContextKey$1, ElMessage, ElTooltip, ElScrollbar, ElDivider, ElColorPicker, ElSwitch, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElDrawer, ElMenuItem, ElSubMenu, ElMenu, ElContainer, ElCol, ElFormItem, ElInput, ElSelect, ElOption, ElDatePicker, ElInputNumber, ElForm, ElRow, ElButton, ElTable, ElTableColumn, ElCheckbox, ElMessageBox, ElPagination, ElDialog, ElTag, ElRadioGroup, ElRadio, ElUpload, ElImageViewer, ElImage, ElTreeSelect, ElTimeSelect, ElCheckboxGroup, ElEmpty } from "element-plus";
|
|
12
|
+
import { localeContextKey as localeContextKey$1, ElMessage, ElTooltip, ElScrollbar, ElDivider, ElColorPicker, ElSwitch, ElDropdown, ElIcon, ElDropdownMenu, ElDropdownItem, ElDrawer, ElMenuItem, ElSubMenu, ElMenu, ElContainer, ElCol, ElFormItem, ElInput, ElSelect, ElOption, ElDatePicker, ElInputNumber, ElForm, ElRow, ElButton, ElTable, ElTableColumn, ElCheckbox, ElMessageBox, ElPagination, ElDialog, ElTag, ElRadioGroup, ElRadio, ElUpload, ElImageViewer, ElImage, ElTreeSelect, ElTimeSelect, ElCheckboxGroup, ElEmpty, ElPopconfirm } from "element-plus";
|
|
13
13
|
|
|
14
14
|
import { useDateFormat, useNow, useFullscreen } from "@vueuse/core";
|
|
15
15
|
|
|
@@ -889,7 +889,9 @@ var merge = createAssigner((function(object, source, srcIndex) {
|
|
|
889
889
|
systemSetting: "系统配置"
|
|
890
890
|
},
|
|
891
891
|
labelimg: {
|
|
892
|
-
saveTxt: "保存中..."
|
|
892
|
+
saveTxt: "保存中...",
|
|
893
|
+
emptyLabelText: "暂无标签数据",
|
|
894
|
+
confirmDeleteLabel: "确定要删除该标注吗?"
|
|
893
895
|
}
|
|
894
896
|
}
|
|
895
897
|
}, enLocale = {
|
|
@@ -961,7 +963,9 @@ var merge = createAssigner((function(object, source, srcIndex) {
|
|
|
961
963
|
systemSetting: "system setting"
|
|
962
964
|
},
|
|
963
965
|
labelimg: {
|
|
964
|
-
saveTxt: "saving..."
|
|
966
|
+
saveTxt: "saving...",
|
|
967
|
+
emptyLabelText: "No label data",
|
|
968
|
+
confirmDeleteLabel: "Are you sure you want to delete this annotation?"
|
|
965
969
|
}
|
|
966
970
|
}
|
|
967
971
|
}, zhtwLocale = {
|
|
@@ -1033,7 +1037,9 @@ var merge = createAssigner((function(object, source, srcIndex) {
|
|
|
1033
1037
|
systemSetting: "系統配置"
|
|
1034
1038
|
},
|
|
1035
1039
|
labelimg: {
|
|
1036
|
-
saveTxt: "保存中..."
|
|
1040
|
+
saveTxt: "保存中...",
|
|
1041
|
+
emptyLabelText: "暂无标签数据",
|
|
1042
|
+
confirmDeleteLabel: "确定要删除该标注吗?"
|
|
1037
1043
|
}
|
|
1038
1044
|
}
|
|
1039
1045
|
};
|
|
@@ -1199,7 +1205,7 @@ const {getLightColor: getLightColor$4} = useChangeColor(), nextUseCssVar = (cssv
|
|
|
1199
1205
|
return main;
|
|
1200
1206
|
}, slots_config_headerMenu = "header-menu", slots_config_headerToolsPrefix = "header-tools-prefix", slots_config_headerToolsSuffix = "header-tools-suffix";
|
|
1201
1207
|
|
|
1202
|
-
var defaultConfig$
|
|
1208
|
+
var defaultConfig$4 = {
|
|
1203
1209
|
logo: "",
|
|
1204
1210
|
title: "Next Element Vue",
|
|
1205
1211
|
userName: "Admin",
|
|
@@ -1244,7 +1250,7 @@ var defaultConfig$3 = {
|
|
|
1244
1250
|
}
|
|
1245
1251
|
};
|
|
1246
1252
|
|
|
1247
|
-
const ns$
|
|
1253
|
+
const ns$k = useNamespace("text-ellipsis");
|
|
1248
1254
|
|
|
1249
1255
|
const NextTextEllipsis = withInstall(defineComponent({
|
|
1250
1256
|
name: "NextTextEllipsis",
|
|
@@ -1291,7 +1297,7 @@ const NextTextEllipsis = withInstall(defineComponent({
|
|
|
1291
1297
|
}
|
|
1292
1298
|
};
|
|
1293
1299
|
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
1294
|
-
class: [ ns$
|
|
1300
|
+
class: [ ns$k.b(), props.class ],
|
|
1295
1301
|
style: setWidth.value,
|
|
1296
1302
|
onMouseenter: onMouseenter
|
|
1297
1303
|
}, [ isTip.value ? createVNode(ElTooltip, {
|
|
@@ -1301,11 +1307,11 @@ const NextTextEllipsis = withInstall(defineComponent({
|
|
|
1301
1307
|
disabled: props.disabled
|
|
1302
1308
|
}, {
|
|
1303
1309
|
default: () => [ createVNode("span", {
|
|
1304
|
-
class: ns$
|
|
1310
|
+
class: ns$k.e("text"),
|
|
1305
1311
|
ref: ellipsisRef
|
|
1306
1312
|
}, [ slots.default ? slots.default() : props.content ]) ]
|
|
1307
1313
|
}) : createVNode("span", {
|
|
1308
|
-
class: ns$
|
|
1314
|
+
class: ns$k.e("text"),
|
|
1309
1315
|
ref: ellipsisRef
|
|
1310
1316
|
}, [ slots.default ? slots.default() : props.content ]) ]) ]);
|
|
1311
1317
|
}
|
|
@@ -2677,7 +2683,7 @@ const NextMenuItem = defineComponent({
|
|
|
2677
2683
|
}, null) ]
|
|
2678
2684
|
}))) ]) ]);
|
|
2679
2685
|
}
|
|
2680
|
-
}), ns$
|
|
2686
|
+
}), ns$j = useNamespace("menu");
|
|
2681
2687
|
|
|
2682
2688
|
const NextMenu = withInstall(defineComponent({
|
|
2683
2689
|
name: "NextMenu",
|
|
@@ -2705,13 +2711,13 @@ const NextMenu = withInstall(defineComponent({
|
|
|
2705
2711
|
}
|
|
2706
2712
|
},
|
|
2707
2713
|
setup(props) {
|
|
2708
|
-
provide("ns", ns$
|
|
2714
|
+
provide("ns", ns$j);
|
|
2709
2715
|
const router = getCurrentInstance().appContext.config.globalProperties.$router, currentPath = router.currentRoute?.value.fullPath, activePath = ref(currentPath);
|
|
2710
2716
|
watch((() => router.currentRoute?.value), (to => {
|
|
2711
2717
|
activePath.value = to.fullPath;
|
|
2712
2718
|
}));
|
|
2713
2719
|
return () => createVNode(Fragment, null, [ createVNode(ElMenu, {
|
|
2714
|
-
class: [ ns$
|
|
2720
|
+
class: [ ns$j.b(), props.className ],
|
|
2715
2721
|
style: props.style,
|
|
2716
2722
|
defaultActive: activePath.value,
|
|
2717
2723
|
router: props.router,
|
|
@@ -2719,7 +2725,7 @@ const NextMenu = withInstall(defineComponent({
|
|
|
2719
2725
|
ellipsis: !0
|
|
2720
2726
|
}, {
|
|
2721
2727
|
default: () => [ createVNode(Fragment, null, [ props.menuTree.map((item => item.children?.length ? valueExist(item.meta?.isHide, !1) ? null : createVNode(ElSubMenu, {
|
|
2722
|
-
"popper-class": ns$
|
|
2728
|
+
"popper-class": ns$j.b("popper"),
|
|
2723
2729
|
index: item.path || item.id,
|
|
2724
2730
|
teleported: !0
|
|
2725
2731
|
}, {
|
|
@@ -2730,7 +2736,7 @@ const NextMenu = withInstall(defineComponent({
|
|
|
2730
2736
|
menuData: item.children
|
|
2731
2737
|
}, null)
|
|
2732
2738
|
}) : valueExist(item.meta?.isHide, !1) ? null : createVNode(ElMenuItem, {
|
|
2733
|
-
"popper-class": ns$
|
|
2739
|
+
"popper-class": ns$j.b("popper"),
|
|
2734
2740
|
index: item.path
|
|
2735
2741
|
}, {
|
|
2736
2742
|
default: () => [ createVNode(MenuItemTitle, {
|
|
@@ -2758,20 +2764,20 @@ var Sidebar$2 = defineComponent({
|
|
|
2758
2764
|
}
|
|
2759
2765
|
});
|
|
2760
2766
|
|
|
2761
|
-
const ns$
|
|
2767
|
+
const ns$i = useNamespace("layout-defaults");
|
|
2762
2768
|
|
|
2763
2769
|
var defaults = defineComponent({
|
|
2764
2770
|
props: {},
|
|
2765
|
-
setup: () => (provide("ns", ns$
|
|
2771
|
+
setup: () => (provide("ns", ns$i), {}),
|
|
2766
2772
|
render() {
|
|
2767
2773
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {});
|
|
2768
2774
|
slots.menu;
|
|
2769
2775
|
const isTabs = ref(!!slots.tabs);
|
|
2770
2776
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(ElContainer, {
|
|
2771
|
-
class: ns$
|
|
2777
|
+
class: ns$i.b()
|
|
2772
2778
|
}, {
|
|
2773
2779
|
default: () => [ createVNode(Sidebar$2, null, null), createVNode("div", {
|
|
2774
|
-
class: [ ns$
|
|
2780
|
+
class: [ ns$i.b("content") ]
|
|
2775
2781
|
}, [ createVNode(Header$3, null, null), _config.showTabs ? slots.tabs ? slots.tabs?.() : createVNode(NextTabs, {
|
|
2776
2782
|
tabs: _config.tabs,
|
|
2777
2783
|
activeTab: _config.activeTab,
|
|
@@ -2779,7 +2785,7 @@ var defaults = defineComponent({
|
|
|
2779
2785
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2780
2786
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2781
2787
|
}, null) : null, createVNode("main", {
|
|
2782
|
-
class: [ ns$
|
|
2788
|
+
class: [ ns$i.bf("main"), ns$i.is("layout-tabs", isTabs.value) ]
|
|
2783
2789
|
}, [ slots.default?.() ]) ]) ]
|
|
2784
2790
|
});
|
|
2785
2791
|
}
|
|
@@ -2812,11 +2818,11 @@ var Header$2 = defineComponent({
|
|
|
2812
2818
|
}
|
|
2813
2819
|
});
|
|
2814
2820
|
|
|
2815
|
-
const ns$
|
|
2821
|
+
const ns$h = useNamespace("layout-transverse");
|
|
2816
2822
|
|
|
2817
2823
|
var transverse = defineComponent({
|
|
2818
2824
|
props: {},
|
|
2819
|
-
setup: () => (provide("ns", ns$
|
|
2825
|
+
setup: () => (provide("ns", ns$h), {}),
|
|
2820
2826
|
render() {
|
|
2821
2827
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {}), __slots_header = {};
|
|
2822
2828
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2833,7 +2839,7 @@ var transverse = defineComponent({
|
|
|
2833
2839
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2834
2840
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2835
2841
|
}, null) : null, createVNode("main", {
|
|
2836
|
-
class: [ ns$
|
|
2842
|
+
class: [ ns$h.b("main"), ns$h.is("layout-tabs", isTabs.value) ]
|
|
2837
2843
|
}, [ slots.default?.() ]) ]);
|
|
2838
2844
|
var s;
|
|
2839
2845
|
}
|
|
@@ -2875,11 +2881,11 @@ var Header$1 = defineComponent({
|
|
|
2875
2881
|
}
|
|
2876
2882
|
});
|
|
2877
2883
|
|
|
2878
|
-
const ns$
|
|
2884
|
+
const ns$g = useNamespace("layout-columns");
|
|
2879
2885
|
|
|
2880
2886
|
var columns = defineComponent({
|
|
2881
2887
|
props: {},
|
|
2882
|
-
setup: () => (provide("ns", ns$
|
|
2888
|
+
setup: () => (provide("ns", ns$g), {}),
|
|
2883
2889
|
render() {
|
|
2884
2890
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {}), __slots_header = {};
|
|
2885
2891
|
slots[slots_config_headerMenu] && (__slots_header[slots_config_headerMenu] = () => slots[slots_config_headerMenu]()),
|
|
@@ -2887,11 +2893,11 @@ var columns = defineComponent({
|
|
|
2887
2893
|
slots[slots_config_headerToolsSuffix] && (__slots_header[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2888
2894
|
const isTabs = ref(!!slots.tabs);
|
|
2889
2895
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(ElContainer, {
|
|
2890
|
-
class: ns$
|
|
2896
|
+
class: ns$g.b()
|
|
2891
2897
|
}, {
|
|
2892
2898
|
default: () => {
|
|
2893
2899
|
return [ createVNode(Sidebar$1, null, null), createVNode("div", {
|
|
2894
|
-
class: [ ns$
|
|
2900
|
+
class: [ ns$g.b("content") ]
|
|
2895
2901
|
}, [ createVNode(Header$1, null, (s = __slots_header, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header : {
|
|
2896
2902
|
default: () => [ __slots_header ]
|
|
2897
2903
|
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : createVNode(NextTabs, {
|
|
@@ -2901,7 +2907,7 @@ var columns = defineComponent({
|
|
|
2901
2907
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2902
2908
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2903
2909
|
}, null) : null, createVNode("main", {
|
|
2904
|
-
class: [ ns$
|
|
2910
|
+
class: [ ns$g.bf("main"), ns$g.is("layout-tabs", isTabs.value) ]
|
|
2905
2911
|
}, [ slots.default?.() ]) ]) ];
|
|
2906
2912
|
var s;
|
|
2907
2913
|
}
|
|
@@ -2947,21 +2953,21 @@ var Header = defineComponent({
|
|
|
2947
2953
|
}
|
|
2948
2954
|
});
|
|
2949
2955
|
|
|
2950
|
-
const ns$
|
|
2956
|
+
const ns$f = useNamespace("layout-classic");
|
|
2951
2957
|
|
|
2952
2958
|
var classic = defineComponent({
|
|
2953
2959
|
props: {},
|
|
2954
|
-
setup: () => (provide("ns", ns$
|
|
2955
|
-
ns: ns$
|
|
2960
|
+
setup: () => (provide("ns", ns$f), {
|
|
2961
|
+
ns: ns$f
|
|
2956
2962
|
}),
|
|
2957
2963
|
render() {
|
|
2958
2964
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {});
|
|
2959
2965
|
slots.menu;
|
|
2960
2966
|
const isTabs = ref(!!slots.tabs);
|
|
2961
2967
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(Fragment, null, [ createVNode(Header, null, null), createVNode("div", {
|
|
2962
|
-
class: [ ns$
|
|
2968
|
+
class: [ ns$f.b("content"), ns$f.is("layout-tabs", isTabs.value) ]
|
|
2963
2969
|
}, [ createVNode(Sidebar, null, null), createVNode("div", {
|
|
2964
|
-
class: ns$
|
|
2970
|
+
class: ns$f.b("container")
|
|
2965
2971
|
}, [ _config.showTabs ? slots.tabs ? slots.tabs?.() : createVNode(NextTabs, {
|
|
2966
2972
|
tabs: _config.tabs,
|
|
2967
2973
|
activeTab: _config.activeTab,
|
|
@@ -2969,12 +2975,12 @@ var classic = defineComponent({
|
|
|
2969
2975
|
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2970
2976
|
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2971
2977
|
}, null) : null, createVNode("main", {
|
|
2972
|
-
class: [ ns$
|
|
2978
|
+
class: [ ns$f.b("main") ]
|
|
2973
2979
|
}, [ slots.default?.() ]) ]) ]) ]);
|
|
2974
2980
|
}
|
|
2975
2981
|
});
|
|
2976
2982
|
|
|
2977
|
-
const ns$
|
|
2983
|
+
const ns$e = useNamespace("layout"), layouts = {
|
|
2978
2984
|
defaults: markRaw(defaults),
|
|
2979
2985
|
transverse: markRaw(transverse),
|
|
2980
2986
|
columns: markRaw(columns),
|
|
@@ -3001,8 +3007,8 @@ const NextLayout = withInstall(defineComponent({
|
|
|
3001
3007
|
},
|
|
3002
3008
|
emits: [ "changeLanguage", "changeUserDropdown", "changeOptions", "tabsChange", "tabsSelect", "tabsClose" ],
|
|
3003
3009
|
setup(props, {slots: slots, emit: emit}) {
|
|
3004
|
-
const _config = ref(mergeWith(defaultConfig$
|
|
3005
|
-
provide("options", _config.value), provide("__ns__", ns$
|
|
3010
|
+
const _config = ref(mergeWith(defaultConfig$4, props.options, customizerCoverArray));
|
|
3011
|
+
provide("options", _config.value), provide("__ns__", ns$e), provide("__emit__", emit),
|
|
3006
3012
|
provide("__slots__", slots);
|
|
3007
3013
|
const updateOptions = cfg => {
|
|
3008
3014
|
_config.value = mergeWith(_config.value, cfg, customizerCoverArray), updateThemeColorCssVar(_config.value?.setting),
|
|
@@ -3026,13 +3032,13 @@ const NextLayout = withInstall(defineComponent({
|
|
|
3026
3032
|
const _activeSlots = {};
|
|
3027
3033
|
for (const key in slots) Object.prototype.hasOwnProperty.call(slots, key) && (_activeSlots[key] = () => slots[key]?.());
|
|
3028
3034
|
return createVNode("div", {
|
|
3029
|
-
class: [ ns$
|
|
3035
|
+
class: [ ns$e.b(), props.className ],
|
|
3030
3036
|
style: props.style
|
|
3031
3037
|
}, [ h(activeLayout.value, {}, {
|
|
3032
3038
|
..._activeSlots
|
|
3033
3039
|
}) ]);
|
|
3034
3040
|
}
|
|
3035
|
-
})), ns$
|
|
3041
|
+
})), ns$d = useNamespace("tabs");
|
|
3036
3042
|
|
|
3037
3043
|
var Element$8 = defineComponent({
|
|
3038
3044
|
name: "NextTabs",
|
|
@@ -3103,12 +3109,12 @@ var Element$8 = defineComponent({
|
|
|
3103
3109
|
tabsView.value.push(activeRoute)), emit("change", activeIndex.value, tabsView.value, "add");
|
|
3104
3110
|
}));
|
|
3105
3111
|
const renderContent = () => createVNode("nav", {
|
|
3106
|
-
class: ns$
|
|
3112
|
+
class: ns$d.b()
|
|
3107
3113
|
}, [ createVNode(ElScrollbar, null, {
|
|
3108
3114
|
default: () => [ createVNode("ul", {
|
|
3109
|
-
class: ns$
|
|
3115
|
+
class: ns$d.b("list")
|
|
3110
3116
|
}, [ tabsView.value.map(((tab, index) => tab ? createVNode("li", {
|
|
3111
|
-
class: [ "tab-item", ns$
|
|
3117
|
+
class: [ "tab-item", ns$d.is("active", activeIndex.value === index) ],
|
|
3112
3118
|
onClick: event => onClickTabItem(event, tab, index)
|
|
3113
3119
|
}, [ createVNode("i", {
|
|
3114
3120
|
class: [ "tab-icon", tab.meta?.icon ]
|
|
@@ -3139,11 +3145,11 @@ var Element$8 = defineComponent({
|
|
|
3139
3145
|
onCommand: onChange
|
|
3140
3146
|
}, {
|
|
3141
3147
|
default: () => createVNode("span", {
|
|
3142
|
-
class: ns$
|
|
3148
|
+
class: ns$d.b("tab-more")
|
|
3143
3149
|
}, [ createVNode("i", {
|
|
3144
|
-
class: [ ns$
|
|
3150
|
+
class: [ ns$d.be("tab-more", "box"), ns$d.be("tab-more", "top") ]
|
|
3145
3151
|
}, null), createVNode("i", {
|
|
3146
|
-
class: [ ns$
|
|
3152
|
+
class: [ ns$d.be("tab-more", "box"), ns$d.be("tab-more", "bottom") ]
|
|
3147
3153
|
}, null) ]),
|
|
3148
3154
|
dropdown: () => createVNode(ElDropdownMenu, null, {
|
|
3149
3155
|
default: () => [ createVNode(ElDropdownItem, {
|
|
@@ -3177,7 +3183,7 @@ var Element$8 = defineComponent({
|
|
|
3177
3183
|
}
|
|
3178
3184
|
});
|
|
3179
3185
|
|
|
3180
|
-
const NextTabs = withInstall(Element$8), ns$
|
|
3186
|
+
const NextTabs = withInstall(Element$8), ns$c = useNamespace("container");
|
|
3181
3187
|
|
|
3182
3188
|
const NextContainer = withInstall(defineComponent({
|
|
3183
3189
|
name: "NextContainer",
|
|
@@ -3216,18 +3222,18 @@ const NextContainer = withInstall(defineComponent({
|
|
|
3216
3222
|
}), style;
|
|
3217
3223
|
}));
|
|
3218
3224
|
return () => props.scrollbar ? createVNode(ElScrollbar, {
|
|
3219
|
-
class: [ ns$
|
|
3225
|
+
class: [ ns$c.b(), props.className ],
|
|
3220
3226
|
style: props.style
|
|
3221
3227
|
}, {
|
|
3222
3228
|
default: () => [ slots.default?.() ]
|
|
3223
3229
|
}) : createVNode("div", {
|
|
3224
|
-
class: [ ns$
|
|
3230
|
+
class: [ ns$c.b(), props.className ],
|
|
3225
3231
|
style: {
|
|
3226
3232
|
...styles.value,
|
|
3227
3233
|
...props.style
|
|
3228
3234
|
}
|
|
3229
3235
|
}, [ props.card ? createVNode("div", {
|
|
3230
|
-
class: ns$
|
|
3236
|
+
class: ns$c.b("card")
|
|
3231
3237
|
}, [ slots.default?.() ]) : slots.default?.() ]);
|
|
3232
3238
|
}
|
|
3233
3239
|
}));
|
|
@@ -3305,7 +3311,7 @@ var defaultPropsConfig = {
|
|
|
3305
3311
|
|
|
3306
3312
|
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" ];
|
|
3307
3313
|
|
|
3308
|
-
var defaultConfig$
|
|
3314
|
+
var defaultConfig$3 = {
|
|
3309
3315
|
initLoadData: !0,
|
|
3310
3316
|
defaultContentHeight: 300,
|
|
3311
3317
|
fullscreenchangeContentHeight: !1,
|
|
@@ -3352,7 +3358,7 @@ var defaultConfig$2 = {
|
|
|
3352
3358
|
formColumnMinWidth: 350
|
|
3353
3359
|
};
|
|
3354
3360
|
|
|
3355
|
-
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$
|
|
3361
|
+
const columnSlotName = prop => "column-" + prop, searchFormSlotName = prop => "search-" + prop, formSlotName = prop => "form-" + prop, ns$b = useNamespace("spin-loading");
|
|
3356
3362
|
|
|
3357
3363
|
var NextSpinLoading$1 = defineComponent({
|
|
3358
3364
|
name: "NextSpinLoading",
|
|
@@ -3374,31 +3380,35 @@ var NextSpinLoading$1 = defineComponent({
|
|
|
3374
3380
|
default: ""
|
|
3375
3381
|
}
|
|
3376
3382
|
},
|
|
3377
|
-
setup() {
|
|
3378
|
-
const {t: t} = useLocale();
|
|
3379
|
-
return {
|
|
3380
|
-
|
|
3383
|
+
setup(props, {expose: expose}) {
|
|
3384
|
+
const {t: t} = useLocale(), elementInstance = ref();
|
|
3385
|
+
return expose({
|
|
3386
|
+
elementInstance: elementInstance
|
|
3387
|
+
}), {
|
|
3388
|
+
t: t,
|
|
3389
|
+
elementInstance: elementInstance
|
|
3381
3390
|
};
|
|
3382
3391
|
},
|
|
3383
3392
|
render() {
|
|
3384
3393
|
const _t = this.t, slots = this.$slots, props = this.$props, loadingText = props.tip || _t("next.loading");
|
|
3385
3394
|
return createVNode("div", {
|
|
3386
|
-
|
|
3395
|
+
ref: "elementInstance",
|
|
3396
|
+
class: [ ns$b.b(), props.className ],
|
|
3387
3397
|
style: props.style
|
|
3388
3398
|
}, [ slots.default?.(), props.loading ? createVNode("div", {
|
|
3389
|
-
class: ns$
|
|
3399
|
+
class: ns$b.b("mask")
|
|
3390
3400
|
}, [ createVNode("span", {
|
|
3391
|
-
class: ns$
|
|
3401
|
+
class: ns$b.b("mask-dot")
|
|
3392
3402
|
}, [ createVNode("i", {
|
|
3393
|
-
class: ns$
|
|
3403
|
+
class: ns$b.be("mask", "dot-item")
|
|
3394
3404
|
}, null), createVNode("i", {
|
|
3395
|
-
class: ns$
|
|
3405
|
+
class: ns$b.be("mask", "dot-item")
|
|
3396
3406
|
}, null), createVNode("i", {
|
|
3397
|
-
class: ns$
|
|
3407
|
+
class: ns$b.be("mask", "dot-item")
|
|
3398
3408
|
}, null), createVNode("i", {
|
|
3399
|
-
class: ns$
|
|
3409
|
+
class: ns$b.be("mask", "dot-item")
|
|
3400
3410
|
}, null) ]), createVNode("span", {
|
|
3401
|
-
class: ns$
|
|
3411
|
+
class: ns$b.be("mask", "text")
|
|
3402
3412
|
}, [ loadingText ]) ]) : null ]);
|
|
3403
3413
|
}
|
|
3404
3414
|
}), SearchColumn = defineComponent({
|
|
@@ -4076,7 +4086,7 @@ var TableColumnOperations = defineComponent({
|
|
|
4076
4086
|
}
|
|
4077
4087
|
});
|
|
4078
4088
|
|
|
4079
|
-
const ns$
|
|
4089
|
+
const ns$a = useNamespace("dialog");
|
|
4080
4090
|
|
|
4081
4091
|
var NextDialog$1 = defineComponent({
|
|
4082
4092
|
name: "NextDialog",
|
|
@@ -4142,7 +4152,7 @@ var NextDialog$1 = defineComponent({
|
|
|
4142
4152
|
return () => createVNode(Fragment, null, [ createVNode(ElDialog, {
|
|
4143
4153
|
modelValue: visible.value,
|
|
4144
4154
|
"onUpdate:modelValue": $event => visible.value = $event,
|
|
4145
|
-
class: ns$
|
|
4155
|
+
class: ns$a.b(),
|
|
4146
4156
|
title: props.title,
|
|
4147
4157
|
appendToBody: props.appendToBody,
|
|
4148
4158
|
"destroy-on-close": !0,
|
|
@@ -4159,12 +4169,12 @@ var NextDialog$1 = defineComponent({
|
|
|
4159
4169
|
}, {
|
|
4160
4170
|
default: () => [ slots.default?.() ],
|
|
4161
4171
|
header: ({close: close, titleId: titleId, titleClass: titleClass}) => createVNode("div", {
|
|
4162
|
-
class: ns$
|
|
4172
|
+
class: ns$a.b("header")
|
|
4163
4173
|
}, [ createVNode("h4", {
|
|
4164
4174
|
id: titleId,
|
|
4165
4175
|
class: titleClass
|
|
4166
4176
|
}, [ props.title ]), createVNode("div", {
|
|
4167
|
-
class: ns$
|
|
4177
|
+
class: ns$a.e("header-right")
|
|
4168
4178
|
}, [ props.fullscreenBtn && createVNode("span", {
|
|
4169
4179
|
class: "icon-fullscreen",
|
|
4170
4180
|
onClick: () => isFullscreen.value = !isFullscreen.value
|
|
@@ -4198,7 +4208,7 @@ const tableSelectConfig = {
|
|
|
4198
4208
|
operations: !1
|
|
4199
4209
|
};
|
|
4200
4210
|
|
|
4201
|
-
var defaultConfig$
|
|
4211
|
+
var defaultConfig$2 = {
|
|
4202
4212
|
size: "default",
|
|
4203
4213
|
colSpan: 8,
|
|
4204
4214
|
labelWidth: "6em",
|
|
@@ -4213,7 +4223,7 @@ var defaultConfig$1 = {
|
|
|
4213
4223
|
resetText: null
|
|
4214
4224
|
};
|
|
4215
4225
|
|
|
4216
|
-
const ns$
|
|
4226
|
+
const ns$9 = useNamespace("form");
|
|
4217
4227
|
|
|
4218
4228
|
var NumberRangePicker = defineComponent({
|
|
4219
4229
|
name: "NumberRangePicker",
|
|
@@ -4253,7 +4263,7 @@ var NumberRangePicker = defineComponent({
|
|
|
4253
4263
|
}));
|
|
4254
4264
|
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
4255
4265
|
ref: numberRangeRef,
|
|
4256
|
-
class: ns$
|
|
4266
|
+
class: ns$9.e("number-range")
|
|
4257
4267
|
}, [ createVNode(ElInputNumber, {
|
|
4258
4268
|
modelValue: startNumber.value,
|
|
4259
4269
|
"onUpdate:modelValue": $event => startNumber.value = $event,
|
|
@@ -4263,7 +4273,7 @@ var NumberRangePicker = defineComponent({
|
|
|
4263
4273
|
disabled: disabled,
|
|
4264
4274
|
onChange: onChangeStart
|
|
4265
4275
|
}, null), createVNode("span", {
|
|
4266
|
-
class: ns$
|
|
4276
|
+
class: ns$9.em("number-range", "division")
|
|
4267
4277
|
}, [ t("next.date.rangeSeparator") ]), createVNode(ElInputNumber, {
|
|
4268
4278
|
modelValue: endNumber.value,
|
|
4269
4279
|
"onUpdate:modelValue": $event => endNumber.value = $event,
|
|
@@ -4282,7 +4292,7 @@ function _isSlot$3(s) {
|
|
|
4282
4292
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s);
|
|
4283
4293
|
}
|
|
4284
4294
|
|
|
4285
|
-
const ns$
|
|
4295
|
+
const ns$8 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
4286
4296
|
name: "InputTableSelect",
|
|
4287
4297
|
props: {
|
|
4288
4298
|
modelValue: {
|
|
@@ -4310,7 +4320,7 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4310
4320
|
},
|
|
4311
4321
|
emits: [ "select" ],
|
|
4312
4322
|
setup(props, {emit: emit}) {
|
|
4313
|
-
const {t: t} = useLocale(), _disabled = props.disabled, _column = props.column, _placeholder = _column.placeholder || t("next.form.select") + _column.label, _tableDefaultConfig = deepClone(defaultConfig$
|
|
4323
|
+
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 = reactive({
|
|
4314
4324
|
visible: !1,
|
|
4315
4325
|
title: _column.label + t("next.form.tableSelect"),
|
|
4316
4326
|
dialogWidth: _options.dialogWidth
|
|
@@ -4381,18 +4391,18 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4381
4391
|
}, renderContent = () => {
|
|
4382
4392
|
let _slot, _slot2;
|
|
4383
4393
|
return createVNode(Fragment, null, [ createVNode("div", {
|
|
4384
|
-
class: [ "el-input", ns$
|
|
4394
|
+
class: [ "el-input", ns$8.e("input-table"), ns$8.is("disabled", _disabled) ]
|
|
4385
4395
|
}, [ createVNode("div", {
|
|
4386
4396
|
class: "el-input__wrapper"
|
|
4387
4397
|
}, [ tags?.value.length ? createVNode("span", {
|
|
4388
|
-
class: ns$
|
|
4398
|
+
class: ns$8.em("input-table", "value")
|
|
4389
4399
|
}, [ tags.value.map(((tag, index) => createVNode(ElTag, {
|
|
4390
4400
|
closable: !_disabled,
|
|
4391
4401
|
onClose: () => _onCloseTag(0, index)
|
|
4392
4402
|
}, {
|
|
4393
4403
|
default: () => [ tag.label ]
|
|
4394
4404
|
}))), tagsMore?.value?.length ? createVNode(ElTooltip, {
|
|
4395
|
-
"popper-class": ns$
|
|
4405
|
+
"popper-class": ns$8.e("tooltip-tags"),
|
|
4396
4406
|
placement: "bottom",
|
|
4397
4407
|
effect: "light"
|
|
4398
4408
|
}, {
|
|
@@ -4406,10 +4416,10 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4406
4416
|
default: () => [ tag.label ]
|
|
4407
4417
|
})))
|
|
4408
4418
|
}) : null ]) : createVNode("span", {
|
|
4409
|
-
class: ns$
|
|
4419
|
+
class: ns$8.em("input-table", "placeholder")
|
|
4410
4420
|
}, [ _placeholder ]) ]), createVNode(ElButton, {
|
|
4411
4421
|
type: "primary",
|
|
4412
|
-
class: ns$
|
|
4422
|
+
class: ns$8.em("input-table", "append"),
|
|
4413
4423
|
disabled: _disabled,
|
|
4414
4424
|
icon: search_default,
|
|
4415
4425
|
onClick: onClickTableDialog
|
|
@@ -4423,7 +4433,7 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4423
4433
|
onClose: onCloseTableDialog
|
|
4424
4434
|
}, {
|
|
4425
4435
|
default: () => [ createVNode("div", {
|
|
4426
|
-
class: ns$
|
|
4436
|
+
class: ns$8.em("input-table", "content")
|
|
4427
4437
|
}, [ createVNode(ElRadioGroup, {
|
|
4428
4438
|
modelValue: sinleSelection.value
|
|
4429
4439
|
}, {
|
|
@@ -4446,7 +4456,7 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4446
4456
|
}) ]
|
|
4447
4457
|
}) ]
|
|
4448
4458
|
}) ]), createVNode("div", {
|
|
4449
|
-
class: ns$
|
|
4459
|
+
class: ns$8.em("input-table", "footer")
|
|
4450
4460
|
}, [ createVNode(ElButton, {
|
|
4451
4461
|
onClick: onResetTableSelect
|
|
4452
4462
|
}, _isSlot$3(_slot = t("next.form.reset")) ? _slot : {
|
|
@@ -4462,7 +4472,7 @@ const ns$7 = useNamespace("form"), InputTableSelect = defineComponent({
|
|
|
4462
4472
|
};
|
|
4463
4473
|
return () => createVNode(Fragment, null, [ renderContent() ]);
|
|
4464
4474
|
}
|
|
4465
|
-
}), ns$
|
|
4475
|
+
}), ns$7 = useNamespace("form");
|
|
4466
4476
|
|
|
4467
4477
|
var UploadImage = defineComponent({
|
|
4468
4478
|
name: "UploadImage",
|
|
@@ -4511,7 +4521,7 @@ var UploadImage = defineComponent({
|
|
|
4511
4521
|
let urls = [];
|
|
4512
4522
|
return "string" == typeof value ? urls = [ value ] : "[object Array]" === Object.prototype.toString.call(value) && (urls = value),
|
|
4513
4523
|
urls = urls.filter((url => !!url)), urls.length ? createVNode(ElImage, {
|
|
4514
|
-
class: ns$
|
|
4524
|
+
class: ns$7.e("preview-image"),
|
|
4515
4525
|
src: urls[0],
|
|
4516
4526
|
previewSrcList: urls,
|
|
4517
4527
|
"preview-teleported": !0,
|
|
@@ -4526,7 +4536,7 @@ var UploadImage = defineComponent({
|
|
|
4526
4536
|
})
|
|
4527
4537
|
}) : null;
|
|
4528
4538
|
})(), _disabled ? null : createVNode(ElUpload, {
|
|
4529
|
-
class: [ ns$
|
|
4539
|
+
class: [ ns$7.b("upload-image"), props.className ],
|
|
4530
4540
|
style: props.style,
|
|
4531
4541
|
"list-type": props.listType,
|
|
4532
4542
|
"auto-upload": !1,
|
|
@@ -4652,7 +4662,7 @@ var UploadImage = defineComponent({
|
|
|
4652
4662
|
}
|
|
4653
4663
|
});
|
|
4654
4664
|
|
|
4655
|
-
const ns$
|
|
4665
|
+
const ns$6 = useNamespace("form");
|
|
4656
4666
|
|
|
4657
4667
|
var Element$6 = defineComponent({
|
|
4658
4668
|
name: "NextForm",
|
|
@@ -4672,7 +4682,7 @@ var Element$6 = defineComponent({
|
|
|
4672
4682
|
},
|
|
4673
4683
|
emits: [ "submit", "close", "reset" ],
|
|
4674
4684
|
setup(props, {slots: slots, emit: emit, expose: expose}) {
|
|
4675
|
-
const _config = deepClone(defaultConfig$
|
|
4685
|
+
const _config = deepClone(defaultConfig$2), options = reactive(merge$1(_config, props.options)), _isEditing = computed((() => "boolean" != typeof options.isEditing || options.isEditing)), {t: t} = useLocale(), colSpan = ref(options.colSpan), formDatum = reactive(props.formDatum) || {}, formParams = reactive(merge$1({}, formDatum)), _formColumns = ref([]), formRules = reactive({});
|
|
4676
4686
|
watch((() => [ props.columns, props.formDatum ]), (() => {
|
|
4677
4687
|
(() => {
|
|
4678
4688
|
const columns = props.columns;
|
|
@@ -5016,7 +5026,7 @@ var Element$6 = defineComponent({
|
|
|
5016
5026
|
let _slot;
|
|
5017
5027
|
return createVNode(ElForm, {
|
|
5018
5028
|
ref: ruleFormRef,
|
|
5019
|
-
class: ns$
|
|
5029
|
+
class: ns$6.b(),
|
|
5020
5030
|
inline: !1,
|
|
5021
5031
|
model: formParams,
|
|
5022
5032
|
size: options.size
|
|
@@ -5037,7 +5047,7 @@ var Element$6 = defineComponent({
|
|
|
5037
5047
|
}, {
|
|
5038
5048
|
label: () => column.label ? createVNode(Fragment, null, [ createVNode(NextTextEllipsis, {
|
|
5039
5049
|
content: t(column.label),
|
|
5040
|
-
class: ns$
|
|
5050
|
+
class: ns$6.e("item-label")
|
|
5041
5051
|
}, null), column.tip ? createVNode(ElTooltip, {
|
|
5042
5052
|
effect: "dark",
|
|
5043
5053
|
content: column.tip,
|
|
@@ -5057,7 +5067,7 @@ var Element$6 = defineComponent({
|
|
|
5057
5067
|
}))), "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? _slot : {
|
|
5058
5068
|
default: () => [ _slot ]
|
|
5059
5069
|
})), _isEditing.value && options.showFooter ? createVNode("div", {
|
|
5060
|
-
class: ns$
|
|
5070
|
+
class: ns$6.e("footer")
|
|
5061
5071
|
}, [ createVNode(ElButton, {
|
|
5062
5072
|
type: "primary",
|
|
5063
5073
|
loading: submitLoading.value,
|
|
@@ -5134,18 +5144,18 @@ function _isSlot(s) {
|
|
|
5134
5144
|
return "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s);
|
|
5135
5145
|
}
|
|
5136
5146
|
|
|
5137
|
-
const ns$
|
|
5147
|
+
const ns$5 = useNamespace("crud-table");
|
|
5138
5148
|
|
|
5139
5149
|
var Element$5 = defineComponent({
|
|
5140
5150
|
name: "NextCrudTable",
|
|
5141
5151
|
props: defaultPropsConfig,
|
|
5142
5152
|
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" ],
|
|
5143
5153
|
setup(props, {emit: emit, slots: slots, expose: expose}) {
|
|
5144
|
-
const _config = deepClone(defaultConfig$
|
|
5154
|
+
const _config = deepClone(defaultConfig$3), _options = computed((() => {
|
|
5145
5155
|
const cfg = unref(props.options);
|
|
5146
5156
|
return merge$1(_config, cfg);
|
|
5147
5157
|
})), options = unref(_options);
|
|
5148
|
-
provide("options", computed((() => _options.value))), provide("ns", ns$
|
|
5158
|
+
provide("options", computed((() => _options.value))), provide("ns", ns$5);
|
|
5149
5159
|
const {t: t} = useLocale(), _columns = ref(options.columns), _searchColumns = ref([]), _formColumns = ref([]), _updateColumnsAll = ops => {
|
|
5150
5160
|
((options, cb) => {
|
|
5151
5161
|
const _columns = reactive(options.columns), _loadDicData = col => {
|
|
@@ -5386,11 +5396,11 @@ var Element$5 = defineComponent({
|
|
|
5386
5396
|
});
|
|
5387
5397
|
return () => createVNode(Fragment, null, [ createVNode(Fragment, null, [ createVNode("div", {
|
|
5388
5398
|
ref: crudTableRef,
|
|
5389
|
-
class: [ ns$
|
|
5399
|
+
class: [ ns$5.b(), props.className ],
|
|
5390
5400
|
style: props.style
|
|
5391
5401
|
}, [ options.showSearchForm || options.showHeaderMenu ? createVNode("header", {
|
|
5392
5402
|
ref: headerRef,
|
|
5393
|
-
class: ns$
|
|
5403
|
+
class: ns$5.b("header")
|
|
5394
5404
|
}, [ options.showSearchForm && createVNode(HeaderSearch, {
|
|
5395
5405
|
columns: _searchColumns.value,
|
|
5396
5406
|
onZoomResize: updateTableContentHeight,
|
|
@@ -5409,7 +5419,7 @@ var Element$5 = defineComponent({
|
|
|
5409
5419
|
}, {
|
|
5410
5420
|
default: () => [ createVNode("div", {
|
|
5411
5421
|
ref: tableRef,
|
|
5412
|
-
class: ns$
|
|
5422
|
+
class: ns$5.b("content")
|
|
5413
5423
|
}, [ createVNode(ElTable, {
|
|
5414
5424
|
data: tableData.value,
|
|
5415
5425
|
height: tableContentHeight.value,
|
|
@@ -5472,7 +5482,7 @@ var Element$5 = defineComponent({
|
|
|
5472
5482
|
}) ]) ]
|
|
5473
5483
|
}), options.isPagination ? createVNode("div", {
|
|
5474
5484
|
ref: footerRef,
|
|
5475
|
-
class: ns$
|
|
5485
|
+
class: ns$5.b("footer")
|
|
5476
5486
|
}, [ createVNode(FooterPagination, {
|
|
5477
5487
|
page: props.page,
|
|
5478
5488
|
onChange: onChangePagination
|
|
@@ -5530,15 +5540,15 @@ var propsConfig = {
|
|
|
5530
5540
|
total: 0
|
|
5531
5541
|
})
|
|
5532
5542
|
}
|
|
5533
|
-
}, defaultConfig = {};
|
|
5543
|
+
}, defaultConfig$1 = {};
|
|
5534
5544
|
|
|
5535
|
-
const ns$
|
|
5545
|
+
const ns$4 = useNamespace("crud-table-virtualized");
|
|
5536
5546
|
|
|
5537
5547
|
const NextCrudTableVirtualized = withInstall(defineComponent({
|
|
5538
5548
|
name: "NextCrudTableVirtualized",
|
|
5539
5549
|
props: propsConfig,
|
|
5540
5550
|
setup(props, {emit: emit}) {
|
|
5541
|
-
const _config = deepClone(defaultConfig), _options = computed((() => {
|
|
5551
|
+
const _config = deepClone(defaultConfig$1), _options = computed((() => {
|
|
5542
5552
|
const cfg = unref(props.options);
|
|
5543
5553
|
return merge$1(_config, cfg);
|
|
5544
5554
|
})), options = unref(_options);
|
|
@@ -5553,7 +5563,7 @@ const NextCrudTableVirtualized = withInstall(defineComponent({
|
|
|
5553
5563
|
emit("close-add-edit");
|
|
5554
5564
|
};
|
|
5555
5565
|
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
5556
|
-
class: [ ns$
|
|
5566
|
+
class: [ ns$4.b(), props.className ]
|
|
5557
5567
|
}, [ createVNode(NextSpinLoading, null, null), createVNode(NextDialog, {
|
|
5558
5568
|
modelValue: addEditDialog.visible,
|
|
5559
5569
|
"onUpdate:modelValue": $event => addEditDialog.visible = $event,
|
|
@@ -5564,7 +5574,7 @@ const NextCrudTableVirtualized = withInstall(defineComponent({
|
|
|
5564
5574
|
onClose: onCloseAddEditDialog
|
|
5565
5575
|
}, null) ]) ]);
|
|
5566
5576
|
}
|
|
5567
|
-
})), NextSpinLoading = withInstall(NextSpinLoading$1), ns$
|
|
5577
|
+
})), NextSpinLoading = withInstall(NextSpinLoading$1), ns$3 = useNamespace("upload");
|
|
5568
5578
|
|
|
5569
5579
|
const NextUpload = withInstall(defineComponent({
|
|
5570
5580
|
name: "NextUpload",
|
|
@@ -5599,7 +5609,7 @@ const NextUpload = withInstall(defineComponent({
|
|
|
5599
5609
|
const slots = this.$slots, props = this.$props, emit = this.$emit, _t = this.t, uploadfilesPreview = ref([]), body = document.getElementsByTagName("body")[0];
|
|
5600
5610
|
let previewImagesContainer = null;
|
|
5601
5611
|
return createVNode(ElUpload, {
|
|
5602
|
-
class: [ ns$
|
|
5612
|
+
class: [ ns$3.b(), props.className ],
|
|
5603
5613
|
style: props.style,
|
|
5604
5614
|
"list-type": props.listType,
|
|
5605
5615
|
"auto-upload": !1,
|
|
@@ -5637,7 +5647,7 @@ const NextUpload = withInstall(defineComponent({
|
|
|
5637
5647
|
})
|
|
5638
5648
|
});
|
|
5639
5649
|
}
|
|
5640
|
-
})), ns$
|
|
5650
|
+
})), ns$2 = useNamespace("video-player");
|
|
5641
5651
|
|
|
5642
5652
|
var Element$2 = defineComponent({
|
|
5643
5653
|
name: "NextVideoPlayer",
|
|
@@ -5712,7 +5722,7 @@ var Element$2 = defineComponent({
|
|
|
5712
5722
|
if (!classNames || !classNames.length) throw new Error("模型类别不能未空!");
|
|
5713
5723
|
container.innerHTML = "", tf.loadGraphModel(modelUrl).then((model => {
|
|
5714
5724
|
const canvas = document.createElement("canvas");
|
|
5715
|
-
canvas.className = ns$
|
|
5725
|
+
canvas.className = ns$2.b("recongition"), container.appendChild(canvas);
|
|
5716
5726
|
const ctx = canvas.getContext("2d"), detect_ctx = document.createElement("canvas").getContext("2d");
|
|
5717
5727
|
video.ontimeupdate = () => {
|
|
5718
5728
|
const {videoWidth: videoWidth, videoHeight: videoHeight, offsetTop: offsetTop, offsetLeft: offsetLeft} = video;
|
|
@@ -5883,7 +5893,7 @@ var Element$2 = defineComponent({
|
|
|
5883
5893
|
});
|
|
5884
5894
|
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
5885
5895
|
ref: videoBoxRef,
|
|
5886
|
-
class: [ ns$
|
|
5896
|
+
class: [ ns$2.b(), props.className ],
|
|
5887
5897
|
style: props.style
|
|
5888
5898
|
}, null) ]);
|
|
5889
5899
|
}
|
|
@@ -5980,7 +5990,7 @@ var ContextMenuLabel = defineComponent({
|
|
|
5980
5990
|
}
|
|
5981
5991
|
}, [ createVNode("span", {
|
|
5982
5992
|
style: {
|
|
5983
|
-
"background-color": colors[index]
|
|
5993
|
+
"background-color": colors[index % colors.length]
|
|
5984
5994
|
},
|
|
5985
5995
|
class: "label-line"
|
|
5986
5996
|
}, null), createVNode("span", null, [ name ]) ]))) ]), isValueExist(activateIndex.value) ? createVNode("div", {
|
|
@@ -5996,7 +6006,11 @@ var ContextMenuLabel = defineComponent({
|
|
|
5996
6006
|
}) ]) : null ]);
|
|
5997
6007
|
return () => createVNode(Fragment, null, [ renderContent() ]);
|
|
5998
6008
|
}
|
|
5999
|
-
})
|
|
6009
|
+
});
|
|
6010
|
+
|
|
6011
|
+
const {hexToRgb: hexToRgb} = useChangeColor();
|
|
6012
|
+
|
|
6013
|
+
var DraggableRect = defineComponent({
|
|
6000
6014
|
props: {
|
|
6001
6015
|
parentEl: {
|
|
6002
6016
|
type: Object,
|
|
@@ -6005,6 +6019,10 @@ var ContextMenuLabel = defineComponent({
|
|
|
6005
6019
|
rect: {
|
|
6006
6020
|
type: Object,
|
|
6007
6021
|
default: () => ({})
|
|
6022
|
+
},
|
|
6023
|
+
color: {
|
|
6024
|
+
type: String,
|
|
6025
|
+
default: null
|
|
6008
6026
|
}
|
|
6009
6027
|
},
|
|
6010
6028
|
emits: [ "draggle-resize", "contextmenu" ],
|
|
@@ -6113,17 +6131,21 @@ var ContextMenuLabel = defineComponent({
|
|
|
6113
6131
|
};
|
|
6114
6132
|
},
|
|
6115
6133
|
render() {
|
|
6116
|
-
const _ns = inject("ns", {});
|
|
6134
|
+
const _ns = inject("ns", {}), props = this.$props;
|
|
6117
6135
|
return createVNode("div", {
|
|
6118
6136
|
class: [ _ns.b("draggable-rect") ],
|
|
6119
6137
|
style: (() => {
|
|
6120
|
-
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = this.rect
|
|
6121
|
-
return {
|
|
6138
|
+
const {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = this.rect, style = {
|
|
6122
6139
|
top: startY + "px",
|
|
6123
6140
|
left: startX + "px",
|
|
6124
6141
|
width: rectWidth + "px",
|
|
6125
6142
|
height: rectHeight + "px"
|
|
6126
|
-
};
|
|
6143
|
+
}, color = props.color;
|
|
6144
|
+
if (color) {
|
|
6145
|
+
const rgb_color = hexToRgb(color);
|
|
6146
|
+
rgb_color && (style.backgroundColor = `rgba(${rgb_color[0]},${rgb_color[1]},${rgb_color[2]}, 0.5)`);
|
|
6147
|
+
}
|
|
6148
|
+
return style;
|
|
6127
6149
|
})(),
|
|
6128
6150
|
onMousedown: this.onMousedown,
|
|
6129
6151
|
onMouseup: this.onMouseup,
|
|
@@ -6163,13 +6185,18 @@ var ContextMenuLabel = defineComponent({
|
|
|
6163
6185
|
type: Array,
|
|
6164
6186
|
default: () => []
|
|
6165
6187
|
},
|
|
6188
|
+
contextClientHeight: {
|
|
6189
|
+
type: Number,
|
|
6190
|
+
default: null
|
|
6191
|
+
},
|
|
6166
6192
|
rowInfo: {
|
|
6167
6193
|
type: Object,
|
|
6168
6194
|
default: () => ({})
|
|
6169
6195
|
}
|
|
6170
6196
|
},
|
|
6171
|
-
|
|
6172
|
-
|
|
6197
|
+
emits: [ "change" ],
|
|
6198
|
+
setup(props, {emit: emit, expose: expose}) {
|
|
6199
|
+
const ns = inject("ns", {}), _emit = inject("_emit", null), canvasMainRef = ref(), canvasBaseRef = ref(), canvasRectRef = ref(), labels = ref([]), drawBaseCanvas = ref({}), formatLabelsType = () => {
|
|
6173
6200
|
const _labels = deepClone(labels.value);
|
|
6174
6201
|
let yolo_label = [];
|
|
6175
6202
|
return {
|
|
@@ -6180,7 +6207,7 @@ var ContextMenuLabel = defineComponent({
|
|
|
6180
6207
|
})),
|
|
6181
6208
|
label_txt: yolo_label.join("\n")
|
|
6182
6209
|
};
|
|
6183
|
-
},
|
|
6210
|
+
}, loadingImage = ref(!1), renderImageLabel = rowInfo => {
|
|
6184
6211
|
labels.value = (rowInfo => rowInfo.labels ? rowInfo.labels.map((rect => {
|
|
6185
6212
|
const typeName = props.classes[rect.type];
|
|
6186
6213
|
return typeName && (rect.typeName = typeName), rect;
|
|
@@ -6188,15 +6215,26 @@ var ContextMenuLabel = defineComponent({
|
|
|
6188
6215
|
const clientHeight = canvasMainRef.value?.clientHeight, ctx = canvasBaseRef.value?.getContext("2d");
|
|
6189
6216
|
if (rowInfo?.imageSrc) {
|
|
6190
6217
|
const image = new Image;
|
|
6191
|
-
image.src = rowInfo.imageSrc, image.onload = () => {
|
|
6192
|
-
|
|
6218
|
+
image.src = rowInfo.imageSrc, loadingImage.value = !0, image.onload = () => {
|
|
6219
|
+
loadingImage.value = !1;
|
|
6220
|
+
const {width: width, height: height} = image, canvasHeight = clientHeight, scaleFactor = parseFloat((canvasHeight / height).toFixed(3)), canvasWidth = Math.ceil(width * scaleFactor);
|
|
6193
6221
|
((canvasWidth, canvasHeight) => {
|
|
6194
6222
|
canvasMainRef.value.style.width = canvasWidth + "px", canvasMainRef.value.style.height = canvasHeight + "px",
|
|
6195
6223
|
canvasBaseRef.value.width = canvasWidth, canvasBaseRef.value.height = canvasHeight,
|
|
6196
6224
|
canvasBaseRef.value.style.width = canvasWidth + "px", canvasBaseRef.value.style.height = canvasHeight + "px",
|
|
6197
6225
|
canvasRectRef.value.width = canvasWidth, canvasRectRef.value.height = canvasHeight,
|
|
6198
6226
|
canvasRectRef.value.style.width = canvasWidth + "px", canvasRectRef.value.style.height = canvasHeight + "px";
|
|
6199
|
-
})(canvasWidth, canvasHeight)
|
|
6227
|
+
})(canvasWidth, canvasHeight), labels.value = ((labels, canvasHeight) => {
|
|
6228
|
+
let scale_rects = [];
|
|
6229
|
+
for (let i = 0; i < labels.length; i++) {
|
|
6230
|
+
const rect = labels[i], scale = parseFloat((canvasHeight / rect.canvasHeight).toFixed(3));
|
|
6231
|
+
scale && (rect.startX = Math.ceil(rect.startX * scale), rect.startY = Math.ceil(rect.startY * scale),
|
|
6232
|
+
rect.rectWidth = Math.ceil(rect.rectWidth * scale), rect.rectHeight = Math.ceil(rect.rectHeight * scale),
|
|
6233
|
+
rect.canvasWidth = Math.ceil(rect.canvasWidth * scale), rect.canvasHeight = canvasHeight),
|
|
6234
|
+
scale_rects.push(rect);
|
|
6235
|
+
}
|
|
6236
|
+
return scale_rects;
|
|
6237
|
+
})(labels.value, canvasHeight);
|
|
6200
6238
|
const {updateLabels: updateLabels, addDrawRect: addDrawRect, hitCanvasLabel: hitCanvasLabel} = (options => {
|
|
6201
6239
|
const {ctx: ctx, labels: labels, image: image, canvasWidth: canvasWidth, canvasHeight: canvasHeight} = options, updateLabels = () => {
|
|
6202
6240
|
ctx.clearRect(0, 0, canvasWidth, canvasHeight), ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight);
|
|
@@ -6217,15 +6255,16 @@ var ContextMenuLabel = defineComponent({
|
|
|
6217
6255
|
ctx.strokeStyle = color, ctx.strokeRect(startX, startY, rectWidth, rectHeight);
|
|
6218
6256
|
},
|
|
6219
6257
|
hitCanvasLabel: (x, y) => {
|
|
6220
|
-
let hit_rect = null, hit_index = null;
|
|
6258
|
+
let hit_rect = null, hit_index = null, color = null;
|
|
6221
6259
|
for (let i = 0; i < labels.length; i++) {
|
|
6222
|
-
const rect = labels[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
6260
|
+
const rect = labels[i], {type: type, startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight} = rect;
|
|
6223
6261
|
x >= startX && x <= startX + rectWidth && y >= startY && y <= startY + rectHeight && (hit_rect = rect,
|
|
6224
|
-
hit_index = i);
|
|
6262
|
+
hit_index = i, color = colors[type]);
|
|
6225
6263
|
}
|
|
6226
6264
|
return {
|
|
6227
6265
|
hit_rect: hit_rect,
|
|
6228
|
-
hit_index: hit_index
|
|
6266
|
+
hit_index: hit_index,
|
|
6267
|
+
color: color
|
|
6229
6268
|
};
|
|
6230
6269
|
}
|
|
6231
6270
|
};
|
|
@@ -6235,20 +6274,23 @@ var ContextMenuLabel = defineComponent({
|
|
|
6235
6274
|
image: image,
|
|
6236
6275
|
canvasWidth: canvasWidth,
|
|
6237
6276
|
canvasHeight: canvasHeight,
|
|
6238
|
-
labels: labels.value
|
|
6277
|
+
labels: labels.value,
|
|
6278
|
+
scaleFactor: scaleFactor
|
|
6239
6279
|
});
|
|
6240
6280
|
drawBaseCanvas.value.updateLabels = updateLabels, drawBaseCanvas.value.addDrawRect = addDrawRect,
|
|
6241
6281
|
drawBaseCanvas.value.hitCanvasLabel = hitCanvasLabel;
|
|
6242
|
-
const {clearCanvas: clearCanvas} = ((canvas, callback) => {
|
|
6282
|
+
const {clearCanvas: clearCanvas} = ((canvas, callback, keyW) => {
|
|
6243
6283
|
const canvasWidth = canvas.width, canvasHeight = canvas.height, ctx = canvas?.getContext("2d"), clearCanvas = () => {
|
|
6244
6284
|
ctx.clearRect(0, 0, canvasWidth, canvasHeight);
|
|
6245
6285
|
};
|
|
6246
6286
|
clearCanvas();
|
|
6247
6287
|
let startX, startY, endX, endY, isDrawing = !1, isRectDraw = !1, isWKeyPressed = !1;
|
|
6248
6288
|
document.addEventListener("keydown", (event => {
|
|
6249
|
-
"
|
|
6289
|
+
"KeyW" === event.code && (isWKeyPressed = !0, canvas.style.cursor = "crosshair",
|
|
6290
|
+
canvas.style.zIndex = "11", keyW && keyW());
|
|
6250
6291
|
})), document.addEventListener("keyup", (event => {
|
|
6251
|
-
"
|
|
6292
|
+
isDrawing || "KeyW" === event.code && (isWKeyPressed = !1, canvas.style.cursor = "unset",
|
|
6293
|
+
canvas.style.zIndex = "0");
|
|
6252
6294
|
})), canvas.addEventListener("mousedown", (e => {
|
|
6253
6295
|
isWKeyPressed && (isDrawing = !0, startX = e.offsetX, startY = e.offsetY);
|
|
6254
6296
|
})), canvas.addEventListener("mousemove", (e => {
|
|
@@ -6256,7 +6298,7 @@ var ContextMenuLabel = defineComponent({
|
|
|
6256
6298
|
drawRect());
|
|
6257
6299
|
})), canvas.addEventListener("mouseup", (() => {
|
|
6258
6300
|
if (!isRectDraw) return;
|
|
6259
|
-
isDrawing = !1, isWKeyPressed = !1;
|
|
6301
|
+
isDrawing = !1, isWKeyPressed = !1, canvas.style.cursor = "unset", canvas.style.zIndex = "0";
|
|
6260
6302
|
const rectWidth = Math.abs(endX - startX), rectHeight = Math.abs(endY - startY);
|
|
6261
6303
|
startX > endX && (startX = endX), startY > endY && (startY = endY), callback && callback({
|
|
6262
6304
|
startX: startX,
|
|
@@ -6281,8 +6323,12 @@ var ContextMenuLabel = defineComponent({
|
|
|
6281
6323
|
};
|
|
6282
6324
|
})(canvasRectRef.value, ((rect, {endX: endX, endY: endY}) => {
|
|
6283
6325
|
activate_add_label.value = rect, drawBaseCanvas.value.addDrawRect(rect), updateContextmenuLabelFixed(endX, endY, rect);
|
|
6326
|
+
}), (() => {
|
|
6327
|
+
onCloseDraggableRectFixed();
|
|
6284
6328
|
}));
|
|
6285
6329
|
drawBaseCanvas.value.clearCanvasRect = clearCanvas;
|
|
6330
|
+
}, image.onerror = () => {
|
|
6331
|
+
loadingImage.value = !1;
|
|
6286
6332
|
};
|
|
6287
6333
|
}
|
|
6288
6334
|
canvasBaseRef.value.addEventListener("contextmenu", (e => {
|
|
@@ -6292,9 +6338,9 @@ var ContextMenuLabel = defineComponent({
|
|
|
6292
6338
|
updateContextmenuLabelFixed(x, y, hit_rect);
|
|
6293
6339
|
}));
|
|
6294
6340
|
})), canvasBaseRef.value.addEventListener("click", (e => {
|
|
6295
|
-
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect, hit_index: hit_index} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6341
|
+
const x = e.offsetX, y = e.offsetY, {hit_rect: hit_rect, hit_index: hit_index, color: color} = drawBaseCanvas.value.hitCanvasLabel(x, y);
|
|
6296
6342
|
onCloseDraggableRectFixed(), onCloseContentmenuLabel(), hit_rect && nextTick((() => {
|
|
6297
|
-
updateDraggableRectFixed(x, y, hit_rect, hit_index);
|
|
6343
|
+
updateDraggableRectFixed(x, y, hit_rect, hit_index, color);
|
|
6298
6344
|
}));
|
|
6299
6345
|
}));
|
|
6300
6346
|
};
|
|
@@ -6305,7 +6351,13 @@ var ContextMenuLabel = defineComponent({
|
|
|
6305
6351
|
}), {
|
|
6306
6352
|
deep: !0,
|
|
6307
6353
|
immediate: !0
|
|
6308
|
-
})
|
|
6354
|
+
}), watch((() => props.contextClientHeight), (height => {
|
|
6355
|
+
if (valueExist(height)) {
|
|
6356
|
+
canvasMainRef.value.style.height = height + "px";
|
|
6357
|
+
const rowInfo = toRaw(props.rowInfo);
|
|
6358
|
+
renderImageLabel(rowInfo);
|
|
6359
|
+
}
|
|
6360
|
+
}));
|
|
6309
6361
|
}));
|
|
6310
6362
|
const contextmenuLabelFixed = ref({
|
|
6311
6363
|
show: !1,
|
|
@@ -6335,21 +6387,23 @@ var ContextMenuLabel = defineComponent({
|
|
|
6335
6387
|
width: 0,
|
|
6336
6388
|
height: 0,
|
|
6337
6389
|
activateRect: null,
|
|
6338
|
-
activateIndex: null
|
|
6339
|
-
|
|
6390
|
+
activateIndex: null,
|
|
6391
|
+
color: null
|
|
6392
|
+
}), updateDraggableRectFixed = (x, y, rect, index, color) => {
|
|
6340
6393
|
draggableRectFixed.value.show = !0, draggableRectFixed.value.top = y, draggableRectFixed.value.left = x,
|
|
6341
6394
|
draggableRectFixed.value.width = rect.rectWidth, draggableRectFixed.value.height = rect.rectHeight,
|
|
6342
|
-
draggableRectFixed.value.activateRect = rect, draggableRectFixed.value.activateIndex = index
|
|
6395
|
+
draggableRectFixed.value.activateRect = rect, draggableRectFixed.value.activateIndex = index,
|
|
6396
|
+
draggableRectFixed.value.color = color;
|
|
6343
6397
|
}, onCloseDraggableRectFixed = () => {
|
|
6344
6398
|
draggableRectFixed.value.show = !1, draggableRectFixed.value.top = 0, draggableRectFixed.value.left = 0,
|
|
6345
6399
|
draggableRectFixed.value.width = 0, draggableRectFixed.value.height = 0, draggableRectFixed.value.activateRect = null,
|
|
6346
|
-
draggableRectFixed.value.activateIndex = null;
|
|
6400
|
+
draggableRectFixed.value.activateIndex = null, draggableRectFixed.value.color = null;
|
|
6347
6401
|
}, onDraggleRectResize = rect => {
|
|
6348
6402
|
draggableRectFixed.value.activateRect = rect, drawBaseCanvas.value.updateLabels();
|
|
6349
6403
|
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6350
6404
|
i > -1 && labels.value.splice(i, 1, rect);
|
|
6351
6405
|
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6352
|
-
_emit("change", rects, label_txt);
|
|
6406
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6353
6407
|
}, onContextmenuDraggable = (e, rect) => {
|
|
6354
6408
|
e.preventDefault();
|
|
6355
6409
|
const rect_x = e.offsetX, rect_y = e.offsetY, x = rect_x + rect.startX, y = rect_y + rect.startY;
|
|
@@ -6364,40 +6418,117 @@ var ContextMenuLabel = defineComponent({
|
|
|
6364
6418
|
i > -1 ? labels.value.splice(i, 1, activate_add_label.value) : labels.value.push(activate_add_label.value),
|
|
6365
6419
|
onCloseContentmenuLabel();
|
|
6366
6420
|
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6367
|
-
_emit("change", rects, label_txt);
|
|
6421
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6368
6422
|
}, onDeleteLabel = rect => {
|
|
6369
6423
|
const i = labels.value.findIndex((o => isEqual(o, rect)));
|
|
6370
6424
|
labels.value.splice(i, 1), onCloseContentmenuLabel(), onCloseDraggableRectFixed(),
|
|
6371
6425
|
drawBaseCanvas.value.updateLabels();
|
|
6372
6426
|
const {rects: rects, label_txt: label_txt} = formatLabelsType();
|
|
6373
|
-
_emit("change", rects, label_txt);
|
|
6427
|
+
_emit("change", rects, label_txt), emit("change", rects, label_txt);
|
|
6374
6428
|
};
|
|
6375
|
-
|
|
6376
|
-
|
|
6377
|
-
|
|
6378
|
-
|
|
6379
|
-
|
|
6380
|
-
|
|
6381
|
-
|
|
6382
|
-
|
|
6383
|
-
|
|
6384
|
-
|
|
6385
|
-
|
|
6386
|
-
|
|
6387
|
-
|
|
6388
|
-
|
|
6389
|
-
|
|
6390
|
-
|
|
6391
|
-
|
|
6392
|
-
|
|
6393
|
-
|
|
6394
|
-
|
|
6395
|
-
|
|
6396
|
-
|
|
6429
|
+
expose({
|
|
6430
|
+
onCloseDraggableRectFixed: onCloseDraggableRectFixed,
|
|
6431
|
+
onCloseContentmenuLabel: onCloseContentmenuLabel,
|
|
6432
|
+
onSelectedLabel: (rect, index) => {
|
|
6433
|
+
onCloseDraggableRectFixed(), nextTick((() => {
|
|
6434
|
+
const {startX: x, startY: y, type: type} = rect;
|
|
6435
|
+
updateDraggableRectFixed(x, y, rect, index, colors[type]);
|
|
6436
|
+
}));
|
|
6437
|
+
},
|
|
6438
|
+
onDeleteLabel: onDeleteLabel
|
|
6439
|
+
});
|
|
6440
|
+
return () => createVNode(Fragment, null, [ createVNode(NextSpinLoading, {
|
|
6441
|
+
loading: loadingImage.value,
|
|
6442
|
+
class: [ ns.b("loading") ]
|
|
6443
|
+
}, {
|
|
6444
|
+
default: () => [ createVNode("div", {
|
|
6445
|
+
ref: canvasMainRef,
|
|
6446
|
+
class: [ ns.b("canvas") ]
|
|
6447
|
+
}, [ createVNode("canvas", {
|
|
6448
|
+
ref: canvasBaseRef,
|
|
6449
|
+
class: [ ns.be("canvas", "context") ]
|
|
6450
|
+
}, null), createVNode("canvas", {
|
|
6451
|
+
ref: canvasRectRef,
|
|
6452
|
+
class: [ ns.be("canvas", "rect") ]
|
|
6453
|
+
}, null), contextmenuLabelFixed.value.show ? createVNode(ContextMenuLabel, {
|
|
6454
|
+
labelRect: contextmenuLabelRect.value,
|
|
6455
|
+
classes: props.classes,
|
|
6456
|
+
activateRect: contextmenuLabelFixed.value.activateRect,
|
|
6457
|
+
onClose: onCloseContentmenuLabel,
|
|
6458
|
+
onSelect: onSelectLabel,
|
|
6459
|
+
onDelete: onDeleteLabel
|
|
6460
|
+
}, null) : null, draggableRectFixed.value.show ? createVNode(DraggableRect, {
|
|
6461
|
+
parentEl: canvasMainRef.value,
|
|
6462
|
+
rect: draggableRectFixed.value.activateRect,
|
|
6463
|
+
color: draggableRectFixed.value.color,
|
|
6464
|
+
onDraggleResize: onDraggleRectResize,
|
|
6465
|
+
onContextmenu: onContextmenuDraggable
|
|
6466
|
+
}, null) : null ]) ]
|
|
6467
|
+
}) ]);
|
|
6397
6468
|
}
|
|
6398
|
-
})
|
|
6469
|
+
}), RightLabel = defineComponent({
|
|
6470
|
+
props: {
|
|
6471
|
+
classes: {
|
|
6472
|
+
type: Array,
|
|
6473
|
+
default: () => []
|
|
6474
|
+
},
|
|
6475
|
+
labels: {
|
|
6476
|
+
type: Array,
|
|
6477
|
+
default: () => []
|
|
6478
|
+
}
|
|
6479
|
+
},
|
|
6480
|
+
emits: [ "delete", "select" ],
|
|
6481
|
+
setup(props, {emit: emit}) {
|
|
6482
|
+
const {t: t} = useLocale(), ns = inject("ns", {}), labels = ref([]);
|
|
6483
|
+
watch((() => props.labels), (rects => {
|
|
6484
|
+
const _rects = toRaw(rects);
|
|
6485
|
+
labels.value = (labels => labels.length ? labels.map((rect => {
|
|
6486
|
+
const typeName = props.classes[rect.type];
|
|
6487
|
+
return typeName && (rect.typeName = typeName), rect;
|
|
6488
|
+
})) : [])(_rects);
|
|
6489
|
+
}), {
|
|
6490
|
+
deep: !0,
|
|
6491
|
+
immediate: !0
|
|
6492
|
+
});
|
|
6493
|
+
const renderContent = () => createVNode("div", {
|
|
6494
|
+
class: [ ns.b("right") ]
|
|
6495
|
+
}, [ labels.value.length ? createVNode("ul", null, [ labels.value.map(((rect, index) => createVNode("li", {
|
|
6496
|
+
key: index,
|
|
6497
|
+
onClick: () => ((rect, index) => {
|
|
6498
|
+
emit("select", rect, index);
|
|
6499
|
+
})(rect, index)
|
|
6500
|
+
}, [ createVNode("div", null, [ createVNode("span", {
|
|
6501
|
+
style: {
|
|
6502
|
+
"background-color": colors[rect.type]
|
|
6503
|
+
},
|
|
6504
|
+
class: "label-line"
|
|
6505
|
+
}, null), createVNode("span", null, [ rect.typeName ]) ]), createVNode(ElPopconfirm, {
|
|
6506
|
+
title: t("next.labelimg.confirmDeleteLabel"),
|
|
6507
|
+
width: 180,
|
|
6508
|
+
onConfirm: () => (rect => {
|
|
6509
|
+
emit("delete", rect);
|
|
6510
|
+
})(rect)
|
|
6511
|
+
}, {
|
|
6512
|
+
reference: () => createVNode(ElIcon, {
|
|
6513
|
+
size: 16,
|
|
6514
|
+
color: "#ff0000",
|
|
6515
|
+
onClick: event => {
|
|
6516
|
+
event.preventDefault(), event.stopPropagation();
|
|
6517
|
+
}
|
|
6518
|
+
}, {
|
|
6519
|
+
default: () => [ createVNode(delete_default, null, null) ]
|
|
6520
|
+
})
|
|
6521
|
+
}) ]))) ]) : createVNode(ElEmpty, {
|
|
6522
|
+
"image-size": 120,
|
|
6523
|
+
description: t("next.labelimg.emptyLabelText")
|
|
6524
|
+
}, null) ]);
|
|
6525
|
+
return () => createVNode(Fragment, null, [ renderContent() ]);
|
|
6526
|
+
}
|
|
6527
|
+
}), defaultConfig = {
|
|
6528
|
+
mainContentHeight: 600
|
|
6529
|
+
};
|
|
6399
6530
|
|
|
6400
|
-
const ns = useNamespace("labelimg");
|
|
6531
|
+
const ns$1 = useNamespace("labelimg");
|
|
6401
6532
|
|
|
6402
6533
|
var Element = defineComponent({
|
|
6403
6534
|
name: "NextLabelimg",
|
|
@@ -6408,25 +6539,58 @@ var Element = defineComponent({
|
|
|
6408
6539
|
},
|
|
6409
6540
|
style: {
|
|
6410
6541
|
type: Object,
|
|
6411
|
-
default: () => ({
|
|
6542
|
+
default: () => ({
|
|
6543
|
+
position: "unset"
|
|
6544
|
+
})
|
|
6545
|
+
},
|
|
6546
|
+
rowKey: {
|
|
6547
|
+
type: String,
|
|
6548
|
+
default: "id"
|
|
6412
6549
|
},
|
|
6413
6550
|
options: {
|
|
6414
6551
|
type: Object,
|
|
6415
|
-
default: () => ({
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
|
|
6552
|
+
default: () => ({})
|
|
6553
|
+
},
|
|
6554
|
+
classes: {
|
|
6555
|
+
type: Array,
|
|
6556
|
+
default: () => []
|
|
6557
|
+
},
|
|
6558
|
+
data: {
|
|
6559
|
+
type: Array,
|
|
6560
|
+
default: () => []
|
|
6419
6561
|
}
|
|
6420
6562
|
},
|
|
6421
6563
|
emits: [ "change", "save", "prev-click", "next-click" ],
|
|
6422
6564
|
setup(props, {emit: emit, slots: slots, expose: expose}) {
|
|
6423
|
-
const {t: t} = useLocale()
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6565
|
+
const {t: t} = useLocale(), _config = deepClone(defaultConfig), _options = computed((() => {
|
|
6566
|
+
const cfg = unref(props.options);
|
|
6567
|
+
return merge$1(_config, cfg);
|
|
6568
|
+
})), options = unref(_options);
|
|
6569
|
+
provide("ns", ns$1), provide("_emit", emit);
|
|
6570
|
+
const activateNodeIndex = ref(0), classes = ref(props.classes), labelImages = ref(deepClone(props.data));
|
|
6571
|
+
watch((() => props.data), (data => {
|
|
6572
|
+
labelImages.value = deepClone(data);
|
|
6573
|
+
}), {
|
|
6574
|
+
deep: !0
|
|
6575
|
+
}), watch((() => props.data.length), (() => {
|
|
6576
|
+
activateNodeIndex.value = 0;
|
|
6577
|
+
})), watch((() => props.classes), (val => {
|
|
6578
|
+
classes.value = val;
|
|
6579
|
+
}), {
|
|
6580
|
+
deep: !0
|
|
6581
|
+
});
|
|
6582
|
+
const currentNode = computed((() => {
|
|
6583
|
+
if (!labelImages.value) return {};
|
|
6584
|
+
const node = labelImages.value[activateNodeIndex.value] || {};
|
|
6585
|
+
return deepClone(node);
|
|
6586
|
+
})), activateNodeLabels = ref(currentNode.value.labels || []);
|
|
6587
|
+
watch((() => currentNode.value), (() => {
|
|
6588
|
+
activateNodeLabels.value = currentNode.value.labels || [];
|
|
6589
|
+
}));
|
|
6590
|
+
const onChangeNodeRect = rects => {
|
|
6591
|
+
currentNode.value.labels = rects, activateNodeLabels.value = rects;
|
|
6592
|
+
}, loading = ref(!1), formatNodeLabels = () => {
|
|
6593
|
+
const node = currentNode.value;
|
|
6430
6594
|
let yolo_label = [];
|
|
6431
6595
|
return node.labels.forEach((rect => {
|
|
6432
6596
|
delete rect.typeName;
|
|
@@ -6436,89 +6600,123 @@ var Element = defineComponent({
|
|
|
6436
6600
|
node: node,
|
|
6437
6601
|
label_txt: yolo_label.join("\n")
|
|
6438
6602
|
};
|
|
6603
|
+
}, isChangeNodeLabels = () => isEqual(labelImages.value[activateNodeIndex.value].labels, currentNode.value.labels), switchKeydownAD = e => {
|
|
6604
|
+
const imageLength = labelImages.value.length;
|
|
6605
|
+
"KeyD" === e.code ? (activateNodeIndex.value++, activateNodeIndex.value >= imageLength && (activateNodeIndex.value = 0)) : "KeyA" === e.code && (activateNodeIndex.value--,
|
|
6606
|
+
activateNodeIndex.value < 0 && (activateNodeIndex.value = imageLength - 1));
|
|
6439
6607
|
}, onKeydownPrevNext = e => {
|
|
6440
6608
|
if (loading.value) return;
|
|
6441
6609
|
if (![ "KeyA", "KeyD" ].includes(e.code)) return;
|
|
6442
6610
|
loading.value = !0;
|
|
6443
6611
|
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6612
|
+
if (canvasContextRef.value.onCloseDraggableRectFixed(), isChangeNodeLabels()) return switchKeydownAD(e),
|
|
6613
|
+
void (loading.value = !1);
|
|
6614
|
+
emit("save", {
|
|
6615
|
+
node: node,
|
|
6616
|
+
label_txt: label_txt
|
|
6617
|
+
}, (imageItem => {
|
|
6618
|
+
labelImages.value[activateNodeIndex.value] = imageItem || node, switchKeydownAD(e),
|
|
6619
|
+
loading.value = !1;
|
|
6620
|
+
}), (() => {
|
|
6621
|
+
loading.value = !1;
|
|
6622
|
+
}));
|
|
6623
|
+
}, onChangeActivateNode = index => {
|
|
6624
|
+
if (loading.value) return;
|
|
6625
|
+
loading.value = !0;
|
|
6626
|
+
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6627
|
+
if (canvasContextRef.value.onCloseDraggableRectFixed(), isChangeNodeLabels()) return activateNodeIndex.value = index,
|
|
6628
|
+
void (loading.value = !1);
|
|
6444
6629
|
emit("save", {
|
|
6445
6630
|
node: node,
|
|
6446
6631
|
label_txt: label_txt
|
|
6447
|
-
}, (
|
|
6448
|
-
|
|
6449
|
-
|
|
6632
|
+
}, (imageItem => {
|
|
6633
|
+
labelImages.value[activateNodeIndex.value] = imageItem || node, activateNodeIndex.value = index,
|
|
6634
|
+
loading.value = !1;
|
|
6450
6635
|
}), (() => {
|
|
6451
6636
|
loading.value = !1;
|
|
6452
6637
|
}));
|
|
6453
6638
|
}, onPaginationPrev = () => {
|
|
6454
|
-
|
|
6639
|
+
const imageLength = labelImages.value.length;
|
|
6640
|
+
let i = activateNodeIndex.value - 1;
|
|
6641
|
+
i < 0 && (i = imageLength - 1), onChangeActivateNode(i), emit("prev-click");
|
|
6455
6642
|
}, onPaginationNext = () => {
|
|
6456
|
-
|
|
6457
|
-
|
|
6643
|
+
const imageLength = labelImages.value.length;
|
|
6644
|
+
let i = activateNodeIndex.value + 1;
|
|
6645
|
+
i >= imageLength && (i = 0), onChangeActivateNode(i), emit("next-click");
|
|
6646
|
+
}, canvasContextRef = ref(), layoutLabelRef = ref(), headerRef = ref(), mainRef = ref(), footerRef = ref(), mainContentHeight = ref(options.mainContentHeight);
|
|
6458
6647
|
onMounted((() => {
|
|
6459
|
-
document.addEventListener("keydown", onKeydownPrevNext), elementResize(
|
|
6648
|
+
document.addEventListener("keydown", onKeydownPrevNext), elementResize(layoutLabelRef.value, (() => {
|
|
6460
6649
|
nextTick((() => {
|
|
6461
|
-
|
|
6650
|
+
layoutLabelRef.value.style.position = "unset";
|
|
6651
|
+
const contentHeight = (layoutLabelRef.value?.clientHeight || 0) - ((headerRef.value?.clientHeight || 0) + (footerRef.value?.clientHeight || 0));
|
|
6462
6652
|
mainContentHeight.value = contentHeight;
|
|
6463
6653
|
}));
|
|
6464
6654
|
}));
|
|
6465
6655
|
})), onUnmounted((() => {
|
|
6466
6656
|
document.removeEventListener("keydown", onKeydownPrevNext);
|
|
6467
|
-
}))
|
|
6657
|
+
}));
|
|
6658
|
+
const onSelectLabelNode = (rect, index) => {
|
|
6659
|
+
canvasContextRef.value.onSelectedLabel(rect, index);
|
|
6660
|
+
}, onDeleteLabelNode = rect => {
|
|
6661
|
+
canvasContextRef.value.onDeleteLabel(rect);
|
|
6662
|
+
};
|
|
6663
|
+
expose({
|
|
6468
6664
|
convertToLabel: convertToLabel,
|
|
6469
6665
|
canvertToCanvas: canvertToCanvas
|
|
6470
6666
|
});
|
|
6471
|
-
|
|
6472
|
-
ref:
|
|
6473
|
-
class: [ ns.b(), props.className ],
|
|
6667
|
+
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
6668
|
+
ref: layoutLabelRef,
|
|
6669
|
+
class: [ ns$1.b(), props.className ],
|
|
6474
6670
|
style: {
|
|
6475
6671
|
...props.style
|
|
6476
6672
|
}
|
|
6477
6673
|
}, [ createVNode(NextSpinLoading$1, {
|
|
6478
6674
|
loading: loading.value,
|
|
6479
6675
|
tip: t("next.labelimg.saveTxt"),
|
|
6480
|
-
class: [ ns.b("loading") ]
|
|
6676
|
+
class: [ ns$1.b("loading") ]
|
|
6481
6677
|
}, {
|
|
6482
6678
|
default: () => [ createVNode(ElScrollbar, null, {
|
|
6483
6679
|
default: () => [ createVNode("header", {
|
|
6484
6680
|
ref: headerRef,
|
|
6485
|
-
class: [ ns.b("header") ]
|
|
6681
|
+
class: [ ns$1.b("header") ]
|
|
6486
6682
|
}, [ slots.header ? slots.header() : createVNode(Fragment, null, [ createVNode("ul", null, null), createVNode("ul", null, null) ]) ]), createVNode("div", {
|
|
6487
6683
|
ref: mainRef,
|
|
6488
|
-
class: [ ns.b("main") ]
|
|
6684
|
+
class: [ ns$1.b("main") ],
|
|
6685
|
+
style: {
|
|
6686
|
+
height: mainContentHeight.value + "px"
|
|
6687
|
+
}
|
|
6688
|
+
}, [ createVNode("div", {
|
|
6689
|
+
class: [ ns$1.be("main", "content") ]
|
|
6489
6690
|
}, [ createVNode(CanvasContext, {
|
|
6490
|
-
|
|
6491
|
-
|
|
6691
|
+
ref: canvasContextRef,
|
|
6692
|
+
contextClientHeight: mainContentHeight.value,
|
|
6693
|
+
classes: classes.value,
|
|
6694
|
+
rowInfo: currentNode.value,
|
|
6695
|
+
onChange: onChangeNodeRect
|
|
6696
|
+
}, null) ]), createVNode(RightLabel, {
|
|
6697
|
+
classes: classes.value,
|
|
6698
|
+
labels: activateNodeLabels.value,
|
|
6699
|
+
onDelete: onDeleteLabelNode,
|
|
6700
|
+
onSelect: onSelectLabelNode
|
|
6492
6701
|
}, null) ]), createVNode("footer", {
|
|
6493
6702
|
ref: footerRef,
|
|
6494
|
-
class: [ ns.b("footer") ]
|
|
6703
|
+
class: [ ns$1.b("footer") ]
|
|
6495
6704
|
}, [ createVNode("div", {
|
|
6496
|
-
class: [ ns.be("footer", "left") ]
|
|
6705
|
+
class: [ ns$1.be("footer", "left") ]
|
|
6497
6706
|
}, [ createVNode(ElIcon, {
|
|
6498
6707
|
size: 24,
|
|
6708
|
+
color: "#797979",
|
|
6499
6709
|
onClick: onPaginationPrev
|
|
6500
6710
|
}, {
|
|
6501
6711
|
default: () => [ createVNode(arrow_left_default, null, null) ]
|
|
6502
6712
|
}) ]), createVNode("div", {
|
|
6503
|
-
class: [ ns.be("footer", "center") ]
|
|
6713
|
+
class: [ ns$1.be("footer", "center") ]
|
|
6504
6714
|
}, [ createVNode(ElScrollbar, null, {
|
|
6505
6715
|
default: () => [ createVNode("ul", {
|
|
6506
|
-
class: [ ns.bem("footer", "center", "list") ]
|
|
6507
|
-
}, [
|
|
6716
|
+
class: [ ns$1.bem("footer", "center", "list") ]
|
|
6717
|
+
}, [ labelImages.value.map(((item, index) => createVNode("li", {
|
|
6508
6718
|
key: index,
|
|
6509
|
-
onClick: () => (index
|
|
6510
|
-
if (loading.value) return;
|
|
6511
|
-
loading.value = !0;
|
|
6512
|
-
const {node: node, label_txt: label_txt} = formatNodeLabels();
|
|
6513
|
-
emit("save", {
|
|
6514
|
-
node: node,
|
|
6515
|
-
label_txt: label_txt
|
|
6516
|
-
}, (() => {
|
|
6517
|
-
activateNodeIndex.value = index, loading.value = !1;
|
|
6518
|
-
}), (() => {
|
|
6519
|
-
loading.value = !1;
|
|
6520
|
-
}));
|
|
6521
|
-
})(index),
|
|
6719
|
+
onClick: () => onChangeActivateNode(index),
|
|
6522
6720
|
class: {
|
|
6523
6721
|
"is-activate": activateNodeIndex.value === index
|
|
6524
6722
|
}
|
|
@@ -6531,20 +6729,90 @@ var Element = defineComponent({
|
|
|
6531
6729
|
fit: "cover"
|
|
6532
6730
|
}, null) ]))) ]) ]
|
|
6533
6731
|
}) ]), createVNode("div", {
|
|
6534
|
-
class: [ ns.be("footer", "right") ]
|
|
6732
|
+
class: [ ns$1.be("footer", "right") ]
|
|
6535
6733
|
}, [ createVNode(ElIcon, {
|
|
6536
6734
|
size: 24,
|
|
6735
|
+
color: "#797979",
|
|
6537
6736
|
onClick: onPaginationNext
|
|
6538
6737
|
}, {
|
|
6539
6738
|
default: () => [ createVNode(arrow_right_default, null, null) ]
|
|
6540
6739
|
}) ]) ]) ]
|
|
6541
6740
|
}) ]
|
|
6542
|
-
}) ]);
|
|
6543
|
-
|
|
6741
|
+
}) ]) ]);
|
|
6742
|
+
}
|
|
6743
|
+
});
|
|
6744
|
+
|
|
6745
|
+
const ns = useNamespace("labelimg-preview");
|
|
6746
|
+
|
|
6747
|
+
var preview = defineComponent({
|
|
6748
|
+
name: "NextLabelimgPreview",
|
|
6749
|
+
props: {
|
|
6750
|
+
className: {
|
|
6751
|
+
type: String,
|
|
6752
|
+
default: ""
|
|
6753
|
+
},
|
|
6754
|
+
style: {
|
|
6755
|
+
type: Object,
|
|
6756
|
+
default: () => ({})
|
|
6757
|
+
},
|
|
6758
|
+
src: {
|
|
6759
|
+
type: String,
|
|
6760
|
+
default: ""
|
|
6761
|
+
},
|
|
6762
|
+
classes: {
|
|
6763
|
+
type: Array,
|
|
6764
|
+
default: () => []
|
|
6765
|
+
},
|
|
6766
|
+
labels: {
|
|
6767
|
+
type: Array,
|
|
6768
|
+
default: () => []
|
|
6769
|
+
}
|
|
6770
|
+
},
|
|
6771
|
+
setup(props) {
|
|
6772
|
+
const canvasBaseRef = ref(), classes = ref(deepClone(props.classes)), labels = ref(deepClone(props.labels)), renderImageAndLabel = () => {
|
|
6773
|
+
if (props.src) {
|
|
6774
|
+
const ctx = canvasBaseRef.value?.getContext("2d"), image = new Image;
|
|
6775
|
+
image.src = props.src, image.onload = () => {
|
|
6776
|
+
const {width: width, height: height} = image, canvasHeight = height, scaleFactor = canvasHeight / height, canvasWidth = Math.ceil(width * scaleFactor);
|
|
6777
|
+
((canvasWidth, canvasHeight) => {
|
|
6778
|
+
canvasBaseRef.value.width = canvasWidth, canvasBaseRef.value.height = canvasHeight,
|
|
6779
|
+
canvasBaseRef.value.style.width = canvasWidth + "px", canvasBaseRef.value.style.height = canvasHeight + "px";
|
|
6780
|
+
})(canvasWidth, canvasHeight), ctx.clearRect(0, 0, canvasWidth, canvasHeight), ctx.drawImage(image, 0, 0, canvasWidth, canvasHeight);
|
|
6781
|
+
for (let i = 0; i < labels.value.length; i++) {
|
|
6782
|
+
const rect = labels.value[i], {startX: startX, startY: startY, rectWidth: rectWidth, rectHeight: rectHeight, type: type} = rect, color = colors[type % colors.length];
|
|
6783
|
+
if (ctx.font = "bold 14px serif", ctx.textBaseline = "top", ctx.save(), ctx.strokeStyle = color,
|
|
6784
|
+
ctx.strokeRect(startX, startY, rectWidth, rectHeight), !isValueExist(rect.typeName)) {
|
|
6785
|
+
const typeName = classes.value[rect.type];
|
|
6786
|
+
typeName && (rect.typeName = typeName);
|
|
6787
|
+
}
|
|
6788
|
+
if (isValueExist(rect.typeName) || isValueExist(rect.type)) {
|
|
6789
|
+
const text = rect.typeName || rect.type;
|
|
6790
|
+
ctx.fillStyle = color, ctx.fillText(text, startX + 6, startY + 6);
|
|
6791
|
+
}
|
|
6792
|
+
ctx.restore();
|
|
6793
|
+
}
|
|
6794
|
+
};
|
|
6795
|
+
}
|
|
6796
|
+
};
|
|
6797
|
+
onMounted((() => {
|
|
6798
|
+
watch((() => props.src), (() => {
|
|
6799
|
+
renderImageAndLabel();
|
|
6800
|
+
}), {
|
|
6801
|
+
immediate: !0
|
|
6802
|
+
});
|
|
6803
|
+
}));
|
|
6804
|
+
return () => createVNode(Fragment, null, [ createVNode("div", {
|
|
6805
|
+
class: [ ns.b(), props.className ],
|
|
6806
|
+
style: {
|
|
6807
|
+
...props.style
|
|
6808
|
+
}
|
|
6809
|
+
}, [ createVNode("canvas", {
|
|
6810
|
+
ref: canvasBaseRef
|
|
6811
|
+
}, null) ]) ]);
|
|
6544
6812
|
}
|
|
6545
6813
|
});
|
|
6546
6814
|
|
|
6547
|
-
const NextLabelimg = withInstall(Element);
|
|
6815
|
+
const NextLabelimg = withInstall(Element), NextLabelimgPreview = withInstall(preview);
|
|
6548
6816
|
|
|
6549
6817
|
var components = Object.freeze({
|
|
6550
6818
|
__proto__: null,
|
|
@@ -6555,6 +6823,7 @@ var components = Object.freeze({
|
|
|
6555
6823
|
NextDragResize: NextDragResize,
|
|
6556
6824
|
NextForm: NextForm,
|
|
6557
6825
|
NextLabelimg: NextLabelimg,
|
|
6826
|
+
NextLabelimgPreview: NextLabelimgPreview,
|
|
6558
6827
|
NextLayout: NextLayout,
|
|
6559
6828
|
NextMenu: NextMenu,
|
|
6560
6829
|
NextSpinLoading: NextSpinLoading,
|
|
@@ -6597,7 +6866,7 @@ const zoomDialog = app => {
|
|
|
6597
6866
|
}));
|
|
6598
6867
|
}
|
|
6599
6868
|
});
|
|
6600
|
-
}, version = "0.2.
|
|
6869
|
+
}, version = "0.2.9", install = function(app) {
|
|
6601
6870
|
Object.keys(components).forEach((key => {
|
|
6602
6871
|
const component = components[key];
|
|
6603
6872
|
app.component(component.name, component);
|
|
@@ -6607,8 +6876,8 @@ const zoomDialog = app => {
|
|
|
6607
6876
|
};
|
|
6608
6877
|
|
|
6609
6878
|
var index = {
|
|
6610
|
-
version: "0.2.
|
|
6879
|
+
version: "0.2.9",
|
|
6611
6880
|
install: install
|
|
6612
6881
|
};
|
|
6613
6882
|
|
|
6614
|
-
export { NextContainer, NextCrudTable, NextCrudTableVirtualized, NextDialog, NextDragResize, NextForm, NextLabelimg, NextLayout, NextMenu, NextSpinLoading, NextTabs, NextTextEllipsis, NextTreeSelect, NextUpload, NextVideoPlayer, buildLocaleContext, buildTranslator, index as default, defaultNamespace, install, localeContextKey, localeLang, namespaceContextKey, nextUseCssTheme, nextUseCssVar, translate, updateThemeColor, updateThemeColorCssVar, useDetectVideo, useGetDerivedNamespace, useLanguage, useLocale, useNamespace, version };
|
|
6883
|
+
export { NextContainer, NextCrudTable, NextCrudTableVirtualized, NextDialog, NextDragResize, NextForm, NextLabelimg, NextLabelimgPreview, NextLayout, NextMenu, NextSpinLoading, NextTabs, NextTextEllipsis, NextTreeSelect, NextUpload, NextVideoPlayer, buildLocaleContext, buildTranslator, index as default, defaultNamespace, install, localeContextKey, localeLang, namespaceContextKey, nextUseCssTheme, nextUseCssVar, translate, updateThemeColor, updateThemeColorCssVar, useDetectVideo, useGetDerivedNamespace, useLanguage, useLocale, useNamespace, version };
|