@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.
Files changed (44) hide show
  1. package/es/FullPage/FullPage.js +1 -1
  2. package/es/ProLayout/Basic/BasicLayout.js +2 -0
  3. package/es/ProLayout/Basic/Header.js +1 -0
  4. package/es/ProLayout/TopHeader/index.js +8 -1
  5. package/es/ProTable/Alert.js +73 -0
  6. package/es/ProTable/Content.js +122 -0
  7. package/es/ProTable/Header.js +73 -0
  8. package/es/ProTable/Pagination.js +46 -0
  9. package/es/ProTable/ProTable.js +310 -0
  10. package/es/ProTable/index.js +1 -410
  11. package/es/ProTable/setting.js +119 -0
  12. package/es/ProTable/style/ProTable.less +83 -0
  13. package/es/ProTable/style/index.js +1 -1
  14. package/es/Search/Advanced/SaveHistory.js +1 -1
  15. package/es/Search/Item.js +1 -1
  16. package/es/Search/Search.js +1 -1
  17. package/es/style/index.css +20 -20
  18. package/es/style/index.less +7 -7
  19. package/lib/FullPage/FullPage.js +1 -1
  20. package/lib/ProLayout/Basic/BasicLayout.js +2 -0
  21. package/lib/ProLayout/Basic/Header.js +1 -0
  22. package/lib/ProLayout/TopHeader/index.js +8 -1
  23. package/lib/ProTable/Alert.js +73 -0
  24. package/lib/ProTable/Content.js +122 -0
  25. package/lib/ProTable/Header.js +73 -0
  26. package/lib/ProTable/Pagination.js +46 -0
  27. package/lib/ProTable/ProTable.js +310 -0
  28. package/lib/ProTable/index.js +4 -412
  29. package/lib/ProTable/setting.js +126 -0
  30. package/lib/ProTable/style/ProTable.less +83 -0
  31. package/lib/ProTable/style/index.js +1 -1
  32. package/lib/Search/Advanced/SaveHistory.js +1 -1
  33. package/lib/Search/Item.js +1 -1
  34. package/lib/Search/Search.js +1 -1
  35. package/lib/style/components.less +0 -1
  36. package/lib/style/index.css +20 -20
  37. package/lib/style/index.less +7 -7
  38. package/package.json +2 -2
  39. package/es/ProTable/proTableTypes.js +0 -11
  40. package/es/ProTable/style/index.css +0 -69
  41. package/es/ProTable/style/index.less +0 -92
  42. package/lib/ProTable/proTableTypes.js +0 -17
  43. package/lib/ProTable/style/index.css +0 -69
  44. package/lib/ProTable/style/index.less +0 -92
@@ -491,7 +491,6 @@
491
491
  .jtable-body-spin {
492
492
  min-height: 100%;
493
493
  width: 100%;
494
- padding: 16px 24px 24px;
495
494
  background-color: #fff;
496
495
  }
497
496
  .jtable-body-spin .ant-spin-nested-loading {
@@ -507,51 +506,52 @@
507
506
  display: flex;
508
507
  flex-direction: column;
509
508
  }
