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.umd.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
|
|
|
@@ -1813,15 +1813,18 @@
|
|
|
1813
1813
|
return isHeaderBarColorGradual ? {
|
|
1814
1814
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$3(color, .5)})`
|
|
1815
1815
|
} : "";
|
|
1816
|
-
}));
|
|
1817
|
-
return
|
|
1816
|
+
})), __slots_header_tools = {};
|
|
1817
|
+
return slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
1818
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]()),
|
|
1819
|
+
vue.createVNode("header", {
|
|
1818
1820
|
class: _ns.b("header"),
|
|
1819
1821
|
style: headerStyle.value
|
|
1820
1822
|
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
1821
1823
|
class: _ns.bf("header", "right")
|
|
1822
|
-
}, [ vue.createVNode(HeaderTools, null, {
|
|
1823
|
-
default: () => [
|
|
1824
|
-
}) ]) ]);
|
|
1824
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
1825
|
+
default: () => [ __slots_header_tools ]
|
|
1826
|
+
})) ]) ]);
|
|
1827
|
+
var s;
|
|
1825
1828
|
}
|
|
1826
1829
|
});
|
|
1827
1830
|
function getDefaultExportFromCjs(x) {
|
|
@@ -2635,21 +2638,29 @@
|
|
|
2635
2638
|
render() {
|
|
2636
2639
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2637
2640
|
slots.menu;
|
|
2641
|
+
const __slots_header_tools = {};
|
|
2642
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2643
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2638
2644
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2639
2645
|
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(elementPlus.ElContainer, {
|
|
2640
2646
|
class: ns$j.b()
|
|
2641
2647
|
}, {
|
|
2642
|
-
default: () =>
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
|
|
2650
|
-
|
|
2651
|
-
|
|
2652
|
-
|
|
2648
|
+
default: () => {
|
|
2649
|
+
return [ vue.createVNode(Sidebar$2, null, null), vue.createVNode("div", {
|
|
2650
|
+
class: [ ns$j.b("content") ]
|
|
2651
|
+
}, [ vue.createVNode(Header$3, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2652
|
+
default: () => [ __slots_header_tools ]
|
|
2653
|
+
})), _config.showTabs ? slots.tabs ? slots.tabs?.() : vue.createVNode(NextTabs, {
|
|
2654
|
+
tabs: _config.tabs,
|
|
2655
|
+
activeTab: _config.activeTab,
|
|
2656
|
+
onChange: (...arg) => _emit("tabsChange", ...arg),
|
|
2657
|
+
onSelect: (...arg) => _emit("tabsSelect", ...arg),
|
|
2658
|
+
onClose: (...arg) => _emit("tabsClose", ...arg)
|
|
2659
|
+
}, null) : null, vue.createVNode("main", {
|
|
2660
|
+
class: [ ns$j.bf("main"), ns$j.is("layout-tabs", isTabs.value) ]
|
|
2661
|
+
}, [ slots.default?.() ]) ]) ];
|
|
2662
|
+
var s;
|
|
2663
|
+
}
|
|
2653
2664
|
});
|
|
2654
2665
|
}
|
|
2655
2666
|
});
|
|
@@ -2661,21 +2672,26 @@
|
|
|
2661
2672
|
return isHeaderBarColorGradual ? {
|
|
2662
2673
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$2(color, .5)})`
|
|
2663
2674
|
} : "";
|
|
2664
|
-
}));
|
|
2665
|
-
|
|
2666
|
-
|
|
2667
|
-
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2675
|
+
})), __slots_header_tools = {};
|
|
2676
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2677
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2678
|
+
return () => {
|
|
2679
|
+
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("header", {
|
|
2680
|
+
class: _ns.b("header"),
|
|
2681
|
+
style: headerStyle.value
|
|
2682
|
+
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
2683
|
+
class: _ns.bf("header", "menu")
|
|
2684
|
+
}, [ slots[slots_config_headerMenu] ? slots[slots_config_headerMenu]() : vue.createVNode(NextMenu, {
|
|
2685
|
+
menuTree: _config.menuTree,
|
|
2686
|
+
router: _config.menuRouter,
|
|
2687
|
+
mode: _config.menuMode
|
|
2688
|
+
}, null) ]), vue.createVNode("div", {
|
|
2689
|
+
class: _ns.bf("header", "right")
|
|
2690
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2691
|
+
default: () => [ __slots_header_tools ]
|
|
2692
|
+
})) ]) ]) ]);
|
|
2693
|
+
var s;
|
|
2694
|
+
};
|
|
2679
2695
|
}
|
|
2680
2696
|
});
|
|
2681
2697
|
const ns$i = useNamespace("layout-transverse");
|
|
@@ -2711,17 +2727,22 @@
|
|
|
2711
2727
|
return isHeaderBarColorGradual ? {
|
|
2712
2728
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor$1(color, .5)})`
|
|
2713
2729
|
} : "";
|
|
2714
|
-
}));
|
|
2715
|
-
|
|
2716
|
-
|
|
2717
|
-
|
|
2718
|
-
|
|
2719
|
-
|
|
2720
|
-
|
|
2721
|
-
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2730
|
+
})), __slots_header_tools = {};
|
|
2731
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2732
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2733
|
+
return () => {
|
|
2734
|
+
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("header", {
|
|
2735
|
+
class: _ns.b("header"),
|
|
2736
|
+
style: headerStyle.value
|
|
2737
|
+
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
2738
|
+
class: _ns.bf("header", "menu")
|
|
2739
|
+
}, null), vue.createVNode("div", {
|
|
2740
|
+
class: _ns.bf("header", "right")
|
|
2741
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2742
|
+
default: () => [ __slots_header_tools ]
|
|
2743
|
+
})) ]) ]) ]);
|
|
2744
|
+
var s;
|
|
2745
|
+
};
|
|
2725
2746
|
}
|
|
2726
2747
|
}), Sidebar$1 = vue.defineComponent({
|
|
2727
2748
|
setup: () => ({
|
|
@@ -2777,17 +2798,22 @@
|
|
|
2777
2798
|
return isHeaderBarColorGradual ? {
|
|
2778
2799
|
background: `linear-gradient(to bottom , ${color}, ${getLightColor(color, .5)})`
|
|
2779
2800
|
} : "";
|
|
2780
|
-
}));
|
|
2781
|
-
|
|
2782
|
-
|
|
2783
|
-
|
|
2784
|
-
|
|
2785
|
-
|
|
2786
|
-
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2790
|
-
|
|
2801
|
+
})), __slots_header_tools = {};
|
|
2802
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2803
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2804
|
+
return () => {
|
|
2805
|
+
return vue.createVNode(vue.Fragment, null, [ vue.createVNode("header", {
|
|
2806
|
+
class: _ns.b("header"),
|
|
2807
|
+
style: headerStyle.value
|
|
2808
|
+
}, [ vue.createVNode(LogoView, null, null), vue.createVNode("div", {
|
|
2809
|
+
class: _ns.bf("header", "menu")
|
|
2810
|
+
}, [ slots[slots_config_headerMenu]?.() ]), vue.createVNode("div", {
|
|
2811
|
+
class: _ns.bf("header", "right")
|
|
2812
|
+
}, [ vue.createVNode(HeaderTools, null, (s = __slots_header_tools, "function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2813
|
+
default: () => [ __slots_header_tools ]
|
|
2814
|
+
})) ]) ]) ]);
|
|
2815
|
+
var s;
|
|
2816
|
+
};
|
|
2791
2817
|
}
|
|
2792
2818
|
}), Sidebar = vue.defineComponent({
|
|
2793
2819
|
setup: () => ({
|
|
@@ -2814,8 +2840,14 @@
|
|
|
2814
2840
|
render() {
|
|
2815
2841
|
const slots = this.$slots, _config = vue.inject("options", {}), _emit = vue.inject("__emit__", {});
|
|
2816
2842
|
slots.menu;
|
|
2843
|
+
const __slots_header_tools = {};
|
|
2844
|
+
slots[slots_config_headerToolsPrefix] && (__slots_header_tools[slots_config_headerToolsPrefix] = () => slots[slots_config_headerToolsPrefix]()),
|
|
2845
|
+
slots[slots_config_headerToolsSuffix] && (__slots_header_tools[slots_config_headerToolsSuffix] = () => slots[slots_config_headerToolsSuffix]());
|
|
2817
2846
|
const isTabs = vue.ref(!!slots.tabs);
|
|
2818
|
-
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header, null,
|
|
2847
|
+
return void 0 === slots.tabs && _config.showTabs && (isTabs.value = !0), vue.createVNode(vue.Fragment, null, [ vue.createVNode(Header, null, (s = __slots_header_tools,
|
|
2848
|
+
"function" == typeof s || "[object Object]" === Object.prototype.toString.call(s) && !vue.isVNode(s) ? __slots_header_tools : {
|
|
2849
|
+
default: () => [ __slots_header_tools ]
|
|
2850
|
+
})), vue.createVNode("div", {
|
|
2819
2851
|
class: [ ns$g.b("content"), ns$g.is("layout-tabs", isTabs.value) ]
|
|
2820
2852
|
}, [ vue.createVNode(Sidebar, null, null), vue.createVNode("div", {
|
|
2821
2853
|
class: ns$g.b("container")
|
|
@@ -2828,6 +2860,7 @@
|
|
|
2828
2860
|
}, null) : null, vue.createVNode("main", {
|
|
2829
2861
|
class: [ ns$g.b("main") ]
|
|
2830
2862
|
}, [ slots.default?.() ]) ]) ]) ]);
|
|
2863
|
+
var s;
|
|
2831
2864
|
}
|
|
2832
2865
|
});
|
|
2833
2866
|
const ns$f = useNamespace("layout"), layouts = {
|
|
@@ -4639,9 +4672,9 @@
|
|
|
4639
4672
|
return vue.createVNode(elementPlus.ElInput, {
|
|
4640
4673
|
modelValue: formParams[col.prop],
|
|
4641
4674
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4642
|
-
clearable: !0,
|
|
4675
|
+
clearable: valueExist(col.clearable, !0),
|
|
4643
4676
|
readonly: valueExist(col.readonly, !1),
|
|
4644
|
-
disabled: col.disabled,
|
|
4677
|
+
disabled: valueExist(col.disabled, !1),
|
|
4645
4678
|
placeholder: placeholder,
|
|
4646
4679
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4647
4680
|
}, {
|
|
@@ -4657,7 +4690,7 @@
|
|
|
4657
4690
|
modelValue: formParams[col.prop],
|
|
4658
4691
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4659
4692
|
type: "password",
|
|
4660
|
-
clearable: !0,
|
|
4693
|
+
clearable: valueExist(col.clearable, !0),
|
|
4661
4694
|
"show-password": !0,
|
|
4662
4695
|
readonly: valueExist(col.readonly, !1),
|
|
4663
4696
|
disabled: col.disabled,
|
|
@@ -4675,7 +4708,7 @@
|
|
|
4675
4708
|
return vue.createVNode(elementPlus.ElInput, {
|
|
4676
4709
|
modelValue: formParams[col.prop],
|
|
4677
4710
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4678
|
-
clearable: !0,
|
|
4711
|
+
clearable: valueExist(col.clearable, !0),
|
|
4679
4712
|
readonly: valueExist(col.readonly, !1),
|
|
4680
4713
|
disabled: col.disabled,
|
|
4681
4714
|
placeholder: placeholder,
|
|
@@ -4696,7 +4729,7 @@
|
|
|
4696
4729
|
return vue.createVNode(elementPlus.ElInput, {
|
|
4697
4730
|
modelValue: formParams[col.prop],
|
|
4698
4731
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4699
|
-
clearable: !0,
|
|
4732
|
+
clearable: valueExist(col.clearable, !0),
|
|
4700
4733
|
readonly: valueExist(col.readonly, !1),
|
|
4701
4734
|
disabled: col.disabled,
|
|
4702
4735
|
placeholder: placeholder,
|
|
@@ -4720,7 +4753,7 @@
|
|
|
4720
4753
|
modelValue: formParams[col.prop],
|
|
4721
4754
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4722
4755
|
type: "textarea",
|
|
4723
|
-
clearable: !0,
|
|
4756
|
+
clearable: valueExist(col.clearable, !0),
|
|
4724
4757
|
readonly: valueExist(col.readonly, !1),
|
|
4725
4758
|
disabled: col.disabled,
|
|
4726
4759
|
placeholder: placeholder,
|
|
@@ -4738,8 +4771,9 @@
|
|
|
4738
4771
|
modelValue: formParams[col.prop],
|
|
4739
4772
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4740
4773
|
placeholder: placeholder,
|
|
4741
|
-
clearable: !0,
|
|
4742
|
-
disabled: col.disabled,
|
|
4774
|
+
clearable: valueExist(col.clearable, !0),
|
|
4775
|
+
disabled: valueExist(col.disabled, !1),
|
|
4776
|
+
readonly: valueExist(col.readonly, !1),
|
|
4743
4777
|
multiple: valueExist(col.multiple, !1),
|
|
4744
4778
|
"collapse-tags-tooltip": !0,
|
|
4745
4779
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
@@ -4760,8 +4794,10 @@
|
|
|
4760
4794
|
start: "00:00",
|
|
4761
4795
|
step: "00:30",
|
|
4762
4796
|
end: "23:59",
|
|
4763
|
-
|
|
4764
|
-
|
|
4797
|
+
clearable: valueExist(col.clearable, !0),
|
|
4798
|
+
editable: valueExist(col.editable, !1),
|
|
4799
|
+
disabled: valueExist(col.disabled, !1),
|
|
4800
|
+
readonly: valueExist(col.readonly, !1),
|
|
4765
4801
|
placeholder: placeholder,
|
|
4766
4802
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4767
4803
|
}, {
|
|
@@ -4772,7 +4808,8 @@
|
|
|
4772
4808
|
if ("radio" === col.type) return vue.createVNode(elementPlus.ElRadioGroup, {
|
|
4773
4809
|
modelValue: formParams[col.prop],
|
|
4774
4810
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4775
|
-
disabled: col.disabled,
|
|
4811
|
+
disabled: valueExist(col.disabled, !1),
|
|
4812
|
+
readonly: valueExist(col.readonly, !1),
|
|
4776
4813
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4777
4814
|
}, {
|
|
4778
4815
|
default: () => [ col.dicData && col.dicData.map((item => vue.createVNode(elementPlus.ElRadio, {
|
|
@@ -4787,7 +4824,8 @@
|
|
|
4787
4824
|
vue.createVNode(elementPlus.ElCheckboxGroup, {
|
|
4788
4825
|
modelValue: formParams[col.prop],
|
|
4789
4826
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4790
|
-
disabled: col.disabled,
|
|
4827
|
+
disabled: valueExist(col.disabled, !1),
|
|
4828
|
+
readonly: valueExist(col.readonly, !1),
|
|
4791
4829
|
onChange: event => col.onChange?.(event, col, formParams, formColumns)
|
|
4792
4830
|
}, {
|
|
4793
4831
|
default: () => [ col.dicData && col.dicData.map((item => vue.createVNode(elementPlus.ElCheckbox, {
|
|
@@ -4807,10 +4845,11 @@
|
|
|
4807
4845
|
type: "date",
|
|
4808
4846
|
valueFormat: col.format || "YYYY-MM-DD",
|
|
4809
4847
|
format: col.format || "YYYY-MM-DD",
|
|
4810
|
-
clearable: !0,
|
|
4848
|
+
clearable: valueExist(col.clearable, !0),
|
|
4811
4849
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
4812
|
-
|
|
4813
|
-
|
|
4850
|
+
editable: valueExist(col.editable, !1),
|
|
4851
|
+
disabled: valueExist(col.disabled, !1),
|
|
4852
|
+
readonly: valueExist(col.readonly, !1)
|
|
4814
4853
|
}, null);
|
|
4815
4854
|
}
|
|
4816
4855
|
if ("datetime" === col.type) {
|
|
@@ -4822,10 +4861,11 @@
|
|
|
4822
4861
|
type: "datetime",
|
|
4823
4862
|
valueFormat: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
4824
4863
|
format: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
4825
|
-
clearable: !0,
|
|
4864
|
+
clearable: valueExist(col.clearable, !0),
|
|
4826
4865
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
4827
|
-
|
|
4828
|
-
|
|
4866
|
+
editable: valueExist(col.editable, !1),
|
|
4867
|
+
disabled: valueExist(col.disabled, !1),
|
|
4868
|
+
readonly: valueExist(col.readonly, !1)
|
|
4829
4869
|
}, null);
|
|
4830
4870
|
}
|
|
4831
4871
|
if ("datetimerange" === col.type) {
|
|
@@ -4837,13 +4877,14 @@
|
|
|
4837
4877
|
type: "datetimerange",
|
|
4838
4878
|
valueFormat: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
4839
4879
|
format: col.format || "YYYY-MM-DD HH:mm:ss",
|
|
4840
|
-
clearable: !0,
|
|
4841
4880
|
"range-separator": t("next.date.rangeSeparator"),
|
|
4842
4881
|
"start-placeholder": t("next.date.startPlaceholder"),
|
|
4843
4882
|
"end-placeholder": t("next.date.endPlaceholder"),
|
|
4844
4883
|
disabledDate: col.disabledDate || _defaultDisabledDate,
|
|
4845
|
-
|
|
4846
|
-
editable: col.editable,
|
|
4884
|
+
clearable: valueExist(col.clearable, !0),
|
|
4885
|
+
editable: valueExist(col.editable, !1),
|
|
4886
|
+
disabled: valueExist(col.disabled, !1),
|
|
4887
|
+
readonly: valueExist(col.readonly, !1),
|
|
4847
4888
|
shortcuts: col.shortcuts || _defaultShortcuts
|
|
4848
4889
|
}, null);
|
|
4849
4890
|
}
|
|
@@ -4861,7 +4902,7 @@
|
|
|
4861
4902
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4862
4903
|
formParams: formParams,
|
|
4863
4904
|
column: col,
|
|
4864
|
-
disabled: col.disabled,
|
|
4905
|
+
disabled: valueExist(col.disabled, !1),
|
|
4865
4906
|
onSelect: rows => ((rows, col) => {
|
|
4866
4907
|
rows && (col.tableSelectRows = rows);
|
|
4867
4908
|
const {value: value} = col.tableSelectProps || {};
|
|
@@ -4870,15 +4911,15 @@
|
|
|
4870
4911
|
}, null) : "uploadImage" === col.type ? vue.createVNode(UploadImage, {
|
|
4871
4912
|
modelValue: formParams[col.prop],
|
|
4872
4913
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4873
|
-
disabled: col.disabled,
|
|
4874
|
-
multiple: col.multiple,
|
|
4914
|
+
disabled: valueExist(col.disabled, !1),
|
|
4915
|
+
multiple: valueExist(col.multiple, !1),
|
|
4875
4916
|
limit: col.limit,
|
|
4876
4917
|
onChange: (...arg) => col.onChange?.(...arg, col, formParams, formColumns),
|
|
4877
4918
|
onExceed: (...arg) => col.onExceed?.(...arg, col, formParams, formColumns)
|
|
4878
4919
|
}, null) : "treeSelect" === col.type ? vue.createVNode(treeSelect, {
|
|
4879
4920
|
modelValue: formParams[col.prop],
|
|
4880
4921
|
"onUpdate:modelValue": $event => formParams[col.prop] = $event,
|
|
4881
|
-
disabled: col.disabled,
|
|
4922
|
+
disabled: valueExist(col.disabled, !1),
|
|
4882
4923
|
column: col,
|
|
4883
4924
|
formParams: formParams
|
|
4884
4925
|
}, null) : void 0;
|
|
@@ -5050,7 +5091,7 @@
|
|
|
5050
5091
|
append: valueExist(col.formAppend, col.append, null),
|
|
5051
5092
|
hide: valueExist(col.formHide, col.hide, !1),
|
|
5052
5093
|
disabled: valueExist(col.formDisabled, col.disabled, !1),
|
|
5053
|
-
clearable: valueExist(col.formClearable, col.clearable, !
|
|
5094
|
+
clearable: valueExist(col.formClearable, col.clearable, !0),
|
|
5054
5095
|
readonly: valueExist(col.formReadonly, col.readonly, !1),
|
|
5055
5096
|
tip: valueExist(col.formTip, col.tip, null),
|
|
5056
5097
|
rules: valueExist(col.formRules, col.rules, null),
|
|
@@ -7123,6 +7164,10 @@
|
|
|
7123
7164
|
onEditPolygon(callback) {
|
|
7124
7165
|
this.editPolygonObserver = callback;
|
|
7125
7166
|
}
|
|
7167
|
+
getTransformPoint(x, y) {
|
|
7168
|
+
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);
|
|
7169
|
+
return [ Math.floor((x - translateX) / scaleX), Math.floor((y - translateY) / scaleY) ];
|
|
7170
|
+
}
|
|
7126
7171
|
drawPolygonPath(vertexes, mouseX, mouseY) {
|
|
7127
7172
|
const ctx = this.ctx;
|
|
7128
7173
|
if (!vertexes.length) return;
|
|
@@ -7154,11 +7199,11 @@
|
|
|
7154
7199
|
this.drawPolygonEdgeCentre(vertexes));
|
|
7155
7200
|
}
|
|
7156
7201
|
pointInVertexes(x, y) {
|
|
7157
|
-
const vertexes = this.vertexes;
|
|
7202
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7158
7203
|
let aimIndex = null;
|
|
7159
7204
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7160
7205
|
const [vertex_x, vertex_y] = vertexes[i];
|
|
7161
|
-
if (isPointInCircle(
|
|
7206
|
+
if (isPointInCircle(_x, _y, vertex_x, vertex_y, this.vertexRadius)) {
|
|
7162
7207
|
this.canvas.style.cursor = "pointer", aimIndex = i;
|
|
7163
7208
|
break;
|
|
7164
7209
|
}
|
|
@@ -7167,11 +7212,11 @@
|
|
|
7167
7212
|
return aimIndex;
|
|
7168
7213
|
}
|
|
7169
7214
|
pointInEdgeCentre(x, y) {
|
|
7170
|
-
const vertexes = this.vertexes;
|
|
7215
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7171
7216
|
let aimIndex = null;
|
|
7172
7217
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7173
7218
|
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;
|
|
7174
|
-
if (isPointInCircle(
|
|
7219
|
+
if (isPointInCircle(_x, _y, vertex_x, vertex_y, this.edgeCentreRadius)) {
|
|
7175
7220
|
this.canvas.style.cursor = "pointer", aimIndex = i;
|
|
7176
7221
|
break;
|
|
7177
7222
|
}
|
|
@@ -7180,9 +7225,9 @@
|
|
|
7180
7225
|
return aimIndex;
|
|
7181
7226
|
}
|
|
7182
7227
|
pointInVertexesOrEdgeCentre(x, y) {
|
|
7183
|
-
const vertexes = this.vertexes;
|
|
7228
|
+
const [_x, _y] = this.getTransformPoint(x, y), vertexes = this.vertexes;
|
|
7184
7229
|
for (let i = 0; i < vertexes.length; i++) {
|
|
7185
|
-
const [vertex_x, vertex_y] = vertexes[i], isInVertex = isPointInCircle(
|
|
7230
|
+
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);
|
|
7186
7231
|
if (isInVertex || isInEdgeCenter) {
|
|
7187
7232
|
this.canvas.style.cursor = "pointer";
|
|
7188
7233
|
break;
|
|
@@ -7322,7 +7367,7 @@
|
|
|
7322
7367
|
this.ctx.clearRect(0, 0, this.canvasWidth, this.canvasHeight), this.ctx.drawImage(this.image, 0, 0, this.canvasWidth, this.canvasHeight),
|
|
7323
7368
|
this.ctx.save();
|
|
7324
7369
|
const shapes = this.labels.shapes;
|
|
7325
|
-
this.drawPolygons(shapes), this.ctx.restore();
|
|
7370
|
+
shapes?.length && this.drawPolygons(shapes), this.ctx.restore();
|
|
7326
7371
|
};
|
|
7327
7372
|
render=() => {
|
|
7328
7373
|
this.canvas.width = this.canvasWidth, this.scaleOffset.value && (this.ctx.translate(this.scaleOffset.value.x, this.scaleOffset.value.y),
|
|
@@ -7894,7 +7939,7 @@
|
|
|
7894
7939
|
})(app);
|
|
7895
7940
|
};
|
|
7896
7941
|
var index = {
|
|
7897
|
-
version: "0.3.
|
|
7942
|
+
version: "0.3.9",
|
|
7898
7943
|
install: install
|
|
7899
7944
|
};
|
|
7900
7945
|
exports.NextContainer = NextContainer, exports.NextCrudTable = NextCrudTable, exports.NextCrudTableVirtualized = NextCrudTableVirtualized,
|
|
@@ -7941,7 +7986,7 @@
|
|
|
7941
7986
|
}), exports.useGetDerivedNamespace = useGetDerivedNamespace, exports.useLanguage = (locale, lang) => {
|
|
7942
7987
|
const localeRef = vue.isRef(locale) ? locale : vue.ref(locale), nextLang = localeLang[lang] || localeLang["zh-cn"];
|
|
7943
7988
|
localeRef.value.name = lang, localeRef.value.next = nextLang.next;
|
|
7944
|
-
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.3.
|
|
7989
|
+
}, exports.useLocale = useLocale, exports.useNamespace = useNamespace, exports.version = "0.3.9",
|
|
7945
7990
|
Object.defineProperty(exports, "__esModule", {
|
|
7946
7991
|
value: !0
|
|
7947
7992
|
});
|