next-element-vue 0.3.8 → 0.3.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.js +136 -91
- package/dist/index.min.js +3 -3
- package/dist/index.umd.js +136 -91
- package/dist/index.umd.min.js +3 -3
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* 作 者:huangteng
|
|
4
4
|
* 邮 箱:htengweb@163.com
|
|
5
|
-
* 当前版本:0.3.
|
|
6
|
-
* 发布日期:2024-
|
|
5
|
+
* 当前版本:0.3.9 v
|
|
6
|
+
* 发布日期:2024-11-12
|
|
7
7
|
* 地 址:https://www.npmjs.com/package/next-element-vue
|
|
8
8
|
*/
|
|
9
9
|
|
|
@@ -1977,15 +1977,18 @@ var Header$3 = defineComponent({
|
|
|
1977
1977
|
return isHeaderBarColorGradual ? {
|
|
1978
1978
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$3(color, .5)})`
|
|
1979
1979
|
} : "";
|
|
1980
|
-
}));
|
|
1981
|
-
return
|
|
1980
|
+
})), __slots_header_tools = {};
|
|
1981
|
+
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
1982
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
1983
|
+
createVNode("header", {
|
|
1982
1984
|
class: _ns.b("header"),
|
|
1983
1985
|
style: headerStyle.value
|
|
1984
1986
|
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
1985
1987
|
class: _ns.bf("header", "right")
|
|
1986
|
-
}, [ createVNode(HeaderTools, null, {
|
|
1987
|
-
default: () => [
|
|
1988
|
-
}) ]) ]);
|
|
1988
|
+
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
1989
|
+
default: () => [ __slots_header_tools ]
|
|
1990
|
+
})) ]) ]);
|
|
1991
|
+
var s;
|
|
1989
1992
|
}
|
|
1990
1993
|
});
|
|
1991
1994
|
|
|
@@ -2824,21 +2827,29 @@ var defaults = defineComponent({
|
|
|
2824
2827
|
render() {
|
|
2825
2828
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {});
|
|
2826
2829
|
slots.menu;
|
|
2830
|
+
const __slots_header_tools = {};
|
|
2831
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2832
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2827
2833
|
const isTabs = ref(!!slots.tabs);
|
|
2828
2834
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(ElContainer, {
|
|
2829
2835
|
class: ns$j.b()
|
|
2830
2836
|
}, {
|
|
2831
|
-
default: () =>
|
|
2832
|
-
|
|
2833
|
-
|
|
2834
|
-
|
|
2835
|
-
|
|
2836
|
-
|
|
2837
|
-
|
|
2838
|
-
|
|
2839
|
-
|
|
2840
|
-
|
|
2841
|
-
|
|
2837
|
+
default: () => {
|
|
2838
|
+
return [ createVNode(Sidebar$2, null, null), createVNode("div", {
|
|
2839
|
+
class: [ ns$j.b("content") ]
|
|
2840
|
+
}, [ createVNode(Header$3, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
2841
|
+
default: () => [ __slots_header_tools ]
|
|
2842
|
+
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : createVNode(NextTabs, {
|
|
2843
|
+
tabs: _config.tabs,
|
|
2844
|
+
activeTab: _config.activeTab,
|
|
2845
|
+
onChange: (...arg) => _emit("tabsChange", ...arg),
|
|
2846
|
+
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2847
|
+
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2848
|
+
}, null) : null, createVNode("main", {
|
|
2849
|
+
class: [ ns$j.bf("main"), ns$j.is("layout-tabs", isTabs.value) ]
|
|
2850
|
+
}, [ slots.default?.() ]) ]) ];
|
|
2851
|
+
var s;
|
|
2852
|
+
}
|
|
2842
2853
|
});
|
|
2843
2854
|
}
|
|
2844
2855
|
});
|
|
@@ -2852,21 +2863,26 @@ var Header$2 = defineComponent({
|
|
|
2852
2863
|
return isHeaderBarColorGradual ? {
|
|
2853
2864
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$2(color, .5)})`
|
|
2854
2865
|
} : "";
|
|
2855
|
-
}));
|
|
2856
|
-
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
2861
|
-
|
|
2862
|
-
|
|
2863
|
-
|
|
2864
|
-
|
|
2865
|
-
|
|
2866
|
-
|
|
2867
|
-
|
|
2868
|
-
|
|
2869
|
-
|
|
2866
|
+
})), __slots_header_tools = {};
|
|
2867
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2868
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2869
|
+
return () => {
|
|
2870
|
+
return createVNode(Fragment, null, [ createVNode("header", {
|
|
2871
|
+
class: _ns.b("header"),
|
|
2872
|
+
style: headerStyle.value
|
|
2873
|
+
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
2874
|
+
class: _ns.bf("header", "menu")
|
|
2875
|
+
}, [ slots[slots_config_headerMenu] ? slots[slots_config_headerMenu]() : createVNode(NextMenu, {
|
|
2876
|
+
menuTree: _config.menuTree,
|
|
2877
|
+
router: _config.menuRouter,
|
|
2878
|
+
mode: _config.menuMode
|
|
2879
|
+
}, null) ]), createVNode("div", {
|
|
2880
|
+
class: _ns.bf("header", "right")
|
|
2881
|
+
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
2882
|
+
default: () => [ __slots_header_tools ]
|
|
2883
|
+
})) ]) ]) ]);
|
|
2884
|
+
var s;
|
|
2885
|
+
};
|
|
2870
2886
|
}
|
|
2871
2887
|
});
|
|
2872
2888
|
|
|
@@ -2906,17 +2922,22 @@ var Header$1 = defineComponent({
|
|
|
2906
2922
|
return isHeaderBarColorGradual ? {
|
|
2907
2923
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$1(color, .5)})`
|
|
2908
2924
|
} : "";
|
|
2909
|
-
}));
|
|
2910
|
-
|
|
2911
|
-
|
|
2912
|
-
|
|
2913
|
-
|
|
2914
|
-
|
|
2915
|
-
|
|
2916
|
-
|
|
2917
|
-
|
|
2918
|
-
|
|
2919
|
-
|
|
2925
|
+
})), __slots_header_tools = {};
|
|
2926
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2927
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2928
|
+
return () => {
|
|
2929
|
+
return createVNode(Fragment, null, [ createVNode("header", {
|
|
2930
|
+
class: _ns.b("header"),
|
|
2931
|
+
style: headerStyle.value
|
|
2932
|
+
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
2933
|
+
class: _ns.bf("header", "menu")
|
|
2934
|
+
}, null), createVNode("div", {
|
|
2935
|
+
class: _ns.bf("header", "right")
|
|
2936
|
+
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
2937
|
+
default: () => [ __slots_header_tools ]
|
|
2938
|
+
})) ]) ]) ]);
|
|
2939
|
+
var s;
|
|
2940
|
+
};
|
|
2920
2941
|
}
|
|
2921
2942
|
}), Sidebar$1 = defineComponent({
|
|
2922
2943
|
setup: () => ({
|
|
@@ -2976,17 +2997,22 @@ var Header = defineComponent({
|
|
|
2976
2997
|
return isHeaderBarColorGradual ? {
|
|
2977
2998
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor(color, .5)})`
|
|
2978
2999
|
} : "";
|
|
2979
|
-
}));
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
3000
|
+
})), __slots_header_tools = {};
|
|
3001
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
3002
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
3003
|
+
return () => {
|
|
3004
|
+
return createVNode(Fragment, null, [ createVNode("header", {
|
|
3005
|
+
class: _ns.b("header"),
|
|
3006
|
+
style: headerStyle.value
|
|
3007
|
+
}, [ createVNode(LogoView, null, null), createVNode("div", {
|
|
3008
|
+
class: _ns.bf("header", "menu")
|
|
3009
|
+
}, [ slots[slots_config_headerMenu]?.() ]), createVNode("div", {
|
|
3010
|
+
class: _ns.bf("header", "right")
|
|
3011
|
+
}, [ createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
3012
|
+
default: () => [ __slots_header_tools ]
|
|
3013
|
+
})) ]) ]) ]);
|
|
3014
|
+
var s;
|
|
3015
|
+
};
|
|
2990
3016
|
}
|
|
2991
3017
|
}), Sidebar = defineComponent({
|
|
2992
3018
|
setup: () => ({
|
|
@@ -3015,8 +3041,14 @@ var classic = defineComponent({
|
|
|
3015
3041
|
render() {
|
|
3016
3042
|
const slots = this.$slots, _config = inject("options", {}), _emit = inject("__emit__", {});
|
|
3017
3043
|
slots.menu;
|
|
3044
|
+
const __slots_header_tools = {};
|
|
3045
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
3046
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
3018
3047
|
const isTabs = ref(!!slots.tabs);
|
|
3019
|
-
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(Fragment, null, [ createVNode(Header, null,
|
|
3048
|
+
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), createVNode(Fragment, null, [ createVNode(Header, null, (s = __slots_header_tools,
|
|
3049
|
+
"function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !isVNode(s) ? __slots_header_tools : {
|
|
3050
|
+
default: () => [ __slots_header_tools ]
|
|
3051
|
+
})), createVNode("div", {
|
|
3020
3052
|
class: [ ns$g.b("content"), ns$g.is("layout-tabs", isTabs.value) ]
|
|
3021
3053
|
}, [ createVNode(Sidebar, null, null), createVNode("div", {
|
|
3022
3054
|
class: ns$g.b("container")
|
|
@@ -3029,6 +3061,7 @@ var classic = defineComponent({
|
|
|
3029
3061
|
}, null) : null, createVNode("main", {
|
|
3030
3062
|
class: [ ns$g.b("main") ]
|
|
3031
3063
|
}, [ slots.default?.() ]) ]) ]) ]);
|
|
3064
|
+
var s;
|
|
3032
3065
|
}
|
|
3033
3066
|
});
|
|
3034
3067
|
|
|
@@ -4868,9 +4901,9 @@ var Element$7 = defineComponent({
|
|
|
4868
4901
|
return createVNode(ElInput, {
|
|
4869
4902
|
modelValue: formParams[col.prop],
|
|
4870
4903
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4871
|
-
clearable: !0,
|
|
4904
|
+
clearable: valueExist(col.clearable, !0),
|
|
4872
4905
|
readonly: valueExist(col.readonly, !1),
|
|
4873
|
-
disabled: col.disabled,
|
|
4906
|
+
disabled: valueExist(col.disabled, !1),
|
|
4874
4907
|
placeholder: placeholder,
|
|
4875
4908
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4876
4909
|
}, {
|
|
@@ -4886,7 +4919,7 @@ var Element$7 = defineComponent({
|
|
|
4886
4919
|
modelValue: formParams[col.prop],
|
|
4887
4920
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4888
4921
|
type: "password",
|
|
4889
|
-
clearable: !0,
|
|
4922
|
+
clearable: valueExist(col.clearable, !0),
|
|
4890
4923
|
"show-password": !0,
|
|
4891
4924
|
readonly: valueExist(col.readonly, !1),
|
|
4892
4925
|
disabled: col.disabled,
|
|
@@ -4904,7 +4937,7 @@ var Element$7 = defineComponent({
|
|
|
4904
4937
|
return createVNode(ElInput, {
|
|
4905
4938
|
modelValue: formParams[col.prop],
|
|
4906
4939
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4907
|
-
clearable: !0,
|
|
4940
|
+
clearable: valueExist(col.clearable, !0),
|
|
4908
4941
|
readonly: valueExist(col.readonly, !1),
|
|
4909
4942
|
disabled: col.disabled,
|
|
4910
4943
|
placeholder: placeholder,
|
|
@@ -4925,7 +4958,7 @@ var Element$7 = defineComponent({
|
|
|
4925
4958
|
return createVNode(ElInput, {
|
|
4926
4959
|
modelValue: formParams[col.prop],
|
|
4927
4960
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4928
|
-
clearable: !0,
|
|
4961
|
+
clearable: valueExist(col.clearable, !0),
|
|
4929
4962
|
readonly: valueExist(col.readonly, !1),
|
|
4930
4963
|
disabled: col.disabled,
|
|
4931
4964
|
placeholder: placeholder,
|
|
@@ -4949,7 +4982,7 @@ var Element$7 = defineComponent({
|
|
|
4949
4982
|
modelValue: formParams[col.prop],
|
|
4950
4983
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4951
4984
|
type: "textarea",
|
|
4952
|
-
clearable: !0,
|
|
4985
|
+
clearable: valueExist(col.clearable, !0),
|
|
4953
4986
|
readonly: valueExist(col.readonly, !1),
|
|
4954
4987
|
disabled: col.disabled,
|
|
4955
4988
|
placeholder: placeholder,
|
|
@@ -4967,8 +5000,9 @@ var Element$7 = defineComponent({
|
|
|
4967
5000
|
modelValue: formParams[col.prop],
|
|
4968
5001
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4969
5002
|
placeholder: placeholder,
|
|
4970
|
-
clearable: !0,
|
|
4971
|
-
disabled: col.disabled,
|
|
5003
|
+
clearable: valueExist(col.clearable, !0),
|
|
5004
|
+
disabled: valueExist(col.disabled, !1),
|
|
5005
|
+
readonly: valueExist(col.readonly, !1),
|
|
4972
5006
|
multiple: valueExist(col.multiple, !1),
|
|
4973
5007
|
"collapse-tags-tooltip": !0,
|
|
4974
5008
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
@@ -4989,8 +5023,10 @@ var Element$7 = defineComponent({
|
|
|
4989
5023
|
start: "00:00",
|
|
4990
5024
|
step: "00:30",
|
|
4991
5025
|
end: "23:59",
|
|
4992
|
-
|
|
4993
|
-
|
|
5026
|
+
clearable: valueExist(col.clearable, !0),
|
|
5027
|
+
editable: valueExist(col.editable, !1),
|
|
5028
|
+
disabled: valueExist(col.disabled, !1),
|
|
5029
|
+
readonly: valueExist(col.readonly, !1),
|
|
4994
5030
|
placeholder: placeholder,
|
|
4995
5031
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4996
5032
|
}, {
|
|
@@ -5001,7 +5037,8 @@ var Element$7 = defineComponent({
|
|
|
5001
5037
|
if ("radio" === col.type) return createVNode(ElRadioGroup, {
|
|
5002
5038
|
modelValue: formParams[col.prop],
|
|
5003
5039
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
5004
|
-
disabled: col.disabled,
|
|
5040
|
+
disabled: valueExist(col.disabled, !1),
|
|
5041
|
+
readonly: valueExist(col.readonly, !1),
|
|
5005
5042
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
5006
5043
|
}, {
|
|
5007
5044
|
default: () => [ col.dicData && col.dicData.map((item => createVNode(ElRadio, {
|
|
@@ -5016,7 +5053,8 @@ var Element$7 = defineComponent({
|
|
|
5016
5053
|
createVNode(ElCheckboxGroup, {
|
|
5017
5054
|
modelValue: formParams[col.prop],
|
|
5018
5055
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
5019
|
-
disabled: col.disabled,
|
|
5056
|
+
disabled: valueExist(col.disabled, !1),
|
|
5057
|
+
readonly: valueExist(col.readonly, !1),
|
|
5020
5058
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
5021
5059
|
}, {
|
|
5022
5060
|
default: () => [ col.dicData && col.dicData.map((item => createVNode(ElCheckbox, {
|
|
@@ -5036,10 +5074,11 @@ var Element$7 = defineComponent({
|
|
|
5036
5074
|
type: "date",
|
|
5037
5075
|
valueFormat: col.format || "YYYY-MM-DD",
|
|
5038
5076
|
format: col.format || "YYYY-MM-DD",
|
|
5039
|
-
clearable: !0,
|
|
5077
|
+
clearable: valueExist(col.clearable, !0),
|
|
5040
5078
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
5041
|
-
|
|
5042
|
-
|
|
5079
|
+
editable: valueExist(col.editable, !1),
|
|
5080
|
+
disabled: valueExist(col.disabled, !1),
|
|
5081
|
+
readonly: valueExist(col.readonly, !1)
|
|
5043
5082
|
}, null);
|
|
5044
5083
|
}
|
|
5045
5084
|
if ("datetime" === col.type) {
|
|
@@ -5051,10 +5090,11 @@ var Element$7 = defineComponent({
|
|
|
5051
5090
|
type: "datetime",
|
|
5052
5091
|
valueFormat: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
5053
5092
|
format: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
5054
|
-
clearable: !0,
|
|
5093
|
+
clearable: valueExist(col.clearable, !0),
|
|
5055
5094
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
5056
|
-
|
|
5057
|
-
|
|
5095
|
+
editable: valueExist(col.editable, !1),
|
|
5096
|
+
disabled: valueExist(col.disabled, !1),
|
|
5097
|
+
readonly: valueExist(col.readonly, !1)
|
|
5058
5098
|
}, null);
|
|
5059
5099
|
}
|
|
5060
5100
|
if ("datetimerange" === col.type) {
|
|
@@ -5066,13 +5106,14 @@ var Element$7 = defineComponent({
|
|
|
5066
5106
|
type: "datetimerange",
|
|
5067
5107
|
valueFormat: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
5068
5108
|
format: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
5069
|
-
clearable: !0,
|
|
5070
5109
|
"range-separator": t("next.date.rangeSeparator"),
|
|
5071
5110
|
"start-placeholder": t("next.date.startPlaceholder"),
|
|
5072
5111
|
"end-placeholder": t("next.date.endPlaceholder"),
|
|
5073
5112
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
5074
|
-
|
|
5075
|
-
editable: col.editable,
|
|
5113
|
+
clearable: valueExist(col.clearable, !0),
|
|
5114
|
+
editable: valueExist(col.editable, !1),
|
|
5115
|
+
disabled: valueExist(col.disabled, !1),
|
|
5116
|
+
readonly: valueExist(col.readonly, !1),
|
|
5076
5117
|
shortcuts: col.shortcuts || _defaultShortcuts
|
|
5077
5118
|
}, null);
|
|
5078
5119
|
}
|
|
@@ -5090,7 +5131,7 @@ var Element$7 = defineComponent({
|
|
|
5090
5131
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
5091
5132
|
formParams: formParams,
|
|
5092
5133
|
column: col,
|
|
5093
|
-
disabled: col.disabled,
|
|
5134
|
+
disabled: valueExist(col.disabled, !1),
|
|
5094
5135
|
onSelect: rows => ((rows, col) => {
|
|
5095
5136
|
rows && (col.tableSelectRows = rows);
|
|
5096
5137
|
const {value: value} = col.tableSelectProps || {};
|
|
@@ -5099,15 +5140,15 @@ var Element$7 = defineComponent({
|
|
|
5099
5140
|
}, null) : "uploadImage" === col.type ? createVNode(UploadImage, {
|
|
5100
5141
|
modelValue: formParams[col.prop],
|
|
5101
5142
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
5102
|
-
disabled: col.disabled,
|
|
5103
|
-
multiple: col.multiple,
|
|
5143
|
+
disabled: valueExist(col.disabled, !1),
|
|
5144
|
+
multiple: valueExist(col.multiple, !1),
|
|
5104
5145
|
limit: col.limit,
|
|
5105
5146
|
onChange: (...arg) => col.onChange?.(...arg, col, formParams, formColumns),
|
|
5106
5147
|
onExceed: (...arg) => col.onExceed?.(...arg, col, formParams, formColumns)
|
|
5107
5148
|
}, null) : "treeSelect" === col.type ? createVNode(treeSelect, {
|
|
5108
5149
|
modelValue: formParams[col.prop],
|
|
5109
5150
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
5110
|
-
disabled: col.disabled,
|
|
5151
|
+
disabled: valueExist(col.disabled, !1),
|
|
5111
5152
|
column: col,
|
|
5112
5153
|
formParams: formParams
|
|
5113
5154
|
}, null) : void 0;
|
|
@@ -5284,7 +5325,7 @@ var Element$6 = defineComponent({
|
|
|
5284
5325
|
append: valueExist(col.formAppend, col.append, null),
|
|
5285
5326
|
hide: valueExist(col.formHide, col.hide, !1),
|
|
5286
5327
|
disabled: valueExist(col.formDisabled, col.disabled, !1),
|
|
5287
|
-
clearable: valueExist(col.formClearable, col.clearable, !
|
|
5328
|
+
clearable: valueExist(col.formClearable, col.clearable, !0),
|
|
5288
5329
|
readonly: valueExist(col.formReadonly, col.readonly, !1),
|
|
5289
5330
|
tip: valueExist(col.formTip, col.tip, null),
|
|
5290
5331
|
rules: valueExist(col.formRules, col.rules, null),
|
|
@@ -7378,6 +7419,10 @@ class EditPolygonPath {
|
|
|
7378
7419
|
onEditPolygon(callback) {
|
|
7379
7420
|
this.editPolygonObserver = callback;
|
|
7380
7421
|
}
|
|
7422
|
+
getTransformPoint(x, y) {
|
|
7423
|
+
const transformMatrix = this.ctx.getTransform(), scaleX = parseFloat(transformMatrix.a.toFixed(1)), scaleY = parseFloat(transformMatrix.d.toFixed(1)), translateX = Math.ceil(transformMatrix.e), translateY = Math.ceil(transformMatrix.f);
|
|
7424
|
+
return [ Math.floor((x - translateX) / scaleX), Math.floor((y - translateY) / scaleY) ];
|
|
7425
|
+
}
|
|
7381
7426
|
drawPolygonPath(vertexes, mouseX, mouseY) {
|
|
7382
7427
|
const ctx = this.ctx;
|
|
7383
7428
|
if (!vertexes.length) return;
|
|
@@ -7409,11 +7454,11 @@ class EditPolygonPath {
|
|
|
7409
7454
|
this.drawPolygonEdgeCentre(vertexes));
|
|
7410
7455
|
}
|
|
7411
7456
|
pointInVertexes(x, y) {
|
|
7412
|
-
const vertexes = this.vertexes;
|
|
7457
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7413
7458
|
let aimIndex = null;
|
|
7414
7459
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7415
7460
|
const [vertex_x, vertex_y] = vertexes[i];
|
|
7416
|
-
if (isPointInCircle(
|
|
7461
|
+
if (isPointInCircle(_x, _y, vertex_x, vertex_y, this.vertexRadius)) {
|
|
7417
7462
|
this.canvas.style.cursor = "pointer", aimIndex = i;
|
|
7418
7463
|
break;
|
|
7419
7464
|
}
|
|
@@ -7422,11 +7467,11 @@ class EditPolygonPath {
|
|
|
7422
7467
|
return aimIndex;
|
|
7423
7468
|
}
|
|
7424
7469
|
pointInEdgeCentre(x, y) {
|
|
7425
|
-
const vertexes = this.vertexes;
|
|
7470
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7426
7471
|
let aimIndex = null;
|
|
7427
7472
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7428
7473
|
const start = vertexes[i % vertexes.length], end = vertexes[(i + 1) % vertexes.length], vertex_x = start[0] + (end[0] - start[0]) / 2, vertex_y = start[1] + (end[1] - start[1]) / 2;
|
|
7429
|
-
if (isPointInCircle(
|
|
7474
|
+
if (isPointInCircle(_x, _y, vertex_x, vertex_y, this.edgeCentreRadius)) {
|
|
7430
7475
|
this.canvas.style.cursor = "pointer", aimIndex = i;
|
|
7431
7476
|
break;
|
|
7432
7477
|
}
|
|
@@ -7435,9 +7480,9 @@ class EditPolygonPath {
|
|
|
7435
7480
|
return aimIndex;
|
|
7436
7481
|
}
|
|
7437
7482
|
pointInVertexesOrEdgeCentre(x, y) {
|
|
7438
|
-
const vertexes = this.vertexes;
|
|
7483
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7439
7484
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7440
|
-
const [vertex_x, vertex_y] = vertexes[i], isInVertex = isPointInCircle(
|
|
7485
|
+
const [vertex_x, vertex_y] = vertexes[i], isInVertex = isPointInCircle(_x, _y, vertex_x, vertex_y, this.vertexRadius), start = vertexes[i % vertexes.length], end = vertexes[(i + 1) % vertexes.length], edge_center_x = start[0] + (end[0] - start[0]) / 2, edge_center_y = start[1] + (end[1] - start[1]) / 2, isInEdgeCenter = isPointInCircle(_x, _y, edge_center_x, edge_center_y, this.edgeCentreRadius);
|
|
7441
7486
|
if (isInVertex || isInEdgeCenter) {
|
|
7442
7487
|
this.canvas.style.cursor = "pointer";
|
|
7443
7488
|
break;
|
|
@@ -7578,7 +7623,7 @@ class CreateDrawCanvas {
|
|
|
7578
7623
|
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight), this.ctx.drawImage(this.image, 0, 0, this.canvasWidth, this.canvasHeight),
|
|
7579
7624
|
this.ctx.save();
|
|
7580
7625
|
const shapes = this.labels.shapes;
|
|
7581
|
-
this.drawPolygons(shapes), this.ctx.restore();
|
|
7626
|
+
shapes?.length && this.drawPolygons(shapes), this.ctx.restore();
|
|
7582
7627
|
};
|
|
7583
7628
|
render=() => {
|
|
7584
7629
|
this.canvas.width = this.canvasWidth, this.scaleOffset.value && (this.ctx.translate(this.scaleOffset.value.x, this.scaleOffset.value.y),
|
|
@@ -8147,7 +8192,7 @@ const zoomDialog = app => {
|
|
|
8147
8192
|
}));
|
|
8148
8193
|
}
|
|
8149
8194
|
});
|
|
8150
|
-
}, version = "0.3.
|
|
8195
|
+
}, version = "0.3.9", install = function(app) {
|
|
8151
8196
|
Object.keys(components).forEach((key => {
|
|
8152
8197
|
const component = components[key];
|
|
8153
8198
|
app.component(component.name, component);
|
|
@@ -8157,7 +8202,7 @@ const zoomDialog = app => {
|
|
|
8157
8202
|
};
|
|
8158
8203
|
|
|
8159
8204
|
var index = {
|
|
8160
|
-
version: "0.3.
|
|
8205
|
+
version: "0.3.9",
|
|
8161
8206
|
install: install
|
|
8162
8207
|
};
|
|
8163
8208
|
|