@jetlinks-web/components 2.6.10 → 2.6.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.
@@ -16,8 +16,10 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
16
16
  } return value; }
17
17
  /* Analyzed bindings: {
18
18
  "groupKey": "props",
19
+ "width": "props",
19
20
  "readonly": "props",
20
21
  "ContextMenu": "setup-maybe-ref",
22
+ "useHScroll": "setup-maybe-ref",
21
23
  "useRightMenuContext": "setup-maybe-ref",
22
24
  "randomString": "setup-maybe-ref",
23
25
  "bodyProps": "setup-maybe-ref",
@@ -37,6 +39,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
37
39
  "virtualRang": "setup-reactive-const",
38
40
  "containerStyle": "setup-ref",
39
41
  "context": "setup-maybe-ref",
42
+ "hScroll": "setup-maybe-ref",
40
43
  "scrollLock": "setup-let",
41
44
  "menuInstance": "setup-let",
42
45
  "maxLen": "setup-ref",
@@ -48,7 +51,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
51
  "rowClick": "setup-const",
49
52
  "updateSelectedKeys": "setup-const"
50
53
  } */
51
- import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, createBlock as _createBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createVNode as _createVNode } from "vue";
54
+ import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, createBlock as _createBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createVNode as _createVNode } from "vue";
52
55
  const _hoisted_1 = { style: { position: 'relative' } };
53
56
  const _hoisted_2 = ["data-row-key", "onContextmenu", "onClick"];
