bgi-plus 2.14.11 → 2.14.12
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/attributes.json +1 -1
- package/dist/index.css +1 -1
- package/dist/index.full.js +144 -21
- package/dist/index.full.min.js +5 -5
- package/dist/index.full.min.mjs +10 -10
- package/dist/index.full.mjs +144 -21
- package/dist/locale/af.js +1 -1
- package/dist/locale/af.min.js +1 -1
- package/dist/locale/af.min.mjs +1 -1
- package/dist/locale/af.mjs +1 -1
- package/dist/locale/ar-eg.js +1 -1
- package/dist/locale/ar-eg.min.js +1 -1
- package/dist/locale/ar-eg.min.mjs +1 -1
- package/dist/locale/ar-eg.mjs +1 -1
- package/dist/locale/ar.js +1 -1
- package/dist/locale/ar.min.js +1 -1
- package/dist/locale/ar.min.mjs +1 -1
- package/dist/locale/ar.mjs +1 -1
- package/dist/locale/az.js +1 -1
- package/dist/locale/az.min.js +1 -1
- package/dist/locale/az.min.mjs +1 -1
- package/dist/locale/az.mjs +1 -1
- package/dist/locale/bg.js +1 -1
- package/dist/locale/bg.min.js +1 -1
- package/dist/locale/bg.min.mjs +1 -1
- package/dist/locale/bg.mjs +1 -1
- package/dist/locale/bn.js +1 -1
- package/dist/locale/bn.min.js +1 -1
- package/dist/locale/bn.min.mjs +1 -1
- package/dist/locale/bn.mjs +1 -1
- package/dist/locale/ca.js +1 -1
- package/dist/locale/ca.min.js +1 -1
- package/dist/locale/ca.min.mjs +1 -1
- package/dist/locale/ca.mjs +1 -1
- package/dist/locale/ckb.js +1 -1
- package/dist/locale/ckb.min.js +1 -1
- package/dist/locale/ckb.min.mjs +1 -1
- package/dist/locale/ckb.mjs +1 -1
- package/dist/locale/cs.js +1 -1
- package/dist/locale/cs.min.js +1 -1
- package/dist/locale/cs.min.mjs +1 -1
- package/dist/locale/cs.mjs +1 -1
- package/dist/locale/da.js +1 -1
- package/dist/locale/da.min.js +1 -1
- package/dist/locale/da.min.mjs +1 -1
- package/dist/locale/da.mjs +1 -1
- package/dist/locale/de.js +1 -1
- package/dist/locale/de.min.js +1 -1
- package/dist/locale/de.min.mjs +1 -1
- package/dist/locale/de.mjs +1 -1
- package/dist/locale/el.js +1 -1
- package/dist/locale/el.min.js +1 -1
- package/dist/locale/el.min.mjs +1 -1
- package/dist/locale/el.mjs +1 -1
- package/dist/locale/en.js +1 -1
- package/dist/locale/en.min.js +1 -1
- package/dist/locale/en.min.mjs +1 -1
- package/dist/locale/en.mjs +1 -1
- package/dist/locale/eo.js +1 -1
- package/dist/locale/eo.min.js +1 -1
- package/dist/locale/eo.min.mjs +1 -1
- package/dist/locale/eo.mjs +1 -1
- package/dist/locale/es.js +1 -1
- package/dist/locale/es.min.js +1 -1
- package/dist/locale/es.min.mjs +1 -1
- package/dist/locale/es.mjs +1 -1
- package/dist/locale/et.js +1 -1
- package/dist/locale/et.min.js +1 -1
- package/dist/locale/et.min.mjs +1 -1
- package/dist/locale/et.mjs +1 -1
- package/dist/locale/eu.js +1 -1
- package/dist/locale/eu.min.js +1 -1
- package/dist/locale/eu.min.mjs +1 -1
- package/dist/locale/eu.mjs +1 -1
- package/dist/locale/fa.js +1 -1
- package/dist/locale/fa.min.js +1 -1
- package/dist/locale/fa.min.mjs +1 -1
- package/dist/locale/fa.mjs +1 -1
- package/dist/locale/fi.js +1 -1
- package/dist/locale/fi.min.js +1 -1
- package/dist/locale/fi.min.mjs +1 -1
- package/dist/locale/fi.mjs +1 -1
- package/dist/locale/fr.js +1 -1
- package/dist/locale/fr.min.js +1 -1
- package/dist/locale/fr.min.mjs +1 -1
- package/dist/locale/fr.mjs +1 -1
- package/dist/locale/he.js +1 -1
- package/dist/locale/he.min.js +1 -1
- package/dist/locale/he.min.mjs +1 -1
- package/dist/locale/he.mjs +1 -1
- package/dist/locale/hi.js +1 -1
- package/dist/locale/hi.min.js +1 -1
- package/dist/locale/hi.min.mjs +1 -1
- package/dist/locale/hi.mjs +1 -1
- package/dist/locale/hr.js +1 -1
- package/dist/locale/hr.min.js +1 -1
- package/dist/locale/hr.min.mjs +1 -1
- package/dist/locale/hr.mjs +1 -1
- package/dist/locale/hu.js +1 -1
- package/dist/locale/hu.min.js +1 -1
- package/dist/locale/hu.min.mjs +1 -1
- package/dist/locale/hu.mjs +1 -1
- package/dist/locale/hy-am.js +1 -1
- package/dist/locale/hy-am.min.js +1 -1
- package/dist/locale/hy-am.min.mjs +1 -1
- package/dist/locale/hy-am.mjs +1 -1
- package/dist/locale/id.js +1 -1
- package/dist/locale/id.min.js +1 -1
- package/dist/locale/id.min.mjs +1 -1
- package/dist/locale/id.mjs +1 -1
- package/dist/locale/it.js +1 -1
- package/dist/locale/it.min.js +1 -1
- package/dist/locale/it.min.mjs +1 -1
- package/dist/locale/it.mjs +1 -1
- package/dist/locale/ja.js +1 -1
- package/dist/locale/ja.min.js +1 -1
- package/dist/locale/ja.min.mjs +1 -1
- package/dist/locale/ja.mjs +1 -1
- package/dist/locale/kk.js +1 -1
- package/dist/locale/kk.min.js +1 -1
- package/dist/locale/kk.min.mjs +1 -1
- package/dist/locale/kk.mjs +1 -1
- package/dist/locale/km.js +1 -1
- package/dist/locale/km.min.js +1 -1
- package/dist/locale/km.min.mjs +1 -1
- package/dist/locale/km.mjs +1 -1
- package/dist/locale/ko.js +1 -1
- package/dist/locale/ko.min.js +1 -1
- package/dist/locale/ko.min.mjs +1 -1
- package/dist/locale/ko.mjs +1 -1
- package/dist/locale/ku.js +1 -1
- package/dist/locale/ku.min.js +1 -1
- package/dist/locale/ku.min.mjs +1 -1
- package/dist/locale/ku.mjs +1 -1
- package/dist/locale/ky.js +1 -1
- package/dist/locale/ky.min.js +1 -1
- package/dist/locale/ky.min.mjs +1 -1
- package/dist/locale/ky.mjs +1 -1
- package/dist/locale/lo.js +1 -1
- package/dist/locale/lo.min.js +1 -1
- package/dist/locale/lo.min.mjs +1 -1
- package/dist/locale/lo.mjs +1 -1
- package/dist/locale/lt.js +1 -1
- package/dist/locale/lt.min.js +1 -1
- package/dist/locale/lt.min.mjs +1 -1
- package/dist/locale/lt.mjs +1 -1
- package/dist/locale/lv.js +1 -1
- package/dist/locale/lv.min.js +1 -1
- package/dist/locale/lv.min.mjs +1 -1
- package/dist/locale/lv.mjs +1 -1
- package/dist/locale/mg.js +1 -1
- package/dist/locale/mg.min.js +1 -1
- package/dist/locale/mg.min.mjs +1 -1
- package/dist/locale/mg.mjs +1 -1
- package/dist/locale/mn.js +1 -1
- package/dist/locale/mn.min.js +1 -1
- package/dist/locale/mn.min.mjs +1 -1
- package/dist/locale/mn.mjs +1 -1
- package/dist/locale/ms.js +1 -1
- package/dist/locale/ms.min.js +1 -1
- package/dist/locale/ms.min.mjs +1 -1
- package/dist/locale/ms.mjs +1 -1
- package/dist/locale/my.js +1 -1
- package/dist/locale/my.min.js +1 -1
- package/dist/locale/my.min.mjs +1 -1
- package/dist/locale/my.mjs +1 -1
- package/dist/locale/nb-no.js +1 -1
- package/dist/locale/nb-no.min.js +1 -1
- package/dist/locale/nb-no.min.mjs +1 -1
- package/dist/locale/nb-no.mjs +1 -1
- package/dist/locale/nl.js +1 -1
- package/dist/locale/nl.min.js +1 -1
- package/dist/locale/nl.min.mjs +1 -1
- package/dist/locale/nl.mjs +1 -1
- package/dist/locale/no.js +1 -1
- package/dist/locale/no.min.js +1 -1
- package/dist/locale/no.min.mjs +1 -1
- package/dist/locale/no.mjs +1 -1
- package/dist/locale/pa.js +1 -1
- package/dist/locale/pa.min.js +1 -1
- package/dist/locale/pa.min.mjs +1 -1
- package/dist/locale/pa.mjs +1 -1
- package/dist/locale/pl.js +1 -1
- package/dist/locale/pl.min.js +1 -1
- package/dist/locale/pl.min.mjs +1 -1
- package/dist/locale/pl.mjs +1 -1
- package/dist/locale/pt-br.js +1 -1
- package/dist/locale/pt-br.min.js +1 -1
- package/dist/locale/pt-br.min.mjs +1 -1
- package/dist/locale/pt-br.mjs +1 -1
- package/dist/locale/pt.js +1 -1
- package/dist/locale/pt.min.js +1 -1
- package/dist/locale/pt.min.mjs +1 -1
- package/dist/locale/pt.mjs +1 -1
- package/dist/locale/ro.js +1 -1
- package/dist/locale/ro.min.js +1 -1
- package/dist/locale/ro.min.mjs +1 -1
- package/dist/locale/ro.mjs +1 -1
- package/dist/locale/ru.js +1 -1
- package/dist/locale/ru.min.js +1 -1
- package/dist/locale/ru.min.mjs +1 -1
- package/dist/locale/ru.mjs +1 -1
- package/dist/locale/sk.js +1 -1
- package/dist/locale/sk.min.js +1 -1
- package/dist/locale/sk.min.mjs +1 -1
- package/dist/locale/sk.mjs +1 -1
- package/dist/locale/sl.js +1 -1
- package/dist/locale/sl.min.js +1 -1
- package/dist/locale/sl.min.mjs +1 -1
- package/dist/locale/sl.mjs +1 -1
- package/dist/locale/sr.js +1 -1
- package/dist/locale/sr.min.js +1 -1
- package/dist/locale/sr.min.mjs +1 -1
- package/dist/locale/sr.mjs +1 -1
- package/dist/locale/sv.js +1 -1
- package/dist/locale/sv.min.js +1 -1
- package/dist/locale/sv.min.mjs +1 -1
- package/dist/locale/sv.mjs +1 -1
- package/dist/locale/sw.js +1 -1
- package/dist/locale/sw.min.js +1 -1
- package/dist/locale/sw.min.mjs +1 -1
- package/dist/locale/sw.mjs +1 -1
- package/dist/locale/ta.js +1 -1
- package/dist/locale/ta.min.js +1 -1
- package/dist/locale/ta.min.mjs +1 -1
- package/dist/locale/ta.mjs +1 -1
- package/dist/locale/te.js +1 -1
- package/dist/locale/te.min.js +1 -1
- package/dist/locale/te.min.mjs +1 -1
- package/dist/locale/te.mjs +1 -1
- package/dist/locale/th.js +1 -1
- package/dist/locale/th.min.js +1 -1
- package/dist/locale/th.min.mjs +1 -1
- package/dist/locale/th.mjs +1 -1
- package/dist/locale/tk.js +1 -1
- package/dist/locale/tk.min.js +1 -1
- package/dist/locale/tk.min.mjs +1 -1
- package/dist/locale/tk.mjs +1 -1
- package/dist/locale/tr.js +1 -1
- package/dist/locale/tr.min.js +1 -1
- package/dist/locale/tr.min.mjs +1 -1
- package/dist/locale/tr.mjs +1 -1
- package/dist/locale/ug-cn.js +1 -1
- package/dist/locale/ug-cn.min.js +1 -1
- package/dist/locale/ug-cn.min.mjs +1 -1
- package/dist/locale/ug-cn.mjs +1 -1
- package/dist/locale/uk.js +1 -1
- package/dist/locale/uk.min.js +1 -1
- package/dist/locale/uk.min.mjs +1 -1
- package/dist/locale/uk.mjs +1 -1
- package/dist/locale/uz-uz.js +1 -1
- package/dist/locale/uz-uz.min.js +1 -1
- package/dist/locale/uz-uz.min.mjs +1 -1
- package/dist/locale/uz-uz.mjs +1 -1
- package/dist/locale/vi.js +1 -1
- package/dist/locale/vi.min.js +1 -1
- package/dist/locale/vi.min.mjs +1 -1
- package/dist/locale/vi.mjs +1 -1
- package/dist/locale/zh-cn.js +1 -1
- package/dist/locale/zh-cn.min.js +1 -1
- package/dist/locale/zh-cn.min.mjs +1 -1
- package/dist/locale/zh-cn.mjs +1 -1
- package/dist/locale/zh-hk.js +1 -1
- package/dist/locale/zh-hk.min.js +1 -1
- package/dist/locale/zh-hk.min.mjs +1 -1
- package/dist/locale/zh-hk.mjs +1 -1
- package/dist/locale/zh-mo.js +1 -1
- package/dist/locale/zh-mo.min.js +1 -1
- package/dist/locale/zh-mo.min.mjs +1 -1
- package/dist/locale/zh-mo.mjs +1 -1
- package/dist/locale/zh-tw.js +1 -1
- package/dist/locale/zh-tw.min.js +1 -1
- package/dist/locale/zh-tw.min.mjs +1 -1
- package/dist/locale/zh-tw.mjs +1 -1
- package/es/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.mjs +1 -1
- package/es/components/extend/base-table/src/index.vue.d.ts +9 -0
- package/es/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.mjs +98 -16
- package/es/components/extend/base-table/src/props.mjs +4 -0
- package/es/components/extend/v-form/src/index.vue_vue_type_script_lang.mjs +4 -1
- package/es/components/input/src/input.vue_vue_type_script_setup_true_lang.mjs +4 -0
- package/es/components/menu/src/utils/menu-item.mjs +1 -1
- package/es/components/menu/src/utils/submenu.mjs +1 -1
- package/es/components/message/src/message.d.ts +1 -1
- package/es/components/notification/src/notification.d.ts +1 -1
- package/es/components/table/src/table/defaults.d.ts +2 -0
- package/es/components/table/src/table/defaults.mjs +4 -0
- package/es/components/table/src/table-body/render-helper.mjs +8 -1
- package/es/components/table/src/table.vue.d.ts +9 -0
- package/es/components/table/src/table.vue_vue_type_script_lang.mjs +22 -3
- package/es/constants/index.mjs +2 -2
- package/es/directives/trap-focus/index.mjs +1 -1
- package/es/index.mjs +2 -2
- package/es/version.mjs +1 -1
- package/lib/components/cascader/src/cascader.vue_vue_type_script_setup_true_lang.js +14 -14
- package/lib/components/cascader-panel/src/index.vue_vue_type_script_setup_true_lang.js +12 -12
- package/lib/components/extend/base-table/src/index.vue.d.ts +9 -0
- package/lib/components/extend/base-table/src/index.vue_vue_type_script_setup_true_lang.js +98 -16
- package/lib/components/extend/base-table/src/props.js +4 -0
- package/lib/components/extend/v-form/src/index.vue_vue_type_script_lang.js +4 -1
- package/lib/components/input/src/input.vue_vue_type_script_setup_true_lang.js +4 -0
- package/lib/components/menu/src/utils/menu-item.js +11 -11
- package/lib/components/menu/src/utils/submenu.js +9 -9
- package/lib/components/message/src/message.d.ts +1 -1
- package/lib/components/notification/src/notification.d.ts +1 -1
- package/lib/components/table/src/table/defaults.d.ts +2 -0
- package/lib/components/table/src/table/defaults.js +4 -0
- package/lib/components/table/src/table-body/render-helper.js +8 -1
- package/lib/components/table/src/table.vue.d.ts +9 -0
- package/lib/components/table/src/table.vue_vue_type_script_lang.js +20 -1
- package/lib/constants/index.js +2 -2
- package/lib/directives/trap-focus/index.js +5 -5
- package/lib/index.js +2 -2
- package/lib/version.js +1 -1
- package/package.json +1 -1
- package/tags.json +1 -1
- package/theme-chalk/index.css +1 -1
- package/theme-chalk/src/extend/base-table.scss +15 -2
- package/web-types.json +1 -1
|
@@ -72,6 +72,7 @@ interface Table<T extends DefaultRow = any> extends ComponentInternalInstance {
|
|
|
72
72
|
useVirtualColumn: ComputedRef<boolean>;
|
|
73
73
|
colStart: Ref<number>;
|
|
74
74
|
colEnd: Ref<number>;
|
|
75
|
+
minRowHeights: Ref<Record<string | number, number>>;
|
|
75
76
|
virtualData: Ref<T[]>;
|
|
76
77
|
getVirtualRow: (index: number) => T | undefined;
|
|
77
78
|
doBack: (rowRef: HTMLElement, rowKey: string, isExpanded: boolean) => void;
|
|
@@ -105,6 +106,7 @@ interface TableProps<T extends DefaultRow> {
|
|
|
105
106
|
rememberScroller?: boolean;
|
|
106
107
|
excessRows?: number;
|
|
107
108
|
excessColumns?: number;
|
|
109
|
+
virtualColumn?: boolean;
|
|
108
110
|
data: T[];
|
|
109
111
|
size?: ComponentSize;
|
|
110
112
|
width?: string | number;
|
|
@@ -24,6 +24,13 @@ function useRender(props) {
|
|
|
24
24
|
if (rowKey) return getRowIdentity(row, rowKey);
|
|
25
25
|
return index;
|
|
26
26
|
};
|
|
27
|
+
const getVirtualRowHeight = ($index) => {
|
|
28
|
+
const context = props.context;
|
|
29
|
+
if (!context?.useVirtual) return void 0;
|
|
30
|
+
if (!context.estimatedRowHeight) return `${context.rowHeight}px`;
|
|
31
|
+
const minHeight = context.minRowHeights.value[$index];
|
|
32
|
+
return minHeight ? `${minHeight}px` : void 0;
|
|
33
|
+
};
|
|
27
34
|
const rowRender = (row, $index, treeRowData, expanded = false) => {
|
|
28
35
|
if (props.context?.useVirtual && ($index < props.context?.start.value || $index >= props.context?.end.value)) return "";
|
|
29
36
|
const { tooltipEffect, tooltipOptions, store } = props;
|
|
@@ -82,7 +89,7 @@ function useRender(props) {
|
|
|
82
89
|
};
|
|
83
90
|
return h(tr_wrapper_default, {
|
|
84
91
|
style: [
|
|
85
|
-
{ height:
|
|
92
|
+
{ height: getVirtualRowHeight($index) },
|
|
86
93
|
displayStyle,
|
|
87
94
|
getRowStyle(row, $index)
|
|
88
95
|
],
|
|
@@ -42,6 +42,10 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
42
42
|
type: NumberConstructor;
|
|
43
43
|
default: number;
|
|
44
44
|
};
|
|
45
|
+
virtualColumn: {
|
|
46
|
+
type: BooleanConstructor;
|
|
47
|
+
default: boolean;
|
|
48
|
+
};
|
|
45
49
|
data: {
|
|
46
50
|
type: vue.PropType<any[]>;
|
|
47
51
|
default: () => never[];
|
|
@@ -850,6 +854,10 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
850
854
|
type: NumberConstructor;
|
|
851
855
|
default: number;
|
|
852
856
|
};
|
|
857
|
+
virtualColumn: {
|
|
858
|
+
type: BooleanConstructor;
|
|
859
|
+
default: boolean;
|
|
860
|
+
};
|
|
853
861
|
data: {
|
|
854
862
|
type: vue.PropType<any[]>;
|
|
855
863
|
default: () => never[];
|
|
@@ -984,6 +992,7 @@ declare const __VLS_export: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
984
992
|
rememberScroller: boolean;
|
|
985
993
|
excessRows: number;
|
|
986
994
|
excessColumns: number;
|
|
995
|
+
virtualColumn: boolean;
|
|
987
996
|
showHeader: boolean;
|
|
988
997
|
showSummary: boolean;
|
|
989
998
|
highlightCurrentRow: boolean;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { isUndefined as isUndefined$1 } from "../../../utils/types.mjs";
|
|
1
|
+
import { isNumber, isUndefined as isUndefined$1 } from "../../../utils/types.mjs";
|
|
2
2
|
import { rAF } from "../../../utils/raf.mjs";
|
|
3
3
|
import { useLocale } from "../../../hooks/use-locale/index.mjs";
|
|
4
4
|
import { useNamespace } from "../../../hooks/use-namespace/index.mjs";
|
|
@@ -20,7 +20,7 @@ import defaults_default from "./table/defaults.mjs";
|
|
|
20
20
|
import { hColgroup } from "./h-helper.mjs";
|
|
21
21
|
import { useScrollbar } from "./composables/use-scrollbar.mjs";
|
|
22
22
|
import { debounce, throttle } from "lodash-unified";
|
|
23
|
-
import { computed, defineComponent, getCurrentInstance, nextTick, onBeforeUnmount, provide, ref, shallowRef, unref, watch } from "vue";
|
|
23
|
+
import { computed, defineComponent, getCurrentInstance, nextTick, onBeforeUnmount, provide, ref, shallowRef, triggerRef, unref, watch } from "vue";
|
|
24
24
|
|
|
25
25
|
//#region ../../packages/components/table/src/table.vue?vue&type=script&lang.ts
|
|
26
26
|
let tableIdSeed = 1;
|
|
@@ -139,7 +139,7 @@ var table_vue_vue_type_script_lang_default = defineComponent({
|
|
|
139
139
|
const scrollLeft = ref(0);
|
|
140
140
|
const colStart = ref(0);
|
|
141
141
|
const colEnd = ref(-1);
|
|
142
|
-
const useVirtualColumn = computed(() => props.useVirtual && tableLayout.value === "fixed");
|
|
142
|
+
const useVirtualColumn = computed(() => props.useVirtual && props.virtualColumn && tableLayout.value === "fixed");
|
|
143
143
|
table.useVirtualColumn = useVirtualColumn;
|
|
144
144
|
table.colStart = colStart;
|
|
145
145
|
table.colEnd = colEnd;
|
|
@@ -362,10 +362,28 @@ var table_vue_vue_type_script_lang_default = defineComponent({
|
|
|
362
362
|
rAF(() => {
|
|
363
363
|
const { height } = rowRef.getBoundingClientRect();
|
|
364
364
|
if (height > 0 && cachedRowHeights[rowKey] !== height) resetHeights(rowKey, height);
|
|
365
|
+
updateMinRowHeight(rowKey, height);
|
|
365
366
|
});
|
|
366
367
|
});
|
|
367
368
|
};
|
|
368
369
|
table.doMeasure = doMeasure;
|
|
370
|
+
const minRowHeights = shallowRef({});
|
|
371
|
+
table.minRowHeights = minRowHeights;
|
|
372
|
+
const updateMinRowHeight = (rowKey, height) => {
|
|
373
|
+
if (!useVirtualColumn.value || !isNumber(rowKey)) return;
|
|
374
|
+
if (height > (minRowHeights.value[rowKey] || 0)) {
|
|
375
|
+
minRowHeights.value[rowKey] = height;
|
|
376
|
+
triggerRef(minRowHeights);
|
|
377
|
+
}
|
|
378
|
+
};
|
|
379
|
+
const resetMinRowHeights = () => {
|
|
380
|
+
if (Object.keys(minRowHeights.value).length) minRowHeights.value = {};
|
|
381
|
+
};
|
|
382
|
+
watch([
|
|
383
|
+
columnOffsets,
|
|
384
|
+
useVirtualColumn,
|
|
385
|
+
expandedKeysCache
|
|
386
|
+
], resetMinRowHeights);
|
|
369
387
|
const virtualBodyHeight = computed(() => {
|
|
370
388
|
if (!props.useVirtual || !data.value) return 0;
|
|
371
389
|
const totalShowedRow = estimatedCommonProps.value.totalRow;
|
|
@@ -456,6 +474,7 @@ var table_vue_vue_type_script_lang_default = defineComponent({
|
|
|
456
474
|
estimatedCommonCache.column = {};
|
|
457
475
|
estimatedCommonCache.lastVisitedRowIndex = -1;
|
|
458
476
|
estimatedCommonCache.lastVisitedColumnIndex = -1;
|
|
477
|
+
resetMinRowHeights();
|
|
459
478
|
}
|
|
460
479
|
};
|
|
461
480
|
watch(() => props.data, () => {
|
package/es/constants/index.mjs
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { EVENT_CODE } from "./aria.mjs";
|
|
2
|
+
import { columnAlignment } from "./column-alignment.mjs";
|
|
2
3
|
import { WEEK_DAYS, datePickTypes } from "./date.mjs";
|
|
3
4
|
import { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from "./event.mjs";
|
|
5
|
+
import { BORDER_HORIZONTAL_WIDTH, MINIMUM_INPUT_WIDTH } from "./form.mjs";
|
|
4
6
|
import { INSTALLED_KEY } from "./key.mjs";
|
|
5
7
|
import { componentSizeMap, componentSizes } from "./size.mjs";
|
|
6
|
-
import { columnAlignment } from "./column-alignment.mjs";
|
|
7
|
-
import { BORDER_HORIZONTAL_WIDTH, MINIMUM_INPUT_WIDTH } from "./form.mjs";
|
|
8
8
|
|
|
9
9
|
export { BORDER_HORIZONTAL_WIDTH, CHANGE_EVENT, EVENT_CODE, INPUT_EVENT, INSTALLED_KEY, MINIMUM_INPUT_WIDTH, UPDATE_MODEL_EVENT, WEEK_DAYS, columnAlignment, componentSizeMap, componentSizes, datePickTypes };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { obtainAllFocusableElements } from "../../utils/dom/aria.mjs";
|
|
2
1
|
import { EVENT_CODE } from "../../constants/aria.mjs";
|
|
2
|
+
import { obtainAllFocusableElements } from "../../utils/dom/aria.mjs";
|
|
3
3
|
import { getEventCode } from "../../utils/dom/event.mjs";
|
|
4
4
|
import { nextTick } from "vue";
|
|
5
5
|
|
package/es/index.mjs
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { EVENT_CODE } from "./constants/aria.mjs";
|
|
2
|
+
import { columnAlignment } from "./constants/column-alignment.mjs";
|
|
2
3
|
import { WEEK_DAYS, datePickTypes } from "./constants/date.mjs";
|
|
3
4
|
import { CHANGE_EVENT, INPUT_EVENT, UPDATE_MODEL_EVENT } from "./constants/event.mjs";
|
|
5
|
+
import { BORDER_HORIZONTAL_WIDTH, MINIMUM_INPUT_WIDTH } from "./constants/form.mjs";
|
|
4
6
|
import { INSTALLED_KEY } from "./constants/key.mjs";
|
|
5
7
|
import { componentSizeMap, componentSizes } from "./constants/size.mjs";
|
|
6
|
-
import { columnAlignment } from "./constants/column-alignment.mjs";
|
|
7
|
-
import { BORDER_HORIZONTAL_WIDTH, MINIMUM_INPUT_WIDTH } from "./constants/form.mjs";
|
|
8
8
|
import { affixEmits, affixProps } from "./components/affix/src/affix.mjs";
|
|
9
9
|
import { useAttrs } from "./hooks/use-attrs/index.mjs";
|
|
10
10
|
import { useCalcInputWidth } from "./hooks/use-calc-input-width/index.mjs";
|
package/es/version.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
|
2
|
-
const require_aria = require('../../../
|
|
3
|
-
const require_aria$1 = require('../../../constants/aria.js');
|
|
2
|
+
const require_aria = require('../../../constants/aria.js');
|
|
4
3
|
const require_event = require('../../../constants/event.js');
|
|
4
|
+
const require_aria$1 = require('../../../utils/dom/aria.js');
|
|
5
5
|
const require_event$1 = require('../../../utils/dom/event.js');
|
|
6
6
|
const require_types = require('../../../utils/types.js');
|
|
7
7
|
const require_index = require('../../../hooks/use-locale/index.js');
|
|
@@ -325,23 +325,23 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
325
325
|
const handleKeyDown = (e) => {
|
|
326
326
|
if (isComposing.value) return;
|
|
327
327
|
switch (require_event$1.getEventCode(e)) {
|
|
328
|
-
case require_aria
|
|
329
|
-
case require_aria
|
|
328
|
+
case require_aria.EVENT_CODE.enter:
|
|
329
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
330
330
|
togglePopperVisible();
|
|
331
331
|
break;
|
|
332
|
-
case require_aria
|
|
332
|
+
case require_aria.EVENT_CODE.down:
|
|
333
333
|
togglePopperVisible(true);
|
|
334
334
|
(0, vue.nextTick)(focusFirstNode);
|
|
335
335
|
e.preventDefault();
|
|
336
336
|
break;
|
|
337
|
-
case require_aria
|
|
337
|
+
case require_aria.EVENT_CODE.esc:
|
|
338
338
|
if (popperVisible.value === true) {
|
|
339
339
|
e.preventDefault();
|
|
340
340
|
e.stopPropagation();
|
|
341
341
|
togglePopperVisible(false);
|
|
342
342
|
}
|
|
343
343
|
break;
|
|
344
|
-
case require_aria
|
|
344
|
+
case require_aria.EVENT_CODE.tab:
|
|
345
345
|
togglePopperVisible(false);
|
|
346
346
|
break;
|
|
347
347
|
}
|
|
@@ -376,10 +376,10 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
376
376
|
const target = e.target;
|
|
377
377
|
const code = require_event$1.getEventCode(e);
|
|
378
378
|
switch (code) {
|
|
379
|
-
case require_aria
|
|
380
|
-
case require_aria
|
|
379
|
+
case require_aria.EVENT_CODE.up:
|
|
380
|
+
case require_aria.EVENT_CODE.down: {
|
|
381
381
|
e.preventDefault();
|
|
382
|
-
const distance = code === require_aria
|
|
382
|
+
const distance = code === require_aria.EVENT_CODE.up ? -1 : 1;
|
|
383
383
|
if (props.virtualScroll && suggestionVirtualListRef.value) {
|
|
384
384
|
const currentIndex = getSuggestionIndexFromTarget(target);
|
|
385
385
|
if (currentIndex >= 0) {
|
|
@@ -388,16 +388,16 @@ var cascader_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, v
|
|
|
388
388
|
suggestionVirtualListRef.value.scrollToItem(targetIndex);
|
|
389
389
|
(0, vue.nextTick)(() => {
|
|
390
390
|
const targetItem = getSuggestionPanelEl(`#suggestion-${suggestions.value[targetIndex].uid}`);
|
|
391
|
-
targetItem && require_aria.focusNode(targetItem);
|
|
391
|
+
targetItem && require_aria$1.focusNode(targetItem);
|
|
392
392
|
});
|
|
393
393
|
return;
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
|
-
require_aria.focusNode(require_aria.getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
|
|
396
|
+
require_aria$1.focusNode(require_aria$1.getSibling(target, distance, `.${nsCascader.e("suggestion-item")}[tabindex="-1"]`));
|
|
397
397
|
break;
|
|
398
398
|
}
|
|
399
|
-
case require_aria
|
|
400
|
-
case require_aria
|
|
399
|
+
case require_aria.EVENT_CODE.enter:
|
|
400
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
401
401
|
target.click();
|
|
402
402
|
break;
|
|
403
403
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const require_runtime = require('../../../_virtual/_rolldown/runtime.js');
|
|
2
|
-
const require_aria = require('../../../
|
|
3
|
-
const require_aria$1 = require('../../../constants/aria.js');
|
|
2
|
+
const require_aria = require('../../../constants/aria.js');
|
|
4
3
|
const require_event = require('../../../constants/event.js');
|
|
4
|
+
const require_aria$1 = require('../../../utils/dom/aria.js');
|
|
5
5
|
const require_event$1 = require('../../../utils/dom/event.js');
|
|
6
6
|
const require_types = require('../../../utils/types.js');
|
|
7
7
|
const require_scroll = require('../../../utils/dom/scroll.js');
|
|
@@ -183,10 +183,10 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
183
183
|
const target = e.target;
|
|
184
184
|
const code = require_event$1.getEventCode(e);
|
|
185
185
|
switch (code) {
|
|
186
|
-
case require_aria
|
|
187
|
-
case require_aria
|
|
186
|
+
case require_aria.EVENT_CODE.up:
|
|
187
|
+
case require_aria.EVENT_CODE.down: {
|
|
188
188
|
e.preventDefault();
|
|
189
|
-
const distance = code === require_aria
|
|
189
|
+
const distance = code === require_aria.EVENT_CODE.up ? -1 : 1;
|
|
190
190
|
if (virtualScroll.value) {
|
|
191
191
|
const menuIndex = require_utils.getMenuIndex(target);
|
|
192
192
|
const menu = menuList.value[menuIndex];
|
|
@@ -206,23 +206,23 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
206
206
|
}
|
|
207
207
|
}
|
|
208
208
|
}
|
|
209
|
-
require_aria.focusNode(require_aria.getSibling(target, distance, `.${ns.b("node")}[tabindex="-1"]`));
|
|
209
|
+
require_aria$1.focusNode(require_aria$1.getSibling(target, distance, `.${ns.b("node")}[tabindex="-1"]`));
|
|
210
210
|
break;
|
|
211
211
|
}
|
|
212
|
-
case require_aria
|
|
212
|
+
case require_aria.EVENT_CODE.left: {
|
|
213
213
|
e.preventDefault();
|
|
214
214
|
const expandedNode = menuList.value[require_utils.getMenuIndex(target) - 1]?.$el.querySelector(`.${ns.b("node")}[aria-expanded="true"]`);
|
|
215
|
-
require_aria.focusNode(expandedNode);
|
|
215
|
+
require_aria$1.focusNode(expandedNode);
|
|
216
216
|
break;
|
|
217
217
|
}
|
|
218
|
-
case require_aria
|
|
218
|
+
case require_aria.EVENT_CODE.right: {
|
|
219
219
|
e.preventDefault();
|
|
220
220
|
const firstNode = menuList.value[require_utils.getMenuIndex(target) + 1]?.$el.querySelector(`.${ns.b("node")}[tabindex="-1"]`);
|
|
221
|
-
require_aria.focusNode(firstNode);
|
|
221
|
+
require_aria$1.focusNode(firstNode);
|
|
222
222
|
break;
|
|
223
223
|
}
|
|
224
|
-
case require_aria
|
|
225
|
-
case require_aria
|
|
224
|
+
case require_aria.EVENT_CODE.enter:
|
|
225
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
226
226
|
require_utils.checkNode(target);
|
|
227
227
|
break;
|
|
228
228
|
}
|
|
@@ -215,6 +215,10 @@ declare const __VLS_base: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
215
215
|
readonly type: vue.PropType<any[]>;
|
|
216
216
|
readonly default: () => never[];
|
|
217
217
|
};
|
|
218
|
+
readonly collapseTopInputs: {
|
|
219
|
+
readonly type: BooleanConstructor;
|
|
220
|
+
readonly default: false;
|
|
221
|
+
};
|
|
218
222
|
readonly topRules: {
|
|
219
223
|
readonly type: vue.PropType<Record<string, any>>;
|
|
220
224
|
readonly default: () => {};
|
|
@@ -514,6 +518,10 @@ declare const __VLS_base: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
514
518
|
readonly type: vue.PropType<any[]>;
|
|
515
519
|
readonly default: () => never[];
|
|
516
520
|
};
|
|
521
|
+
readonly collapseTopInputs: {
|
|
522
|
+
readonly type: BooleanConstructor;
|
|
523
|
+
readonly default: false;
|
|
524
|
+
};
|
|
517
525
|
readonly topRules: {
|
|
518
526
|
readonly type: vue.PropType<Record<string, any>>;
|
|
519
527
|
readonly default: () => {};
|
|
@@ -681,6 +689,7 @@ declare const __VLS_base: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
681
689
|
readonly tableHeight: number;
|
|
682
690
|
readonly tableHeightMinus: number;
|
|
683
691
|
readonly topInputs: any[];
|
|
692
|
+
readonly collapseTopInputs: boolean;
|
|
684
693
|
readonly topRules: Record<string, any>;
|
|
685
694
|
readonly tabLevel: number;
|
|
686
695
|
readonly middleButtons: any[];
|
|
@@ -24,7 +24,7 @@ let vue = require("vue");
|
|
|
24
24
|
//#region ../../packages/components/extend/base-table/src/index.vue?vue&type=script&setup=true&lang.tsx
|
|
25
25
|
const _hoisted_1 = {
|
|
26
26
|
key: 0,
|
|
27
|
-
class: "form-btns"
|
|
27
|
+
class: "form-btns form-btns--collapse"
|
|
28
28
|
};
|
|
29
29
|
const _hoisted_2 = {
|
|
30
30
|
key: 1,
|
|
@@ -242,14 +242,15 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
242
242
|
autoSubmitOnEnter: true,
|
|
243
243
|
maxlength: item.maxlength || 1e6
|
|
244
244
|
};
|
|
245
|
-
if (isCollapsed.value) {
|
|
246
|
-
if (item.multiple &&
|
|
245
|
+
if (props.collapseTopInputs && isCollapsed.value) {
|
|
246
|
+
if (item.multiple && ["el-select", "el-select-v2"].includes(item.element) || item.element === "el-cascader" && item.props.multiple) {
|
|
247
247
|
extra.filterable = false;
|
|
248
248
|
extra.collapseTags = true;
|
|
249
249
|
}
|
|
250
250
|
if (["el-input", "el-autocomplete"].includes(item.element) && item.type === "textarea") {
|
|
251
251
|
extra.resize = "none";
|
|
252
252
|
extra.rows = 1;
|
|
253
|
+
extra.autosize = false;
|
|
253
254
|
}
|
|
254
255
|
}
|
|
255
256
|
if (!item.placeholder) if (item.element === "el-input") extra.placeholder = t("expand.utils.pleaseEnter");
|
|
@@ -454,6 +455,92 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
454
455
|
function toggleCollapse() {
|
|
455
456
|
isCollapsed.value = !isCollapsed.value;
|
|
456
457
|
}
|
|
458
|
+
const collapsedHeight = (0, vue.ref)(0);
|
|
459
|
+
const collapsedFormStyle = (0, vue.computed)(() => isCollapsed.value && collapsedHeight.value ? { height: `${collapsedHeight.value}px` } : void 0);
|
|
460
|
+
let formResizeObserver = null;
|
|
461
|
+
let collapseLayoutRafId = 0;
|
|
462
|
+
const getSearchFormEl = () => {
|
|
463
|
+
const el = searchForm.value?.$el;
|
|
464
|
+
return el instanceof HTMLElement ? el : void 0;
|
|
465
|
+
};
|
|
466
|
+
function getFormLayoutChildren(formEl) {
|
|
467
|
+
return Array.from(formEl.children).filter((el) => el instanceof HTMLElement && !el.classList.contains("form-btns--collapse") && el.getClientRects().length > 0);
|
|
468
|
+
}
|
|
469
|
+
function updateShowCollapse(formEl) {
|
|
470
|
+
const formStyle = getComputedStyle(formEl);
|
|
471
|
+
const formWidth = formEl.clientWidth - Number.parseFloat(formStyle.paddingLeft) - Number.parseFloat(formStyle.paddingRight);
|
|
472
|
+
showCollapse.value = getFormLayoutChildren(formEl).reduce((sum, el) => {
|
|
473
|
+
const style = getComputedStyle(el);
|
|
474
|
+
return sum + el.getBoundingClientRect().width + Number.parseFloat(style.marginLeft) + Number.parseFloat(style.marginRight);
|
|
475
|
+
}, 0) > formWidth + 1;
|
|
476
|
+
}
|
|
477
|
+
function updateCollapsedHeight(formEl) {
|
|
478
|
+
const children = getFormLayoutChildren(formEl);
|
|
479
|
+
if (!children.length) return;
|
|
480
|
+
const formRect = formEl.getBoundingClientRect();
|
|
481
|
+
const formStyle = getComputedStyle(formEl);
|
|
482
|
+
const contentTop = formRect.top + formEl.clientTop + Number.parseFloat(formStyle.paddingTop);
|
|
483
|
+
let prevLeft = Number.NEGATIVE_INFINITY;
|
|
484
|
+
let maxBottom = contentTop;
|
|
485
|
+
for (const el of children) {
|
|
486
|
+
const rect = el.getBoundingClientRect();
|
|
487
|
+
if (rect.left <= prevLeft) break;
|
|
488
|
+
prevLeft = rect.left;
|
|
489
|
+
maxBottom = Math.max(maxBottom, rect.bottom + Number.parseFloat(getComputedStyle(el).marginBottom));
|
|
490
|
+
}
|
|
491
|
+
collapsedHeight.value = Math.ceil(maxBottom - contentTop);
|
|
492
|
+
}
|
|
493
|
+
function updateCollapseLayout() {
|
|
494
|
+
const formEl = getSearchFormEl();
|
|
495
|
+
if (!formEl) return;
|
|
496
|
+
if (isCollapsed.value) {
|
|
497
|
+
updateCollapsedHeight(formEl);
|
|
498
|
+
return;
|
|
499
|
+
}
|
|
500
|
+
updateShowCollapse(formEl);
|
|
501
|
+
if (showCollapse.value && props.headerFilter && !autoCollapsed.value) {
|
|
502
|
+
isCollapsed.value = true;
|
|
503
|
+
autoCollapsed.value = true;
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
function scheduleCollapseLayout() {
|
|
507
|
+
cancelAnimationFrame(collapseLayoutRafId);
|
|
508
|
+
collapseLayoutRafId = requestAnimationFrame(updateCollapseLayout);
|
|
509
|
+
}
|
|
510
|
+
function observeFormLayout() {
|
|
511
|
+
if (!require_utils.isClient) return;
|
|
512
|
+
const formEl = getSearchFormEl();
|
|
513
|
+
formResizeObserver?.disconnect();
|
|
514
|
+
if (!formEl) return;
|
|
515
|
+
formResizeObserver ??= new ResizeObserver(scheduleCollapseLayout);
|
|
516
|
+
formResizeObserver.observe(formEl);
|
|
517
|
+
getFormLayoutChildren(formEl).forEach((el) => formResizeObserver.observe(el));
|
|
518
|
+
updateCollapseLayout();
|
|
519
|
+
}
|
|
520
|
+
(0, vue.watch)([topInputsDealed, isCollapsed], () => (0, vue.nextTick)(observeFormLayout), { flush: "post" });
|
|
521
|
+
const draggedTextareaSize = /* @__PURE__ */ new WeakMap();
|
|
522
|
+
(0, vue.watch)(isCollapsed, (collapsed) => {
|
|
523
|
+
const formEl = getSearchFormEl();
|
|
524
|
+
if (!formEl || !props.collapseTopInputs) return;
|
|
525
|
+
formEl.querySelectorAll(".el-textarea__inner").forEach((textarea) => {
|
|
526
|
+
const { style } = textarea;
|
|
527
|
+
if (collapsed) {
|
|
528
|
+
if (!style.height && !style.width) return;
|
|
529
|
+
draggedTextareaSize.set(textarea, {
|
|
530
|
+
height: style.height,
|
|
531
|
+
width: style.width
|
|
532
|
+
});
|
|
533
|
+
style.height = "";
|
|
534
|
+
style.width = "";
|
|
535
|
+
} else {
|
|
536
|
+
const size = draggedTextareaSize.get(textarea);
|
|
537
|
+
if (!size) return;
|
|
538
|
+
style.height = size.height;
|
|
539
|
+
style.width = size.width;
|
|
540
|
+
draggedTextareaSize.delete(textarea);
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
}, { flush: "post" });
|
|
457
544
|
function getInputsData() {
|
|
458
545
|
return inputsData;
|
|
459
546
|
}
|
|
@@ -1143,23 +1230,14 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
1143
1230
|
if (props.autoSearch) onSearch();
|
|
1144
1231
|
(0, vue.nextTick)(() => {
|
|
1145
1232
|
if (props.needDropdown) initInfiniteScroll();
|
|
1146
|
-
resizeObserver.value = new ResizeObserver((
|
|
1147
|
-
|
|
1148
|
-
const { contentRect, target } = entry;
|
|
1149
|
-
if (target.className.includes("basetable-top-box")) {
|
|
1150
|
-
showCollapse.value = contentRect.height > 45;
|
|
1151
|
-
if (showCollapse.value && props.headerFilter && !autoCollapsed.value) {
|
|
1152
|
-
isCollapsed.value = true;
|
|
1153
|
-
autoCollapsed.value = true;
|
|
1154
|
-
}
|
|
1155
|
-
}
|
|
1156
|
-
setTableHeight();
|
|
1157
|
-
}
|
|
1233
|
+
resizeObserver.value = new ResizeObserver(() => {
|
|
1234
|
+
setTableHeight();
|
|
1158
1235
|
});
|
|
1159
1236
|
const element = rootEl.value?.querySelector(".basetable-top-box");
|
|
1160
1237
|
element && resizeObserver.value.observe(element);
|
|
1161
1238
|
const middleBox = rootEl.value?.querySelector(".basetable-middle-box");
|
|
1162
1239
|
middleBox && resizeObserver.value.observe(middleBox);
|
|
1240
|
+
observeFormLayout();
|
|
1163
1241
|
if (!VTableBase.value) return;
|
|
1164
1242
|
if (props.autoHeight || props.maxHeight) return;
|
|
1165
1243
|
if (props.tableHeight) {
|
|
@@ -1192,6 +1270,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
1192
1270
|
abortSignal.value && abortSignal.value.abort();
|
|
1193
1271
|
observer.value && observer.value.disconnect();
|
|
1194
1272
|
resizeObserver.value && resizeObserver.value.disconnect();
|
|
1273
|
+
formResizeObserver?.disconnect();
|
|
1274
|
+
cancelAnimationFrame(collapseLayoutRafId);
|
|
1195
1275
|
});
|
|
1196
1276
|
__expose({
|
|
1197
1277
|
onSearch,
|
|
@@ -1255,6 +1335,7 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
1255
1335
|
"form-items": topInputsDealed.value,
|
|
1256
1336
|
rules: _ctx.topRules,
|
|
1257
1337
|
class: (0, vue.normalizeClass)({ "is-collapsed": isCollapsed.value }),
|
|
1338
|
+
style: (0, vue.normalizeStyle)(collapsedFormStyle.value),
|
|
1258
1339
|
onValueChange: onChange
|
|
1259
1340
|
}, {
|
|
1260
1341
|
default: (0, vue.withCtx)(() => [!isCollapsed.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [_ctx.topInputs.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [
|
|
@@ -1323,7 +1404,8 @@ var index_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
1323
1404
|
"model",
|
|
1324
1405
|
"form-items",
|
|
1325
1406
|
"rules",
|
|
1326
|
-
"class"
|
|
1407
|
+
"class",
|
|
1408
|
+
"style"
|
|
1327
1409
|
])) : (0, vue.createCommentVNode)("v-if", true),
|
|
1328
1410
|
_ctx.$slots.topLeft || isCollapsed.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_6, [isCollapsed.value ? ((0, vue.openBlock)(), (0, vue.createElementBlock)("div", _hoisted_7, [_ctx.topInputs.length ? ((0, vue.openBlock)(), (0, vue.createElementBlock)(vue.Fragment, { key: 0 }, [
|
|
1329
1411
|
(0, vue.createElementVNode)("div", _hoisted_8, [(0, vue.createVNode)((0, vue.unref)(require_index$4.ElButton), {
|
|
@@ -74,7 +74,10 @@ var index_vue_vue_type_script_lang_default = (0, vue.defineComponent)({
|
|
|
74
74
|
});
|
|
75
75
|
}
|
|
76
76
|
(0, vue.watch)(() => props.formItems, (v) => {
|
|
77
|
-
dealedFormItems.value = (0, vue.unref)(v)
|
|
77
|
+
dealedFormItems.value = ((0, vue.unref)(v) || []).map((item) => ({
|
|
78
|
+
...item,
|
|
79
|
+
rules: item.rules ? [...item.rules] : void 0
|
|
80
|
+
}));
|
|
78
81
|
const { initForm } = require_useForm.useForm({
|
|
79
82
|
emit,
|
|
80
83
|
formModel,
|
|
@@ -327,6 +327,10 @@ var input_vue_vue_type_script_setup_true_lang_default = /* @__PURE__ */ (0, vue.
|
|
|
327
327
|
setNativeInputValue();
|
|
328
328
|
resizeTextarea();
|
|
329
329
|
});
|
|
330
|
+
(0, vue.watch)(() => [props.rows, props.autosize], async () => {
|
|
331
|
+
await (0, vue.nextTick)();
|
|
332
|
+
resizeTextarea();
|
|
333
|
+
}, { deep: true });
|
|
330
334
|
(0, vue.onMounted)(() => {
|
|
331
335
|
if (!props.formatter && props.parser) require_error.debugWarn(COMPONENT_NAME, "If you set the parser, you also need to set the formatter.");
|
|
332
336
|
setNativeInputValue();
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_aria = require('../../../../
|
|
3
|
-
const require_aria$1 = require('../../../../
|
|
2
|
+
const require_aria = require('../../../../constants/aria.js');
|
|
3
|
+
const require_aria$1 = require('../../../../utils/dom/aria.js');
|
|
4
4
|
const require_event = require('../../../../utils/dom/event.js');
|
|
5
5
|
const require_submenu = require('./submenu.js');
|
|
6
6
|
|
|
@@ -22,22 +22,22 @@ var MenuItem = class {
|
|
|
22
22
|
const code = require_event.getEventCode(event);
|
|
23
23
|
let prevDef = false;
|
|
24
24
|
switch (code) {
|
|
25
|
-
case require_aria
|
|
26
|
-
require_aria.triggerEvent(event.currentTarget, "mouseenter");
|
|
25
|
+
case require_aria.EVENT_CODE.down:
|
|
26
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseenter");
|
|
27
27
|
this.submenu?.gotoSubIndex(0);
|
|
28
28
|
prevDef = true;
|
|
29
29
|
break;
|
|
30
|
-
case require_aria
|
|
31
|
-
require_aria.triggerEvent(event.currentTarget, "mouseenter");
|
|
30
|
+
case require_aria.EVENT_CODE.up:
|
|
31
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseenter");
|
|
32
32
|
this.submenu?.gotoSubIndex(this.submenu.subMenuItems.length - 1);
|
|
33
33
|
prevDef = true;
|
|
34
34
|
break;
|
|
35
|
-
case require_aria
|
|
36
|
-
require_aria.triggerEvent(event.currentTarget, "mouseleave");
|
|
35
|
+
case require_aria.EVENT_CODE.tab:
|
|
36
|
+
require_aria$1.triggerEvent(event.currentTarget, "mouseleave");
|
|
37
37
|
break;
|
|
38
|
-
case require_aria
|
|
39
|
-
case require_aria
|
|
40
|
-
case require_aria
|
|
38
|
+
case require_aria.EVENT_CODE.enter:
|
|
39
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
40
|
+
case require_aria.EVENT_CODE.space:
|
|
41
41
|
prevDef = true;
|
|
42
42
|
event.currentTarget.click();
|
|
43
43
|
break;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Object.defineProperties(exports, { __esModule: { value: true }, [Symbol.toStringTag]: { value: 'Module' } });
|
|
2
|
-
const require_aria = require('../../../../
|
|
3
|
-
const require_aria$1 = require('../../../../
|
|
2
|
+
const require_aria = require('../../../../constants/aria.js');
|
|
3
|
+
const require_aria$1 = require('../../../../utils/dom/aria.js');
|
|
4
4
|
const require_event = require('../../../../utils/dom/event.js');
|
|
5
5
|
|
|
6
6
|
//#region ../../packages/components/menu/src/utils/submenu.ts
|
|
@@ -25,20 +25,20 @@ var SubMenu = class {
|
|
|
25
25
|
const code = require_event.getEventCode(event);
|
|
26
26
|
let prevDef = false;
|
|
27
27
|
switch (code) {
|
|
28
|
-
case require_aria
|
|
28
|
+
case require_aria.EVENT_CODE.down:
|
|
29
29
|
this.gotoSubIndex(this.subIndex + 1);
|
|
30
30
|
prevDef = true;
|
|
31
31
|
break;
|
|
32
|
-
case require_aria
|
|
32
|
+
case require_aria.EVENT_CODE.up:
|
|
33
33
|
this.gotoSubIndex(this.subIndex - 1);
|
|
34
34
|
prevDef = true;
|
|
35
35
|
break;
|
|
36
|
-
case require_aria
|
|
37
|
-
require_aria.triggerEvent(parentNode, "mouseleave");
|
|
36
|
+
case require_aria.EVENT_CODE.tab:
|
|
37
|
+
require_aria$1.triggerEvent(parentNode, "mouseleave");
|
|
38
38
|
break;
|
|
39
|
-
case require_aria
|
|
40
|
-
case require_aria
|
|
41
|
-
case require_aria
|
|
39
|
+
case require_aria.EVENT_CODE.enter:
|
|
40
|
+
case require_aria.EVENT_CODE.numpadEnter:
|
|
41
|
+
case require_aria.EVENT_CODE.space:
|
|
42
42
|
prevDef = true;
|
|
43
43
|
event.currentTarget.click();
|
|
44
44
|
break;
|
|
@@ -134,7 +134,7 @@ declare const messageProps: {
|
|
|
134
134
|
readonly type: EpPropFinalized<StringConstructor, "info" | "primary" | "success" | "warning" | "error", unknown, "info", boolean>;
|
|
135
135
|
readonly plain: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
136
136
|
readonly offset: EpPropFinalized<NumberConstructor, unknown, unknown, 16, boolean>;
|
|
137
|
-
readonly placement: EpPropFinalized<StringConstructor, "top" | "bottom" | "top-
|
|
137
|
+
readonly placement: EpPropFinalized<StringConstructor, "top" | "bottom" | "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, undefined, boolean>;
|
|
138
138
|
readonly zIndex: EpPropFinalized<NumberConstructor, unknown, unknown, 0, boolean>;
|
|
139
139
|
readonly grouping: EpPropFinalized<BooleanConstructor, unknown, unknown, false, boolean>;
|
|
140
140
|
readonly repeatNum: EpPropFinalized<NumberConstructor, unknown, unknown, 1, boolean>;
|
|
@@ -110,7 +110,7 @@ declare const notificationProps: {
|
|
|
110
110
|
readonly validator: ((val: unknown) => boolean) | undefined;
|
|
111
111
|
__epPropKey: true;
|
|
112
112
|
};
|
|
113
|
-
readonly position: EpPropFinalized<StringConstructor, "top-
|
|
113
|
+
readonly position: EpPropFinalized<StringConstructor, "top-left" | "top-right" | "bottom-left" | "bottom-right", unknown, "top-right", boolean>;
|
|
114
114
|
readonly showClose: EpPropFinalized<BooleanConstructor, unknown, unknown, true, boolean>;
|
|
115
115
|
readonly title: EpPropFinalized<StringConstructor, unknown, unknown, "", boolean>;
|
|
116
116
|
readonly type: EpPropFinalized<StringConstructor, "" | "info" | "primary" | "success" | "warning" | "error", unknown, "", boolean>;
|