bkui-vue 0.0.1-beta.390 → 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/dist/index.cjs.js +22 -22
- package/dist/index.esm.js +0 -1
- package/dist/index.umd.js +23 -23
- 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/badge.d.ts +1 -1
- package/lib/badge/index.d.ts +4 -4
- package/lib/badge/index.js +114 -50
- package/lib/breadcrumb/breadcrumb-item.d.ts +1 -1
- package/lib/breadcrumb/breadcrumb.d.ts +1 -1
- package/lib/breadcrumb/index.d.ts +5 -5
- package/lib/breadcrumb/index.js +133 -67
- package/lib/button/index.js +147 -68
- package/lib/card/index.js +154 -69
- package/lib/cascader/cascader.d.ts +3 -3
- package/lib/cascader/index.d.ts +10 -10
- 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/color-picker.d.ts +1 -1
- package/lib/color-picker/index.d.ts +4 -4
- package/lib/color-picker/index.js +245 -193
- package/lib/components.js +671 -434
- package/lib/container/container.d.ts +1 -1
- package/lib/container/index.d.ts +4 -4
- package/lib/container/index.js +125 -64
- package/lib/date-picker/date-picker.d.ts +2 -2
- package/lib/date-picker/index.d.ts +7 -7
- package/lib/date-picker/index.js +563 -462
- package/lib/date-picker/panel/time-range.d.ts +3 -3
- package/lib/date-picker/panel/time.d.ts +3 -3
- package/lib/date-picker/time-picker.d.ts +3 -3
- package/lib/dialog/dialog.d.ts +2 -2
- package/lib/dialog/index.d.ts +7 -7
- package/lib/dialog/index.js +198 -108
- package/lib/directives/index.d.ts +1 -0
- package/lib/directives/index.js +139 -86
- package/lib/dist.index.js +133 -48
- package/lib/divider/index.js +118 -50
- package/lib/dropdown/dropdown.d.ts +2 -2
- package/lib/dropdown/index.d.ts +7 -7
- package/lib/dropdown/index.js +155 -73
- package/lib/exception/index.js +145 -97
- package/lib/fixed-navbar/fixed-navbar.d.ts +1 -1
- package/lib/fixed-navbar/index.d.ts +4 -4
- package/lib/fixed-navbar/index.js +107 -43
- package/lib/form/form-item.d.ts +1 -1
- package/lib/form/index.d.ts +1 -1
- 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.d.ts +4 -4
- package/lib/input/index.js +167 -99
- package/lib/input/input.d.ts +1 -1
- package/lib/link/index.d.ts +4 -4
- package/lib/link/index.js +115 -47
- package/lib/link/link.d.ts +1 -1
- package/lib/loading/index.d.ts +4 -4
- package/lib/loading/index.js +127 -67
- package/lib/loading/loading.d.ts +1 -1
- package/lib/menu/index.js +156 -92
- package/lib/message/index.js +148 -76
- package/lib/modal/index.d.ts +4 -4
- package/lib/modal/index.js +151 -85
- package/lib/modal/modal.d.ts +1 -1
- package/lib/navigation/index.js +134 -66
- package/lib/notify/index.js +153 -81
- package/lib/notify/notifyConstructor.d.ts +1 -1
- package/lib/overflow-title/index.js +128 -92
- package/lib/pagination/index.d.ts +4 -4
- package/lib/pagination/index.js +220 -131
- package/lib/pagination/pagination.d.ts +1 -1
- package/lib/plugin-popover/index.js +190 -143
- package/lib/plugins/index.js +100 -33
- package/lib/popover/index.d.ts +10 -10
- package/lib/popover/index.js +193 -148
- package/lib/popover/popover.d.ts +3 -3
- package/lib/popover2/index.js +99 -35
- package/lib/preset.js +104 -37
- package/lib/process/index.d.ts +4 -4
- package/lib/process/index.js +134 -92
- package/lib/process/process.d.ts +1 -1
- package/lib/progress/index.d.ts +7 -7
- package/lib/progress/index.js +127 -63
- package/lib/progress/progress.d.ts +2 -2
- 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.d.ts +10 -10
- package/lib/select/index.js +394 -315
- package/lib/select/select.d.ts +3 -3
- package/lib/shared/index.js +203 -228
- package/lib/sideslider/index.d.ts +4 -4
- package/lib/sideslider/index.js +137 -88
- package/lib/sideslider/sideslider.d.ts +1 -1
- package/lib/slider/index.d.ts +7 -7
- package/lib/slider/index.js +196 -147
- package/lib/slider/slider.d.ts +2 -2
- package/lib/steps/index.js +152 -105
- package/lib/swiper/index.js +126 -62
- package/lib/switcher/index.d.ts +4 -4
- package/lib/switcher/index.js +133 -65
- package/lib/switcher/switcher.d.ts +1 -1
- package/lib/tab/index.d.ts +4 -4
- package/lib/tab/index.js +188 -118
- package/lib/tab/tab.d.ts +1 -1
- 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.d.ts +7 -7
- package/lib/tag-input/index.js +277 -175
- package/lib/tag-input/tag-input.d.ts +2 -2
- package/lib/time-picker/index.d.ts +10 -10
- package/lib/time-picker/index.js +111 -40
- package/lib/timeline/index.d.ts +4 -4
- package/lib/timeline/index.js +114 -50
- package/lib/timeline/timeline.d.ts +1 -1
- package/lib/transfer/index.js +174 -89
- package/lib/tree/index.js +235 -158
- package/lib/upload/index.d.ts +7 -7
- package/lib/upload/index.js +227 -173
- package/lib/upload/upload-list.d.ts +1 -1
- package/lib/upload/upload-trigger.d.ts +1 -1
- package/lib/upload/upload.d.ts +2 -2
- package/lib/virtual-render/index.js +154 -86
- package/package.json +1 -1
package/lib/swiper/index.js
CHANGED
@@ -1,42 +1,102 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
1
|
+
(function webpackUniversalModuleDefinition(root, factory) {
|
2
|
+
if(typeof exports === 'object' && typeof module === 'object')
|
3
|
+
module.exports = factory(require("../shared"), require("vue"));
|
4
|
+
else if(typeof define === 'function' && define.amd)
|
5
|
+
define(["../shared", "vue"], factory);
|
6
|
+
else {
|
7
|
+
var a = typeof exports === 'object' ? factory(require("../shared"), require("vue")) : factory(root["../shared"], root["vue"]);
|
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__) => {
|
11
|
+
return /******/ (() => { // webpackBootstrap
|
12
|
+
/******/ "use strict";
|
13
|
+
/******/ var __webpack_modules__ = ({
|
14
|
+
|
15
|
+
/***/ 4212:
|
16
|
+
/***/ ((module) => {
|
17
|
+
|
18
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__4212__;
|
19
|
+
|
20
|
+
/***/ }),
|
21
|
+
|
22
|
+
/***/ 748:
|
23
|
+
/***/ ((module) => {
|
24
|
+
|
25
|
+
module.exports = __WEBPACK_EXTERNAL_MODULE__748__;
|
26
|
+
|
27
|
+
/***/ })
|
28
|
+
|
29
|
+
/******/ });
|
6
30
|
/************************************************************************/
|
7
|
-
/******/
|
8
|
-
/******/
|
9
|
-
/******/
|
10
|
-
/******/
|
11
|
-
/******/
|
12
|
-
/******/
|
13
|
-
/******/
|
14
|
-
/******/
|
31
|
+
/******/ // The module cache
|
32
|
+
/******/ var __webpack_module_cache__ = {};
|
33
|
+
/******/
|
34
|
+
/******/ // The require function
|
35
|
+
/******/ function __webpack_require__(moduleId) {
|
36
|
+
/******/ // Check if module is in cache
|
37
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
38
|
+
/******/ if (cachedModule !== undefined) {
|
39
|
+
/******/ return cachedModule.exports;
|
15
40
|
/******/ }
|
16
|
-
/******/
|
17
|
-
/******/
|
18
|
-
/******/
|
19
|
-
/******/
|
20
|
-
/******/
|
21
|
-
/******/
|
22
|
-
/******/
|
23
|
-
/******/
|
41
|
+
/******/ // Create a new module (and put it into the cache)
|
42
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
43
|
+
/******/ // no module.id needed
|
44
|
+
/******/ // no module.loaded needed
|
45
|
+
/******/ exports: {}
|
46
|
+
/******/ };
|
47
|
+
/******/
|
48
|
+
/******/ // Execute the module function
|
49
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
50
|
+
/******/
|
51
|
+
/******/ // Return the exports of the module
|
52
|
+
/******/ return module.exports;
|
53
|
+
/******/ }
|
54
|
+
/******/
|
55
|
+
/************************************************************************/
|
56
|
+
/******/ /* webpack/runtime/define property getters */
|
57
|
+
/******/ (() => {
|
58
|
+
/******/ // define getter functions for harmony exports
|
59
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
60
|
+
/******/ for(var key in definition) {
|
61
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
62
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
63
|
+
/******/ }
|
64
|
+
/******/ }
|
65
|
+
/******/ };
|
66
|
+
/******/ })();
|
67
|
+
/******/
|
68
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
69
|
+
/******/ (() => {
|
70
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
71
|
+
/******/ })();
|
72
|
+
/******/
|
73
|
+
/******/ /* webpack/runtime/make namespace object */
|
74
|
+
/******/ (() => {
|
75
|
+
/******/ // define __esModule on exports
|
76
|
+
/******/ __webpack_require__.r = (exports) => {
|
77
|
+
/******/ if(typeof Symbol !== 'undefined' && Symbol.toStringTag) {
|
78
|
+
/******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
|
79
|
+
/******/ }
|
80
|
+
/******/ Object.defineProperty(exports, '__esModule', { value: true });
|
81
|
+
/******/ };
|
82
|
+
/******/ })();
|
83
|
+
/******/
|
24
84
|
/************************************************************************/
|
25
85
|
var __webpack_exports__ = {};
|
86
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
87
|
+
(() => {
|
88
|
+
// ESM COMPAT FLAG
|
89
|
+
__webpack_require__.r(__webpack_exports__);
|
26
90
|
|
27
91
|
// EXPORTS
|
28
92
|
__webpack_require__.d(__webpack_exports__, {
|
29
|
-
"
|
93
|
+
"default": () => (/* binding */ src)
|
30
94
|
});
|
31
95
|
|
32
|
-
|
33
|
-
var
|
34
|
-
|
35
|
-
|
36
|
-
;// CONCATENATED MODULE: external "vue"
|
37
|
-
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
38
|
-
var external_vue_y = x => () => x
|
39
|
-
const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.computed, ["createVNode"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.createVNode, ["defineComponent"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.defineComponent, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["toRefs"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.toRefs, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
|
96
|
+
// EXTERNAL MODULE: external "../shared"
|
97
|
+
var external_shared_ = __webpack_require__(4212);
|
98
|
+
// EXTERNAL MODULE: external "vue"
|
99
|
+
var external_vue_ = __webpack_require__(748);
|
40
100
|
;// CONCATENATED MODULE: ../../packages/swiper/src/swiper.tsx
|
41
101
|
|
42
102
|
|
@@ -67,15 +127,15 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
67
127
|
*/
|
68
128
|
|
69
129
|
|
70
|
-
/* harmony default export */ const swiper = ((0,
|
130
|
+
/* harmony default export */ const swiper = ((0,external_vue_.defineComponent)({
|
71
131
|
name: 'Swiper',
|
72
132
|
props: {
|
73
|
-
isLoop:
|
74
|
-
loopTime:
|
75
|
-
pics:
|
76
|
-
list:
|
77
|
-
height:
|
78
|
-
width:
|
133
|
+
isLoop: external_shared_.PropTypes.bool.def(true),
|
134
|
+
loopTime: external_shared_.PropTypes.number.def(8000),
|
135
|
+
pics: external_shared_.PropTypes.array.def([]),
|
136
|
+
list: external_shared_.PropTypes.array.def([]),
|
137
|
+
height: external_shared_.PropTypes.number,
|
138
|
+
width: external_shared_.PropTypes.number
|
79
139
|
},
|
80
140
|
emits: ['index-change'],
|
81
141
|
setup: function setup(props, _ref) {
|
@@ -83,7 +143,7 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
83
143
|
slots = _ref.slots;
|
84
144
|
|
85
145
|
// 属性
|
86
|
-
var _toRefs = (0,
|
146
|
+
var _toRefs = (0,external_vue_.toRefs)(props),
|
87
147
|
isLoop = _toRefs.isLoop,
|
88
148
|
loopTime = _toRefs.loopTime,
|
89
149
|
pics = _toRefs.pics,
|
@@ -92,25 +152,25 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
92
152
|
width = _toRefs.width; // 声明变量
|
93
153
|
|
94
154
|
|
95
|
-
var swiperRef = (0,
|
96
|
-
var swiperIndex = (0,
|
97
|
-
var renderWidth = (0,
|
98
|
-
var renderHeight = (0,
|
99
|
-
var loopId = (0,
|
155
|
+
var swiperRef = (0,external_vue_.ref)();
|
156
|
+
var swiperIndex = (0,external_vue_.ref)(0);
|
157
|
+
var renderWidth = (0,external_vue_.ref)(0);
|
158
|
+
var renderHeight = (0,external_vue_.ref)(0);
|
159
|
+
var loopId = (0,external_vue_.ref)(0);
|
100
160
|
var resizeObserver; // 计算属性
|
101
161
|
|
102
|
-
var computedRenderDataList = (0,
|
162
|
+
var computedRenderDataList = (0,external_vue_.computed)(function () {
|
103
163
|
var _a;
|
104
164
|
|
105
165
|
return ((_a = list.value) === null || _a === void 0 ? void 0 : _a.length) > 0 ? list.value : pics.value;
|
106
166
|
});
|
107
|
-
var computedSwiperTranslateStyle = (0,
|
167
|
+
var computedSwiperTranslateStyle = (0,external_vue_.computed)(function () {
|
108
168
|
return {
|
109
169
|
width: "".concat(renderWidth.value * computedRenderDataList.value.length, "px"),
|
110
170
|
transform: "translateX(-".concat(renderWidth.value * swiperIndex.value, "px)")
|
111
171
|
};
|
112
172
|
});
|
113
|
-
var computedSwiperRenderStyle = (0,
|
173
|
+
var computedSwiperRenderStyle = (0,external_vue_.computed)(function () {
|
114
174
|
return {
|
115
175
|
width: "".concat(renderWidth.value, "px"),
|
116
176
|
height: "".concat(renderHeight.value, "px")
|
@@ -217,60 +277,60 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
217
277
|
renderHeight.value = +height.value > 0 ? height.value : swiperParentSize.height;
|
218
278
|
};
|
219
279
|
|
220
|
-
(0,
|
221
|
-
(0,
|
280
|
+
(0,external_vue_.watch)([height, width], calcSize);
|
281
|
+
(0,external_vue_.onMounted)(function () {
|
222
282
|
calcSize();
|
223
283
|
startLoop();
|
224
284
|
watchParentSizeChange();
|
225
285
|
});
|
226
|
-
(0,
|
286
|
+
(0,external_vue_.onBeforeUnmount)(function () {
|
227
287
|
endLoop();
|
228
288
|
endWatchParentSizeChange();
|
229
289
|
}); // render
|
230
290
|
|
231
291
|
return function () {
|
232
|
-
return (0,
|
292
|
+
return (0,external_vue_.createVNode)("section", {
|
233
293
|
"class": "bk-swiper-home",
|
234
294
|
"ref": swiperRef,
|
235
295
|
"style": computedSwiperRenderStyle.value
|
236
|
-
}, [(0,
|
296
|
+
}, [(0,external_vue_.createVNode)("hgroup", {
|
237
297
|
"style": computedSwiperTranslateStyle.value,
|
238
298
|
"class": "bk-transition bk-swiper-main"
|
239
299
|
}, [computedRenderDataList.value.map(function (renderData) {
|
240
300
|
var _a, _b;
|
241
301
|
|
242
|
-
return (0,
|
302
|
+
return (0,external_vue_.createVNode)("h3", {
|
243
303
|
"class": "bk-swiper-card",
|
244
304
|
"style": computedSwiperRenderStyle.value
|
245
|
-
}, [(_b = (_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots, renderData)) !== null && _b !== void 0 ? _b : (0,
|
305
|
+
}, [(_b = (_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots, renderData)) !== null && _b !== void 0 ? _b : (0,external_vue_.createVNode)("span", {
|
246
306
|
"class": getRenderItemClass(renderData),
|
247
307
|
"style": getRenderItemStyle(renderData),
|
248
308
|
"onClick": function onClick() {
|
249
309
|
return goToLink(renderData.link);
|
250
310
|
}
|
251
311
|
}, null)]);
|
252
|
-
})]), (0,
|
312
|
+
})]), (0,external_vue_.createVNode)("ul", {
|
253
313
|
"class": "bk-swiper-index"
|
254
314
|
}, [computedRenderDataList.value.map(function (_, index) {
|
255
|
-
return (0,
|
315
|
+
return (0,external_vue_.createVNode)("li", {
|
256
316
|
"class": getRenderIndexStyle(index),
|
257
317
|
"onMouseover": function onMouseover() {
|
258
318
|
return changeIndex(index);
|
259
319
|
}
|
260
320
|
}, null);
|
261
|
-
})]), (0,
|
321
|
+
})]), (0,external_vue_.createVNode)("span", {
|
262
322
|
"class": "bk-swiper-nav bk-nav-prev",
|
263
323
|
"onClick": function onClick() {
|
264
324
|
return changeIndex(swiperIndex.value - 1);
|
265
325
|
}
|
266
|
-
}, [(0,
|
326
|
+
}, [(0,external_vue_.createVNode)("i", {
|
267
327
|
"class": "bk-swiper-nav-icon"
|
268
|
-
}, null)]), (0,
|
328
|
+
}, null)]), (0,external_vue_.createVNode)("span", {
|
269
329
|
"class": "bk-swiper-nav bk-nav-next",
|
270
330
|
"onClick": function onClick() {
|
271
331
|
return changeIndex(swiperIndex.value + 1);
|
272
332
|
}
|
273
|
-
}, [(0,
|
333
|
+
}, [(0,external_vue_.createVNode)("i", {
|
274
334
|
"class": "bk-swiper-nav-icon"
|
275
335
|
}, null)])]);
|
276
336
|
};
|
@@ -304,7 +364,11 @@ const external_vue_namespaceObject = external_vue_x({ ["computed"]: () => __WEBP
|
|
304
364
|
*/
|
305
365
|
|
306
366
|
|
307
|
-
var BkSwiper = (0,
|
367
|
+
var BkSwiper = (0,external_shared_.withInstall)(swiper);
|
308
368
|
/* harmony default export */ const src = (BkSwiper);
|
309
|
-
|
310
|
-
|
369
|
+
})();
|
370
|
+
|
371
|
+
/******/ return __webpack_exports__;
|
372
|
+
/******/ })()
|
373
|
+
;
|
374
|
+
});
|
package/lib/switcher/index.d.ts
CHANGED
@@ -3,9 +3,9 @@ declare const BkSwitcher: {
|
|
3
3
|
$: import("vue").ComponentInternalInstance;
|
4
4
|
$data: {};
|
5
5
|
$props: Partial<{
|
6
|
-
extCls: string;
|
7
6
|
disabled: boolean;
|
8
7
|
value: string | number | boolean;
|
8
|
+
extCls: string;
|
9
9
|
modelValue: string | number | boolean;
|
10
10
|
withValidate: boolean;
|
11
11
|
beforeChange: (...args: any[]) => any;
|
@@ -69,7 +69,7 @@ declare const BkSwitcher: {
|
|
69
69
|
}>> & {
|
70
70
|
onChange?: (...args: any[]) => any;
|
71
71
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
72
|
-
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "
|
72
|
+
} & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, "disabled" | "value" | "extCls" | "modelValue" | "withValidate" | "beforeChange" | "showText" | "isOutline" | "onText" | "offText" | "isSquare" | "trueValue" | "falseValue">;
|
73
73
|
$attrs: {
|
74
74
|
[x: string]: unknown;
|
75
75
|
};
|
@@ -137,9 +137,9 @@ declare const BkSwitcher: {
|
|
137
137
|
onChange?: (...args: any[]) => any;
|
138
138
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
139
139
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], string, {
|
140
|
-
extCls: string;
|
141
140
|
disabled: boolean;
|
142
141
|
value: string | number | boolean;
|
142
|
+
extCls: string;
|
143
143
|
modelValue: string | number | boolean;
|
144
144
|
withValidate: boolean;
|
145
145
|
beforeChange: (...args: any[]) => any;
|
@@ -281,9 +281,9 @@ declare const BkSwitcher: {
|
|
281
281
|
onChange?: (...args: any[]) => any;
|
282
282
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
283
283
|
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("change" | "update:modelValue")[], "change" | "update:modelValue", {
|
284
|
-
extCls: string;
|
285
284
|
disabled: boolean;
|
286
285
|
value: string | number | boolean;
|
286
|
+
extCls: string;
|
287
287
|
modelValue: string | number | boolean;
|
288
288
|
withValidate: boolean;
|
289
289
|
beforeChange: (...args: any[]) => any;
|
package/lib/switcher/index.js
CHANGED
@@ -1,39 +1,107 @@
|
|
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
|
-
"
|
100
|
+
"default": () => (/* binding */ src)
|
31
101
|
});
|
32
102
|
|
33
|
-
|
34
|
-
var
|
35
|
-
var y = x => () => x
|
36
|
-
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["useFormItem"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.useFormItem, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
103
|
+
// EXTERNAL MODULE: external "../shared"
|
104
|
+
var external_shared_ = __webpack_require__(4212);
|
37
105
|
;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
|
38
106
|
function _defineProperty(obj, key, value) {
|
39
107
|
if (key in obj) {
|
@@ -49,14 +117,10 @@ function _defineProperty(obj, key, value) {
|
|
49
117
|
|
50
118
|
return obj;
|
51
119
|
}
|
52
|
-
|
53
|
-
var
|
54
|
-
|
55
|
-
|
56
|
-
;// CONCATENATED MODULE: external "../icon"
|
57
|
-
var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
58
|
-
var external_icon_y = x => () => x
|
59
|
-
const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.SwitcherLoading });
|
120
|
+
// EXTERNAL MODULE: external "vue"
|
121
|
+
var external_vue_ = __webpack_require__(748);
|
122
|
+
// EXTERNAL MODULE: external "../icon"
|
123
|
+
var external_icon_ = __webpack_require__(6870);
|
60
124
|
;// CONCATENATED MODULE: ../../packages/switcher/src/switcher.tsx
|
61
125
|
|
62
126
|
|
@@ -89,38 +153,38 @@ const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: ()
|
|
89
153
|
|
90
154
|
|
91
155
|
|
92
|
-
/* harmony default export */ const switcher = ((0,
|
156
|
+
/* harmony default export */ const switcher = ((0,external_vue_.defineComponent)({
|
93
157
|
name: 'Switcher',
|
94
158
|
props: {
|
95
|
-
theme:
|
96
|
-
size:
|
97
|
-
disabled:
|
98
|
-
showText:
|
99
|
-
isOutline:
|
100
|
-
onText:
|
101
|
-
offText:
|
102
|
-
isSquare:
|
103
|
-
extCls:
|
104
|
-
beforeChange:
|
105
|
-
trueValue:
|
106
|
-
falseValue:
|
107
|
-
value:
|
108
|
-
modelValue:
|
109
|
-
withValidate:
|
159
|
+
theme: external_shared_.PropTypes.theme(),
|
160
|
+
size: external_shared_.PropTypes.size(),
|
161
|
+
disabled: external_shared_.PropTypes.bool,
|
162
|
+
showText: external_shared_.PropTypes.bool,
|
163
|
+
isOutline: external_shared_.PropTypes.bool,
|
164
|
+
onText: external_shared_.PropTypes.string.def('ON'),
|
165
|
+
offText: external_shared_.PropTypes.string.def('OFF'),
|
166
|
+
isSquare: external_shared_.PropTypes.bool,
|
167
|
+
extCls: external_shared_.PropTypes.string,
|
168
|
+
beforeChange: external_shared_.PropTypes.func.def(undefined),
|
169
|
+
trueValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number, external_shared_.PropTypes.bool]).def(true),
|
170
|
+
falseValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number, external_shared_.PropTypes.bool]).def(false),
|
171
|
+
value: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number, external_shared_.PropTypes.bool]).def(false),
|
172
|
+
modelValue: external_shared_.PropTypes.oneOfType([external_shared_.PropTypes.string, external_shared_.PropTypes.number, external_shared_.PropTypes.bool]).def(false),
|
173
|
+
withValidate: external_shared_.PropTypes.bool.def(true)
|
110
174
|
},
|
111
175
|
emits: ['update:modelValue', 'change'],
|
112
176
|
setup: function setup(props, _ref) {
|
113
177
|
var emit = _ref.emit;
|
114
|
-
var formItem = (0,
|
115
|
-
var isLoading = (0,
|
116
|
-
var isChecked = (0,
|
178
|
+
var formItem = (0,external_shared_.useFormItem)();
|
179
|
+
var isLoading = (0,external_vue_.ref)(false);
|
180
|
+
var isChecked = (0,external_vue_.computed)(function () {
|
117
181
|
return props.trueValue === localValue.value;
|
118
182
|
});
|
119
|
-
var isModelValue = (0,
|
120
|
-
var localValue = (0,
|
183
|
+
var isModelValue = (0,external_vue_.ref)(props.modelValue !== false);
|
184
|
+
var localValue = (0,external_vue_.computed)(function () {
|
121
185
|
return isModelValue.value ? props.modelValue : props.value;
|
122
186
|
});
|
123
|
-
var classObject = (0,
|
187
|
+
var classObject = (0,external_vue_.computed)(function () {
|
124
188
|
var _cls;
|
125
189
|
|
126
190
|
var cls = (_cls = {}, _defineProperty(_cls, props.extCls, !!props.extCls), _defineProperty(_cls, 'bk-switcher', true), _defineProperty(_cls, 'bk-switcher-outline', props.isOutline), _defineProperty(_cls, 'bk-switcher-square', props.isSquare), _defineProperty(_cls, 'show-label', props.showText), _defineProperty(_cls, 'is-disabled', props.disabled), _defineProperty(_cls, 'is-checked', isChecked.value), _defineProperty(_cls, 'is-unchecked', !isChecked.value), _defineProperty(_cls, 'is-loading', isLoading.value), _defineProperty(_cls, 'bk-primary', props.theme === 'primary'), _cls); // 显示文本则size无效,使用固定尺寸
|
@@ -132,7 +196,7 @@ const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: ()
|
|
132
196
|
|
133
197
|
return cls;
|
134
198
|
});
|
135
|
-
(0,
|
199
|
+
(0,external_vue_.watch)(function () {
|
136
200
|
return props.modelValue;
|
137
201
|
}, function () {
|
138
202
|
var _a;
|
@@ -143,7 +207,7 @@ const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: ()
|
|
143
207
|
(_a = formItem === null || formItem === void 0 ? void 0 : formItem.validate) === null || _a === void 0 ? void 0 : _a.call(formItem, 'change');
|
144
208
|
}
|
145
209
|
});
|
146
|
-
(0,
|
210
|
+
(0,external_vue_.watch)(function () {
|
147
211
|
return props.value;
|
148
212
|
}, function () {
|
149
213
|
isModelValue.value = false;
|
@@ -193,14 +257,14 @@ const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: ()
|
|
193
257
|
};
|
194
258
|
|
195
259
|
return function () {
|
196
|
-
return (0,
|
260
|
+
return (0,external_vue_.createVNode)("div", {
|
197
261
|
"class": classObject.value,
|
198
262
|
"onClick": handleChange,
|
199
263
|
"tabindex": "0",
|
200
264
|
"onKeydown": handleKeydown
|
201
|
-
}, [isLoading.value ? (0,
|
265
|
+
}, [isLoading.value ? (0,external_vue_.createVNode)(external_icon_.SwitcherLoading, {
|
202
266
|
"class": "bk-switcher-loading"
|
203
|
-
}, null) : '', props.showText ? (0,
|
267
|
+
}, null) : '', props.showText ? (0,external_vue_.createVNode)("span", {
|
204
268
|
"class": "switcher-text"
|
205
269
|
}, [isChecked.value ? props.onText : props.offText]) : '']);
|
206
270
|
};
|
@@ -234,7 +298,11 @@ const external_icon_namespaceObject = external_icon_x({ ["SwitcherLoading"]: ()
|
|
234
298
|
*/
|
235
299
|
|
236
300
|
|
237
|
-
var BkSwitcher = (0,
|
301
|
+
var BkSwitcher = (0,external_shared_.withInstall)(switcher);
|
238
302
|
/* harmony default export */ const src = (BkSwitcher);
|
239
|
-
|
240
|
-
|
303
|
+
})();
|
304
|
+
|
305
|
+
/******/ return __webpack_exports__;
|
306
|
+
/******/ })()
|
307
|
+
;
|
308
|
+
});
|
@@ -102,9 +102,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
102
102
|
onChange?: (...args: any[]) => any;
|
103
103
|
"onUpdate:modelValue"?: (...args: any[]) => any;
|
104
104
|
}, {
|
105
|
-
extCls: string;
|
106
105
|
disabled: boolean;
|
107
106
|
value: string | number | boolean;
|
107
|
+
extCls: string;
|
108
108
|
modelValue: string | number | boolean;
|
109
109
|
withValidate: boolean;
|
110
110
|
beforeChange: (...args: any[]) => any;
|