54
57
  const _hoisted_3 = {
@@ -65,7 +68,7 @@ const _hoisted_5 = {
65
68
  };
66
69
  const _hoisted_6 = { class: "jetlinks-edit-table-body-empty" };
67
70
  import ContextMenu from './components/ContextMenu';
68
- import { useRightMenuContext } from "./hooks";
71
+ import { useHScroll, useRightMenuContext } from "./hooks";
69
72
  import { randomString } from "@jetlinks-web/utils";
70
73
  import { bodyProps } from "./props";
71
74
  import { ref, reactive, computed, watch, onMounted, onBeforeUnmount, nextTick } from 'vue';
@@ -80,6 +83,9 @@ const __sfc_main__ = Object.assign({
80
83
  type: [String, Number],
81
84
  default: undefined
82
85
  },
86
+ width: {
87
+ type: Number
88
+ },
83
89
  readonly: {
84
90
  type: Boolean,
85
91
  default: false
@@ -97,6 +103,7 @@ const __sfc_main__ = Object.assign({
97
103
  });
98
104
  const containerStyle = ref(0);
99
105
  const context = useRightMenuContext();
106
+ const hScroll = useHScroll();
100
107
  let scrollLock = ref(false);
101
108
  let menuInstance;
102
109
  const maxLen = computed(() => {
@@ -106,7 +113,7 @@ const __sfc_main__ = Object.assign({
106
113
  const virtualData = computed(() => {
107
114
  const array = props.dataSource.slice(virtualRang.start, virtualRang.end);
108
115
  if (tableCenterRef.value) {
109
- tableCenterRef.value.style.webkitTransform = `translate3d(0, ${virtualRang.start * props.cellHeight}px, 0)`;
116
+ // tableCenterRef.value.style.webkitTransform = `translateY(${virtualRang.start * props.cellHeight}px)`
110
117
  }
111
118
  return array;
112
119
  });
@@ -217,7 +224,11 @@ const __sfc_main__ = Object.assign({
217
224
  _createElementVNode("div", {
218
225
  class: "jetlinks-edit-table-center",
219
226
  ref_key: "tableCenterRef",
220
- ref: tableCenterRef
227
+ ref: tableCenterRef,
228
+ style: _normalizeStyle({
229
+ transform: `translate3d(-${_unref(hScroll) || 0}px, ${virtualRang.start * _ctx.cellHeight}px, 0)`,
230
+ width: __props.width + 'px'
231
+ })
221
232
  }, [
222
233
  (virtualData.value.length)
223
234
  ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(virtualData.value, (item, index) => {
@@ -227,7 +238,10 @@ const __sfc_main__ = Object.assign({
227
238
  'jetlinks-edit-table-row-selected': _optionalChain([selectedRowKeys, 'access', _12 => _12.value, 'optionalAccess', _13 => _13.includes, 'call', _14 => _14(item[_ctx.rowKey] || virtualRang.start + index + 1)])
228
239
  }),
229
240
  key: `record_${item.__key}`,
230
- style: _normalizeStyle({ height: `${_ctx.cellHeight}px`, }),
241
+ style: _normalizeStyle({
242
+ height: `${_ctx.cellHeight}px`,
243
+ transform: `-${_unref(hScroll) || 0}px`
244
+ }),
231
245
  "data-row-key": item[_ctx.rowKey] || virtualRang.start + index + 1,
232
246
  onContextmenu: _withModifiers((e) => showContextMenu(e, item, virtualRang.start + index), ["right"]),
233
247
  onClick: _withModifiers(() => rowClick(item), ["stop"])
@@ -277,7 +291,7 @@ const __sfc_main__ = Object.assign({
277
291
  (__props.readonly)
278
292
  ? (_openBlock(), _createElementBlock("div", _hoisted_5))
279
293
  : _createCommentVNode("v-if", true)
280
- ], 512 /* NEED_PATCH */)
294
+ ], 4 /* STYLE */)
281
295
  ])
282
296
  ], 36 /* STYLE, NEED_HYDRATION */))
283
297
  : _renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
@@ -26,6 +26,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
26
26
  "TABLE_GROUP_ACTIVE": "setup-maybe-ref",
27
27
  "TABLE_GROUP_ERROR": "setup-maybe-ref",
28
28
  "TABLE_GROUP_OPTIONS": "setup-maybe-ref",
29
+ "TABLE_H_SCROLL": "setup-maybe-ref",
29
30
  "TABLE_OPEN_GROUP": "setup-maybe-ref",
30
31
  "TABLE_TOOL": "setup-maybe-ref",
31
32
  "TABLE_WRAPPER": "setup-maybe-ref",
@@ -58,7 +59,11 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
58
59
  "myColumns": "setup-ref",
59
60
  "tableWrapper": "setup-ref",
60
61
  "tableBody": "setup-ref",
62
+ "scrollBarRef": "setup-ref",
61
63
  "tableStyle": "setup-reactive-const",
64
+ "showScroll": "setup-ref",
65
+ "horizontalScrollWidth": "setup-ref",
66
+ "horizontalScrollLeft": "setup-ref",
62
67
  "fields": "setup-const",
63
68
  "defaultGroupId": "literal-const",
64
69
  "fieldsErrMap": "setup-ref",
@@ -94,12 +99,18 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
94
99
  "getTableWrapperRef": "setup-const",
95
100
  "groupDelete": "setup-const",
96
101
  "groupEdit": "setup-const",
97
- "getGroupActive": "setup-const"
102
+ "getGroupActive": "setup-const",
103
+ "onHorizontalScroll": "setup-const"
98
104
  } */
99
- import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from "vue";
105
+ import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, normalizeClass as _normalizeClass } from "vue";
100
106
  const _hoisted_1 = { class: "jetlinks-edit-table-extra" };
101
107
  const _hoisted_2 = { class: "jetlinks-edit-table" };
102
- import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_GROUP_ACTIVE, TABLE_GROUP_ERROR, TABLE_GROUP_OPTIONS, TABLE_OPEN_GROUP, TABLE_TOOL, TABLE_WRAPPER } from './consts';
108
+ const _hoisted_3 = {
109
+ key: 0,
110
+ class: "jetlinks-table-horizontal-scroll"
111
+ };
112
+ const _hoisted_4 = /*#__PURE__*/ _createElementVNode("div", { style: { "width": "15px", "height": "100%", "overflow-x": "hidden" } }, null, -1 /* HOISTED */);
113
+ import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_GROUP_ACTIVE, TABLE_GROUP_ERROR, TABLE_GROUP_OPTIONS, TABLE_H_SCROLL, TABLE_OPEN_GROUP, TABLE_TOOL, TABLE_WRAPPER } from './consts';
103
114
  import { handleColumnsWidth } from './utils';
104
115
  import { useGroup, useResizeObserver, useValidate } from './hooks';
105
116
  import { tableProps } from 'ant-design-vue/lib/table';
@@ -148,10 +159,14 @@ const __sfc_main__ = Object.assign({
148
159
  const myColumns = ref([]);
149
160
  const tableWrapper = ref();
150
161
  const tableBody = ref();
162
+ const scrollBarRef = ref();
151
163
  const tableStyle = reactive({
152
164
  width: '100%',
153
165
  height: props.height
154
166
  });
167
+ const showScroll = ref(false);
168
+ const horizontalScrollWidth = ref(0);
169
+ const horizontalScrollLeft = ref(0);
155
170
  const fields = {};
156
171
  const fieldsErrMap = ref({});
157
172
  const fieldsGroupError = ref({});
@@ -288,6 +303,7 @@ const __sfc_main__ = Object.assign({
288
303
  });
289
304
  provide(TABLE_GROUP_OPTIONS, groupOptions);
290
305
  provide(TABLE_GROUP_ACTIVE, groupActive);
306
+ provide(TABLE_H_SCROLL, horizontalScrollLeft);
291
307
  const addField = (key, field) => {
292
308
  fields[key] = field;
293
309
  };
@@ -322,11 +338,19 @@ const __sfc_main__ = Object.assign({
322
338
  }
323
339
  return customData.index + 1;
324
340
  },
325
- width: _optionalChain([props, 'access', _14 => _14.serial, 'optionalAccess', _15 => _15.width])
341
+ width: _optionalChain([props, 'access', _14 => _14.serial, 'optionalAccess', _15 => _15.width]),
342
+ fixed: 'left'
326
343
  };
327
344
  newColumns = [serial, ...props.columns];
328
345
  }
329
346
  myColumns.value = handleColumnsWidth(newColumns, tableStyle.width - scrollWidth.value);
347
+ horizontalScrollWidth.value = myColumns.value.reduce((prev, next) => {
348
+ prev += next.width;
349
+ return prev;
350
+ }, 0);
351
+ if (horizontalScrollWidth.value > tableStyle.width) {
352
+ showScroll.value = true;
353
+ }
330
354
  };
331
355
  function onResize({ width = 0 }) {
332
356
  const _width = width - scrollWidth.value;
@@ -372,6 +396,9 @@ const __sfc_main__ = Object.assign({
372
396
  const getGroupActive = () => {
373
397
  return groupActive.value;
374
398
  };
399
+ const onHorizontalScroll = (e) => {
400
+ horizontalScrollLeft.value = scrollBarRef.value.scrollLeft;
401
+ };
375
402
  watch(() => fieldsErrMap.value, (errorMap) => {
376
403
  fieldsGroupError.value = {};
377
404
  if (props.openGroup) {
@@ -448,7 +475,7 @@ const __sfc_main__ = Object.assign({
448
475
  _createVNode(Header, {
449
476
  columns: myColumns.value,
450
477
  searchColumns: __props.searchColumns,
451
- style: _normalizeStyle({ width: tableStyle.width })
478
+ style: _normalizeStyle({ width: tableStyle.width, transform: `translateX(-${horizontalScrollLeft.value}px)` })
452
479
  }, null, 8 /* PROPS */, ["columns", "searchColumns", "style"])
453
480
  ], 4 /* STYLE */),
454
481
  _createElementVNode("div", {
@@ -468,6 +495,7 @@ const __sfc_main__ = Object.assign({
468
495
  openGroup: _ctx.openGroup,
469
496
  rowSelection: _ctx.rowSelection,
470
497
  readonly: __props.readonly,
498
+ width: horizontalScrollWidth.value,
471
499
  onScrollDown: onScrollDown
472
500
  }, _createSlots({ _: 2 /* DYNAMIC */ }, [
473
501
  _renderList(_unref(slots), (_, name) => {
@@ -478,12 +506,32 @@ const __sfc_main__ = Object.assign({
478
506
  ])
479
507
  };
480
508
  })
481
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "cellHeight", "height", "disableMenu", "rowKey", "groupKey", "openGroup", "rowSelection", "readonly"]),
509
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "cellHeight", "height", "disableMenu", "rowKey", "groupKey", "openGroup", "rowSelection", "readonly", "width"]),
482
510
  _renderSlot(_ctx.$slots, "bodyExtra")
483
511
  ], 4 /* STYLE */),
512
+ (showScroll.value)
513
+ ? (_openBlock(), _createElementBlock("div", _hoisted_3, [
514
+ _createElementVNode("div", {
515
+ class: "jetlinks-table-horizontal-scroll-bar",
516
+ ref_key: "scrollBarRef",
517
+ ref: scrollBarRef,
518
+ style: _normalizeStyle({
519
+ width: 'calc(100% - 15px)',
520
+ height: '100%',
521
+ overflowX: 'scroll'
522
+ }),
523
+ onScroll: onHorizontalScroll
524
+ }, [
525
+ _createElementVNode("div", {
526
+ style: _normalizeStyle({ minWidth: horizontalScrollWidth.value + 'px', maxWidth: horizontalScrollWidth.value + 'px', height: '100%' })
527
+ }, null, 4 /* STYLE */)
528
+ ], 36 /* STYLE, NEED_HYDRATION */),
529
+ _hoisted_4
530
+ ]))
531
+ : _createCommentVNode("v-if", true),
484
532
  (_ctx.dataSource.length && _ctx.openGroup)
485
533
  ? (_openBlock(), _createBlock(Group, {
486
- key: 0,
534
+ key: 1,
487
535
  activeKey: _unref(groupActive).value,
488
536
  "onUpdate:activeKey": _cache[0] || (_cache[0] = $event => ((_unref(groupActive).value) = $event)),
489
537
  options: _unref(groupOptions),
@@ -23,10 +23,12 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
23
23
  "Sort": "setup-maybe-ref",
24
24
  "reactive": "setup-const",
25
25
  "defineOptions": "setup-const",
26
+ "useHScroll": "setup-maybe-ref",
26
27
  "useTableTool": "setup-maybe-ref",
27
28
  "HeaderItemRender": "setup-const",
28
29
  "props": "setup-reactive-const",
29
30
  "tableTool": "setup-maybe-ref",
31
+ "hScroll": "setup-maybe-ref",
30
32
  "searchData": "setup-reactive-const",
31
33
  "showFilter": "setup-const",
32
34
  "sortClick": "setup-const"
@@ -46,7 +48,7 @@ const _hoisted_6 = {
46
48
  };
47
49
  import { SearchModal, Sort } from './components/Search';
48
50
  import { reactive, } from 'vue';
49
- import { useTableTool } from "./hooks";
51
+ import { useHScroll, useTableTool } from "./hooks";
50
52
  import HeaderItemRender from './HeaderRender.js';
51
53
  const __sfc_main__ = Object.assign({
52
54
  name: 'JEditTableHeader'
@@ -72,6 +74,7 @@ const __sfc_main__ = Object.assign({
72
74
  setup(__props) {
73
75
  const props = __props;
74
76
  const tableTool = useTableTool();
77
+ const hScroll = useHScroll();
75
78
  const searchData = reactive({
76
79
  visible: false,
77
80
  key: undefined
@@ -42,7 +42,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
42
42
  "onDesc": "setup-const"
43
43
  } */
44
44
  import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
45
- const _withScopeId = n => (_pushScopeId("data-v-1744627839929"), n = n(), _popScopeId(), n);
45
+ const _withScopeId = n => (_pushScopeId("data-v-1744797585363"), n = n(), _popScopeId(), n);
46
46
  const _hoisted_1 = { class: "jetlinks-table-sort-content" };
47
47
  const _hoisted_2 = { class: "jetlinks-table-sort-title" };
48
48
  const _hoisted_3 = { class: "table-sort-body" };
@@ -9,4 +9,5 @@ export var TABLE_DATA_SOURCE = Symbol('table-data-source');
9
9
  export var TABLE_OPEN_GROUP = Symbol('table-open-group');
10
10
  export var TABLE_TOOL = Symbol('table-tool');
11
11
  export var TABLE_FORM_ITEM_ERROR = Symbol('table-form-item-error');
12
- export var TABLE_GROUP_ACTIVE = Symbol('table-group-active');
12
+ export var TABLE_GROUP_ACTIVE = Symbol('table-group-active');
13
+ export var TABLE_H_SCROLL = Symbol('table-h-scroll');
@@ -1,5 +1,5 @@
1
1
  import { provide, inject, computed } from 'vue';
2
- import { RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_WRAPPER, TABLE_TOOL, TABLE_FORM_ITEM_ERROR, FULL_SCREEN } from "../consts";
2
+ import { RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_WRAPPER, TABLE_TOOL, TABLE_FORM_ITEM_ERROR, FULL_SCREEN, TABLE_H_SCROLL } from "../consts";
3
3
  export * from './useResizeObserver';
4
4
  export * from './useValidate';
5
5
  export * from './useGroup';
@@ -38,4 +38,7 @@ export var useFormItemError = function useFormItemError() {
38
38
  };
39
39
  export var useTableFullScreen = function useTableFullScreen() {
40
40
  return inject(FULL_SCREEN);
41
+ };
42
+ export var useHScroll = function useHScroll() {
43
+ return inject(TABLE_H_SCROLL);
41
44
  };
@@ -40,7 +40,7 @@ export var bodyProps = function bodyProps() {
40
40
  },
41
41
  cellHeight: {
42
42
  type: Number,
43
- default: 50
43
+ default: 65
44
44
  },
45
45
  height: {
46
46
  type: Number,
@@ -17,6 +17,7 @@
17
17
  flex-shrink: 0;
18
18
  background: #fafafa;
19
19
  transition: background-color 0.3s ease;
20
+ overflow: auto hidden;
20
21
  }
21
22
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
22
23
  overflow: hidden;
@@ -31,6 +32,17 @@
31
32
  flex: 1 1 auto;
32
33
  flex-direction: row;
33
34
  }
35
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll {
36
+ width: 100%;
37
+ height: 15px;
38
+ min-height: 15px;
39
+ max-height: 15px;
40
+ display: flex;
41
+ }
42
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll .jetlinks-table-horizontal-scroll-bar {
43
+ height: 100%;
44
+ overflow-x: scroll;
45
+ }
34
46
  .jetlinks-edit-table-body-viewport {
35
47
  max-height: 100%;
36
48
  width: 100%;
@@ -14,6 +14,7 @@
14
14
  flex-shrink: 0;
15
15
  background: #fafafa;
16
16
  transition: background-color .3s ease;
17
+ overflow: auto hidden;
17
18
 
18
19
  .jetlinks-edit-table-header {
19
20
  overflow: hidden;
@@ -29,5 +30,18 @@
29
30
  flex: 1 1 auto;
30
31
  flex-direction: row;
31
32
  }
33
+
34
+ .jetlinks-table-horizontal-scroll {
35
+ width: 100%;
36
+ height: 15px;
37
+ min-height: 15px;
38
+ max-height: 15px;
39
+ display: flex;
40
+
41
+ .jetlinks-table-horizontal-scroll-bar {
42
+ height: 100%;
43
+ overflow-x: scroll;
44
+ }
45
+ }
32
46
  }
33
47
  }
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1744627832838"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1744797583796"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
25
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1744627839108"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1744797585097"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
package/es/Search/Item.js CHANGED
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
82
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
83
- const _withScopeId = n => (_pushScopeId("data-v-1744627835608"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1744797584295"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -4841,6 +4841,7 @@ span.ant-radio + * {
4841
4841
  flex-shrink: 0;
4842
4842
  background: #fafafa;
4843
4843
  transition: background-color 0.3s ease;
4844
+ overflow: auto hidden;
4844
4845
  }
4845
4846
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
4846
4847
  overflow: hidden;
@@ -4855,6 +4856,17 @@ span.ant-radio + * {
4855
4856
  flex: 1 1 auto;
4856
4857
  flex-direction: row;
4857
4858
  }
4859
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll {
4860
+ width: 100%;
4861
+ height: 15px;
4862
+ min-height: 15px;
4863
+ max-height: 15px;
4864
+ display: flex;
4865
+ }
4866
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll .jetlinks-table-horizontal-scroll-bar {
4867
+ height: 100%;
4868
+ overflow-x: scroll;
4869
+ }
4858
4870
  .jetlinks-edit-table-body-viewport {
4859
4871
  max-height: 100%;
4860
4872
  width: 100%;
@@ -16,8 +16,10 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
16
16
  } return value; }
17
17
  /* Analyzed bindings: {
18
18
  "groupKey": "props",
19
+ "width": "props",
19
20
  "readonly": "props",
20
21
  "ContextMenu": "setup-maybe-ref",
22
+ "useHScroll": "setup-maybe-ref",
21
23
  "useRightMenuContext": "setup-maybe-ref",
22
24
  "randomString": "setup-maybe-ref",
23
25
  "bodyProps": "setup-maybe-ref",
@@ -37,6 +39,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
37
39
  "virtualRang": "setup-reactive-const",
38
40
  "containerStyle": "setup-ref",
39
41
  "context": "setup-maybe-ref",
42
+ "hScroll": "setup-maybe-ref",
40
43
  "scrollLock": "setup-let",
41
44
  "menuInstance": "setup-let",
42
45
  "maxLen": "setup-ref",
@@ -48,7 +51,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
48
51
  "rowClick": "setup-const",
49
52
  "updateSelectedKeys": "setup-const"
50
53
  } */
51
- import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, createBlock as _createBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createVNode as _createVNode } from "vue";
54
+ import { normalizeStyle as _normalizeStyle, createElementVNode as _createElementVNode, unref as _unref, renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, renderSlot as _renderSlot, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, createCommentVNode as _createCommentVNode, createBlock as _createBlock, withModifiers as _withModifiers, normalizeClass as _normalizeClass, createVNode as _createVNode } from "vue";
52
55
  const _hoisted_1 = { style: { position: 'relative' } };
53
56
  const _hoisted_2 = ["data-row-key", "onContextmenu", "onClick"];
54
57
  const _hoisted_3 = {
@@ -65,7 +68,7 @@ const _hoisted_5 = {
65
68
  };
66
69
  const _hoisted_6 = { class: "jetlinks-edit-table-body-empty" };
67
70
  import ContextMenu from './components/ContextMenu';
68
- import { useRightMenuContext } from "./hooks";
71
+ import { useHScroll, useRightMenuContext } from "./hooks";
69
72
  import { randomString } from "@jetlinks-web/utils";
70
73
  import { bodyProps } from "./props";
71
74
  import { ref, reactive, computed, watch, onMounted, onBeforeUnmount, nextTick } from 'vue';
@@ -80,6 +83,9 @@ const __sfc_main__ = Object.assign({
80
83
  type: [String, Number],
81
84
  default: undefined
82
85
  },
86
+ width: {
87
+ type: Number
88
+ },
83
89
  readonly: {
84
90
  type: Boolean,
85
91
  default: false
@@ -97,6 +103,7 @@ const __sfc_main__ = Object.assign({
97
103
  });
98
104
  const containerStyle = ref(0);
99
105
  const context = useRightMenuContext();
106
+ const hScroll = useHScroll();
100
107
  let scrollLock = ref(false);
101
108
  let menuInstance;
102
109
  const maxLen = computed(() => {
@@ -106,7 +113,7 @@ const __sfc_main__ = Object.assign({
106
113
  const virtualData = computed(() => {
107
114
  const array = props.dataSource.slice(virtualRang.start, virtualRang.end);
108
115
  if (tableCenterRef.value) {
109
- tableCenterRef.value.style.webkitTransform = `translate3d(0, ${virtualRang.start * props.cellHeight}px, 0)`;
116
+ // tableCenterRef.value.style.webkitTransform = `translateY(${virtualRang.start * props.cellHeight}px)`
110
117
  }
111
118
  return array;
112
119
  });
@@ -217,7 +224,11 @@ const __sfc_main__ = Object.assign({
217
224
  _createElementVNode("div", {
218
225
  class: "jetlinks-edit-table-center",
219
226
  ref_key: "tableCenterRef",
220
- ref: tableCenterRef
227
+ ref: tableCenterRef,
228
+ style: _normalizeStyle({
229
+ transform: `translate3d(-${_unref(hScroll) || 0}px, ${virtualRang.start * _ctx.cellHeight}px, 0)`,
230
+ width: __props.width + 'px'
231
+ })
221
232
  }, [
222
233
  (virtualData.value.length)
223
234
  ? (_openBlock(true), _createElementBlock(_Fragment, { key: 0 }, _renderList(virtualData.value, (item, index) => {
@@ -227,7 +238,10 @@ const __sfc_main__ = Object.assign({
227
238
  'jetlinks-edit-table-row-selected': _optionalChain([selectedRowKeys, 'access', _12 => _12.value, 'optionalAccess', _13 => _13.includes, 'call', _14 => _14(item[_ctx.rowKey] || virtualRang.start + index + 1)])
228
239
  }),
229
240
  key: `record_${item.__key}`,
230
- style: _normalizeStyle({ height: `${_ctx.cellHeight}px`, }),
241
+ style: _normalizeStyle({
242
+ height: `${_ctx.cellHeight}px`,
243
+ transform: `-${_unref(hScroll) || 0}px`
244
+ }),
231
245
  "data-row-key": item[_ctx.rowKey] || virtualRang.start + index + 1,
232
246
  onContextmenu: _withModifiers((e) => showContextMenu(e, item, virtualRang.start + index), ["right"]),
233
247
  onClick: _withModifiers(() => rowClick(item), ["stop"])
@@ -277,7 +291,7 @@ const __sfc_main__ = Object.assign({
277
291
  (__props.readonly)
278
292
  ? (_openBlock(), _createElementBlock("div", _hoisted_5))
279
293
  : _createCommentVNode("v-if", true)
280
- ], 512 /* NEED_PATCH */)
294
+ ], 4 /* STYLE */)
281
295
  ])
282
296
  ], 36 /* STYLE, NEED_HYDRATION */))
283
297
  : _renderSlot(_ctx.$slots, "empty", { key: 1 }, () => [
@@ -26,6 +26,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
26
26
  "TABLE_GROUP_ACTIVE": "setup-maybe-ref",
27
27
  "TABLE_GROUP_ERROR": "setup-maybe-ref",
28
28
  "TABLE_GROUP_OPTIONS": "setup-maybe-ref",
29
+ "TABLE_H_SCROLL": "setup-maybe-ref",
29
30
  "TABLE_OPEN_GROUP": "setup-maybe-ref",
30
31
  "TABLE_TOOL": "setup-maybe-ref",
31
32
  "TABLE_WRAPPER": "setup-maybe-ref",
@@ -58,7 +59,11 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
58
59
  "myColumns": "setup-ref",
59
60
  "tableWrapper": "setup-ref",
60
61
  "tableBody": "setup-ref",
62
+ "scrollBarRef": "setup-ref",
61
63
  "tableStyle": "setup-reactive-const",
64
+ "showScroll": "setup-ref",
65
+ "horizontalScrollWidth": "setup-ref",
66
+ "horizontalScrollLeft": "setup-ref",
62
67
  "fields": "setup-const",
63
68
  "defaultGroupId": "literal-const",
64
69
  "fieldsErrMap": "setup-ref",
@@ -94,12 +99,18 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
94
99
  "getTableWrapperRef": "setup-const",
95
100
  "groupDelete": "setup-const",
96
101
  "groupEdit": "setup-const",
97
- "getGroupActive": "setup-const"
102
+ "getGroupActive": "setup-const",
103
+ "onHorizontalScroll": "setup-const"
98
104
  } */
99
- import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, normalizeClass as _normalizeClass, createElementBlock as _createElementBlock } from "vue";
105
+ import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, createVNode as _createVNode, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, withCtx as _withCtx, renderList as _renderList, createSlots as _createSlots, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, normalizeClass as _normalizeClass } from "vue";
100
106
  const _hoisted_1 = { class: "jetlinks-edit-table-extra" };
101
107
  const _hoisted_2 = { class: "jetlinks-edit-table" };
102
- import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_GROUP_ACTIVE, TABLE_GROUP_ERROR, TABLE_GROUP_OPTIONS, TABLE_OPEN_GROUP, TABLE_TOOL, TABLE_WRAPPER } from './consts';
108
+ const _hoisted_3 = {
109
+ key: 0,
110
+ class: "jetlinks-table-horizontal-scroll"
111
+ };
112
+ const _hoisted_4 = /*#__PURE__*/ _createElementVNode("div", { style: { "width": "15px", "height": "100%", "overflow-x": "hidden" } }, null, -1 /* HOISTED */);
113
+ import { FULL_SCREEN, RIGHT_MENU, TABLE_DATA_SOURCE, TABLE_ERROR, TABLE_GROUP_ACTIVE, TABLE_GROUP_ERROR, TABLE_GROUP_OPTIONS, TABLE_H_SCROLL, TABLE_OPEN_GROUP, TABLE_TOOL, TABLE_WRAPPER } from './consts';
103
114
  import { handleColumnsWidth } from './utils';
104
115
  import { useGroup, useResizeObserver, useValidate } from './hooks';
105
116
  import { tableProps } from 'ant-design-vue/lib/table';
@@ -148,10 +159,14 @@ const __sfc_main__ = Object.assign({
148
159
  const myColumns = ref([]);
149
160
  const tableWrapper = ref();
150
161
  const tableBody = ref();
162
+ const scrollBarRef = ref();
151
163
  const tableStyle = reactive({
152
164
  width: '100%',
153
165
  height: props.height
154
166
  });
167
+ const showScroll = ref(false);
168
+ const horizontalScrollWidth = ref(0);
169
+ const horizontalScrollLeft = ref(0);
155
170
  const fields = {};
156
171
  const fieldsErrMap = ref({});
157
172
  const fieldsGroupError = ref({});
@@ -288,6 +303,7 @@ const __sfc_main__ = Object.assign({
288
303
  });
289
304
  provide(TABLE_GROUP_OPTIONS, groupOptions);
290
305
  provide(TABLE_GROUP_ACTIVE, groupActive);
306
+ provide(TABLE_H_SCROLL, horizontalScrollLeft);
291
307
  const addField = (key, field) => {
292
308
  fields[key] = field;
293
309
  };
@@ -322,11 +338,19 @@ const __sfc_main__ = Object.assign({
322
338
  }
323
339
  return customData.index + 1;
324
340
  },
325
- width: _optionalChain([props, 'access', _14 => _14.serial, 'optionalAccess', _15 => _15.width])
341
+ width: _optionalChain([props, 'access', _14 => _14.serial, 'optionalAccess', _15 => _15.width]),
342
+ fixed: 'left'
326
343
  };
327
344
  newColumns = [serial, ...props.columns];
328
345
  }
329
346
  myColumns.value = handleColumnsWidth(newColumns, tableStyle.width - scrollWidth.value);
347
+ horizontalScrollWidth.value = myColumns.value.reduce((prev, next) => {
348
+ prev += next.width;
349
+ return prev;
350
+ }, 0);
351
+ if (horizontalScrollWidth.value > tableStyle.width) {
352
+ showScroll.value = true;
353
+ }
330
354
  };
331
355
  function onResize({ width = 0 }) {
332
356
  const _width = width - scrollWidth.value;
@@ -372,6 +396,9 @@ const __sfc_main__ = Object.assign({
372
396
  const getGroupActive = () => {
373
397
  return groupActive.value;
374
398
  };
399
+ const onHorizontalScroll = (e) => {
400
+ horizontalScrollLeft.value = scrollBarRef.value.scrollLeft;
401
+ };
375
402
  watch(() => fieldsErrMap.value, (errorMap) => {
376
403
  fieldsGroupError.value = {};
377
404
  if (props.openGroup) {
@@ -448,7 +475,7 @@ const __sfc_main__ = Object.assign({
448
475
  _createVNode(Header, {
449
476
  columns: myColumns.value,
450
477
  searchColumns: __props.searchColumns,
451
- style: _normalizeStyle({ width: tableStyle.width })
478
+ style: _normalizeStyle({ width: tableStyle.width, transform: `translateX(-${horizontalScrollLeft.value}px)` })
452
479
  }, null, 8 /* PROPS */, ["columns", "searchColumns", "style"])
453
480
  ], 4 /* STYLE */),
454
481
  _createElementVNode("div", {
@@ -468,6 +495,7 @@ const __sfc_main__ = Object.assign({
468
495
  openGroup: _ctx.openGroup,
469
496
  rowSelection: _ctx.rowSelection,
470
497
  readonly: __props.readonly,
498
+ width: horizontalScrollWidth.value,
471
499
  onScrollDown: onScrollDown
472
500
  }, _createSlots({ _: 2 /* DYNAMIC */ }, [
473
501
  _renderList(_unref(slots), (_, name) => {
@@ -478,12 +506,32 @@ const __sfc_main__ = Object.assign({
478
506
  ])
479
507
  };
480
508
  })
481
- ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "cellHeight", "height", "disableMenu", "rowKey", "groupKey", "openGroup", "rowSelection", "readonly"]),
509
+ ]), 1032 /* PROPS, DYNAMIC_SLOTS */, ["dataSource", "columns", "cellHeight", "height", "disableMenu", "rowKey", "groupKey", "openGroup", "rowSelection", "readonly", "width"]),
482
510
  _renderSlot(_ctx.$slots, "bodyExtra")
483
511
  ], 4 /* STYLE */),
512
+ (showScroll.value)
513
+ ? (_openBlock(), _createElementBlock("div", _hoisted_3, [
514
+ _createElementVNode("div", {
515
+ class: "jetlinks-table-horizontal-scroll-bar",
516
+ ref_key: "scrollBarRef",
517
+ ref: scrollBarRef,
518
+ style: _normalizeStyle({
519
+ width: 'calc(100% - 15px)',
520
+ height: '100%',
521
+ overflowX: 'scroll'
522
+ }),
523
+ onScroll: onHorizontalScroll
524
+ }, [
525
+ _createElementVNode("div", {
526
+ style: _normalizeStyle({ minWidth: horizontalScrollWidth.value + 'px', maxWidth: horizontalScrollWidth.value + 'px', height: '100%' })
527
+ }, null, 4 /* STYLE */)
528
+ ], 36 /* STYLE, NEED_HYDRATION */),
529
+ _hoisted_4
530
+ ]))
531
+ : _createCommentVNode("v-if", true),
484
532
  (_ctx.dataSource.length && _ctx.openGroup)
485
533
  ? (_openBlock(), _createBlock(Group, {
486
- key: 0,
534
+ key: 1,
487
535
  activeKey: _unref(groupActive).value,
488
536
  "onUpdate:activeKey": _cache[0] || (_cache[0] = $event => ((_unref(groupActive).value) = $event)),
489
537
  options: _unref(groupOptions),
@@ -23,10 +23,12 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
23
23
  "Sort": "setup-maybe-ref",
24
24
  "reactive": "setup-const",
25
25
  "defineOptions": "setup-const",
26
+ "useHScroll": "setup-maybe-ref",
26
27
  "useTableTool": "setup-maybe-ref",
27
28
  "HeaderItemRender": "setup-const",
28
29
  "props": "setup-reactive-const",
29
30
  "tableTool": "setup-maybe-ref",
31
+ "hScroll": "setup-maybe-ref",
30
32
  "searchData": "setup-reactive-const",
31
33
  "showFilter": "setup-const",
32
34
  "sortClick": "setup-const"
@@ -46,7 +48,7 @@ const _hoisted_6 = {
46
48
  };
47
49
  import { SearchModal, Sort } from './components/Search';
48
50
  import { reactive, } from 'vue';
49
- import { useTableTool } from "./hooks";
51
+ import { useHScroll, useTableTool } from "./hooks";
50
52
  import HeaderItemRender from './HeaderRender.js';
51
53
  const __sfc_main__ = Object.assign({
52
54
  name: 'JEditTableHeader'
@@ -72,6 +74,7 @@ const __sfc_main__ = Object.assign({
72
74
  setup(__props) {
73
75
  const props = __props;
74
76
  const tableTool = useTableTool();
77
+ const hScroll = useHScroll();
75
78
  const searchData = reactive({
76
79
  visible: false,
77
80
  key: undefined
@@ -42,7 +42,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
42
42
  "onDesc": "setup-const"
43
43
  } */
44
44
  import { unref as _unref, toDisplayString as _toDisplayString, createElementVNode as _createElementVNode, resolveComponent as _resolveComponent, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, createTextVNode as _createTextVNode, withCtx as _withCtx, createVNode as _createVNode, normalizeClass as _normalizeClass, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
45
- const _withScopeId = n => (_pushScopeId("data-v-1744627839975"), n = n(), _popScopeId(), n);
45
+ const _withScopeId = n => (_pushScopeId("data-v-1744797585382"), n = n(), _popScopeId(), n);
46
46
  const _hoisted_1 = { class: "jetlinks-table-sort-content" };
47
47
  const _hoisted_2 = { class: "jetlinks-table-sort-title" };
48
48
  const _hoisted_3 = { class: "table-sort-body" };
@@ -3,7 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.TABLE_WRAPPER = exports.TABLE_TOOL = exports.TABLE_OPEN_GROUP = exports.TABLE_GROUP_OPTIONS = exports.TABLE_GROUP_ERROR = exports.TABLE_GROUP_ACTIVE = exports.TABLE_FORM_ITEM_ERROR = exports.TABLE_ERROR = exports.TABLE_DATA_SOURCE = exports.RIGHT_MENU = exports.METADATA_GROUP_OPTIONS = exports.FULL_SCREEN = void 0;
6
+ exports.TABLE_WRAPPER = exports.TABLE_TOOL = exports.TABLE_OPEN_GROUP = exports.TABLE_H_SCROLL = exports.TABLE_GROUP_OPTIONS = exports.TABLE_GROUP_ERROR = exports.TABLE_GROUP_ACTIVE = exports.TABLE_FORM_ITEM_ERROR = exports.TABLE_ERROR = exports.TABLE_DATA_SOURCE = exports.RIGHT_MENU = exports.METADATA_GROUP_OPTIONS = exports.FULL_SCREEN = void 0;
7
7
  var METADATA_GROUP_OPTIONS = exports.METADATA_GROUP_OPTIONS = Symbol('metadata-group-options');
8
8
  var TABLE_WRAPPER = exports.TABLE_WRAPPER = Symbol('table-wrapper');
9
9
  var FULL_SCREEN = exports.FULL_SCREEN = Symbol('full');
@@ -15,4 +15,5 @@ var TABLE_DATA_SOURCE = exports.TABLE_DATA_SOURCE = Symbol('table-data-source');
15
15
  var TABLE_OPEN_GROUP = exports.TABLE_OPEN_GROUP = Symbol('table-open-group');
16
16
  var TABLE_TOOL = exports.TABLE_TOOL = Symbol('table-tool');
17
17
  var TABLE_FORM_ITEM_ERROR = exports.TABLE_FORM_ITEM_ERROR = Symbol('table-form-item-error');
18
- var TABLE_GROUP_ACTIVE = exports.TABLE_GROUP_ACTIVE = Symbol('table-group-active');
18
+ var TABLE_GROUP_ACTIVE = exports.TABLE_GROUP_ACTIVE = Symbol('table-group-active');
19
+ var TABLE_H_SCROLL = exports.TABLE_H_SCROLL = Symbol('table-h-scroll');
@@ -12,9 +12,10 @@ var _exportNames = {
12
12
  useTableDataSource: true,
13
13
  useTableTool: true,
14
14
  useFormItemError: true,
15
- useTableFullScreen: true
15
+ useTableFullScreen: true,
16
+ useHScroll: true
16
17
  };
17
- exports.useTableWrapper = exports.useTableTool = exports.useTableFullScreen = exports.useTableDataSource = exports.useRightMenuContext = exports.useInjectForm = exports.useInjectError = exports.useFormItemError = exports.useFormContext = void 0;
18
+ exports.useTableWrapper = exports.useTableTool = exports.useTableFullScreen = exports.useTableDataSource = exports.useRightMenuContext = exports.useInjectForm = exports.useInjectError = exports.useHScroll = exports.useFormItemError = exports.useFormContext = void 0;
18
19
  var _vue = require("vue");
19
20
  var _consts = require("../consts");
20
21
  var _useResizeObserver = require("./useResizeObserver");
@@ -88,4 +89,7 @@ var useFormItemError = exports.useFormItemError = function useFormItemError() {
88
89
  };
89
90
  var useTableFullScreen = exports.useTableFullScreen = function useTableFullScreen() {
90
91
  return (0, _vue.inject)(_consts.FULL_SCREEN);
92
+ };
93
+ var useHScroll = exports.useHScroll = function useHScroll() {
94
+ return (0, _vue.inject)(_consts.TABLE_H_SCROLL);
91
95
  };
@@ -46,7 +46,7 @@ var bodyProps = exports.bodyProps = function bodyProps() {
46
46
  },
47
47
  cellHeight: {
48
48
  type: Number,
49
- default: 50
49
+ default: 65
50
50
  },
51
51
  height: {
52
52
  type: Number,
@@ -17,6 +17,7 @@
17
17
  flex-shrink: 0;
18
18
  background: #fafafa;
19
19
  transition: background-color 0.3s ease;
20
+ overflow: auto hidden;
20
21
  }
21
22
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
22
23
  overflow: hidden;
@@ -31,6 +32,17 @@
31
32
  flex: 1 1 auto;
32
33
  flex-direction: row;
33
34
  }
35
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll {
36
+ width: 100%;
37
+ height: 15px;
38
+ min-height: 15px;
39
+ max-height: 15px;
40
+ display: flex;
41
+ }
42
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll .jetlinks-table-horizontal-scroll-bar {
43
+ height: 100%;
44
+ overflow-x: scroll;
45
+ }
34
46
  .jetlinks-edit-table-body-viewport {
35
47
  max-height: 100%;
36
48
  width: 100%;
@@ -14,6 +14,7 @@
14
14
  flex-shrink: 0;
15
15
  background: #fafafa;
16
16
  transition: background-color .3s ease;
17
+ overflow: auto hidden;
17
18
 
18
19
  .jetlinks-edit-table-header {
19
20
  overflow: hidden;
@@ -29,5 +30,18 @@
29
30
  flex: 1 1 auto;
30
31
  flex-direction: row;
31
32
  }
33
+
34
+ .jetlinks-table-horizontal-scroll {
35
+ width: 100%;
36
+ height: 15px;
37
+ min-height: 15px;
38
+ max-height: 15px;
39
+ display: flex;
40
+
41
+ .jetlinks-table-horizontal-scroll-bar {
42
+ height: 100%;
43
+ overflow-x: scroll;
44
+ }
45
+ }
32
46
  }
33
47
  }
@@ -9,7 +9,7 @@
9
9
  } */
10
10
  import { defineComponent as _defineComponent } from 'vue';
11
11
  import { unref as _unref, renderSlot as _renderSlot, createElementVNode as _createElementVNode, normalizeStyle as _normalizeStyle, openBlock as _openBlock, createElementBlock as _createElementBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
12
- const _withScopeId = n => (_pushScopeId("data-v-1744627832852"), n = n(), _popScopeId(), n);
12
+ const _withScopeId = n => (_pushScopeId("data-v-1744797583803"), n = n(), _popScopeId(), n);
13
13
  const _hoisted_1 = { class: "full-page-warp-content" };
14
14
  import { ref, inject } from 'vue';
15
15
  import { useElementBounding } from '@vueuse/core';
@@ -23,7 +23,7 @@
23
23
  } */
24
24
  import { defineComponent as _defineComponent } from 'vue';
25
25
  import { unref as _unref, createVNode as _createVNode, withCtx as _withCtx, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, createBlock as _createBlock, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
26
- const _withScopeId = n => (_pushScopeId("data-v-1744627839173"), n = n(), _popScopeId(), n);
26
+ const _withScopeId = n => (_pushScopeId("data-v-1744797585115"), n = n(), _popScopeId(), n);
27
27
  const _hoisted_1 = {
28
28
  key: 0,
29
29
  style: { "width": "240px" }
@@ -80,7 +80,7 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
80
80
  } */
81
81
  import { defineComponent as _defineComponent } from 'vue';
82
82
  import { unref as _unref, openBlock as _openBlock, createBlock as _createBlock, createCommentVNode as _createCommentVNode, toDisplayString as _toDisplayString, createElementBlock as _createElementBlock, createVNode as _createVNode, Fragment as _Fragment, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, resolveDynamicComponent as _resolveDynamicComponent, withCtx as _withCtx, createElementVNode as _createElementVNode, pushScopeId as _pushScopeId, popScopeId as _popScopeId } from "vue";
83
- const _withScopeId = n => (_pushScopeId("data-v-1744627835796"), n = n(), _popScopeId(), n);
83
+ const _withScopeId = n => (_pushScopeId("data-v-1744797584354"), n = n(), _popScopeId(), n);
84
84
  const _hoisted_1 = { class: "JSearch-item" };
85
85
  const _hoisted_2 = {
86
86
  key: 0,
@@ -4841,6 +4841,7 @@ span.ant-radio + * {
4841
4841
  flex-shrink: 0;
4842
4842
  background: #fafafa;
4843
4843
  transition: background-color 0.3s ease;
4844
+ overflow: auto hidden;
4844
4845
  }
4845
4846
  .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-edit-table-header {
4846
4847
  overflow: hidden;
@@ -4855,6 +4856,17 @@ span.ant-radio + * {
4855
4856
  flex: 1 1 auto;
4856
4857
  flex-direction: row;
4857
4858
  }
4859
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll {
4860
+ width: 100%;
4861
+ height: 15px;
4862
+ min-height: 15px;
4863
+ max-height: 15px;
4864
+ display: flex;
4865
+ }
4866
+ .jetlinks-edit-table-wrapper .jetlinks-edit-table .jetlinks-table-horizontal-scroll .jetlinks-table-horizontal-scroll-bar {
4867
+ height: 100%;
4868
+ overflow-x: scroll;
4869
+ }
4858
4870
  .jetlinks-edit-table-body-viewport {
4859
4871
  max-height: 100%;
4860
4872
  width: 100%;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@jetlinks-web/components",
3
- "version": "2.6.10",
3
+ "version": "2.6.12",
4
4
  "description": "",
5
5
  "main": "lib/index.js",
6
6
  "module": "es/index.js",
@@ -159,8 +159,8 @@
159
159
  "webpack-merge": "^5.0.0",
160
160
  "webpackbar": "^5.0.2",
161
161
  "@jetlinks-web/constants": "^1.0.9",
162
- "@jetlinks-web/hooks": "^1.0.25",
163
- "@jetlinks-web/utils": "^1.2.9"
162
+ "@jetlinks-web/utils": "^1.2.9",
163
+ "@jetlinks-web/hooks": "^1.0.25"
164
164
  },
165
165
  "publishConfig": {
166
166
  "registry": "https://registry.npmjs.org/",