@jetlinks-web/components 2.0.31 → 2.0.33
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/FullPage/FullPage.js +1 -1
- package/es/ProLayout/Basic/BasicLayout.js +2 -0
- package/es/ProLayout/Basic/Header.js +1 -0
- package/es/ProLayout/TopHeader/index.js +8 -1
- package/es/ProTable/Alert.js +73 -0
- package/es/ProTable/Content.js +122 -0
- package/es/ProTable/Header.js +73 -0
- package/es/ProTable/Pagination.js +46 -0
- package/es/ProTable/ProTable.js +310 -0
- package/es/ProTable/index.js +1 -410
- package/es/ProTable/setting.js +119 -0
- package/es/ProTable/style/ProTable.less +83 -0
- package/es/ProTable/style/index.js +1 -1
- package/es/Search/Advanced/SaveHistory.js +1 -1
- package/es/Search/Item.js +1 -1
- package/es/Search/Search.js +1 -1
- package/es/style/index.css +20 -20
- package/es/style/index.less +7 -7
- package/lib/FullPage/FullPage.js +1 -1
- package/lib/ProLayout/Basic/BasicLayout.js +2 -0
- package/lib/ProLayout/Basic/Header.js +1 -0
- package/lib/ProLayout/TopHeader/index.js +8 -1
- package/lib/ProTable/Alert.js +73 -0
- package/lib/ProTable/Content.js +122 -0
- package/lib/ProTable/Header.js +73 -0
- package/lib/ProTable/Pagination.js +46 -0
- package/lib/ProTable/ProTable.js +310 -0
- package/lib/ProTable/index.js +4 -412
- package/lib/ProTable/setting.js +126 -0
- package/lib/ProTable/style/ProTable.less +83 -0
- package/lib/ProTable/style/index.js +1 -1
- package/lib/Search/Advanced/SaveHistory.js +1 -1
- package/lib/Search/Item.js +1 -1
- package/lib/Search/Search.js +1 -1
- package/lib/style/components.less +0 -1
- package/lib/style/index.css +20 -20
- package/lib/style/index.less +7 -7
- package/package.json +2 -2
- package/es/ProTable/proTableTypes.js +0 -11
- package/es/ProTable/style/index.css +0 -69
- package/es/ProTable/style/index.less +0 -92
- package/lib/ProTable/proTableTypes.js +0 -17
- package/lib/ProTable/style/index.css +0 -69
- package/lib/ProTable/style/index.less +0 -92
package/es/FullPage/FullPage.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
} */
|
|
7
7
|
import { defineComponent as _defineComponent } from 'vue';
|
|
8
8
|
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";
|
|
9
|
-
const _withScopeId = n => (_pushScopeId("data-v-
|
|
9
|
+
const _withScopeId = n => (_pushScopeId("data-v-1716520751726"), n = n(), _popScopeId(), n);
|
|
10
10
|
const _hoisted_1 = { class: "full-page-warp-content" };
|
|
11
11
|
import { ref } from 'vue';
|
|
12
12
|
import { useElementBounding } from '@vueuse/core';
|
|
@@ -210,6 +210,7 @@ export default defineComponent({
|
|
|
210
210
|
var linksRender = getSlot(slots, props, 'linksRender');
|
|
211
211
|
var logoRender = getSlot(slots, props, 'logoRender');
|
|
212
212
|
var historyRender = getSlot(slots, props, 'historyRender');
|
|
213
|
+
var topHeaderMenuRender = getSlot(slots, props, 'topHeaderMenuRender');
|
|
213
214
|
var headerDom = computed(function () {
|
|
214
215
|
return headerRender(_objectSpread(_objectSpread({}, props), {}, {
|
|
215
216
|
menuItemRender: menuItemRender,
|
|
@@ -228,6 +229,7 @@ export default defineComponent({
|
|
|
228
229
|
headerContentRender: headerContentRender,
|
|
229
230
|
logo: logoRender || props.logo,
|
|
230
231
|
headerRender: customHeaderRender,
|
|
232
|
+
topHeaderMenuRender: topHeaderMenuRender,
|
|
231
233
|
theme: (props.theme || 'dark').toLocaleLowerCase().includes('dark') ? 'dark' : 'light'
|
|
232
234
|
}), props.matchMenuKeys);
|
|
233
235
|
});
|
|
@@ -53,6 +53,7 @@ export default defineComponent({
|
|
|
53
53
|
var className = computed(function () {
|
|
54
54
|
return _defineProperty(_defineProperty({}, "".concat(prefixCls.value, "-fixed-header"), needFixedHeader.value), "".concat(prefixCls.value, "-top-menu"), isTop.value);
|
|
55
55
|
});
|
|
56
|
+
var headerMenuRender = computed(function () {});
|
|
56
57
|
var renderContent = function renderContent() {
|
|
57
58
|
var defaultDom = _createVNode(TopNavHeader, _objectSpread(_objectSpread({
|
|
58
59
|
"theme": theme.value,
|
|
@@ -39,6 +39,12 @@ export var baseHeaderProps = _objectSpread(_objectSpread({}, defaultSettingProps
|
|
|
39
39
|
},
|
|
40
40
|
menuHeaderRender: siderMenuProps.menuHeaderRender,
|
|
41
41
|
menuItemRender: siderMenuProps.menuItemRender,
|
|
42
|
+
topHeaderMenuRender: {
|
|
43
|
+
type: [Function, Object, Boolean],
|
|
44
|
+
default: function _default() {
|
|
45
|
+
return undefined;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
42
48
|
subMenuItemRender: siderMenuProps.subMenuItemRender,
|
|
43
49
|
rightContentRender: {
|
|
44
50
|
type: [Object, Function],
|
|
@@ -86,6 +92,7 @@ export var TopNavHeader = function TopNavHeader(props) {
|
|
|
86
92
|
onSelect = props.onSelect,
|
|
87
93
|
contentWidth = props.contentWidth,
|
|
88
94
|
rightContentRender = props.rightContentRender,
|
|
95
|
+
topHeaderMenuRender = props.topHeaderMenuRender,
|
|
89
96
|
layout = props.layout,
|
|
90
97
|
menuData = props.menuData,
|
|
91
98
|
mode = props.mode;
|
|
@@ -136,7 +143,7 @@ export var TopNavHeader = function TopNavHeader(props) {
|
|
|
136
143
|
flex: 1
|
|
137
144
|
},
|
|
138
145
|
"class": "".concat(prefixCls, "-menu")
|
|
139
|
-
}, [_createVNode(BaseMenu, {
|
|
146
|
+
}, [topHeaderMenuRender ? topHeaderMenuRender() : _createVNode(BaseMenu, {
|
|
140
147
|
"prefixCls": propPrefixCls,
|
|
141
148
|
"locale": props.locale || context.locale,
|
|
142
149
|
"theme": props.theme,
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) {
|
|
2
|
+
const op = ops[i];
|
|
3
|
+
const fn = ops[i + 1];
|
|
4
|
+
i += 2;
|
|
5
|
+
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
if (op === 'access' || op === 'optionalAccess') {
|
|
9
|
+
lastAccessLHS = value;
|
|
10
|
+
value = fn(value);
|
|
11
|
+
}
|
|
12
|
+
else if (op === 'call' || op === 'optionalCall') {
|
|
13
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
14
|
+
lastAccessLHS = undefined;
|
|
15
|
+
}
|
|
16
|
+
} return value; }
|
|
17
|
+
/* Analyzed bindings: {
|
|
18
|
+
"Alert": "setup-maybe-ref",
|
|
19
|
+
"Button": "setup-maybe-ref",
|
|
20
|
+
"computed": "setup-const",
|
|
21
|
+
"_alertProps": "setup-maybe-ref",
|
|
22
|
+
"props": "setup-reactive-const",
|
|
23
|
+
"emits": "setup-const",
|
|
24
|
+
"_message": "setup-ref",
|
|
25
|
+
"onClose": "setup-const"
|
|
26
|
+
} */
|
|
27
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
28
|
+
import { renderSlot as _renderSlot, createTextVNode as _createTextVNode, unref as _unref, withCtx as _withCtx, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
29
|
+
const _hoisted_1 = { class: "jtable-alert" };
|
|
30
|
+
import { Alert, Button } from 'ant-design-vue';
|
|
31
|
+
import { computed } from "vue";
|
|
32
|
+
import { _alertProps } from "./setting";
|
|
33
|
+
const __sfc_main__ = _defineComponent({
|
|
34
|
+
...{
|
|
35
|
+
name: 'Alert'
|
|
36
|
+
},
|
|
37
|
+
props: { ..._alertProps },
|
|
38
|
+
emits: ['close'],
|
|
39
|
+
setup(__props, { emit: __emit }) {
|
|
40
|
+
const props = __props;
|
|
41
|
+
const emits = __emit;
|
|
42
|
+
const _message = computed(() => {
|
|
43
|
+
return '已选择' + (_optionalChain([props, 'access', _2 => _2.rowSelection, 'optionalAccess', _3 => _3.selectedRowKeys, 'optionalAccess', _4 => _4.length]) || 0) + '项';
|
|
44
|
+
});
|
|
45
|
+
const onClose = () => {
|
|
46
|
+
emits('close');
|
|
47
|
+
};
|
|
48
|
+
return (_ctx, _cache) => {
|
|
49
|
+
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
50
|
+
_renderSlot(_ctx.$slots, "default", {}, () => [
|
|
51
|
+
_createVNode(_unref(Alert), {
|
|
52
|
+
type: "info",
|
|
53
|
+
message: _message.value
|
|
54
|
+
}, {
|
|
55
|
+
closeText: _withCtx(() => [
|
|
56
|
+
_createVNode(_unref(Button), {
|
|
57
|
+
type: "link",
|
|
58
|
+
onClick: onClose
|
|
59
|
+
}, {
|
|
60
|
+
default: _withCtx(() => [
|
|
61
|
+
_createTextVNode("取消选择")
|
|
62
|
+
]),
|
|
63
|
+
_: 1 /* STABLE */
|
|
64
|
+
})
|
|
65
|
+
]),
|
|
66
|
+
_: 1 /* STABLE */
|
|
67
|
+
}, 8 /* PROPS */, ["message"])
|
|
68
|
+
])
|
|
69
|
+
]));
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
function _optionalChain(ops) { let lastAccessLHS = undefined; let value = ops[0]; let i = 1; while (i < ops.length) {
|
|
2
|
+
const op = ops[i];
|
|
3
|
+
const fn = ops[i + 1];
|
|
4
|
+
i += 2;
|
|
5
|
+
if ((op === 'optionalAccess' || op === 'optionalCall') && value == null) {
|
|
6
|
+
return undefined;
|
|
7
|
+
}
|
|
8
|
+
if (op === 'access' || op === 'optionalAccess') {
|
|
9
|
+
lastAccessLHS = value;
|
|
10
|
+
value = fn(value);
|
|
11
|
+
}
|
|
12
|
+
else if (op === 'call' || op === 'optionalCall') {
|
|
13
|
+
value = fn((...args) => value.call(lastAccessLHS, ...args));
|
|
14
|
+
lastAccessLHS = undefined;
|
|
15
|
+
}
|
|
16
|
+
} return value; }
|
|
17
|
+
/* Analyzed bindings: {
|
|
18
|
+
"column": "props",
|
|
19
|
+
"useSlots": "setup-const",
|
|
20
|
+
"computed": "setup-const",
|
|
21
|
+
"_contentProps": "setup-maybe-ref",
|
|
22
|
+
"Table": "setup-maybe-ref",
|
|
23
|
+
"get": "setup-maybe-ref",
|
|
24
|
+
"isString": "setup-maybe-ref",
|
|
25
|
+
"Empty": "setup-maybe-ref",
|
|
26
|
+
"props": "setup-reactive-const",
|
|
27
|
+
"slots": "setup-maybe-ref",
|
|
28
|
+
"_columns": "setup-ref",
|
|
29
|
+
"cardStyle": "setup-ref",
|
|
30
|
+
"gridTemplateColumns": "setup-ref"
|
|
31
|
+
} */
|
|
32
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
33
|
+
import { renderList as _renderList, Fragment as _Fragment, openBlock as _openBlock, createElementBlock as _createElementBlock, normalizeProps as _normalizeProps, guardReactiveProps as _guardReactiveProps, renderSlot as _renderSlot, normalizeClass as _normalizeClass, normalizeStyle as _normalizeStyle, unref as _unref, createVNode as _createVNode, mergeProps as _mergeProps, toDisplayString as _toDisplayString, createTextVNode as _createTextVNode, withCtx as _withCtx, createBlock as _createBlock } from "vue";
|
|
34
|
+
const _hoisted_1 = { class: "jtable-box" };
|
|
35
|
+
const _hoisted_2 = {
|
|
36
|
+
key: 1,
|
|
37
|
+
class: "j-table-empty"
|
|
38
|
+
};
|
|
39
|
+
import { useSlots, computed } from 'vue';
|
|
40
|
+
import { _contentProps } from "./setting";
|
|
41
|
+
import { Table } from 'ant-design-vue';
|
|
42
|
+
import { get, isString } from 'lodash-es';
|
|
43
|
+
import Empty from '../Empty';
|
|
44
|
+
const __sfc_main__ = _defineComponent({
|
|
45
|
+
...{
|
|
46
|
+
name: 'Content'
|
|
47
|
+
},
|
|
48
|
+
props: {
|
|
49
|
+
..._contentProps,
|
|
50
|
+
column: {
|
|
51
|
+
type: Number,
|
|
52
|
+
default: 4
|
|
53
|
+
}
|
|
54
|
+
},
|
|
55
|
+
setup(__props) {
|
|
56
|
+
const props = __props;
|
|
57
|
+
const slots = useSlots();
|
|
58
|
+
const _columns = computed(() => props.columns.filter((i) => !_optionalChain([i, 'optionalAccess', _2 => _2.hideInTable])));
|
|
59
|
+
const cardStyle = computed(() => props.scroll && props.scroll.y ? {
|
|
60
|
+
maxHeight: isString(props.scroll.y) ? props.scroll.y : props.scroll.y + 'px',
|
|
61
|
+
overflow: 'auto',
|
|
62
|
+
}
|
|
63
|
+
: undefined);
|
|
64
|
+
const gridTemplateColumns = computed(() => {
|
|
65
|
+
return `repeat(${props.column}, 1fr)`;
|
|
66
|
+
});
|
|
67
|
+
return (_ctx, _cache) => {
|
|
68
|
+
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
69
|
+
(_ctx.mode === 'CARD')
|
|
70
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
71
|
+
key: 0,
|
|
72
|
+
class: "jtable-card",
|
|
73
|
+
style: _normalizeStyle(cardStyle.value)
|
|
74
|
+
}, [
|
|
75
|
+
(_ctx.dataSource.length)
|
|
76
|
+
? (_openBlock(), _createElementBlock("div", {
|
|
77
|
+
key: 0,
|
|
78
|
+
class: "jtable-card-items",
|
|
79
|
+
style: _normalizeStyle({ gridTemplateColumns: gridTemplateColumns.value })
|
|
80
|
+
}, [
|
|
81
|
+
(_openBlock(true), _createElementBlock(_Fragment, null, _renderList(_ctx.dataSource, (item) => {
|
|
82
|
+
return (_openBlock(), _createElementBlock("div", {
|
|
83
|
+
class: _normalizeClass(['jtable-card-item', props.cardBodyClass]),
|
|
84
|
+
key: item[_ctx.rowKey]
|
|
85
|
+
}, [
|
|
86
|
+
_renderSlot(_ctx.$slots, "card", _normalizeProps(_guardReactiveProps(item)))
|
|
87
|
+
], 2 /* CLASS */));
|
|
88
|
+
}), 128 /* KEYED_FRAGMENT */))
|
|
89
|
+
], 4 /* STYLE */))
|
|
90
|
+
: (_openBlock(), _createElementBlock("div", _hoisted_2, [
|
|
91
|
+
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
92
|
+
_createVNode(_unref(Empty))
|
|
93
|
+
])
|
|
94
|
+
]))
|
|
95
|
+
], 4 /* STYLE */))
|
|
96
|
+
: (_openBlock(), _createBlock(_unref(Table), _mergeProps({ key: 1 }, props, {
|
|
97
|
+
dataSource: _ctx.dataSource,
|
|
98
|
+
columns: _columns.value,
|
|
99
|
+
pagination: false
|
|
100
|
+
}), {
|
|
101
|
+
headerCell: _withCtx(({ column, title }) => [
|
|
102
|
+
_renderSlot(_ctx.$slots, "headerCell", _normalizeProps(_guardReactiveProps({ column, title })))
|
|
103
|
+
]),
|
|
104
|
+
bodyCell: _withCtx(({ column, record }) => [
|
|
105
|
+
((_optionalChain([column, 'optionalAccess', _3 => _3.key]) || _optionalChain([column, 'optionalAccess', _4 => _4.dataIndex])) && _optionalChain([column, 'optionalAccess', _5 => _5.scopedSlots]) && (_optionalChain([_unref, 'call', _6 => _6(slots), 'optionalAccess', _7 => _7[_optionalChain([column, 'optionalAccess', _8 => _8.dataIndex])]]) || _optionalChain([_unref, 'call', _9 => _9(slots), 'optionalAccess', _10 => _10[_optionalChain([column, 'optionalAccess', _11 => _11.key])]])))
|
|
106
|
+
? _renderSlot(_ctx.$slots, _optionalChain([column, 'optionalAccess', _12 => _12.key]) || _optionalChain([column, 'optionalAccess', _13 => _13.dataIndex]), _normalizeProps(_mergeProps({ key: 0 }, record)))
|
|
107
|
+
: (_openBlock(), _createElementBlock(_Fragment, { key: 1 }, [
|
|
108
|
+
_createTextVNode(_toDisplayString(_unref(get)(record, _optionalChain([column, 'optionalAccess', _14 => _14.dataIndex]) || _optionalChain([column, 'optionalAccess', _15 => _15.key]))), 1 /* TEXT */)
|
|
109
|
+
], 64 /* STABLE_FRAGMENT */))
|
|
110
|
+
]),
|
|
111
|
+
emptyText: _withCtx(() => [
|
|
112
|
+
_renderSlot(_ctx.$slots, "emptyText", {}, () => [
|
|
113
|
+
_createVNode(_unref(Empty))
|
|
114
|
+
])
|
|
115
|
+
]),
|
|
116
|
+
_: 3 /* FORWARDED */
|
|
117
|
+
}, 16 /* FULL_PROPS */, ["dataSource", "columns"]))
|
|
118
|
+
]));
|
|
119
|
+
};
|
|
120
|
+
}
|
|
121
|
+
});
|
|
122
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"initMode": "props",
|
|
3
|
+
"RadioGroup": "setup-maybe-ref",
|
|
4
|
+
"RadioButton": "setup-maybe-ref",
|
|
5
|
+
"AIcon": "setup-maybe-ref",
|
|
6
|
+
"_headerProps": "setup-maybe-ref",
|
|
7
|
+
"props": "setup-reactive-const",
|
|
8
|
+
"emits": "setup-const"
|
|
9
|
+
} */
|
|
10
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
11
|
+
import { renderSlot as _renderSlot, createElementVNode as _createElementVNode, unref as _unref, createVNode as _createVNode, withCtx as _withCtx, openBlock as _openBlock, createElementBlock as _createElementBlock, createCommentVNode as _createCommentVNode } from "vue";
|
|
12
|
+
const _hoisted_1 = { class: "jtable-body-header" };
|
|
13
|
+
const _hoisted_2 = { class: "jtable-body-header-left" };
|
|
14
|
+
const _hoisted_3 = { class: "jtable-body-header-right" };
|
|
15
|
+
const _hoisted_4 = {
|
|
16
|
+
key: 0,
|
|
17
|
+
class: "table-body-header-right-button"
|
|
18
|
+
};
|
|
19
|
+
import { RadioGroup, RadioButton } from 'ant-design-vue';
|
|
20
|
+
import AIcon from '../Icon';
|
|
21
|
+
import { _headerProps } from './setting';
|
|
22
|
+
const __sfc_main__ = _defineComponent({
|
|
23
|
+
...{
|
|
24
|
+
name: 'Header'
|
|
25
|
+
},
|
|
26
|
+
props: {
|
|
27
|
+
..._headerProps,
|
|
28
|
+
initMode: {
|
|
29
|
+
type: [String, undefined],
|
|
30
|
+
default: undefined
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
emits: ['change'],
|
|
34
|
+
setup(__props, { emit: __emit }) {
|
|
35
|
+
const props = __props;
|
|
36
|
+
const emits = __emit;
|
|
37
|
+
return (_ctx, _cache) => {
|
|
38
|
+
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
39
|
+
_createElementVNode("div", _hoisted_2, [
|
|
40
|
+
_renderSlot(_ctx.$slots, "headerLeftRender")
|
|
41
|
+
]),
|
|
42
|
+
_createElementVNode("div", _hoisted_3, [
|
|
43
|
+
_renderSlot(_ctx.$slots, "headerRightRender"),
|
|
44
|
+
(!__props.initMode)
|
|
45
|
+
? (_openBlock(), _createElementBlock("div", _hoisted_4, [
|
|
46
|
+
_createVNode(_unref(RadioGroup), {
|
|
47
|
+
value: _ctx.mode,
|
|
48
|
+
onChange: _cache[0] || (_cache[0] = (e) => emits('change', e))
|
|
49
|
+
}, {
|
|
50
|
+
default: _withCtx(() => [
|
|
51
|
+
_createVNode(_unref(RadioButton), { value: "TABLE" }, {
|
|
52
|
+
default: _withCtx(() => [
|
|
53
|
+
_createVNode(_unref(AIcon), { type: "UnorderedListOutlined" })
|
|
54
|
+
]),
|
|
55
|
+
_: 1 /* STABLE */
|
|
56
|
+
}),
|
|
57
|
+
_createVNode(_unref(RadioButton), { value: "CARD" }, {
|
|
58
|
+
default: _withCtx(() => [
|
|
59
|
+
_createVNode(_unref(AIcon), { type: "AppstoreOutlined" })
|
|
60
|
+
]),
|
|
61
|
+
_: 1 /* STABLE */
|
|
62
|
+
})
|
|
63
|
+
]),
|
|
64
|
+
_: 1 /* STABLE */
|
|
65
|
+
}, 8 /* PROPS */, ["value"])
|
|
66
|
+
]))
|
|
67
|
+
: _createCommentVNode("v-if", true)
|
|
68
|
+
])
|
|
69
|
+
]));
|
|
70
|
+
};
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
export default __sfc_main__;
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
/* Analyzed bindings: {
|
|
2
|
+
"Pagination": "setup-maybe-ref",
|
|
3
|
+
"paginationProps": "setup-maybe-ref",
|
|
4
|
+
"props": "setup-reactive-const",
|
|
5
|
+
"emits": "setup-const",
|
|
6
|
+
"_showTotal": "setup-const",
|
|
7
|
+
"onChange": "setup-const"
|
|
8
|
+
} */
|
|
9
|
+
import { defineComponent as _defineComponent } from 'vue';
|
|
10
|
+
import { renderSlot as _renderSlot, unref as _unref, createVNode as _createVNode, openBlock as _openBlock, createElementBlock as _createElementBlock } from "vue";
|
|
11
|
+
const _hoisted_1 = { class: "jtable-pagination" };
|
|
12
|
+
import { Pagination } from 'ant-design-vue';
|
|
13
|
+
import { paginationProps } from "./setting";
|
|
14
|
+
const __sfc_main__ = _defineComponent({
|
|
15
|
+
...{
|
|
16
|
+
name: 'Pagination'
|
|
17
|
+
},
|
|
18
|
+
props: { ...paginationProps },
|
|
19
|
+
emits: ['change'],
|
|
20
|
+
setup(__props, { emit: __emit }) {
|
|
21
|
+
const props = __props;
|
|
22
|
+
const emits = __emit;
|
|
23
|
+
const _showTotal = (num) => {
|
|
24
|
+
const minSize = props.pageIndex * props.pageSize + 1;
|
|
25
|
+
const MaxSize = (props.pageIndex + 1) * props.pageSize;
|
|
26
|
+
return `第 ${minSize} - ${MaxSize > num ? num : MaxSize} 条/总共 ${num} 条`;
|
|
27
|
+
};
|
|
28
|
+
const onChange = (page, size) => {
|
|
29
|
+
emits('change', page, size);
|
|
30
|
+
};
|
|
31
|
+
return (_ctx, _cache) => {
|
|
32
|
+
return (_openBlock(), _createElementBlock("div", _hoisted_1, [
|
|
33
|
+
_renderSlot(_ctx.$slots, "default", {}, () => [
|
|
34
|
+
_createVNode(_unref(Pagination), {
|
|
35
|
+
total: _ctx.total,
|
|
36
|
+
pageSize: _ctx.pageSize,
|
|
37
|
+
current: _ctx.pageIndex + 1,
|
|
38
|
+
"show-total": (num) => _showTotal(num),
|
|
39
|
+
onChange: onChange
|
|
40
|
+
}, null, 8 /* PROPS */, ["total", "pageSize", "current", "show-total"])
|
|
41
|
+
])
|
|
42
|
+
]));
|
|
43
|
+
};
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
export default __sfc_main__;
|