@jetlinks-web/components 2.6.27 → 2.6.28
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/es/EditTable/components/Search/sort.js +1 -1
- package/es/FullPage/FullPage.js +1 -1
- package/es/ProTable/Content.js +66 -13
- package/es/ProTable/style/ProTable.less +4 -1
- package/es/Search/Advanced/SaveHistory.js +1 -1
- package/es/Search/Item.js +1 -1
- package/es/locale/en-US.js +3 -0
- package/es/locale/zh-CN.js +3 -0
- package/es/style/index.css +4 -1
- package/lib/EditTable/components/Search/sort.js +1 -1
- package/lib/FullPage/FullPage.js +1 -1
- package/lib/ProTable/Content.js +66 -13
- package/lib/ProTable/style/ProTable.less +4 -1
- package/lib/Search/Advanced/SaveHistory.js +1 -1
- package/lib/Search/Item.js +1 -1
- package/lib/locale/en-US.js +3 -0
- package/lib/locale/zh-CN.js +3 -0
- package/lib/style/index.css +4 -1
- package/package.json +3 -3
|
@@ -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-
|
|
45
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154724514"), 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" };
|
package/es/FullPage/FullPage.js
CHANGED
|
@@ -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-
|
|
12
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154722160"), 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';
|
package/es/ProTable/Content.js
CHANGED
|
@@ -23,22 +23,36 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
23
23
|
"get": "setup-maybe-ref",
|
|
24
24
|
"omit": "setup-maybe-ref",
|
|
25
25
|
"Empty": "setup-maybe-ref",
|
|
26
|
+
"useTableInject": "setup-maybe-ref",
|
|
27
|
+
"useLocaleReceiver": "setup-maybe-ref",
|
|
26
28
|
"props": "setup-reactive-const",
|
|
27
29
|
"slots": "setup-maybe-ref",
|
|
30
|
+
"contextLocale": "setup-maybe-ref",
|
|
31
|
+
"_rowSelection": "setup-maybe-ref",
|
|
28
32
|
"_columns": "setup-ref",
|
|
29
33
|
"_slots": "setup-ref",
|
|
30
34
|
"_scroll": "setup-ref",
|
|
31
|
-
"gridTemplateColumns": "setup-ref"
|
|
35
|
+
"gridTemplateColumns": "setup-ref",
|
|
36
|
+
"__rowSelection": "setup-ref",
|
|
37
|
+
"indeterminate": "setup-ref",
|
|
38
|
+
"checkedAll": "setup-ref",
|
|
39
|
+
"onClick": "setup-const",
|
|
40
|
+
"handleCheckedAllChange": "setup-const"
|
|
32
41
|
} */
|
|
33
42
|
import { defineComponent as _defineComponent } from 'vue';
|
|
34
|
-
import {
|
|
43
|
+
import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, createSlots as _createSlots, createBlock as _createBlock } from "vue";
|
|
35
44
|
const _hoisted_1 = { class: "jtable-box" };
|
|
36
45
|
const _hoisted_2 = {
|
|
37
46
|
key: 0,
|
|
38
47
|
class: "jtable-card"
|
|
39
48
|
};
|
|
40
49
|
const _hoisted_3 = {
|
|
41
|
-
key:
|
|
50
|
+
key: 0,
|
|
51
|
+
style: { "margin-bottom": "10px" }
|
|
52
|
+
};
|
|
53
|
+
const _hoisted_4 = ["onClick"];
|
|
54
|
+
const _hoisted_5 = {
|
|
55
|
+
key: 2,
|
|
42
56
|
class: "j-table-empty"
|
|
43
57
|
};
|
|
44
58
|
import { useSlots, computed } from 'vue';
|
|
@@ -46,6 +60,8 @@ import { _contentProps } from "./setting";
|
|
|
46
60
|
import { Table } from 'ant-design-vue/es/';
|
|
47
61
|
import { get, omit } from 'lodash-es';
|
|
48
62
|
import Empty from '../Empty';
|
|
63
|
+
import { useTableInject } from './hooks';
|
|
64
|
+
import { useLocaleReceiver } from "../LocaleReciver";
|
|
49
65
|
const __sfc_main__ = _defineComponent({
|
|
50
66
|
...{
|
|
51
67
|
name: 'Content'
|
|
@@ -60,6 +76,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
60
76
|
setup(__props) {
|
|
61
77
|
const props = __props;
|
|
62
78
|
const slots = useSlots();
|
|
79
|
+
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
80
|
+
const _rowSelection = useTableInject();
|
|
63
81
|
const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
|
|
64
82
|
const _slots = computed(() => {
|
|
65
83
|
return omit(slots, ['emptyText', 'bodyCell']);
|
|
@@ -79,47 +97,82 @@ const __sfc_main__ = _defineComponent({
|
|
|
79
97
|
const gridTemplateColumns = computed(() => {
|
|
80
98
|
return `repeat(${props.column}, 1fr)`;
|
|
81
99
|
});
|
|
100
|
+
const __rowSelection = computed(() => {
|
|
101
|
+
return props.rowSelection || _optionalChain([_rowSelection, 'optionalAccess', _3 => _3.value]);
|
|
102
|
+
});
|
|
103
|
+
const indeterminate = computed(() => {
|
|
104
|
+
return _optionalChain([__rowSelection, 'access', _4 => _4.value, 'optionalAccess', _5 => _5.selectedRowKeys, 'optionalAccess', _6 => _6.length]) > 0 && _optionalChain([__rowSelection, 'access', _7 => _7.value, 'optionalAccess', _8 => _8.selectedRowKeys, 'optionalAccess', _9 => _9.length]) < props.dataSource.length;
|
|
105
|
+
});
|
|
106
|
+
const checkedAll = computed(() => {
|
|
107
|
+
return _optionalChain([__rowSelection, 'access', _10 => _10.value, 'optionalAccess', _11 => _11.selectedRowKeys, 'optionalAccess', _12 => _12.length]) > 0 && _optionalChain([__rowSelection, 'access', _13 => _13.value, 'optionalAccess', _14 => _14.selectedRowKeys, 'optionalAccess', _15 => _15.length]) === props.dataSource.length;
|
|
108
|
+
});
|
|
109
|
+
const onClick = (item) => {
|
|
110
|
+
if (_rowSelection && _rowSelection.value) {
|
|
111
|
+
const _selected = _optionalChain([_rowSelection, 'access', _16 => _16.value, 'access', _17 => _17.selectedRowKeys, 'optionalAccess', _18 => _18.includes, 'call', _19 => _19(item[props.rowKey])]);
|
|
112
|
+
_optionalChain([_rowSelection, 'access', _20 => _20.value, 'access', _21 => _21.onSelect, 'optionalCall', _22 => _22(item, !_selected)]);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const handleCheckedAllChange = (e) => {
|
|
116
|
+
const flag = e.target.checked;
|
|
117
|
+
_optionalChain([__rowSelection, 'access', _23 => _23.value, 'optionalAccess', _24 => _24.onSelectAll, 'optionalCall', _25 => _25(flag, props.dataSource, props.dataSource)]);
|
|
118
|
+
};
|
|
82
119
|
return (_ctx, _cache) => {
|
|
120
|
+
const _component_a_checkbox = _resolveComponent("a-checkbox");
|
|
83
121
|
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
84
122
|
(_ctx.mode === 'CARD')
|
|
85
123
|
? (_openBlock(), _createElementBlock("div", _hoisted_2, [
|
|
124
|
+
(__rowSelection.value && __rowSelection.value.type === 'checkbox')
|
|
125
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_3, [
|
|
126
|
+
_createVNode(_component_a_checkbox, {
|
|
127
|
+
indeterminate: indeterminate.value,
|
|
128
|
+
checked: checkedAll.value,
|
|
129
|
+
onChange: handleCheckedAllChange
|
|
130
|
+
}, {
|
|
131
|
+
default: _withCtx(() => [
|
|
132
|
+
_createTextVNode(_toDisplayString(_unref(contextLocale).select.all), 1 /* TEXT */)
|
|
133
|
+
]),
|
|
134
|
+
_: 1 /* STABLE */
|
|
135
|
+
}, 8 /* PROPS */, ["indeterminate", "checked"])
|
|
136
|
+
]))
|
|
137
|
+
: _createCommentVNode("v-if", true),
|
|
86
138
|
(_ctx.dataSource.length)
|
|
87
139
|
? (_openBlock(), _createElementBlock("div", {
|
|
88
|
-
key:
|
|
140
|
+
key: 1,
|
|
89
141
|
class: "jtable-card-items",
|
|
90
142
|
style: _normalizeStyle({ gridTemplateColumns: gridTemplateColumns.value })
|
|
91
143
|
}, [
|
|
92
144
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
|
|
93
145
|
return (_openBlock(), _createElementBlock("div", {
|
|
94
146
|
class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
|
|
95
|
-
key: item[props.rowKey]
|
|
147
|
+
key: item[props.rowKey],
|
|
148
|
+
onClick: ($event) => (onClick(item))
|
|
96
149
|
}, [
|
|
97
150
|
_renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
|
|
98
|
-
],
|
|
151
|
+
], 10 /* CLASS, PROPS */, _hoisted_4));
|
|
99
152
|
}), 128 /* KEYED_FRAGMENT */))
|
|
100
153
|
], 4 /* STYLE */))
|
|
101
|
-
: (_openBlock(), _createElementBlock("div",
|
|
154
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_5, [
|
|
102
155
|
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
103
156
|
_createVNode(_unref(Empty))
|
|
104
157
|
])
|
|
105
158
|
]))
|
|
106
159
|
]))
|
|
107
160
|
: (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
|
|
108
|
-
"row-selection":
|
|
161
|
+
"row-selection": __rowSelection.value,
|
|
109
162
|
dataSource: _ctx.dataSource,
|
|
110
163
|
columns: _columns.value,
|
|
111
164
|
pagination: false,
|
|
112
165
|
scroll: _scroll.value,
|
|
113
|
-
class: { 'j-table-scroll': !_optionalChain([props, 'access',
|
|
166
|
+
class: { 'j-table-scroll': !_optionalChain([props, 'access', _26 => _26.scroll, 'optionalAccess', _27 => _27.y]) }
|
|
114
167
|
}), _createSlots({
|
|
115
168
|
bodyCell: _withCtx(({ column, record, index }) => [
|
|
116
|
-
((_optionalChain([column, 'optionalAccess',
|
|
117
|
-
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess',
|
|
169
|
+
((_optionalChain([column, 'optionalAccess', _28 => _28.key]) || _optionalChain([column, 'optionalAccess', _29 => _29.dataIndex])) && _optionalChain([column, 'optionalAccess', _30 => _30.scopedSlots]) && (_optionalChain([_slots, 'access', _31 => _31.value, 'optionalAccess', _32 => _32[_optionalChain([column, 'optionalAccess', _33 => _33.dataIndex])]]) || _optionalChain([_slots, 'access', _34 => _34.value, 'optionalAccess', _35 => _35[_optionalChain([column, 'optionalAccess', _36 => _36.key])]])))
|
|
170
|
+
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _37 => _37.key]) || _optionalChain([column, 'optionalAccess', _38 => _38.dataIndex]), _mergeProps({ key: 0 }, record, {
|
|
118
171
|
index: index,
|
|
119
172
|
column: column
|
|
120
173
|
}))
|
|
121
174
|
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
122
|
-
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess',
|
|
175
|
+
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _39 => _39.dataIndex]) || _optionalChain([column, 'optionalAccess', _40 => _40.key])) || '--'), 1 /* TEXT */)
|
|
123
176
|
], 64 /* STABLE_FRAGMENT */))
|
|
124
177
|
]),
|
|
125
178
|
emptyText: _withCtx(() => [
|
|
@@ -133,7 +186,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
133
186
|
return {
|
|
134
187
|
name: slotKey,
|
|
135
188
|
fn: _withCtx((slotProps) => [
|
|
136
|
-
(!((_optionalChain([__props, 'access',
|
|
189
|
+
(!((_optionalChain([__props, 'access', _41 => _41.column, 'optionalAccess', _42 => _42.key]) || _optionalChain([__props, 'access', _43 => _43.column, 'optionalAccess', _44 => _44.dataIndex])) && _optionalChain([__props, 'access', _45 => _45.column, 'optionalAccess', _46 => _46.scopedSlots]) && (_optionalChain([_slots, 'access', _47 => _47.value, 'optionalAccess', _48 => _48[_optionalChain([__props, 'access', _49 => _49.column, 'optionalAccess', _50 => _50.dataIndex])]]) || _optionalChain([_slots, 'access', _51 => _51.value, 'optionalAccess', _52 => _52[_optionalChain([__props, 'access', _53 => _53.column, 'optionalAccess', _54 => _54.key])]]))))
|
|
137
190
|
? _renderSlot(_ctx.$slots, slotKey, _normalizeProps(_mergeProps({ key: 0 }, slotProps)))
|
|
138
191
|
: _createCommentVNode("v-if", true)
|
|
139
192
|
])
|
|
@@ -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-
|
|
26
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154724391"), 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-
|
|
83
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154723815"), n = n(), _popScopeId(), n);
|
|
84
84
|
const _hoisted_1 = { class: "JSearch-item" };
|
|
85
85
|
const _hoisted_2 = {
|
|
86
86
|
key: 0,
|
package/es/locale/en-US.js
CHANGED
package/es/locale/zh-CN.js
CHANGED
package/es/style/index.css
CHANGED
|
@@ -4512,9 +4512,12 @@ span.ant-radio + * {
|
|
|
4512
4512
|
}
|
|
4513
4513
|
.jtable-box .jtable-card {
|
|
4514
4514
|
height: 100%;
|
|
4515
|
-
|
|
4515
|
+
display: flex;
|
|
4516
|
+
flex-direction: column;
|
|
4516
4517
|
}
|
|
4517
4518
|
.jtable-box .jtable-card .jtable-card-items {
|
|
4519
|
+
height: 100%;
|
|
4520
|
+
overflow-y: auto;
|
|
4518
4521
|
display: grid;
|
|
4519
4522
|
grid-gap: 26px;
|
|
4520
4523
|
}
|
|
@@ -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-
|
|
45
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154724497"), 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" };
|
package/lib/FullPage/FullPage.js
CHANGED
|
@@ -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-
|
|
12
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154721895"), 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';
|
package/lib/ProTable/Content.js
CHANGED
|
@@ -23,22 +23,36 @@ function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]
|
|
|
23
23
|
"get": "setup-maybe-ref",
|
|
24
24
|
"omit": "setup-maybe-ref",
|
|
25
25
|
"Empty": "setup-maybe-ref",
|
|
26
|
+
"useTableInject": "setup-maybe-ref",
|
|
27
|
+
"useLocaleReceiver": "setup-maybe-ref",
|
|
26
28
|
"props": "setup-reactive-const",
|
|
27
29
|
"slots": "setup-maybe-ref",
|
|
30
|
+
"contextLocale": "setup-maybe-ref",
|
|
31
|
+
"_rowSelection": "setup-maybe-ref",
|
|
28
32
|
"_columns": "setup-ref",
|
|
29
33
|
"_slots": "setup-ref",
|
|
30
34
|
"_scroll": "setup-ref",
|
|
31
|
-
"gridTemplateColumns": "setup-ref"
|
|
35
|
+
"gridTemplateColumns": "setup-ref",
|
|
36
|
+
"__rowSelection": "setup-ref",
|
|
37
|
+
"indeterminate": "setup-ref",
|
|
38
|
+
"checkedAll": "setup-ref",
|
|
39
|
+
"onClick": "setup-const",
|
|
40
|
+
"handleCheckedAllChange": "setup-const"
|
|
32
41
|
} */
|
|
33
42
|
import { defineComponent as _defineComponent } from 'vue';
|
|
34
|
-
import {
|
|
43
|
+
import { unref as _unref, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, resolveComponent as _resolveComponent, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode, renderList as _renderList, Fragment as _Fragment, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, mergeProps as _mergeProps, createSlots as _createSlots, createBlock as _createBlock } from "vue";
|
|
35
44
|
const _hoisted_1 = { class: "jtable-box" };
|
|
36
45
|
const _hoisted_2 = {
|
|
37
46
|
key: 0,
|
|
38
47
|
class: "jtable-card"
|
|
39
48
|
};
|
|
40
49
|
const _hoisted_3 = {
|
|
41
|
-
key:
|
|
50
|
+
key: 0,
|
|
51
|
+
style: { "margin-bottom": "10px" }
|
|
52
|
+
};
|
|
53
|
+
const _hoisted_4 = ["onClick"];
|
|
54
|
+
const _hoisted_5 = {
|
|
55
|
+
key: 2,
|
|
42
56
|
class: "j-table-empty"
|
|
43
57
|
};
|
|
44
58
|
import { useSlots, computed } from 'vue';
|
|
@@ -46,6 +60,8 @@ import { _contentProps } from "./setting";
|
|
|
46
60
|
import { Table } from 'ant-design-vue/lib/';
|
|
47
61
|
import { get, omit } from 'lodash-es';
|
|
48
62
|
import Empty from '../Empty';
|
|
63
|
+
import { useTableInject } from './hooks';
|
|
64
|
+
import { useLocaleReceiver } from "../LocaleReciver";
|
|
49
65
|
const __sfc_main__ = _defineComponent({
|
|
50
66
|
...{
|
|
51
67
|
name: 'Content'
|
|
@@ -60,6 +76,8 @@ const __sfc_main__ = _defineComponent({
|
|
|
60
76
|
setup(__props) {
|
|
61
77
|
const props = __props;
|
|
62
78
|
const slots = useSlots();
|
|
79
|
+
const [contextLocale] = useLocaleReceiver('ProTable');
|
|
80
|
+
const _rowSelection = useTableInject();
|
|
63
81
|
const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
|
|
64
82
|
const _slots = computed(() => {
|
|
65
83
|
return omit(slots, ['emptyText', 'bodyCell']);
|
|
@@ -79,47 +97,82 @@ const __sfc_main__ = _defineComponent({
|
|
|
79
97
|
const gridTemplateColumns = computed(() => {
|
|
80
98
|
return `repeat(${props.column}, 1fr)`;
|
|
81
99
|
});
|
|
100
|
+
const __rowSelection = computed(() => {
|
|
101
|
+
return props.rowSelection || _optionalChain([_rowSelection, 'optionalAccess', _3 => _3.value]);
|
|
102
|
+
});
|
|
103
|
+
const indeterminate = computed(() => {
|
|
104
|
+
return _optionalChain([__rowSelection, 'access', _4 => _4.value, 'optionalAccess', _5 => _5.selectedRowKeys, 'optionalAccess', _6 => _6.length]) > 0 && _optionalChain([__rowSelection, 'access', _7 => _7.value, 'optionalAccess', _8 => _8.selectedRowKeys, 'optionalAccess', _9 => _9.length]) < props.dataSource.length;
|
|
105
|
+
});
|
|
106
|
+
const checkedAll = computed(() => {
|
|
107
|
+
return _optionalChain([__rowSelection, 'access', _10 => _10.value, 'optionalAccess', _11 => _11.selectedRowKeys, 'optionalAccess', _12 => _12.length]) > 0 && _optionalChain([__rowSelection, 'access', _13 => _13.value, 'optionalAccess', _14 => _14.selectedRowKeys, 'optionalAccess', _15 => _15.length]) === props.dataSource.length;
|
|
108
|
+
});
|
|
109
|
+
const onClick = (item) => {
|
|
110
|
+
if (_rowSelection && _rowSelection.value) {
|
|
111
|
+
const _selected = _optionalChain([_rowSelection, 'access', _16 => _16.value, 'access', _17 => _17.selectedRowKeys, 'optionalAccess', _18 => _18.includes, 'call', _19 => _19(item[props.rowKey])]);
|
|
112
|
+
_optionalChain([_rowSelection, 'access', _20 => _20.value, 'access', _21 => _21.onSelect, 'optionalCall', _22 => _22(item, !_selected)]);
|
|
113
|
+
}
|
|
114
|
+
};
|
|
115
|
+
const handleCheckedAllChange = (e) => {
|
|
116
|
+
const flag = e.target.checked;
|
|
117
|
+
_optionalChain([__rowSelection, 'access', _23 => _23.value, 'optionalAccess', _24 => _24.onSelectAll, 'optionalCall', _25 => _25(flag, props.dataSource, props.dataSource)]);
|
|
118
|
+
};
|
|
82
119
|
return (_ctx, _cache) => {
|
|
120
|
+
const _component_a_checkbox = _resolveComponent("a-checkbox");
|
|
83
121
|
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
84
122
|
(_ctx.mode === 'CARD')
|
|
85
123
|
? (_openBlock(), _createElementBlock("div", _hoisted_2, [
|
|
124
|
+
(__rowSelection.value && __rowSelection.value.type === 'checkbox')
|
|
125
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_3, [
|
|
126
|
+
_createVNode(_component_a_checkbox, {
|
|
127
|
+
indeterminate: indeterminate.value,
|
|
128
|
+
checked: checkedAll.value,
|
|
129
|
+
onChange: handleCheckedAllChange
|
|
130
|
+
}, {
|
|
131
|
+
default: _withCtx(() => [
|
|
132
|
+
_createTextVNode(_toDisplayString(_unref(contextLocale).select.all), 1 /* TEXT */)
|
|
133
|
+
]),
|
|
134
|
+
_: 1 /* STABLE */
|
|
135
|
+
}, 8 /* PROPS */, ["indeterminate", "checked"])
|
|
136
|
+
]))
|
|
137
|
+
: _createCommentVNode("v-if", true),
|
|
86
138
|
(_ctx.dataSource.length)
|
|
87
139
|
? (_openBlock(), _createElementBlock("div", {
|
|
88
|
-
key:
|
|
140
|
+
key: 1,
|
|
89
141
|
class: "jtable-card-items",
|
|
90
142
|
style: _normalizeStyle({ gridTemplateColumns: gridTemplateColumns.value })
|
|
91
143
|
}, [
|
|
92
144
|
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
|
|
93
145
|
return (_openBlock(), _createElementBlock("div", {
|
|
94
146
|
class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
|
|
95
|
-
key: item[props.rowKey]
|
|
147
|
+
key: item[props.rowKey],
|
|
148
|
+
onClick: ($event) => (onClick(item))
|
|
96
149
|
}, [
|
|
97
150
|
_renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
|
|
98
|
-
],
|
|
151
|
+
], 10 /* CLASS, PROPS */, _hoisted_4));
|
|
99
152
|
}), 128 /* KEYED_FRAGMENT */))
|
|
100
153
|
], 4 /* STYLE */))
|
|
101
|
-
: (_openBlock(), _createElementBlock("div",
|
|
154
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_5, [
|
|
102
155
|
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
103
156
|
_createVNode(_unref(Empty))
|
|
104
157
|
])
|
|
105
158
|
]))
|
|
106
159
|
]))
|
|
107
160
|
: (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
|
|
108
|
-
"row-selection":
|
|
161
|
+
"row-selection": __rowSelection.value,
|
|
109
162
|
dataSource: _ctx.dataSource,
|
|
110
163
|
columns: _columns.value,
|
|
111
164
|
pagination: false,
|
|
112
165
|
scroll: _scroll.value,
|
|
113
|
-
class: { 'j-table-scroll': !_optionalChain([props, 'access',
|
|
166
|
+
class: { 'j-table-scroll': !_optionalChain([props, 'access', _26 => _26.scroll, 'optionalAccess', _27 => _27.y]) }
|
|
114
167
|
}), _createSlots({
|
|
115
168
|
bodyCell: _withCtx(({ column, record, index }) => [
|
|
116
|
-
((_optionalChain([column, 'optionalAccess',
|
|
117
|
-
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess',
|
|
169
|
+
((_optionalChain([column, 'optionalAccess', _28 => _28.key]) || _optionalChain([column, 'optionalAccess', _29 => _29.dataIndex])) && _optionalChain([column, 'optionalAccess', _30 => _30.scopedSlots]) && (_optionalChain([_slots, 'access', _31 => _31.value, 'optionalAccess', _32 => _32[_optionalChain([column, 'optionalAccess', _33 => _33.dataIndex])]]) || _optionalChain([_slots, 'access', _34 => _34.value, 'optionalAccess', _35 => _35[_optionalChain([column, 'optionalAccess', _36 => _36.key])]])))
|
|
170
|
+
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _37 => _37.key]) || _optionalChain([column, 'optionalAccess', _38 => _38.dataIndex]), _mergeProps({ key: 0 }, record, {
|
|
118
171
|
index: index,
|
|
119
172
|
column: column
|
|
120
173
|
}))
|
|
121
174
|
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
122
|
-
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess',
|
|
175
|
+
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _39 => _39.dataIndex]) || _optionalChain([column, 'optionalAccess', _40 => _40.key])) || '--'), 1 /* TEXT */)
|
|
123
176
|
], 64 /* STABLE_FRAGMENT */))
|
|
124
177
|
]),
|
|
125
178
|
emptyText: _withCtx(() => [
|
|
@@ -133,7 +186,7 @@ const __sfc_main__ = _defineComponent({
|
|
|
133
186
|
return {
|
|
134
187
|
name: slotKey,
|
|
135
188
|
fn: _withCtx((slotProps) => [
|
|
136
|
-
(!((_optionalChain([__props, 'access',
|
|
189
|
+
(!((_optionalChain([__props, 'access', _41 => _41.column, 'optionalAccess', _42 => _42.key]) || _optionalChain([__props, 'access', _43 => _43.column, 'optionalAccess', _44 => _44.dataIndex])) && _optionalChain([__props, 'access', _45 => _45.column, 'optionalAccess', _46 => _46.scopedSlots]) && (_optionalChain([_slots, 'access', _47 => _47.value, 'optionalAccess', _48 => _48[_optionalChain([__props, 'access', _49 => _49.column, 'optionalAccess', _50 => _50.dataIndex])]]) || _optionalChain([_slots, 'access', _51 => _51.value, 'optionalAccess', _52 => _52[_optionalChain([__props, 'access', _53 => _53.column, 'optionalAccess', _54 => _54.key])]]))))
|
|
137
190
|
? _renderSlot(_ctx.$slots, slotKey, _normalizeProps(_mergeProps({ key: 0 }, slotProps)))
|
|
138
191
|
: _createCommentVNode("v-if", true)
|
|
139
192
|
])
|
|
@@ -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-
|
|
26
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154724378"), n = n(), _popScopeId(), n);
|
|
27
27
|
const _hoisted_1 = {
|
|
28
28
|
key: 0,
|
|
29
29
|
style: { "width": "240px" }
|
package/lib/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-
|
|
83
|
+
const _withScopeId = n => (_pushScopeId("data-v-1755154723758"), n = n(), _popScopeId(), n);
|
|
84
84
|
const _hoisted_1 = { class: "JSearch-item" };
|
|
85
85
|
const _hoisted_2 = {
|
|
86
86
|
key: 0,
|
package/lib/locale/en-US.js
CHANGED
package/lib/locale/zh-CN.js
CHANGED
package/lib/style/index.css
CHANGED
|
@@ -4512,9 +4512,12 @@ span.ant-radio + * {
|
|
|
4512
4512
|
}
|
|
4513
4513
|
.jtable-box .jtable-card {
|
|
4514
4514
|
height: 100%;
|
|
4515
|
-
|
|
4515
|
+
display: flex;
|
|
4516
|
+
flex-direction: column;
|
|
4516
4517
|
}
|
|
4517
4518
|
.jtable-box .jtable-card .jtable-card-items {
|
|
4519
|
+
height: 100%;
|
|
4520
|
+
overflow-y: auto;
|
|
4518
4521
|
display: grid;
|
|
4519
4522
|
grid-gap: 26px;
|
|
4520
4523
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jetlinks-web/components",
|
|
3
|
-
"version": "2.6.
|
|
3
|
+
"version": "2.6.28",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "es/index.js",
|
|
@@ -45,8 +45,8 @@
|
|
|
45
45
|
"resize-observer-polyfill": "^1.5.1",
|
|
46
46
|
"sortablejs": "^1.15.2",
|
|
47
47
|
"@jetlinks-web/constants": "1.0.9",
|
|
48
|
-
"@jetlinks-web/
|
|
49
|
-
"@jetlinks-web/
|
|
48
|
+
"@jetlinks-web/hooks": "1.0.29",
|
|
49
|
+
"@jetlinks-web/utils": "1.2.13"
|
|
50
50
|
},
|
|
51
51
|
"devDependencies": {
|
|
52
52
|
"@babel/cli": "^7.8.4",
|