sun-biz 0.0.4-beta.55 → 0.0.4-beta.56
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/dist/components/index.js
CHANGED
|
@@ -2331,6 +2331,10 @@ const Table_exports_ = Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
|
2331
2331
|
});
|
|
2332
2332
|
const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
2333
2333
|
/* ESM default export */ const TableContainer = TableContainer_exports_;
|
|
2334
|
+
const Paginationvue_type_script_setup_true_lang_ts_name_Pagination_hoisted_1 = {
|
|
2335
|
+
key: 0,
|
|
2336
|
+
class: "pagination-slot"
|
|
2337
|
+
};
|
|
2334
2338
|
/* ESM default export */ const Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2335
2339
|
__name: 'Pagination',
|
|
2336
2340
|
props: {
|
|
@@ -2341,30 +2345,82 @@ const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true
|
|
|
2341
2345
|
},
|
|
2342
2346
|
handleCurrentChange: {
|
|
2343
2347
|
type: Function
|
|
2348
|
+
},
|
|
2349
|
+
layout: {},
|
|
2350
|
+
enableCustomPageSize: {
|
|
2351
|
+
type: Boolean
|
|
2344
2352
|
}
|
|
2345
2353
|
},
|
|
2346
2354
|
setup (__props) {
|
|
2355
|
+
const props = __props;
|
|
2356
|
+
const pageSize = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
|
|
2357
|
+
get: ()=>props.pageInfo.pageSize,
|
|
2358
|
+
set: (val)=>{
|
|
2359
|
+
const value = Number(val);
|
|
2360
|
+
// 修改时只能录入正整数
|
|
2361
|
+
if (Number.isInteger(value) && value > 0) props.handleSizeChange(value);
|
|
2362
|
+
}
|
|
2363
|
+
});
|
|
2364
|
+
const computedLayout = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2365
|
+
if (props.enableCustomPageSize) return (props.layout ?? 'total, sizes, prev, pager, next').replace('sizes', 'slot');
|
|
2366
|
+
return props.layout ?? 'total, sizes, prev, pager, next';
|
|
2367
|
+
});
|
|
2347
2368
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPagination), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2348
2369
|
"current-page": _ctx.pageInfo.pageNumber,
|
|
2349
2370
|
"page-size": _ctx.pageInfo.pageSize,
|
|
2350
2371
|
total: _ctx.pageInfo.total,
|
|
2351
2372
|
"page-sizes": _ctx.pageSizes,
|
|
2352
|
-
layout:
|
|
2373
|
+
layout: computedLayout.value,
|
|
2353
2374
|
onSizeChange: _ctx.handleSizeChange,
|
|
2354
2375
|
onCurrentChange: _ctx.handleCurrentChange,
|
|
2355
2376
|
"set-scroll-top": 500,
|
|
2356
2377
|
background: ""
|
|
2357
|
-
}, _ctx.$attrs),
|
|
2378
|
+
}, _ctx.$attrs), {
|
|
2379
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2380
|
+
props.enableCustomPageSize ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", Paginationvue_type_script_setup_true_lang_ts_name_Pagination_hoisted_1, [
|
|
2381
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
|
|
2382
|
+
class: "size-select",
|
|
2383
|
+
modelValue: pageSize.value,
|
|
2384
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>pageSize.value = $event),
|
|
2385
|
+
filterable: "",
|
|
2386
|
+
"allow-create": "",
|
|
2387
|
+
"default-first-option": "",
|
|
2388
|
+
"reserve-keyword": false
|
|
2389
|
+
}, {
|
|
2390
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2391
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(_ctx.pageSizes, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElOption), {
|
|
2392
|
+
key: item,
|
|
2393
|
+
label: item + '条/页',
|
|
2394
|
+
value: item
|
|
2395
|
+
}, null, 8, [
|
|
2396
|
+
"label",
|
|
2397
|
+
"value"
|
|
2398
|
+
]))), 128))
|
|
2399
|
+
]),
|
|
2400
|
+
_: 1
|
|
2401
|
+
}, 8, [
|
|
2402
|
+
"modelValue"
|
|
2403
|
+
])
|
|
2404
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2405
|
+
]),
|
|
2406
|
+
_: 1
|
|
2407
|
+
}, 16, [
|
|
2358
2408
|
"current-page",
|
|
2359
2409
|
"page-size",
|
|
2360
2410
|
"total",
|
|
2361
2411
|
"page-sizes",
|
|
2412
|
+
"layout",
|
|
2362
2413
|
"onSizeChange",
|
|
2363
2414
|
"onCurrentChange"
|
|
2364
2415
|
]));
|
|
2365
2416
|
}
|
|
2366
2417
|
});
|
|
2367
|
-
const Pagination_exports_ = Paginationvue_type_script_setup_true_lang_ts_name_Pagination
|
|
2418
|
+
const Pagination_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Paginationvue_type_script_setup_true_lang_ts_name_Pagination, [
|
|
2419
|
+
[
|
|
2420
|
+
'__scopeId',
|
|
2421
|
+
"data-v-eb218d18"
|
|
2422
|
+
]
|
|
2423
|
+
]);
|
|
2368
2424
|
/* ESM default export */ const Pagination = Pagination_exports_;
|
|
2369
2425
|
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
|
|
2370
2426
|
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
@@ -2480,6 +2536,10 @@ const SELECTION = 'selection';
|
|
|
2480
2536
|
scrollLoad: {
|
|
2481
2537
|
type: Function,
|
|
2482
2538
|
default: void 0
|
|
2539
|
+
},
|
|
2540
|
+
enableCustomPageSize: {
|
|
2541
|
+
type: Boolean,
|
|
2542
|
+
default: false
|
|
2483
2543
|
}
|
|
2484
2544
|
},
|
|
2485
2545
|
emits: [
|
|
@@ -3065,11 +3125,13 @@ const SELECTION = 'selection';
|
|
|
3065
3125
|
"page-info": paginationInfo.value,
|
|
3066
3126
|
"page-sizes": props.pageSizes,
|
|
3067
3127
|
"handle-size-change": handleSizeChange,
|
|
3068
|
-
"handle-current-change": changeCurrentPage
|
|
3128
|
+
"handle-current-change": changeCurrentPage,
|
|
3129
|
+
"enable-custom-page-size": props.enableCustomPageSize
|
|
3069
3130
|
}, null, 8, [
|
|
3070
3131
|
"layout",
|
|
3071
3132
|
"page-info",
|
|
3072
|
-
"page-sizes"
|
|
3133
|
+
"page-sizes",
|
|
3134
|
+
"enable-custom-page-size"
|
|
3073
3135
|
])
|
|
3074
3136
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
3075
3137
|
]));
|
|
@@ -69,6 +69,8 @@ export interface PaginationProps {
|
|
|
69
69
|
pageSizes: number[];
|
|
70
70
|
handleSizeChange: (size: number) => void;
|
|
71
71
|
handleCurrentChange: (currentPage: number) => void;
|
|
72
|
+
layout?: string;
|
|
73
|
+
enableCustomPageSize?: boolean;
|
|
72
74
|
}
|
|
73
75
|
export declare namespace Table {
|
|
74
76
|
interface PageInfo {
|
|
@@ -19,6 +19,13 @@
|
|
|
19
19
|
background-color: #0000 !important;
|
|
20
20
|
}
|
|
21
21
|
|
|
22
|
+
.size-select[data-v-eb218d18] {
|
|
23
|
+
color: #606266;
|
|
24
|
+
width: 110px;
|
|
25
|
+
margin-left: 10px;
|
|
26
|
+
font-weight: 400;
|
|
27
|
+
}
|
|
28
|
+
|
|
22
29
|
.input[data-v-bf6cf296] .el-input__inner {
|
|
23
30
|
cursor: pointer !important;
|
|
24
31
|
}
|
package/dist/index.js
CHANGED
|
@@ -2367,6 +2367,10 @@ const Table_exports_ = Tablevue_type_script_setup_true_lang_tsx_name_Table;
|
|
|
2367
2367
|
});
|
|
2368
2368
|
const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true_name_ProTableContainer;
|
|
2369
2369
|
/* ESM default export */ const TableContainer = TableContainer_exports_;
|
|
2370
|
+
const Paginationvue_type_script_setup_true_lang_ts_name_Pagination_hoisted_1 = {
|
|
2371
|
+
key: 0,
|
|
2372
|
+
class: "pagination-slot"
|
|
2373
|
+
};
|
|
2370
2374
|
/* ESM default export */ const Paginationvue_type_script_setup_true_lang_ts_name_Pagination = /*@__PURE__*/ (0, __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent)({
|
|
2371
2375
|
__name: 'Pagination',
|
|
2372
2376
|
props: {
|
|
@@ -2377,30 +2381,82 @@ const TableContainer_exports_ = TableContainervue_type_script_lang_ts_setup_true
|
|
|
2377
2381
|
},
|
|
2378
2382
|
handleCurrentChange: {
|
|
2379
2383
|
type: Function
|
|
2384
|
+
},
|
|
2385
|
+
layout: {},
|
|
2386
|
+
enableCustomPageSize: {
|
|
2387
|
+
type: Boolean
|
|
2380
2388
|
}
|
|
2381
2389
|
},
|
|
2382
2390
|
setup (__props) {
|
|
2391
|
+
const props = __props;
|
|
2392
|
+
const pageSize = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)({
|
|
2393
|
+
get: ()=>props.pageInfo.pageSize,
|
|
2394
|
+
set: (val)=>{
|
|
2395
|
+
const value = Number(val);
|
|
2396
|
+
// 修改时只能录入正整数
|
|
2397
|
+
if (Number.isInteger(value) && value > 0) props.handleSizeChange(value);
|
|
2398
|
+
}
|
|
2399
|
+
});
|
|
2400
|
+
const computedLayout = (0, __WEBPACK_EXTERNAL_MODULE_vue__.computed)(()=>{
|
|
2401
|
+
if (props.enableCustomPageSize) return (props.layout ?? 'total, sizes, prev, pager, next').replace('sizes', 'slot');
|
|
2402
|
+
return props.layout ?? 'total, sizes, prev, pager, next';
|
|
2403
|
+
});
|
|
2383
2404
|
return (_ctx, _cache)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElPagination), (0, __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps)({
|
|
2384
2405
|
"current-page": _ctx.pageInfo.pageNumber,
|
|
2385
2406
|
"page-size": _ctx.pageInfo.pageSize,
|
|
2386
2407
|
total: _ctx.pageInfo.total,
|
|
2387
2408
|
"page-sizes": _ctx.pageSizes,
|
|
2388
|
-
layout:
|
|
2409
|
+
layout: computedLayout.value,
|
|
2389
2410
|
onSizeChange: _ctx.handleSizeChange,
|
|
2390
2411
|
onCurrentChange: _ctx.handleCurrentChange,
|
|
2391
2412
|
"set-scroll-top": 500,
|
|
2392
2413
|
background: ""
|
|
2393
|
-
}, _ctx.$attrs),
|
|
2414
|
+
}, _ctx.$attrs), {
|
|
2415
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2416
|
+
props.enableCustomPageSize ? ((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)("span", Paginationvue_type_script_setup_true_lang_ts_name_Pagination_hoisted_1, [
|
|
2417
|
+
(0, __WEBPACK_EXTERNAL_MODULE_vue__.createVNode)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElSelect), {
|
|
2418
|
+
class: "size-select",
|
|
2419
|
+
modelValue: pageSize.value,
|
|
2420
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event)=>pageSize.value = $event),
|
|
2421
|
+
filterable: "",
|
|
2422
|
+
"allow-create": "",
|
|
2423
|
+
"default-first-option": "",
|
|
2424
|
+
"reserve-keyword": false
|
|
2425
|
+
}, {
|
|
2426
|
+
default: (0, __WEBPACK_EXTERNAL_MODULE_vue__.withCtx)(()=>[
|
|
2427
|
+
((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(true), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createElementBlock)(__WEBPACK_EXTERNAL_MODULE_vue__.Fragment, null, (0, __WEBPACK_EXTERNAL_MODULE_vue__.renderList)(_ctx.pageSizes, (item)=>((0, __WEBPACK_EXTERNAL_MODULE_vue__.openBlock)(), (0, __WEBPACK_EXTERNAL_MODULE_vue__.createBlock)((0, __WEBPACK_EXTERNAL_MODULE_vue__.unref)(__WEBPACK_EXTERNAL_MODULE_element_sun__.ElOption), {
|
|
2428
|
+
key: item,
|
|
2429
|
+
label: item + '条/页',
|
|
2430
|
+
value: item
|
|
2431
|
+
}, null, 8, [
|
|
2432
|
+
"label",
|
|
2433
|
+
"value"
|
|
2434
|
+
]))), 128))
|
|
2435
|
+
]),
|
|
2436
|
+
_: 1
|
|
2437
|
+
}, 8, [
|
|
2438
|
+
"modelValue"
|
|
2439
|
+
])
|
|
2440
|
+
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
2441
|
+
]),
|
|
2442
|
+
_: 1
|
|
2443
|
+
}, 16, [
|
|
2394
2444
|
"current-page",
|
|
2395
2445
|
"page-size",
|
|
2396
2446
|
"total",
|
|
2397
2447
|
"page-sizes",
|
|
2448
|
+
"layout",
|
|
2398
2449
|
"onSizeChange",
|
|
2399
2450
|
"onCurrentChange"
|
|
2400
2451
|
]));
|
|
2401
2452
|
}
|
|
2402
2453
|
});
|
|
2403
|
-
const Pagination_exports_ = Paginationvue_type_script_setup_true_lang_ts_name_Pagination
|
|
2454
|
+
const Pagination_exports_ = /*#__PURE__*/ (0, exportHelper["default"])(Paginationvue_type_script_setup_true_lang_ts_name_Pagination, [
|
|
2455
|
+
[
|
|
2456
|
+
'__scopeId',
|
|
2457
|
+
"data-v-eb218d18"
|
|
2458
|
+
]
|
|
2459
|
+
]);
|
|
2404
2460
|
/* ESM default export */ const Pagination = Pagination_exports_;
|
|
2405
2461
|
const pro_tablevue_type_script_lang_ts_setup_true_name_ProTable_hoisted_1 = {
|
|
2406
2462
|
class: "relative flex flex-1 flex-col overflow-hidden"
|
|
@@ -2516,6 +2572,10 @@ const SELECTION = 'selection';
|
|
|
2516
2572
|
scrollLoad: {
|
|
2517
2573
|
type: Function,
|
|
2518
2574
|
default: void 0
|
|
2575
|
+
},
|
|
2576
|
+
enableCustomPageSize: {
|
|
2577
|
+
type: Boolean,
|
|
2578
|
+
default: false
|
|
2519
2579
|
}
|
|
2520
2580
|
},
|
|
2521
2581
|
emits: [
|
|
@@ -3101,11 +3161,13 @@ const SELECTION = 'selection';
|
|
|
3101
3161
|
"page-info": paginationInfo.value,
|
|
3102
3162
|
"page-sizes": props.pageSizes,
|
|
3103
3163
|
"handle-size-change": handleSizeChange,
|
|
3104
|
-
"handle-current-change": changeCurrentPage
|
|
3164
|
+
"handle-current-change": changeCurrentPage,
|
|
3165
|
+
"enable-custom-page-size": props.enableCustomPageSize
|
|
3105
3166
|
}, null, 8, [
|
|
3106
3167
|
"layout",
|
|
3107
3168
|
"page-info",
|
|
3108
|
-
"page-sizes"
|
|
3169
|
+
"page-sizes",
|
|
3170
|
+
"enable-custom-page-size"
|
|
3109
3171
|
])
|
|
3110
3172
|
])) : (0, __WEBPACK_EXTERNAL_MODULE_vue__.createCommentVNode)("", true)
|
|
3111
3173
|
]));
|