bkui-vue 0.0.1-beta.391 → 0.0.1-beta.392
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/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 +190 -143
- package/lib/plugins/index.js +100 -33
- package/lib/popover/index.js +193 -148
- 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/collapse/index.js
CHANGED
@@ -1,41 +1,109 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"), require("../icon"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue", "../icon"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue"), require("../icon")) : factory(root["../shared"], root["vue"], root["../icon"]);
|
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__6870__) => {
|
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
|
+
/***/ 4212:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
26
|
+
|
27
|
+
/***/ }),
|
28
|
+
|
29
|
+
/***/ 748:
|
30
|
+
/***/ ((module) => {
|
31
|
+
|
32
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
33
|
+
|
34
|
+
/***/ })
|
35
|
+
|
36
|
+
/******/ });
|
7
37
|
/************************************************************************/
|
8
|
-
/******/
|
9
|
-
/******/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
14
|
-
/******/
|
15
|
-
/******/
|
38
|
+
/******/ // The module cache
|
39
|
+
/******/ var __webpack_module_cache__ = {};
|
40
|
+
/******/
|
41
|
+
/******/ // The require function
|
42
|
+
/******/ function __webpack_require__(moduleId) {
|
43
|
+
/******/ // Check if module is in cache
|
44
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
45
|
+
/******/ if (cachedModule !== undefined) {
|
46
|
+
/******/ return cachedModule.exports;
|
16
47
|
/******/ }
|
17
|
-
/******/
|
18
|
-
/******/
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
23
|
-
/******/
|
24
|
-
/******/
|
48
|
+
/******/ // Create a new module (and put it into the cache)
|
49
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
50
|
+
/******/ // no module.id needed
|
51
|
+
/******/ // no module.loaded needed
|
52
|
+
/******/ exports: {}
|
53
|
+
/******/ };
|
54
|
+
/******/
|
55
|
+
/******/ // Execute the module function
|
56
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
57
|
+
/******/
|
58
|
+
/******/ // Return the exports of the module
|
59
|
+
/******/ return module.exports;
|
60
|
+
/******/ }
|
61
|
+
/******/
|
62
|
+
/************************************************************************/
|
63
|
+
/******/ /* webpack/runtime/define property getters */
|
64
|
+
/******/ (() => {
|
65
|
+
/******/ // define getter functions for harmony exports
|
66
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
67
|
+
/******/ for(var key in definition) {
|
68
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
69
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
70
|
+
/******/ }
|
71
|
+
/******/ }
|
72
|
+
/******/ };
|
73
|
+
/******/ })();
|
74
|
+
/******/
|
75
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
76
|
+
/******/ (() => {
|
77
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
78
|
+
/******/ })();
|
79
|
+
/******/
|
80
|
+
/******/ /* webpack/runtime/make namespace object */
|
81
|
+
/******/ (() => {
|
82
|
+
/******/ // define __esModule on exports
|
83
|
+
/******/ __webpack_require__.r = (exports) => {
|
84
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
85
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
86
|
+
/******/ }
|
87
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
88
|
+
/******/ };
|
89
|
+
/******/ })();
|
90
|
+
/******/
|
25
91
|
/************************************************************************/
|
26
92
|
var __webpack_exports__ = {};
|
93
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
94
|
+
(() => {
|
95
|
+
// ESM COMPAT FLAG
|
96
|
+
__webpack_require__.r(__webpack_exports__);
|
27
97
|
|
28
98
|
// EXPORTS
|
29
99
|
__webpack_require__.d(__webpack_exports__, {
|
30
|
-
"
|
31
|
-
"
|
32
|
-
"
|
100
|
+
"BkCollapsePanel": () => (/* reexport */ collapse_panel),
|
101
|
+
"Collapse": () => (/* reexport */ collapse),
|
102
|
+
"default": () => (/* binding */ src)
|
33
103
|
});
|
34
104
|
|
35
|
-
|
36
|
-
var
|
37
|
-
var y = x => () => x
|
38
|
-
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["renderDirectiveType"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.renderDirectiveType, ["withInstallProps"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstallProps });
|
105
|
+
// EXTERNAL MODULE: external "../shared"
|
106
|
+
var external_shared_ = __webpack_require__(4212);
|
39
107
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/arrayLikeToArray.js
|
40
108
|
function _arrayLikeToArray(arr, len) {
|
41
109
|
if (len == null || len > arr.length) len = arr.length;
|
@@ -77,14 +145,10 @@ function _nonIterableSpread() {
|
|
77
145
|
function _toConsumableArray(arr) {
|
78
146
|
return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _unsupportedIterableToArray(arr) || _nonIterableSpread();
|
79
147
|
}
|
80
|
-
|
81
|
-
var
|
82
|
-
|
83
|
-
|
84
|
-
;// CONCATENATED MODULE: external "../icon"
|
85
|
-
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
86
|
-
var external_icon_y = x => () => x
|
87
|
-
const external_icon_namespaceObject = external_icon_x({ ["AngleRight"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleRight });
|
148
|
+
// EXTERNAL MODULE: external "vue"
|
149
|
+
var external_vue_ = __webpack_require__(748);
|
150
|
+
// EXTERNAL MODULE: external "../icon"
|
151
|
+
var external_icon_ = __webpack_require__(6870);
|
88
152
|
;// CONCATENATED MODULE: ../../packages/collapse/src/props.ts
|
89
153
|
/*
|
90
154
|
* Tencent is pleased to support the open source community by making
|
@@ -117,33 +181,33 @@ var propsCollapse = {
|
|
117
181
|
* 渲染列表
|
118
182
|
* 对象数组或者字符串数组,字符串数组默认会增加 name 字段,值为传入的字符串值
|
119
183
|
*/
|
120
|
-
list:
|
184
|
+
list: external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.any).def([]),
|
121
185
|
|
122
186
|
/**
|
123
187
|
* ID字段
|
124
188
|
*/
|
125
|
-
idFiled:
|
189
|
+
idFiled: external_shared_.PropTypes.string.def('$index'),
|
126
190
|
|
127
191
|
/**
|
128
192
|
* Title 字段
|
129
193
|
*/
|
130
|
-
titleField:
|
194
|
+
titleField: external_shared_.PropTypes.string.def('name'),
|
131
195
|
|
132
196
|
/**
|
133
197
|
* Content 字段,默认渲染内容,不配置时自动读取 content 字段
|
134
198
|
* 自定义配置slot时可以忽略
|
135
199
|
*/
|
136
|
-
contentField:
|
200
|
+
contentField: external_shared_.PropTypes.string.def('content'),
|
137
201
|
|
138
202
|
/**
|
139
203
|
* 当前激活Index
|
140
204
|
*/
|
141
|
-
modelValue:
|
205
|
+
modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.number).def([]), external_shared_.PropTypes.arrayOf(external_shared_.PropTypes.string).def([]), external_shared_.PropTypes.number.def(-1)]),
|
142
206
|
|
143
207
|
/**
|
144
208
|
* 是否使用手风琴效果
|
145
209
|
*/
|
146
|
-
accordion:
|
210
|
+
accordion: external_shared_.PropTypes.bool.def(false)
|
147
211
|
};
|
148
212
|
var CollapsePanelEventProps = {
|
149
213
|
itemClick: {
|
@@ -151,13 +215,13 @@ var CollapsePanelEventProps = {
|
|
151
215
|
}
|
152
216
|
};
|
153
217
|
var propsCollapsePanel = Object.assign({
|
154
|
-
name:
|
155
|
-
title:
|
156
|
-
content:
|
157
|
-
disabled:
|
158
|
-
isFormList:
|
159
|
-
renderDirective: (0,
|
160
|
-
modelValue:
|
218
|
+
name: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.number, external_shared_.PropTypes.string]).def(''),
|
219
|
+
title: external_shared_.PropTypes.any,
|
220
|
+
content: external_shared_.PropTypes.string,
|
221
|
+
disabled: external_shared_.PropTypes.bool.def(false),
|
222
|
+
isFormList: external_shared_.PropTypes.bool.def(false),
|
223
|
+
renderDirective: (0,external_shared_.renderDirectiveType)(),
|
224
|
+
modelValue: external_shared_.PropTypes.bool.def(false)
|
161
225
|
}, CollapsePanelEventProps);
|
162
226
|
;// CONCATENATED MODULE: ../../packages/collapse/src/utils.ts
|
163
227
|
|
@@ -317,25 +381,25 @@ var collapseMotion = function collapseMotion(emit) {
|
|
317
381
|
|
318
382
|
|
319
383
|
function _isSlot(s) {
|
320
|
-
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,
|
384
|
+
return typeof s === 'function' || Object.prototype.toString.call(s) === '[object Object]' && !(0,external_vue_.isVNode)(s);
|
321
385
|
}
|
322
386
|
|
323
|
-
/* harmony default export */ const collapse_panel = ((0,
|
387
|
+
/* harmony default export */ const collapse_panel = ((0,external_vue_.defineComponent)({
|
324
388
|
name: 'CollapsePanel',
|
325
389
|
props: propsCollapsePanel,
|
326
390
|
emits: ['change', 'update:modelValue', 'after-leave', 'before-enter'],
|
327
391
|
setup: function setup(props, _ref) {
|
328
392
|
var emit = _ref.emit,
|
329
393
|
slots = _ref.slots;
|
330
|
-
var localActiveItems = (0,
|
331
|
-
var handleItemClick = (0,
|
332
|
-
var isActive = (0,
|
333
|
-
(0,
|
394
|
+
var localActiveItems = (0,external_vue_.inject)('localActiveItems');
|
395
|
+
var handleItemClick = (0,external_vue_.inject)('handleItemClick');
|
396
|
+
var isActive = (0,external_vue_.ref)(props.modelValue);
|
397
|
+
(0,external_vue_.watch)(function () {
|
334
398
|
return props.modelValue;
|
335
399
|
}, function (newVal) {
|
336
400
|
isActive.value = newVal;
|
337
401
|
});
|
338
|
-
(0,
|
402
|
+
(0,external_vue_.watch)(localActiveItems, function (newVal) {
|
339
403
|
if (newVal === null || newVal === void 0 ? void 0 : newVal.length) {
|
340
404
|
isActive.value = newVal.includes(props.name);
|
341
405
|
}
|
@@ -364,7 +428,7 @@ function _isSlot(s) {
|
|
364
428
|
}
|
365
429
|
}
|
366
430
|
|
367
|
-
var transition = (0,
|
431
|
+
var transition = (0,external_vue_.ref)(collapseMotion(emit));
|
368
432
|
|
369
433
|
function getContent() {
|
370
434
|
if (props.content) {
|
@@ -372,7 +436,7 @@ function _isSlot(s) {
|
|
372
436
|
}
|
373
437
|
|
374
438
|
if (typeof slots.content === 'function') {
|
375
|
-
return slots.content(
|
439
|
+
return slots.content(external_vue_.h);
|
376
440
|
}
|
377
441
|
|
378
442
|
return slots.content;
|
@@ -383,15 +447,15 @@ function _isSlot(s) {
|
|
383
447
|
return '';
|
384
448
|
}
|
385
449
|
|
386
|
-
return (0,
|
450
|
+
return (0,external_vue_.withDirectives)((0,external_vue_.createVNode)("div", {
|
387
451
|
"class": "bk-collapse-content ".concat(isActive.value && 'active' || '')
|
388
|
-
}, [getContent()]), [[
|
452
|
+
}, [getContent()]), [[external_vue_.vShow, isActive.value]]);
|
389
453
|
}
|
390
454
|
|
391
455
|
function renderHeader() {
|
392
456
|
if (slots.header) {
|
393
457
|
if (typeof slots.header === 'function') {
|
394
|
-
return slots.header(
|
458
|
+
return slots.header(external_vue_.h);
|
395
459
|
}
|
396
460
|
|
397
461
|
return slots.header;
|
@@ -401,7 +465,7 @@ function _isSlot(s) {
|
|
401
465
|
|
402
466
|
if (slots["default"]) {
|
403
467
|
if (typeof slots["default"] === 'function') {
|
404
|
-
title = slots["default"](
|
468
|
+
title = slots["default"](external_vue_.h);
|
405
469
|
} else {
|
406
470
|
title = slots["default"];
|
407
471
|
}
|
@@ -409,11 +473,11 @@ function _isSlot(s) {
|
|
409
473
|
title = props.title;
|
410
474
|
}
|
411
475
|
|
412
|
-
return (0,
|
476
|
+
return (0,external_vue_.createVNode)("div", {
|
413
477
|
"class": 'bk-collapse-header'
|
414
|
-
}, [(0,
|
478
|
+
}, [(0,external_vue_.createVNode)("span", {
|
415
479
|
"class": 'bk-collapse-title'
|
416
|
-
}, [title]), (0,
|
480
|
+
}, [title]), (0,external_vue_.createVNode)(external_icon_.AngleRight, {
|
417
481
|
"class": "bk-collapse-icon ".concat(isActive.value && 'rotate-icon' || '')
|
418
482
|
}, null)]);
|
419
483
|
}
|
@@ -421,13 +485,13 @@ function _isSlot(s) {
|
|
421
485
|
return function () {
|
422
486
|
var _slot;
|
423
487
|
|
424
|
-
return (0,
|
488
|
+
return (0,external_vue_.createVNode)("div", {
|
425
489
|
"class": "bk-collapse-item ".concat(props.disabled ? 'is-disabled' : '', " ").concat(isActive.value ? 'bk-collapse-item-active' : '')
|
426
|
-
}, [(0,
|
490
|
+
}, [(0,external_vue_.createVNode)("div", {
|
427
491
|
"onClick": function onClick() {
|
428
492
|
return clickItem(props);
|
429
493
|
}
|
430
|
-
}, [renderHeader()]), (0,
|
494
|
+
}, [renderHeader()]), (0,external_vue_.createVNode)(external_vue_.Transition, transition.value, _isSlot(_slot = renderPanel()) ? _slot : {
|
431
495
|
"default": function _default() {
|
432
496
|
return [_slot];
|
433
497
|
}
|
@@ -467,16 +531,16 @@ function _isSlot(s) {
|
|
467
531
|
|
468
532
|
|
469
533
|
|
470
|
-
/* harmony default export */ const collapse = ((0,
|
534
|
+
/* harmony default export */ const collapse = ((0,external_vue_.defineComponent)({
|
471
535
|
name: 'Collapse',
|
472
536
|
props: propsCollapse,
|
473
537
|
emits: ['item-click', 'update:modelValue', 'after-leave', 'before-enter'],
|
474
538
|
setup: function setup(props, _ref) {
|
475
539
|
var emit = _ref.emit,
|
476
540
|
slots = _ref.slots;
|
477
|
-
var localActiveItems = (0,
|
541
|
+
var localActiveItems = (0,external_vue_.ref)([]); // 以保证当前的设置生效
|
478
542
|
|
479
|
-
(0,
|
543
|
+
(0,external_vue_.watch)(function () {
|
480
544
|
return [props.modelValue];
|
481
545
|
}, function () {
|
482
546
|
var value = props.modelValue;
|
@@ -522,15 +586,15 @@ function _isSlot(s) {
|
|
522
586
|
emit('update:modelValue', localActiveItems.value);
|
523
587
|
};
|
524
588
|
|
525
|
-
(0,
|
526
|
-
(0,
|
589
|
+
(0,external_vue_.provide)('localActiveItems', localActiveItems);
|
590
|
+
(0,external_vue_.provide)('handleItemClick', handleItemClick);
|
527
591
|
var className = 'bk-collapse-wrapper';
|
528
592
|
|
529
593
|
if (!Array.isArray(props.list) || !props.list.length) {
|
530
594
|
return function () {
|
531
|
-
return (0,
|
595
|
+
return (0,external_vue_.createVNode)('div', {
|
532
596
|
"class": className
|
533
|
-
}, [(0,
|
597
|
+
}, [(0,external_vue_.renderSlot)(slots, 'default', {
|
534
598
|
props: {
|
535
599
|
isList: true
|
536
600
|
}
|
@@ -539,7 +603,7 @@ function _isSlot(s) {
|
|
539
603
|
} // 统一格式化传入数据格式为标准渲染格式
|
540
604
|
|
541
605
|
|
542
|
-
var collapseData = (0,
|
606
|
+
var collapseData = (0,external_vue_.computed)(function () {
|
543
607
|
return (props.list || []).map(function (item, index) {
|
544
608
|
if (typeof item === 'string' || typeof item === 'number' || typeof item === 'boolean') {
|
545
609
|
return {
|
@@ -573,7 +637,7 @@ function _isSlot(s) {
|
|
573
637
|
title = (_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots, item, index);
|
574
638
|
}
|
575
639
|
|
576
|
-
return (0,
|
640
|
+
return (0,external_vue_.createVNode)(collapse_panel, {
|
577
641
|
"key": index,
|
578
642
|
"item-click": handleItemClick,
|
579
643
|
"disabled": item.disabled,
|
@@ -586,7 +650,7 @@ function _isSlot(s) {
|
|
586
650
|
};
|
587
651
|
|
588
652
|
return function () {
|
589
|
-
return (0,
|
653
|
+
return (0,external_vue_.createVNode)("div", {
|
590
654
|
"class": className
|
591
655
|
}, [renderItems()]);
|
592
656
|
};
|
@@ -621,12 +685,14 @@ function _isSlot(s) {
|
|
621
685
|
|
622
686
|
|
623
687
|
|
624
|
-
var BkCollapse = (0,
|
688
|
+
var BkCollapse = (0,external_shared_.withInstallProps)(collapse, {
|
625
689
|
CollapsePanel: collapse_panel
|
626
690
|
});
|
627
691
|
|
628
692
|
/* harmony default export */ const src = (BkCollapse);
|
629
|
-
|
630
|
-
|
631
|
-
|
632
|
-
|
693
|
+
})();
|
694
|
+
|
695
|
+
/******/ return __webpack_exports__;
|
696
|
+
/******/ })()
|
697
|
+
;
|
698
|
+
});
|