510
- .jtable-body-spin .jtable-body .jtable-body-header {
509
+ .jtable-body-header {
511
510
  display: flex;
512
511
  justify-content: space-between;
513
512
  align-items: center;
513
+ margin-bottom: 16px;
514
+ width: 100%;
515
+ gap: 8px;
516
+ }
517
+ .jtable-body-header .jtable-body-header-left {
518
+ flex: 1;
519
+ min-width: 0;
514
520
  }
515
- .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right {
521
+ .jtable-body-header .jtable-body-header-right {
516
522
  display: flex;
517
523
  gap: 8px;
518
524
  align-items: center;
519
525
  }
520
- .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .right-button-icon {
526
+ .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button {
527
+ width: 62px;
528
+ }
529
+ .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .right-button-icon {
521
530
  font-size: 16px;
522
531
  color: #d9d9d9;
523
532
  }
524
- .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .ant-radio-button-wrapper {
533
+ .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .ant-radio-button-wrapper {
525
534
  padding: 0 8px;
526
535
  }
527
- .jtable-body-spin .jtable-body .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button .ant-radio-button-wrapper-checked .right-button-icon {
536
+ .jtable-body-header .jtable-body-header-right .jtable-body-header-right-button :deep(.ant-radio-button-wrapper-checked) {
528
537
  color: #1890ff;
529
538
  }
530
- .jtable-body-spin .jtable-body .jtable-content {
531
- flex: 1;
532
- padding: 16px 0;
533
- }
534
- .jtable-body-spin .jtable-body .jtable-content .jtable-alert {
539
+ .jtable-alert {
535
540
  margin-bottom: 16px;
536
541
  }
537
- .jtable-body-spin .jtable-body .jtable-content .jtable-card .jtable-card-items {
542
+ .jtable-card .jtable-card-items {
538
543
  display: grid;
539
544
  grid-gap: 26px;
540
545
  }
541
- .jtable-body-spin .jtable-body .jtable-content .jtable-card .jtable-card-items .jtable-card-item {
546
+ .jtable-card .jtable-card-items .jtable-card-item {
542
547
  display: flex;
543
548
  min-width: 0;
544
549
  }
545
- .jtable-body-spin .jtable-body .jtable-pagination {
550
+ .jtable-pagination {
546
551
  width: 100%;
547
552
  display: flex;
548
553
  justify-content: flex-end;
549
- }
550
- .jtable-body-spin .jtable-body .j-table-empty {
551
- display: flex;
552
- justify-content: center;
553
- align-items: center;
554
- margin: 10% 0;
554
+ margin-top: 16px;
555
555
  }
556
556
  .JSearch-warp {
557
557
  padding: 24px;
@@ -1,7 +1,7 @@
1
- @import '../Ellipsis/style/index.less';
2
- @import '../CheckButton/style/index.less';
3
- @import '../ProLayout/style/style.less';
4
- @import '../ProTable/style/index.less';
5
- @import '../Search/style/Search.less';
6
- @import '../Search/style/Item.less';
7
- @import '../CardSelect/style/index.less';
1
+ @import '../Ellipsis/style/index.less';
2
+ @import '../CheckButton/style/index.less';
3
+ @import '../ProLayout/style/style.less';
4
+ @import '../ProTable/style/ProTable.less';
5
+ @import '../Search/style/Search.less';
6
+ @import '../Search/style/Item.less';
7
+ @import '../CardSelect/style/index.less';
@@ -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-1715741796198"), n = n(), _popScopeId(), n);
9
+ const _withScopeId = n => (_pushScopeId("data-v-1716520751738"), 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';
@@ -219,6 +219,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
219
219
  var linksRender = (0, _util.getSlot)(slots, props, 'linksRender');
220
220
  var logoRender = (0, _util.getSlot)(slots, props, 'logoRender');
221
221
  var historyRender = (0, _util.getSlot)(slots, props, 'historyRender');
222
+ var topHeaderMenuRender = (0, _util.getSlot)(slots, props, 'topHeaderMenuRender');
222
223
  var headerDom = (0, _vue.computed)(function () {
223
224
  return headerRender((0, _objectSpread2.default)((0, _objectSpread2.default)({}, props), {}, {
224
225
  menuItemRender: menuItemRender,
@@ -237,6 +238,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
237
238
  headerContentRender: headerContentRender,
238
239
  logo: logoRender || props.logo,
239
240
  headerRender: customHeaderRender,
241
+ topHeaderMenuRender: topHeaderMenuRender,
240
242
  theme: (props.theme || 'dark').toLocaleLowerCase().includes('dark') ? 'dark' : 'light'
241
243
  }), props.matchMenuKeys);
242
244
  });
@@ -59,6 +59,7 @@ var _default2 = exports.default = (0, _vue.defineComponent)({
59
59
  var className = (0, _vue.computed)(function () {
60
60
  return (0, _defineProperty2.default)((0, _defineProperty2.default)({}, "".concat(prefixCls.value, "-fixed-header"), needFixedHeader.value), "".concat(prefixCls.value, "-top-menu"), isTop.value);
61
61
  });
62
+ var headerMenuRender = (0, _vue.computed)(function () {});
62
63
  var renderContent = function renderContent() {
63
64
  var defaultDom = (0, _vue.createVNode)(_TopHeader.TopNavHeader, (0, _objectSpread2.default)((0, _objectSpread2.default)({
64
65
  "theme": theme.value,
@@ -44,6 +44,12 @@ var baseHeaderProps = exports.baseHeaderProps = (0, _objectSpread2.default)((0,
44
44
  },
45
45
  menuHeaderRender: _SiderMenu.siderMenuProps.menuHeaderRender,
46
46
  menuItemRender: _SiderMenu.siderMenuProps.menuItemRender,
47
+ topHeaderMenuRender: {
48
+ type: [Function, Object, Boolean],
49
+ default: function _default() {
50
+ return undefined;
51
+ }
52
+ },
47
53
  subMenuItemRender: _SiderMenu.siderMenuProps.subMenuItemRender,
48
54
  rightContentRender: {
49
55
  type: [Object, Function],
@@ -91,6 +97,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
91
97
  onSelect = props.onSelect,
92
98
  contentWidth = props.contentWidth,
93
99
  rightContentRender = props.rightContentRender,
100
+ topHeaderMenuRender = props.topHeaderMenuRender,
94
101
  layout = props.layout,
95
102
  menuData = props.menuData,
96
103
  mode = props.mode;
@@ -141,7 +148,7 @@ var TopNavHeader = exports.TopNavHeader = function TopNavHeader(props) {
141
148
  flex: 1
142
149
  },
143
150
  "class": "".concat(prefixCls, "-menu")
144
- }, [(0, _vue.createVNode)(_BaseMenu.default, {
151
+ }, [topHeaderMenuRender ? topHeaderMenuRender() : (0, _vue.createVNode)(_BaseMenu.default, {
145
152
  "prefixCls": propPrefixCls,
146
153
  "locale": props.locale || context.locale,
147
154
  "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__;