bkui-vue 0.0.1-beta.391 → 0.0.1-beta.393
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/index.cjs.js +35 -35
- package/dist/index.esm.js +856 -857
- package/dist/index.umd.js +9 -9
- package/lib/affix/index.js +128 -60
- package/lib/alert/index.js +124 -56
- package/lib/animate-number/index.js +106 -42
- package/lib/backtop/index.js +133 -61
- package/lib/badge/index.js +114 -50
- package/lib/breadcrumb/index.js +133 -67
- package/lib/button/index.js +147 -68
- package/lib/card/index.js +154 -69
- package/lib/cascader/index.js +242 -168
- package/lib/checkbox/index.js +139 -77
- package/lib/code-diff/index.js +121 -79
- package/lib/collapse/index.js +150 -84
- package/lib/color-picker/index.js +245 -193
- package/lib/components.js +671 -434
- package/lib/container/index.js +125 -64
- package/lib/date-picker/index.js +563 -462
- package/lib/dialog/index.js +198 -108
- package/lib/directives/index.js +138 -92
- package/lib/dist.index.js +133 -48
- package/lib/divider/index.js +118 -50
- package/lib/dropdown/index.js +155 -73
- package/lib/exception/index.js +145 -97
- package/lib/fixed-navbar/index.js +107 -43
- package/lib/form/index.js +193 -107
- package/lib/icon/angle-double-down-line.js +90 -30
- package/lib/icon/angle-double-left-line.js +90 -30
- package/lib/icon/angle-double-left.js +90 -30
- package/lib/icon/angle-double-right-line.js +90 -30
- package/lib/icon/angle-double-right.js +90 -30
- package/lib/icon/angle-double-up-line.js +90 -30
- package/lib/icon/angle-down-fill.js +90 -30
- package/lib/icon/angle-down-line.js +90 -30
- package/lib/icon/angle-down.js +90 -30
- package/lib/icon/angle-left.js +90 -30
- package/lib/icon/angle-right.js +90 -30
- package/lib/icon/angle-up-fill.js +90 -30
- package/lib/icon/angle-up.js +90 -30
- package/lib/icon/archive-fill.js +90 -30
- package/lib/icon/arrows-left.js +90 -30
- package/lib/icon/arrows-right.js +90 -30
- package/lib/icon/audio-fill.js +90 -30
- package/lib/icon/bk.js +90 -30
- package/lib/icon/circle.js +90 -30
- package/lib/icon/close-line.js +90 -30
- package/lib/icon/close.js +90 -30
- package/lib/icon/code.js +90 -30
- package/lib/icon/cog-shape.js +90 -30
- package/lib/icon/collapse-left.js +90 -30
- package/lib/icon/copy.js +90 -30
- package/lib/icon/data-shape.js +90 -30
- package/lib/icon/del.js +90 -30
- package/lib/icon/doc-fill.js +90 -30
- package/lib/icon/done.js +90 -30
- package/lib/icon/down-shape.js +90 -30
- package/lib/icon/down-small.js +90 -30
- package/lib/icon/edit-line.js +90 -30
- package/lib/icon/ellipsis.js +90 -30
- package/lib/icon/enlarge-line.js +90 -30
- package/lib/icon/error.js +90 -30
- package/lib/icon/excel-fill.js +90 -30
- package/lib/icon/exclamation-circle-shape.js +90 -30
- package/lib/icon/eye.js +90 -30
- package/lib/icon/filliscreen-line.js +90 -30
- package/lib/icon/folder-open.js +90 -30
- package/lib/icon/folder-shape-open.js +90 -30
- package/lib/icon/folder-shape.js +90 -30
- package/lib/icon/folder.js +90 -30
- package/lib/icon/funnel.js +90 -30
- package/lib/icon/help-document-fill.js +90 -30
- package/lib/icon/help-fill.js +90 -30
- package/lib/icon/help.js +90 -30
- package/lib/icon/image-fill.js +90 -30
- package/lib/icon/img-placehoulder.js +88 -52
- package/lib/icon/index.js +255 -267
- package/lib/icon/info-line.js +88 -52
- package/lib/icon/info.js +88 -52
- package/lib/icon/left-shape.js +88 -52
- package/lib/icon/left-turn-line.js +88 -52
- package/lib/icon/narrow-line.js +88 -52
- package/lib/icon/original.js +88 -52
- package/lib/icon/pdf-fill.js +88 -52
- package/lib/icon/play-shape.js +88 -52
- package/lib/icon/plus.js +88 -52
- package/lib/icon/ppt-fill.js +88 -52
- package/lib/icon/qq.js +88 -52
- package/lib/icon/right-shape.js +88 -52
- package/lib/icon/right-turn-line.js +88 -52
- package/lib/icon/search.js +88 -52
- package/lib/icon/share.js +88 -52
- package/lib/icon/spinner.js +88 -52
- package/lib/icon/success.js +88 -52
- package/lib/icon/switcher-loading.js +88 -52
- package/lib/icon/text-file.js +88 -52
- package/lib/icon/text-fill.js +88 -52
- package/lib/icon/transfer.js +88 -52
- package/lib/icon/tree-application-shape.js +88 -52
- package/lib/icon/unfull-screen.js +88 -52
- package/lib/icon/unvisible.js +88 -52
- package/lib/icon/up-shape.js +88 -52
- package/lib/icon/upload.js +88 -52
- package/lib/icon/video-fill.js +88 -52
- package/lib/icon/warn.js +88 -52
- package/lib/icon/weixin.js +88 -52
- package/lib/image/index.js +213 -164
- package/lib/index.js +134 -50
- package/lib/info-box/index.js +206 -152
- package/lib/input/index.js +167 -99
- package/lib/link/index.js +115 -47
- package/lib/loading/index.js +127 -67
- package/lib/menu/index.js +156 -92
- package/lib/message/index.js +148 -76
- package/lib/modal/index.js +151 -85
- package/lib/navigation/index.js +134 -66
- package/lib/notify/index.js +153 -81
- package/lib/overflow-title/index.js +128 -92
- package/lib/pagination/index.js +220 -131
- package/lib/plugin-popover/index.js +329 -148
- package/lib/plugins/index.js +100 -33
- package/lib/popover/index.js +332 -153
- package/lib/popover2/index.js +99 -35
- package/lib/preset.js +104 -37
- package/lib/process/index.js +134 -92
- package/lib/progress/index.js +127 -63
- package/lib/radio/index.js +142 -81
- package/lib/rate/index.js +127 -63
- package/lib/resize-layout/index.js +147 -79
- package/lib/search-select/index.js +220 -168
- package/lib/select/index.js +394 -315
- package/lib/shared/index.js +203 -228
- package/lib/sideslider/index.js +137 -88
- package/lib/slider/index.js +196 -147
- package/lib/steps/index.js +152 -105
- package/lib/swiper/index.js +126 -62
- package/lib/switcher/index.js +133 -65
- package/lib/tab/index.js +188 -118
- package/lib/table/index.js +572 -457
- package/lib/table-column/index.js +197 -129
- package/lib/tag/index.js +130 -58
- package/lib/tag-input/index.js +277 -175
- package/lib/time-picker/index.js +111 -40
- package/lib/timeline/index.js +114 -50
- package/lib/transfer/index.js +174 -89
- package/lib/tree/index.js +235 -158
- package/lib/upload/index.js +227 -173
- package/lib/virtual-render/index.js +154 -86
- package/package.json +1 -1
package/lib/pagination/index.js
CHANGED
@@ -1,42 +1,134 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"), require("../select"), require("../icon"), require("../popover"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue", "../select", "../icon", "../popover"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../select"), require("../icon"), require("../popover")) : factory(root["../shared"], root["vue"], root["../select"], root["../icon"], root["../popover"]);
|
8
|
+
for(var i in a) (typeof exports === 'object' ? exports : root)[i] = a[i];
|
9
|
+
}
|
10
|
+
})(self, (__WEBPACK_EXTERNAL_MODULE__4212__, __WEBPACK_EXTERNAL_MODULE__748__, __WEBPACK_EXTERNAL_MODULE__6422__, __WEBPACK_EXTERNAL_MODULE__6870__, __WEBPACK_EXTERNAL_MODULE__5537__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 6870:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6870__;
|
19
|
+
|
20
|
+
/***/ }),
|
21
|
+
|
22
|
+
/***/ 5537:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__5537__;
|
26
|
+
|
27
|
+
/***/ }),
|
28
|
+
|
29
|
+
/***/ 6422:
|
30
|
+
/***/ ((module) => {
|
31
|
+
|
32
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__6422__;
|
33
|
+
|
34
|
+
/***/ }),
|
35
|
+
|
36
|
+
/***/ 4212:
|
37
|
+
/***/ ((module) => {
|
38
|
+
|
39
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
40
|
+
|
41
|
+
/***/ }),
|
42
|
+
|
43
|
+
/***/ 748:
|
44
|
+
/***/ ((module) => {
|
45
|
+
|
46
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
47
|
+
|
48
|
+
/***/ })
|
49
|
+
|
50
|
+
/******/ });
|
9
51
|
/************************************************************************/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
14
|
-
/******/
|
15
|
-
/******/
|
16
|
-
/******/
|
17
|
-
/******/
|
52
|
+
/******/ // The module cache
|
53
|
+
/******/ var __webpack_module_cache__ = {};
|
54
|
+
/******/
|
55
|
+
/******/ // The require function
|
56
|
+
/******/ function __webpack_require__(moduleId) {
|
57
|
+
/******/ // Check if module is in cache
|
58
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
59
|
+
/******/ if (cachedModule !== undefined) {
|
60
|
+
/******/ return cachedModule.exports;
|
18
61
|
/******/ }
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
23
|
-
/******/
|
24
|
-
/******/
|
25
|
-
/******/
|
26
|
-
/******/
|
62
|
+
/******/ // Create a new module (and put it into the cache)
|
63
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
64
|
+
/******/ // no module.id needed
|
65
|
+
/******/ // no module.loaded needed
|
66
|
+
/******/ exports: {}
|
67
|
+
/******/ };
|
68
|
+
/******/
|
69
|
+
/******/ // Execute the module function
|
70
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
71
|
+
/******/
|
72
|
+
/******/ // Return the exports of the module
|
73
|
+
/******/ return module.exports;
|
74
|
+
/******/ }
|
75
|
+
/******/
|
76
|
+
/************************************************************************/
|
77
|
+
/******/ /* webpack/runtime/compat get default export */
|
78
|
+
/******/ (() => {
|
79
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
80
|
+
/******/ __webpack_require__.n = (module) => {
|
81
|
+
/******/ var getter = module && module.__esModule ?
|
82
|
+
/******/ () => (module['default']) :
|
83
|
+
/******/ () => (module);
|
84
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
85
|
+
/******/ return getter;
|
86
|
+
/******/ };
|
87
|
+
/******/ })();
|
88
|
+
/******/
|
89
|
+
/******/ /* webpack/runtime/define property getters */
|
90
|
+
/******/ (() => {
|
91
|
+
/******/ // define getter functions for harmony exports
|
92
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
93
|
+
/******/ for(var key in definition) {
|
94
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
95
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
96
|
+
/******/ }
|
97
|
+
/******/ }
|
98
|
+
/******/ };
|
99
|
+
/******/ })();
|
100
|
+
/******/
|
101
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
102
|
+
/******/ (() => {
|
103
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
104
|
+
/******/ })();
|
105
|
+
/******/
|
106
|
+
/******/ /* webpack/runtime/make namespace object */
|
107
|
+
/******/ (() => {
|
108
|
+
/******/ // define __esModule on exports
|
109
|
+
/******/ __webpack_require__.r = (exports) => {
|
110
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
111
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
112
|
+
/******/ }
|
113
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
114
|
+
/******/ };
|
115
|
+
/******/ })();
|
116
|
+
/******/
|
27
117
|
/************************************************************************/
|
28
118
|
var __webpack_exports__ = {};
|
119
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
120
|
+
(() => {
|
121
|
+
// ESM COMPAT FLAG
|
122
|
+
__webpack_require__.r(__webpack_exports__);
|
29
123
|
|
30
124
|
// EXPORTS
|
31
125
|
__webpack_require__.d(__webpack_exports__, {
|
32
|
-
"
|
33
|
-
"
|
126
|
+
"BkPagination": () => (/* binding */ BkPagination),
|
127
|
+
"default": () => (/* binding */ src)
|
34
128
|
});
|
35
129
|
|
36
|
-
|
37
|
-
var
|
38
|
-
var y = x => () => x
|
39
|
-
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["classes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.classes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
130
|
+
// EXTERNAL MODULE: external "../shared"
|
131
|
+
var external_shared_ = __webpack_require__(4212);
|
40
132
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
41
133
|
function _defineProperty(obj, key, value) {
|
42
134
|
if (key in obj) {
|
@@ -118,14 +210,11 @@ function _nonIterableRest() {
|
|
118
210
|
function _slicedToArray(arr, i) {
|
119
211
|
return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest();
|
120
212
|
}
|
121
|
-
|
122
|
-
var
|
123
|
-
|
124
|
-
|
125
|
-
|
126
|
-
var external_select_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
127
|
-
var external_select_y = x => () => x
|
128
|
-
const external_select_namespaceObject = external_select_x({ ["BkOption"]: () => __WEBPACK_EXTERNAL_MODULE__select_22a14f69__.BkOption, ["default"]: () => __WEBPACK_EXTERNAL_MODULE__select_22a14f69__["default"] });
|
213
|
+
// EXTERNAL MODULE: external "vue"
|
214
|
+
var external_vue_ = __webpack_require__(748);
|
215
|
+
// EXTERNAL MODULE: external "../select"
|
216
|
+
var external_select_ = __webpack_require__(6422);
|
217
|
+
var external_select_default = /*#__PURE__*/__webpack_require__.n(external_select_);
|
129
218
|
;// CONCATENATED MODULE: ../../packages/pagination/src/use-limit.tsx
|
130
219
|
|
131
220
|
|
@@ -159,19 +248,19 @@ const external_select_namespaceObject = external_select_x({ ["BkOption"]: () =>
|
|
159
248
|
|
160
249
|
|
161
250
|
function _isSlot(s) {
|
162
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,
|
251
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
|
163
252
|
}
|
164
253
|
|
165
254
|
/* harmony default export */ const use_limit = (function () {
|
166
|
-
var _getCurrentInstance = (0,
|
255
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
167
256
|
proxy = _getCurrentInstance.proxy;
|
168
257
|
|
169
|
-
var localLimit = (0,
|
258
|
+
var localLimit = (0,external_vue_.ref)(proxy.limit);
|
170
259
|
/**
|
171
260
|
* @desc 同步props.limit的变化
|
172
261
|
*/
|
173
262
|
|
174
|
-
(0,
|
263
|
+
(0,external_vue_.watch)(function () {
|
175
264
|
return proxy.limit;
|
176
265
|
}, function (limit) {
|
177
266
|
localLimit.value = limit;
|
@@ -180,10 +269,10 @@ function _isSlot(s) {
|
|
180
269
|
* @desc 同步props.limitlist的变化并判断props.limit的合法性
|
181
270
|
*/
|
182
271
|
|
183
|
-
(0,
|
272
|
+
(0,external_vue_.watch)(function () {
|
184
273
|
return proxy.limitList;
|
185
274
|
}, function (limitList) {
|
186
|
-
(0,
|
275
|
+
(0,external_vue_.nextTick)(function () {
|
187
276
|
if (!limitList.includes(localLimit.value)) {
|
188
277
|
var _limitList = _slicedToArray(limitList, 1);
|
189
278
|
|
@@ -211,7 +300,7 @@ function _isSlot(s) {
|
|
211
300
|
return null;
|
212
301
|
}
|
213
302
|
|
214
|
-
return (0,
|
303
|
+
return (0,external_vue_.createVNode)("div", (0,external_vue_.mergeProps)({
|
215
304
|
"class": {
|
216
305
|
'bk-pagination-limit': true,
|
217
306
|
'is-first': isFirst,
|
@@ -219,7 +308,7 @@ function _isSlot(s) {
|
|
219
308
|
}
|
220
309
|
}, {
|
221
310
|
disabled: proxy.disabled
|
222
|
-
}), [(0,
|
311
|
+
}), [(0,external_vue_.createVNode)("div", null, [(0,external_vue_.createTextVNode)("\u6BCF\u9875")]), (0,external_vue_.createVNode)((external_select_default()), {
|
223
312
|
"class": "bk-pagination-limit-select",
|
224
313
|
"clearable": false,
|
225
314
|
"size": "small",
|
@@ -228,7 +317,7 @@ function _isSlot(s) {
|
|
228
317
|
"onChange": handleLimitChange,
|
229
318
|
"disabled": proxy.disabled
|
230
319
|
}, _isSlot(_slot = proxy.limitList.map(function (num, index) {
|
231
|
-
return (0,
|
320
|
+
return (0,external_vue_.createVNode)(external_select_.BkOption, {
|
232
321
|
"value": num,
|
233
322
|
"label": "".concat(num),
|
234
323
|
"key": "".concat(index, "_").concat(num)
|
@@ -237,7 +326,7 @@ function _isSlot(s) {
|
|
237
326
|
"default": function _default() {
|
238
327
|
return [_slot];
|
239
328
|
}
|
240
|
-
}), (0,
|
329
|
+
}), (0,external_vue_.createVNode)("div", null, [(0,external_vue_.createTextVNode)("\u6761")])]);
|
241
330
|
};
|
242
331
|
|
243
332
|
return {
|
@@ -245,10 +334,8 @@ function _isSlot(s) {
|
|
245
334
|
render: render
|
246
335
|
};
|
247
336
|
});
|
248
|
-
|
249
|
-
var
|
250
|
-
var external_icon_y = x => () => x
|
251
|
-
const external_icon_namespaceObject = external_icon_x({ ["AngleLeft"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleLeft, ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleRight, ["Ellipsis"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.Ellipsis });
|
337
|
+
// EXTERNAL MODULE: external "../icon"
|
338
|
+
var external_icon_ = __webpack_require__(6870);
|
252
339
|
;// CONCATENATED MODULE: ../../packages/pagination/src/use-list.tsx
|
253
340
|
|
254
341
|
|
@@ -281,19 +368,19 @@ const external_icon_namespaceObject = external_icon_x({ ["AngleLeft"]: () => __W
|
|
281
368
|
|
282
369
|
var PAGE_ITEMS_NUM = 5;
|
283
370
|
/* harmony default export */ const use_list = (function () {
|
284
|
-
var _getCurrentInstance = (0,
|
371
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
285
372
|
proxy = _getCurrentInstance.proxy;
|
286
373
|
|
287
|
-
var localCurrent = (0,
|
288
|
-
var isPagePreDisabled = (0,
|
374
|
+
var localCurrent = (0,external_vue_.ref)(1);
|
375
|
+
var isPagePreDisabled = (0,external_vue_.computed)(function () {
|
289
376
|
return localCurrent.value === 1;
|
290
377
|
});
|
291
|
-
var isPageNextDisabled = (0,
|
378
|
+
var isPageNextDisabled = (0,external_vue_.computed)(function () {
|
292
379
|
return localCurrent.value === proxy.totalPageNum;
|
293
380
|
});
|
294
|
-
var showPreBatch = (0,
|
295
|
-
var showNextBatch = (0,
|
296
|
-
var list = (0,
|
381
|
+
var showPreBatch = (0,external_vue_.ref)(false);
|
382
|
+
var showNextBatch = (0,external_vue_.ref)(false);
|
383
|
+
var list = (0,external_vue_.computed)(function () {
|
297
384
|
showPreBatch.value = false;
|
298
385
|
showNextBatch.value = false;
|
299
386
|
var stack = [];
|
@@ -321,11 +408,11 @@ var PAGE_ITEMS_NUM = 5;
|
|
321
408
|
|
322
409
|
return stack;
|
323
410
|
});
|
324
|
-
(0,
|
411
|
+
(0,external_vue_.watch)(function () {
|
325
412
|
return proxy.modelValue;
|
326
413
|
}, function (modelValue) {
|
327
414
|
// nextTick延后执行,保证proxy.totalPageNum计算正确
|
328
|
-
(0,
|
415
|
+
(0,external_vue_.nextTick)(function () {
|
329
416
|
if (modelValue >= 1 && modelValue <= proxy.totalPageNum) {
|
330
417
|
localCurrent.value = modelValue;
|
331
418
|
} else if (modelValue < 1) {
|
@@ -338,8 +425,8 @@ var PAGE_ITEMS_NUM = 5;
|
|
338
425
|
immediate: true
|
339
426
|
}); // 切换limit时会导致totalPageNum变小旧的current可能会超出范围,修正localCurrent
|
340
427
|
|
341
|
-
(0,
|
342
|
-
(0,
|
428
|
+
(0,external_vue_.nextTick)(function () {
|
429
|
+
(0,external_vue_.watch)(function () {
|
343
430
|
return proxy.totalPageNum;
|
344
431
|
}, function (totalPageNum) {
|
345
432
|
if (localCurrent.value > totalPageNum) {
|
@@ -403,19 +490,19 @@ var PAGE_ITEMS_NUM = 5;
|
|
403
490
|
var render = function render(_ref) {
|
404
491
|
var isFirst = _ref.isFirst,
|
405
492
|
isLast = _ref.isLast;
|
406
|
-
return (0,
|
493
|
+
return (0,external_vue_.createVNode)("div", {
|
407
494
|
"class": {
|
408
495
|
'bk-pagination-list': true,
|
409
496
|
'is-first': isFirst,
|
410
497
|
'is-last': isLast
|
411
498
|
}
|
412
|
-
}, [(0,
|
499
|
+
}, [(0,external_vue_.createVNode)("div", {
|
413
500
|
"class": {
|
414
501
|
'bk-pagination-list-pre': true,
|
415
502
|
'is-disabled': isPagePreDisabled.value
|
416
503
|
},
|
417
504
|
"onClick": handlePrePage
|
418
|
-
}, [proxy.prevText || (0,
|
505
|
+
}, [proxy.prevText || (0,external_vue_.createVNode)(external_icon_.AngleLeft, null, null)]), (0,external_vue_.createVNode)("div", {
|
419
506
|
"class": {
|
420
507
|
'bk-pagination-list-item': true,
|
421
508
|
'is-active': localCurrent.value === 1
|
@@ -424,12 +511,12 @@ var PAGE_ITEMS_NUM = 5;
|
|
424
511
|
"onClick": function onClick() {
|
425
512
|
return handleItemClick(1);
|
426
513
|
}
|
427
|
-
}, [(0,
|
514
|
+
}, [(0,external_vue_.createTextVNode)("1")]), showPreBatch.value && (0,external_vue_.createVNode)("div", {
|
428
515
|
"key": "pre-batch",
|
429
516
|
"class": "bk-pagination-list-pre-batch",
|
430
517
|
"onClick": handlePreBatch
|
431
|
-
}, [(0,
|
432
|
-
return (0,
|
518
|
+
}, [(0,external_vue_.createVNode)(external_icon_.Ellipsis, null, null)]), list.value.map(function (num) {
|
519
|
+
return (0,external_vue_.createVNode)("div", {
|
433
520
|
"class": {
|
434
521
|
'bk-pagination-list-item': true,
|
435
522
|
'is-active': localCurrent.value === num
|
@@ -439,11 +526,11 @@ var PAGE_ITEMS_NUM = 5;
|
|
439
526
|
return handleItemClick(num);
|
440
527
|
}
|
441
528
|
}, [num]);
|
442
|
-
}), showNextBatch.value && (0,
|
529
|
+
}), showNextBatch.value && (0,external_vue_.createVNode)("div", {
|
443
530
|
"key": "next-batch",
|
444
531
|
"class": "bk-pagination-list-next-batch",
|
445
532
|
"onClick": handleNextBatch
|
446
|
-
}, [(0,
|
533
|
+
}, [(0,external_vue_.createVNode)(external_icon_.Ellipsis, null, null)]), proxy.totalPageNum > 1 && (0,external_vue_.createVNode)("div", {
|
447
534
|
"class": {
|
448
535
|
'bk-pagination-list-item': true,
|
449
536
|
'is-active': localCurrent.value === proxy.totalPageNum
|
@@ -452,13 +539,13 @@ var PAGE_ITEMS_NUM = 5;
|
|
452
539
|
"onClick": function onClick() {
|
453
540
|
return handleItemClick(proxy.totalPageNum);
|
454
541
|
}
|
455
|
-
}, [proxy.totalPageNum]), (0,
|
542
|
+
}, [proxy.totalPageNum]), (0,external_vue_.createVNode)("div", {
|
456
543
|
"class": {
|
457
544
|
'bk-pagination-list-pre': true,
|
458
545
|
'is-disabled': isPageNextDisabled.value
|
459
546
|
},
|
460
547
|
"onClick": handleNextPage
|
461
|
-
}, [proxy.nextText || (0,
|
548
|
+
}, [proxy.nextText || (0,external_vue_.createVNode)(external_icon_.AngleRight, null, null)])]);
|
462
549
|
};
|
463
550
|
|
464
551
|
return {
|
@@ -466,10 +553,9 @@ var PAGE_ITEMS_NUM = 5;
|
|
466
553
|
render: render
|
467
554
|
};
|
468
555
|
});
|
469
|
-
|
470
|
-
var
|
471
|
-
var
|
472
|
-
const external_popover_namespaceObject = external_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__["default"] });
|
556
|
+
// EXTERNAL MODULE: external "../popover"
|
557
|
+
var external_popover_ = __webpack_require__(5537);
|
558
|
+
var external_popover_default = /*#__PURE__*/__webpack_require__.n(external_popover_);
|
473
559
|
;// CONCATENATED MODULE: ../../packages/pagination/src/use-small-list.tsx
|
474
560
|
|
475
561
|
|
@@ -502,22 +588,22 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
502
588
|
|
503
589
|
|
504
590
|
/* harmony default export */ const use_small_list = (function () {
|
505
|
-
var _getCurrentInstance = (0,
|
591
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
506
592
|
proxy = _getCurrentInstance.proxy;
|
507
593
|
|
508
|
-
var inputRef = (0,
|
509
|
-
var isFocused = (0,
|
510
|
-
var localCurrent = (0,
|
511
|
-
var isPagePreDisabled = (0,
|
594
|
+
var inputRef = (0,external_vue_.ref)(null);
|
595
|
+
var isFocused = (0,external_vue_.ref)(false);
|
596
|
+
var localCurrent = (0,external_vue_.ref)(1);
|
597
|
+
var isPagePreDisabled = (0,external_vue_.computed)(function () {
|
512
598
|
return localCurrent.value === 1;
|
513
599
|
});
|
514
|
-
var isPageNextDisabled = (0,
|
600
|
+
var isPageNextDisabled = (0,external_vue_.computed)(function () {
|
515
601
|
return localCurrent.value === proxy.totalPageNum;
|
516
602
|
}); // 缓存input输入,失焦或者enter键触发提交
|
517
603
|
|
518
604
|
var inputMemo = 0; // 页码可选列表
|
519
605
|
|
520
|
-
var list = (0,
|
606
|
+
var list = (0,external_vue_.computed)(function () {
|
521
607
|
var stack = [];
|
522
608
|
|
523
609
|
for (var i = 1; i <= proxy.totalPageNum; i++) {
|
@@ -526,11 +612,11 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
526
612
|
|
527
613
|
return stack;
|
528
614
|
});
|
529
|
-
(0,
|
615
|
+
(0,external_vue_.watch)(function () {
|
530
616
|
return proxy.modelValue;
|
531
617
|
}, function (modelValue) {
|
532
618
|
// nextTick延后执行,保证proxy.totalPageNum计算正确
|
533
|
-
(0,
|
619
|
+
(0,external_vue_.nextTick)(function () {
|
534
620
|
if (modelValue >= 1 && modelValue <= proxy.totalPageNum) {
|
535
621
|
localCurrent.value = modelValue;
|
536
622
|
} else if (modelValue < 1) {
|
@@ -545,8 +631,8 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
545
631
|
immediate: true
|
546
632
|
}); // 切换limit时会导致totalPageNum变小旧的current可能会超出范围,修正localCurrent
|
547
633
|
|
548
|
-
(0,
|
549
|
-
(0,
|
634
|
+
(0,external_vue_.nextTick)(function () {
|
635
|
+
(0,external_vue_.watch)(function () {
|
550
636
|
return proxy.totalPageNum;
|
551
637
|
}, function (totalPageNum) {
|
552
638
|
if (localCurrent.value > totalPageNum) {
|
@@ -639,15 +725,15 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
639
725
|
};
|
640
726
|
|
641
727
|
var render = function render() {
|
642
|
-
return (0,
|
728
|
+
return (0,external_vue_.createVNode)("div", {
|
643
729
|
"class": "bk-pagination-small-list"
|
644
|
-
}, [(0,
|
730
|
+
}, [(0,external_vue_.createVNode)("div", {
|
645
731
|
"class": {
|
646
732
|
'bk-pagination-btn-pre': true,
|
647
733
|
'is-disabled': isPagePreDisabled.value
|
648
734
|
},
|
649
735
|
"onClick": handlePrePage
|
650
|
-
}, [(0,
|
736
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleLeft, null, null)]), (0,external_vue_.createVNode)((external_popover_default()), {
|
651
737
|
"theme": "light",
|
652
738
|
"trigger": "click",
|
653
739
|
"arrow": false,
|
@@ -656,12 +742,12 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
656
742
|
"placement": "bottom"
|
657
743
|
}, {
|
658
744
|
"default": function _default() {
|
659
|
-
return (0,
|
745
|
+
return (0,external_vue_.createVNode)("div", {
|
660
746
|
"class": {
|
661
747
|
'bk-pagination-picker': true,
|
662
748
|
'is-focused': isFocused.value
|
663
749
|
}
|
664
|
-
}, [(0,
|
750
|
+
}, [(0,external_vue_.createVNode)("span", {
|
665
751
|
"ref": inputRef,
|
666
752
|
"class": "bk-pagination-editor",
|
667
753
|
"contenteditable": true,
|
@@ -670,15 +756,15 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
670
756
|
"onBlur": handlePageEditorBlur,
|
671
757
|
"onInput": handlePageEditorInput,
|
672
758
|
"onKeydown": handlePageEditorKeydown
|
673
|
-
}, [localCurrent.value]), (0,
|
759
|
+
}, [localCurrent.value]), (0,external_vue_.createVNode)("span", null, [(0,external_vue_.createTextVNode)("/")]), (0,external_vue_.createVNode)("span", {
|
674
760
|
"class": "bk-pagination-small-list-total"
|
675
761
|
}, [proxy.totalPageNum])]);
|
676
762
|
},
|
677
763
|
content: function content() {
|
678
|
-
return (0,
|
764
|
+
return (0,external_vue_.createVNode)("div", {
|
679
765
|
"class": "bk-pagination-picker-list"
|
680
766
|
}, [list.value.map(function (item) {
|
681
|
-
return (0,
|
767
|
+
return (0,external_vue_.createVNode)("div", {
|
682
768
|
"class": {
|
683
769
|
item: true,
|
684
770
|
'is-actived': item === localCurrent.value
|
@@ -690,13 +776,13 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
690
776
|
}, [item]);
|
691
777
|
})]);
|
692
778
|
}
|
693
|
-
}), (0,
|
779
|
+
}), (0,external_vue_.createVNode)("div", {
|
694
780
|
"class": {
|
695
781
|
'bk-pagination-btn-next': true,
|
696
782
|
'is-disabled': isPageNextDisabled.value
|
697
783
|
},
|
698
784
|
"onClick": handleNextPage
|
699
|
-
}, [(0,
|
785
|
+
}, [(0,external_vue_.createVNode)(external_icon_.AngleRight, null, null)])]);
|
700
786
|
};
|
701
787
|
|
702
788
|
return {
|
@@ -738,14 +824,14 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
738
824
|
var isFirst = _ref.isFirst,
|
739
825
|
isLast = _ref.isLast;
|
740
826
|
|
741
|
-
var _getCurrentInstance = (0,
|
827
|
+
var _getCurrentInstance = (0,external_vue_.getCurrentInstance)(),
|
742
828
|
props = _getCurrentInstance.props;
|
743
829
|
|
744
830
|
if (!props.showTotalCount) {
|
745
831
|
return null;
|
746
832
|
}
|
747
833
|
|
748
|
-
return (0,
|
834
|
+
return (0,external_vue_.createVNode)("div", (0,external_vue_.mergeProps)({
|
749
835
|
"class": {
|
750
836
|
'bk-pagination-total': true,
|
751
837
|
'is-first': isFirst,
|
@@ -753,9 +839,9 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
753
839
|
}
|
754
840
|
}, {
|
755
841
|
disabled: props.disabled
|
756
|
-
}), [(0,
|
842
|
+
}), [(0,external_vue_.createTextVNode)("\u5171\u8BA1"), (0,external_vue_.createVNode)("div", {
|
757
843
|
"class": "bk-pagination-total-num"
|
758
|
-
}, [props.count]), (0,
|
844
|
+
}, [props.count]), (0,external_vue_.createTextVNode)("\u6761")]);
|
759
845
|
};
|
760
846
|
});
|
761
847
|
;// CONCATENATED MODULE: ../../packages/pagination/src/pagination.tsx
|
@@ -795,22 +881,22 @@ const external_popover_namespaceObject = external_popover_x({ ["default"]: () =>
|
|
795
881
|
|
796
882
|
|
797
883
|
var paginationProps = {
|
798
|
-
modelValue:
|
799
|
-
count:
|
800
|
-
limit:
|
801
|
-
limitList:
|
802
|
-
showLimit:
|
803
|
-
type:
|
804
|
-
location:
|
805
|
-
align:
|
806
|
-
size:
|
807
|
-
small:
|
808
|
-
showTotalCount:
|
809
|
-
prevText:
|
810
|
-
nextText:
|
811
|
-
disabled:
|
812
|
-
beforeChange:
|
813
|
-
layout:
|
884
|
+
modelValue: external_shared_.PropTypes.number.def(1),
|
885
|
+
count: external_shared_.PropTypes.number.def(0).isRequired,
|
886
|
+
limit: external_shared_.PropTypes.number.def(10),
|
887
|
+
limitList: external_shared_.PropTypes.arrayOf(Number).def([10, 20, 50, 100]),
|
888
|
+
showLimit: external_shared_.PropTypes.bool.def(true),
|
889
|
+
type: external_shared_.PropTypes.oneOf(['default', 'compact']).def('default'),
|
890
|
+
location: external_shared_.PropTypes.oneOf(['left', 'right']).def('right'),
|
891
|
+
align: external_shared_.PropTypes.oneOf(['left', 'center', 'right']).def('left'),
|
892
|
+
size: external_shared_.PropTypes.size(),
|
893
|
+
small: external_shared_.PropTypes.bool.def(false),
|
894
|
+
showTotalCount: external_shared_.PropTypes.bool.def(true),
|
895
|
+
prevText: external_shared_.PropTypes.string,
|
896
|
+
nextText: external_shared_.PropTypes.string,
|
897
|
+
disabled: external_shared_.PropTypes.bool.def(false),
|
898
|
+
beforeChange: external_shared_.PropTypes.func,
|
899
|
+
layout: external_shared_.PropTypes.custom(function (value) {
|
814
900
|
var layoutNameMap = {
|
815
901
|
total: true,
|
816
902
|
list: true,
|
@@ -821,14 +907,14 @@ var paginationProps = {
|
|
821
907
|
});
|
822
908
|
}, 'layout 的值只支持 * total、list、limit *').def(['total', 'list', 'limit'])
|
823
909
|
};
|
824
|
-
/* harmony default export */ const pagination = ((0,
|
910
|
+
/* harmony default export */ const pagination = ((0,external_vue_.defineComponent)({
|
825
911
|
name: 'Pagination',
|
826
912
|
props: paginationProps,
|
827
913
|
emits: ['update:modelValue', 'change', 'update:limit', 'limitChange'],
|
828
914
|
setup: function setup(props, context) {
|
829
|
-
var totalPageNum = (0,
|
915
|
+
var totalPageNum = (0,external_vue_.ref)(0);
|
830
916
|
|
831
|
-
var _toRefs = (0,
|
917
|
+
var _toRefs = (0,external_vue_.toRefs)(props),
|
832
918
|
count = _toRefs.count,
|
833
919
|
limit = _toRefs.limit;
|
834
920
|
|
@@ -846,7 +932,7 @@ var paginationProps = {
|
|
846
932
|
localLimit = _useLimit.limit,
|
847
933
|
renderLimit = _useLimit.render;
|
848
934
|
|
849
|
-
(0,
|
935
|
+
(0,external_vue_.watch)([count, localLimit, limit], function (_ref) {
|
850
936
|
var _ref2 = _slicedToArray(_ref, 2),
|
851
937
|
count = _ref2[0],
|
852
938
|
localLimit = _ref2[1];
|
@@ -856,11 +942,11 @@ var paginationProps = {
|
|
856
942
|
}, {
|
857
943
|
immediate: true
|
858
944
|
});
|
859
|
-
(0,
|
945
|
+
(0,external_vue_.watch)(listCurrent, function (listCurrent) {
|
860
946
|
context.emit('update:modelValue', listCurrent);
|
861
947
|
context.emit('change', listCurrent);
|
862
948
|
});
|
863
|
-
(0,
|
949
|
+
(0,external_vue_.watch)(smallListCurrent, function (smallListCurrent) {
|
864
950
|
if (!props.small) {
|
865
951
|
return;
|
866
952
|
}
|
@@ -868,7 +954,7 @@ var paginationProps = {
|
|
868
954
|
context.emit('update:modelValue', smallListCurrent);
|
869
955
|
context.emit('change', smallListCurrent);
|
870
956
|
});
|
871
|
-
(0,
|
957
|
+
(0,external_vue_.watch)(localLimit, function (localLimit) {
|
872
958
|
context.emit('limitChange', localLimit);
|
873
959
|
});
|
874
960
|
return {
|
@@ -883,7 +969,7 @@ var paginationProps = {
|
|
883
969
|
var _classes,
|
884
970
|
_this = this;
|
885
971
|
|
886
|
-
var paginationClass = (0,
|
972
|
+
var paginationClass = (0,external_shared_.classes)((_classes = {
|
887
973
|
'bk-pagination': true
|
888
974
|
}, _defineProperty(_classes, "bk-pagination--".concat(this.size), true), _defineProperty(_classes, "is-align-".concat(this.align), true), _classes));
|
889
975
|
var layoutMap = {
|
@@ -891,7 +977,7 @@ var paginationProps = {
|
|
891
977
|
list: this.small ? this.renderSmallList : this.renderList,
|
892
978
|
limit: this.renderLimit
|
893
979
|
};
|
894
|
-
return (0,
|
980
|
+
return (0,external_vue_.createVNode)("div", {
|
895
981
|
"class": paginationClass
|
896
982
|
}, [this.layout.map(function (layout, index) {
|
897
983
|
return layoutMap[layout]({
|
@@ -929,9 +1015,12 @@ var paginationProps = {
|
|
929
1015
|
*/
|
930
1016
|
|
931
1017
|
|
932
|
-
var BkPagination = (0,
|
1018
|
+
var BkPagination = (0,external_shared_.withInstall)(pagination);
|
933
1019
|
/* harmony default export */ const src = (BkPagination);
|
934
1020
|
|
935
|
-
|
936
|
-
|
937
|
-
|
1021
|
+
})();
|
1022
|
+
|
1023
|
+
/******/ return __webpack_exports__;
|
1024
|
+
/******/ })()
|
1025
|
+
;
|
1026
|
+
});
|