bkui-vue 0.0.2-beta.75 → 0.0.2-beta.77

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (170) hide show
  1. package/lib/affix/index.js +1 -319
  2. package/lib/alert/index.js +1 -215
  3. package/lib/animate-number/index.js +1 -155
  4. package/lib/backtop/index.js +1 -188
  5. package/lib/badge/index.js +1 -236
  6. package/lib/breadcrumb/index.js +1 -309
  7. package/lib/button/index.js +1 -321
  8. package/lib/card/index.js +1 -274
  9. package/lib/cascader/index.js +2 -2019
  10. package/lib/cascader/index.js.LICENSE.txt +1 -0
  11. package/lib/checkbox/index.js +1 -542
  12. package/lib/code-diff/index.js +1 -5501
  13. package/lib/collapse/index.js +1 -518
  14. package/lib/collapse-transition/index.js +1 -178
  15. package/lib/color-picker/index.js +1 -2662
  16. package/lib/components.js +1 -530
  17. package/lib/config-provider/index.js +1 -317
  18. package/lib/container/index.js +1 -343
  19. package/lib/date-picker/index.js +1 -5481
  20. package/lib/dialog/index.js +2 -1266
  21. package/lib/dialog/index.js.LICENSE.txt +1 -0
  22. package/lib/directives/index.js +2 -1335
  23. package/lib/directives/index.js.LICENSE.txt +14 -0
  24. package/lib/dist.index.js +1 -87
  25. package/lib/divider/index.js +1 -169
  26. package/lib/dropdown/index.js +1 -369
  27. package/lib/exception/index.js +1 -385
  28. package/lib/fixed-navbar/index.js +1 -154
  29. package/lib/form/index.js +1 -918
  30. package/lib/hooks.js +1 -73
  31. package/lib/icon/angle-double-down-line.js +1 -481
  32. package/lib/icon/angle-double-left-line.js +1 -481
  33. package/lib/icon/angle-double-left.js +1 -481
  34. package/lib/icon/angle-double-right-line.js +1 -481
  35. package/lib/icon/angle-double-right.js +1 -481
  36. package/lib/icon/angle-double-up-line.js +1 -481
  37. package/lib/icon/angle-down-fill.js +1 -481
  38. package/lib/icon/angle-down-line.js +1 -481
  39. package/lib/icon/angle-down.js +1 -481
  40. package/lib/icon/angle-left.js +1 -481
  41. package/lib/icon/angle-right.js +1 -481
  42. package/lib/icon/angle-up-fill.js +1 -481
  43. package/lib/icon/angle-up.js +1 -481
  44. package/lib/icon/archive-fill.js +1 -481
  45. package/lib/icon/arrows-left.js +1 -481
  46. package/lib/icon/arrows-right.js +1 -481
  47. package/lib/icon/assistant.js +1 -481
  48. package/lib/icon/audio-fill.js +1 -481
  49. package/lib/icon/bk.js +1 -481
  50. package/lib/icon/circle.js +1 -481
  51. package/lib/icon/close-line.js +1 -481
  52. package/lib/icon/close.js +1 -481
  53. package/lib/icon/code.js +1 -481
  54. package/lib/icon/cog-shape.js +1 -481
  55. package/lib/icon/collapse-left.js +1 -481
  56. package/lib/icon/copy-shape.js +1 -481
  57. package/lib/icon/copy.js +1 -481
  58. package/lib/icon/data-shape.js +1 -481
  59. package/lib/icon/del.js +1 -481
  60. package/lib/icon/doc-fill.js +1 -481
  61. package/lib/icon/done.js +1 -481
  62. package/lib/icon/down-shape.js +1 -481
  63. package/lib/icon/down-small.js +1 -481
  64. package/lib/icon/edit-line.js +1 -481
  65. package/lib/icon/ellipsis.js +1 -481
  66. package/lib/icon/enlarge-line.js +1 -481
  67. package/lib/icon/error.js +1 -481
  68. package/lib/icon/excel-fill.js +1 -481
  69. package/lib/icon/exclamation-circle-shape.js +1 -481
  70. package/lib/icon/eye.js +1 -481
  71. package/lib/icon/filliscreen-line.js +1 -481
  72. package/lib/icon/fix-line.js +1 -481
  73. package/lib/icon/fix-shape.js +1 -481
  74. package/lib/icon/folder-open.js +1 -481
  75. package/lib/icon/folder-shape-open.js +1 -481
  76. package/lib/icon/folder-shape.js +1 -481
  77. package/lib/icon/folder.js +1 -481
  78. package/lib/icon/funnel.js +1 -481
  79. package/lib/icon/help-document-fill.js +1 -481
  80. package/lib/icon/help-fill.js +1 -481
  81. package/lib/icon/help.js +1 -481
  82. package/lib/icon/image-fill.js +1 -527
  83. package/lib/icon/img-error.js +1 -527
  84. package/lib/icon/img-placehoulder.js +1 -527
  85. package/lib/icon/index.js +1 -2367
  86. package/lib/icon/info-line.js +1 -527
  87. package/lib/icon/info.js +1 -527
  88. package/lib/icon/left-shape.js +1 -527
  89. package/lib/icon/left-turn-line.js +1 -527
  90. package/lib/icon/narrow-line.js +1 -527
  91. package/lib/icon/original.js +1 -527
  92. package/lib/icon/pdf-fill.js +1 -527
  93. package/lib/icon/play-shape.js +1 -527
  94. package/lib/icon/plus.js +1 -527
  95. package/lib/icon/ppt-fill.js +1 -527
  96. package/lib/icon/qq.js +1 -527
  97. package/lib/icon/right-shape.js +1 -527
  98. package/lib/icon/right-turn-line.js +1 -527
  99. package/lib/icon/search.js +1 -527
  100. package/lib/icon/share.js +1 -527
  101. package/lib/icon/spinner.js +1 -527
  102. package/lib/icon/success.js +1 -527
  103. package/lib/icon/switcher-loading.js +1 -527
  104. package/lib/icon/text-file.js +1 -527
  105. package/lib/icon/text-fill.js +1 -527
  106. package/lib/icon/transfer.js +1 -527
  107. package/lib/icon/tree-application-shape.js +1 -527
  108. package/lib/icon/unfull-screen.js +1 -527
  109. package/lib/icon/unvisible.js +1 -527
  110. package/lib/icon/up-shape.js +1 -527
  111. package/lib/icon/upload.js +1 -527
  112. package/lib/icon/video-fill.js +1 -527
  113. package/lib/icon/warn.js +1 -527
  114. package/lib/icon/weixin-pro.js +1 -527
  115. package/lib/icon/weixin.js +1 -527
  116. package/lib/image/index.js +1 -593
  117. package/lib/index.js +1 -97
  118. package/lib/info-box/index.js +2 -1456
  119. package/lib/info-box/index.js.LICENSE.txt +1 -0
  120. package/lib/input/index.js +2 -1528
  121. package/lib/input/index.js.LICENSE.txt +1 -0
  122. package/lib/link/index.js +1 -160
  123. package/lib/loading/index.js +1 -379
  124. package/lib/locale/index.js +1 -465
  125. package/lib/menu/index.js +1 -725
  126. package/lib/message/index.js +2 -1790
  127. package/lib/message/index.js.LICENSE.txt +6 -0
  128. package/lib/modal/index.js +1 -337
  129. package/lib/navigation/index.js +1 -367
  130. package/lib/notify/index.js +1 -394
  131. package/lib/overflow-title/index.js +1 -485
  132. package/lib/pagination/index.js +1 -880
  133. package/lib/plugin-popover/index.js +1 -4067
  134. package/lib/plugins/index.js +1 -63
  135. package/lib/pop-confirm/index.js +1 -273
  136. package/lib/popover/index.js +1 -4075
  137. package/lib/popover2/index.js +1 -107
  138. package/lib/preset.js +1 -93
  139. package/lib/process/index.js +2 -1099
  140. package/lib/process/index.js.LICENSE.txt +1 -0
  141. package/lib/progress/index.js +1 -428
  142. package/lib/radio/index.js +1 -627
  143. package/lib/rate/index.js +1 -338
  144. package/lib/resize-layout/index.js +1 -430
  145. package/lib/search-select/index.js +2 -3036
  146. package/lib/search-select/index.js.LICENSE.txt +1 -0
  147. package/lib/select/index.js +2 -2571
  148. package/lib/select/index.js.LICENSE.txt +1 -0
  149. package/lib/shared/index.js +1 -2865
  150. package/lib/sideslider/index.js +2 -1005
  151. package/lib/sideslider/index.js.LICENSE.txt +1 -0
  152. package/lib/slider/index.js +2 -1629
  153. package/lib/slider/index.js.LICENSE.txt +1 -0
  154. package/lib/steps/index.js +2 -1163
  155. package/lib/steps/index.js.LICENSE.txt +1 -0
  156. package/lib/swiper/index.js +1 -336
  157. package/lib/switcher/index.js +1 -277
  158. package/lib/tab/index.js +1 -859
  159. package/lib/table/index.js +1 -6568
  160. package/lib/table-column/index.js +1 -730
  161. package/lib/tag/index.js +1 -233
  162. package/lib/tag-input/index.js +1 -1652
  163. package/lib/time-picker/index.js +1 -71
  164. package/lib/timeline/index.js +1 -242
  165. package/lib/transfer/index.js +1 -673
  166. package/lib/tree/index.js +1 -2625
  167. package/lib/upload/index.js +2 -3193
  168. package/lib/upload/index.js.LICENSE.txt +1 -0
  169. package/lib/virtual-render/index.js +1 -748
  170. package/package.json +1 -1
@@ -1,155 +1 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
- /******/ // The require scope
4
- /******/ var __webpack_require__ = {};
5
- /******/
6
- /************************************************************************/
7
- /******/ /* webpack/runtime/define property getters */
8
- /******/ (() => {
9
- /******/ // define getter functions for harmony exports
10
- /******/ __webpack_require__.d = (exports, definition) => {
11
- /******/ for(var key in definition) {
12
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
13
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
14
- /******/ }
15
- /******/ }
16
- /******/ };
17
- /******/ })();
18
- /******/
19
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
20
- /******/ (() => {
21
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
22
- /******/ })();
23
- /******/
24
- /************************************************************************/
25
- var __webpack_exports__ = {};
26
-
27
- // EXPORTS
28
- __webpack_require__.d(__webpack_exports__, {
29
- Z: () => (/* binding */ src)
30
- });
31
-
32
- ;// CONCATENATED MODULE: external "../shared"
33
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
34
- var y = x => () => x
35
- const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
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, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
40
- ;// CONCATENATED MODULE: ../../packages/animate-number/src/animate-number.tsx
41
-
42
- /*
43
- * Tencent is pleased to support the open source community by making
44
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
45
- *
46
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
47
- *
48
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
49
- *
50
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
51
- *
52
- * ---------------------------------------------------
53
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
54
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
55
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
56
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
57
- *
58
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
59
- * the Software.
60
- *
61
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
62
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
63
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
64
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
65
- * IN THE SOFTWARE.
66
- */
67
-
68
-
69
- /* harmony default export */ const animate_number = ((0,external_vue_namespaceObject.defineComponent)({
70
- name: 'AnimateNumber',
71
- props: {
72
- value: external_shared_namespaceObject.PropTypes.number.def(0),
73
- digits: external_shared_namespaceObject.PropTypes.number.def(0)
74
- },
75
- setup: function setup(props) {
76
- var rafId = -1;
77
- var tweeningValue = (0,external_vue_namespaceObject.ref)(0);
78
- var formatValue = (0,external_vue_namespaceObject.computed)(function () {
79
- return Number(tweeningValue.value).toFixed(props.digits);
80
- });
81
- var tween = function tween(startValue, endValue) {
82
- // 错误数据返回0
83
- if (Number.isNaN(+endValue)) return 0;
84
- var dis = Math.abs(endValue - startValue);
85
- var isPositive = endValue - startValue > 0 ? 1 : -1;
86
- var ticDis = Math.ceil(dis / 30 * Math.pow(10, props.digits)) / Math.pow(10, props.digits);
87
- var ticTimes = Math.ceil(dis / ticDis);
88
- // 算出每次计算需要间隔的时间,保证动画的流畅
89
- var gapTime = 25 / ticTimes;
90
- var tickGap = 1;
91
- var animate = function animate() {
92
- if (tickGap < gapTime) {
93
- rafId = requestAnimationFrame(animate);
94
- tickGap = tickGap + 1;
95
- return;
96
- }
97
- tweeningValue.value += ticDis * isPositive;
98
- var isUnDone = isPositive === 1 ? tweeningValue.value < endValue : tweeningValue.value > endValue;
99
- if (isUnDone) {
100
- rafId = requestAnimationFrame(animate);
101
- tickGap = 1;
102
- } else {
103
- tweeningValue.value = endValue;
104
- }
105
- };
106
- animate();
107
- };
108
- (0,external_vue_namespaceObject.watch)(function () {
109
- return props.value;
110
- }, function (newValue, oldValue) {
111
- tween(oldValue, newValue);
112
- });
113
- (0,external_vue_namespaceObject.onMounted)(function () {
114
- tween(0, props.value);
115
- });
116
- (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
117
- cancelAnimationFrame(rafId);
118
- });
119
- return function () {
120
- return (0,external_vue_namespaceObject.createVNode)("span", null, [formatValue.value]);
121
- };
122
- }
123
- }));
124
- ;// CONCATENATED MODULE: ../../packages/animate-number/src/index.ts
125
- /*
126
- * Tencent is pleased to support the open source community by making
127
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
128
- *
129
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
130
- *
131
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
132
- *
133
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
134
- *
135
- * ---------------------------------------------------
136
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
137
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
138
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
139
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
140
- *
141
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
142
- * the Software.
143
- *
144
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
145
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
146
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
147
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
148
- * IN THE SOFTWARE.
149
- */
150
-
151
-
152
- var BkAnimateNumber = (0,external_shared_namespaceObject.withInstall)(animate_number);
153
- /* harmony default export */ const src = (BkAnimateNumber);
154
- var __webpack_exports__default = __webpack_exports__.Z;
155
- export { __webpack_exports__default as default };
1
+ import*as e from"../shared";import*as n from"vue";var t={d:(e,n)=>{for(var o in n)t.o(n,o)&&!t.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:n[o]})},o:(e,n)=>Object.prototype.hasOwnProperty.call(e,n)},o={};t.d(o,{Z:()=>d});const r=(a={PropTypes:()=>e.PropTypes,withInstall:()=>e.withInstall},u={},t.d(u,a),u);var a,u;const i=(e=>{var n={};return t.d(n,e),n})({computed:()=>n.computed,createVNode:()=>n.createVNode,defineComponent:()=>n.defineComponent,onBeforeUnmount:()=>n.onBeforeUnmount,onMounted:()=>n.onMounted,ref:()=>n.ref,watch:()=>n.watch}),c=(0,i.defineComponent)({name:"AnimateNumber",props:{value:r.PropTypes.number.def(0),digits:r.PropTypes.number.def(0)},setup:function(e){var n=-1,t=(0,i.ref)(0),o=(0,i.computed)((function(){return Number(t.value).toFixed(e.digits)})),r=function(o,r){if(Number.isNaN(+r))return 0;var a=Math.abs(r-o),u=r-o>0?1:-1,i=Math.ceil(a/30*Math.pow(10,e.digits))/Math.pow(10,e.digits),c=25/Math.ceil(a/i),d=1;!function e(){if(d<c)return n=requestAnimationFrame(e),void(d+=1);t.value+=i*u,(1===u?t.value<r:t.value>r)?(n=requestAnimationFrame(e),d=1):t.value=r}()};return(0,i.watch)((function(){return e.value}),(function(e,n){r(n,e)})),(0,i.onMounted)((function(){r(0,e.value)})),(0,i.onBeforeUnmount)((function(){cancelAnimationFrame(n)})),function(){return(0,i.createVNode)("span",null,[o.value])}}}),d=(0,r.withInstall)(c);var f=o.Z;export{f as default};
@@ -1,188 +1 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
- import * as __WEBPACK_EXTERNAL_MODULE_lodash__ from "lodash";
4
- import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
5
- import * as __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__ from "../icon";
6
- /******/ // The require scope
7
- /******/ var __webpack_require__ = {};
8
- /******/
9
- /************************************************************************/
10
- /******/ /* webpack/runtime/define property getters */
11
- /******/ (() => {
12
- /******/ // define getter functions for harmony exports
13
- /******/ __webpack_require__.d = (exports, definition) => {
14
- /******/ for(var key in definition) {
15
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
16
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
17
- /******/ }
18
- /******/ }
19
- /******/ };
20
- /******/ })();
21
- /******/
22
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
23
- /******/ (() => {
24
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
25
- /******/ })();
26
- /******/
27
- /************************************************************************/
28
- var __webpack_exports__ = {};
29
-
30
- // EXPORTS
31
- __webpack_require__.d(__webpack_exports__, {
32
- Z: () => (/* binding */ src)
33
- });
34
-
35
- ;// CONCATENATED MODULE: external "../shared"
36
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
37
- var y = x => () => x
38
- const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["bkZIndexManager"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.bkZIndexManager, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
39
- ;// CONCATENATED MODULE: external "vue"
40
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
41
- var external_vue_y = x => () => x
42
- const external_vue_namespaceObject = external_vue_x({ ["Transition"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.Transition, ["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, ["watch"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.watch });
43
- ;// CONCATENATED MODULE: external "lodash"
44
- var external_lodash_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
45
- var external_lodash_y = x => () => x
46
- const external_lodash_namespaceObject = external_lodash_x({ ["throttle"]: () => __WEBPACK_EXTERNAL_MODULE_lodash__.throttle });
47
- ;// CONCATENATED MODULE: external "../config-provider"
48
- var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
49
- var external_config_provider_y = x => () => x
50
- const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
51
- ;// CONCATENATED MODULE: external "../icon"
52
- var external_icon_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
53
- var external_icon_y = x => () => x
54
- const external_icon_namespaceObject = external_icon_x({ ["AngleUp"]: () => __WEBPACK_EXTERNAL_MODULE__icon_85385c3e__.AngleUp });
55
- ;// CONCATENATED MODULE: ../../packages/backtop/src/backtop.tsx
56
-
57
- /*
58
- * Tencent is pleased to support the open source community by making
59
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
60
- *
61
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
62
- *
63
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
64
- *
65
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
66
- *
67
- * ---------------------------------------------------
68
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
69
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
70
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
71
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
72
- *
73
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
74
- * the Software.
75
- *
76
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
77
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
78
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
79
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
80
- * IN THE SOFTWARE.
81
- */
82
-
83
-
84
-
85
-
86
-
87
- /* harmony default export */ const backtop = ((0,external_vue_namespaceObject.defineComponent)({
88
- name: 'Backtop',
89
- props: {
90
- visibilityHeight: external_shared_namespaceObject.PropTypes.number.def(200),
91
- target: external_shared_namespaceObject.PropTypes.string.def(''),
92
- right: external_shared_namespaceObject.PropTypes.number.def(40),
93
- bottom: external_shared_namespaceObject.PropTypes.number.def(40),
94
- extCls: external_shared_namespaceObject.PropTypes.string.def('')
95
- },
96
- setup: function setup(props, _ref) {
97
- var slots = _ref.slots;
98
- var container = (0,external_vue_namespaceObject.ref)(null);
99
- var el = (0,external_vue_namespaceObject.ref)(null);
100
- var visible = (0,external_vue_namespaceObject.ref)(false);
101
- var zIndex = (0,external_vue_namespaceObject.ref)(external_shared_namespaceObject.bkZIndexManager.getModalNextIndex());
102
- var styleBottom = "".concat(props.bottom, "px");
103
- var styleRight = "".concat(props.right, "px");
104
- var scrollHandler = (0,external_lodash_namespaceObject.throttle)(function () {
105
- visible.value = el.value.scrollTop >= props.visibilityHeight;
106
- }, 30);
107
- var scrollTop = function scrollTop() {
108
- el.value.scrollTo({
109
- top: 0,
110
- behavior: 'smooth'
111
- });
112
- };
113
- (0,external_vue_namespaceObject.watch)(function () {
114
- return visible;
115
- }, function () {
116
- zIndex.value = external_shared_namespaceObject.bkZIndexManager.getModalNextIndex();
117
- });
118
- (0,external_vue_namespaceObject.onMounted)(function () {
119
- container.value = document;
120
- el.value = document.documentElement;
121
- if (props.target) {
122
- el.value = document.querySelector(props.target);
123
- if (!el.value) {
124
- throw new Error('target does not exist');
125
- }
126
- container.value = el.value;
127
- }
128
- container.value.addEventListener('scroll', scrollHandler);
129
- });
130
- (0,external_vue_namespaceObject.onBeforeUnmount)(function () {
131
- container.value.removeEventListener('scroll', scrollHandler);
132
- });
133
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
134
- resolveClassName = _usePrefix.resolveClassName;
135
- return function () {
136
- var _a, _b;
137
- return (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Transition, {
138
- "name": "bk-fade"
139
- }, {
140
- "default": function _default() {
141
- return [visible.value ? (0,external_vue_namespaceObject.createVNode)("div", {
142
- "class": "".concat(resolveClassName('backtop'), " ").concat(props.extCls),
143
- "style": {
144
- right: styleRight,
145
- bottom: styleBottom,
146
- zIndex: zIndex.value
147
- },
148
- "onClick": scrollTop
149
- }, [(_b = (_a = slots["default"]) === null || _a === void 0 ? void 0 : _a.call(slots)) !== null && _b !== void 0 ? _b : (0,external_vue_namespaceObject.createVNode)(external_icon_namespaceObject.AngleUp, {
150
- "class": "".concat(resolveClassName('backtop-icon'))
151
- }, null)]) : ''];
152
- }
153
- });
154
- };
155
- }
156
- }));
157
- ;// CONCATENATED MODULE: ../../packages/backtop/src/index.ts
158
- /*
159
- * Tencent is pleased to support the open source community by making
160
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
161
- *
162
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
163
- *
164
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
165
- *
166
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
167
- *
168
- * ---------------------------------------------------
169
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
170
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
171
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
172
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
173
- *
174
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
175
- * the Software.
176
- *
177
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
178
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
179
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
180
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
181
- * IN THE SOFTWARE.
182
- */
183
-
184
-
185
- var BkBacktop = (0,external_shared_namespaceObject.withInstall)(backtop);
186
- /* harmony default export */ const src = (BkBacktop);
187
- var __webpack_exports__default = __webpack_exports__.Z;
188
- export { __webpack_exports__default as default };
1
+ import*as e from"../shared";import*as t from"vue";import*as o from"lodash";import*as n from"../config-provider";import*as r from"../icon";var a={d:(e,t)=>{for(var o in t)a.o(t,o)&&!a.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},l={};a.d(l,{Z:()=>m});const i=(u={PropTypes:()=>e.PropTypes,bkZIndexManager:()=>e.bkZIndexManager,withInstall:()=>e.withInstall},s={},a.d(s,u),s);var u,s;const c=(e=>{var t={};return a.d(t,e),t})({Transition:()=>t.Transition,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent,onBeforeUnmount:()=>t.onBeforeUnmount,onMounted:()=>t.onMounted,ref:()=>t.ref,watch:()=>t.watch}),d=(e=>{var t={};return a.d(t,e),t})({throttle:()=>o.throttle}),f=(e=>{var t={};return a.d(t,e),t})({usePrefix:()=>n.usePrefix}),p=(e=>{var t={};return a.d(t,e),t})({AngleUp:()=>r.AngleUp}),v=(0,c.defineComponent)({name:"Backtop",props:{visibilityHeight:i.PropTypes.number.def(200),target:i.PropTypes.string.def(""),right:i.PropTypes.number.def(40),bottom:i.PropTypes.number.def(40),extCls:i.PropTypes.string.def("")},setup:function(e,t){var o=t.slots,n=(0,c.ref)(null),r=(0,c.ref)(null),a=(0,c.ref)(!1),l=(0,c.ref)(i.bkZIndexManager.getModalNextIndex()),u="".concat(e.bottom,"px"),s="".concat(e.right,"px"),v=(0,d.throttle)((function(){a.value=r.value.scrollTop>=e.visibilityHeight}),30),m=function(){r.value.scrollTo({top:0,behavior:"smooth"})};(0,c.watch)((function(){return a}),(function(){l.value=i.bkZIndexManager.getModalNextIndex()})),(0,c.onMounted)((function(){if(n.value=document,r.value=document.documentElement,e.target){if(r.value=document.querySelector(e.target),!r.value)throw new Error("target does not exist");n.value=r.value}n.value.addEventListener("scroll",v)})),(0,c.onBeforeUnmount)((function(){n.value.removeEventListener("scroll",v)}));var g=(0,f.usePrefix)().resolveClassName;return function(){var t,n;return(0,c.createVNode)(c.Transition,{name:"bk-fade"},{default:function(){return[a.value?(0,c.createVNode)("div",{class:"".concat(g("backtop")," ").concat(e.extCls),style:{right:s,bottom:u,zIndex:l.value},onClick:m},[null!==(n=null===(t=o.default)||void 0===t?void 0:t.call(o))&&void 0!==n?n:(0,c.createVNode)(p.AngleUp,{class:"".concat(g("backtop-icon"))},null)]):""]}})}}}),m=(0,i.withInstall)(v);var g=l.Z;export{g as default};
@@ -1,236 +1 @@
1
- import * as __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__ from "../shared";
2
- import * as __WEBPACK_EXTERNAL_MODULE_vue__ from "vue";
3
- import * as __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__ from "../config-provider";
4
- /******/ // The require scope
5
- /******/ var __webpack_require__ = {};
6
- /******/
7
- /************************************************************************/
8
- /******/ /* webpack/runtime/define property getters */
9
- /******/ (() => {
10
- /******/ // define getter functions for harmony exports
11
- /******/ __webpack_require__.d = (exports, definition) => {
12
- /******/ for(var key in definition) {
13
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
14
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
15
- /******/ }
16
- /******/ }
17
- /******/ };
18
- /******/ })();
19
- /******/
20
- /******/ /* webpack/runtime/hasOwnProperty shorthand */
21
- /******/ (() => {
22
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
23
- /******/ })();
24
- /******/
25
- /************************************************************************/
26
- var __webpack_exports__ = {};
27
-
28
- // EXPORTS
29
- __webpack_require__.d(__webpack_exports__, {
30
- Z: () => (/* binding */ src)
31
- });
32
-
33
- ;// CONCATENATED MODULE: external "../shared"
34
- var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
35
- var y = x => () => x
36
- 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 });
37
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/typeof.js
38
- function _typeof(obj) {
39
- "@babel/helpers - typeof";
40
-
41
- return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
42
- return typeof obj;
43
- } : function (obj) {
44
- return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
45
- }, _typeof(obj);
46
- }
47
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPrimitive.js
48
-
49
- function _toPrimitive(input, hint) {
50
- if (_typeof(input) !== "object" || input === null) return input;
51
- var prim = input[Symbol.toPrimitive];
52
- if (prim !== undefined) {
53
- var res = prim.call(input, hint || "default");
54
- if (_typeof(res) !== "object") return res;
55
- throw new TypeError("@@toPrimitive must return a primitive value.");
56
- }
57
- return (hint === "string" ? String : Number)(input);
58
- }
59
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/toPropertyKey.js
60
-
61
-
62
- function _toPropertyKey(arg) {
63
- var key = _toPrimitive(arg, "string");
64
- return _typeof(key) === "symbol" ? key : String(key);
65
- }
66
- ;// CONCATENATED MODULE: ../../node_modules/@babel/runtime/helpers/esm/defineProperty.js
67
-
68
- function _defineProperty(obj, key, value) {
69
- key = _toPropertyKey(key);
70
- if (key in obj) {
71
- Object.defineProperty(obj, key, {
72
- value: value,
73
- enumerable: true,
74
- configurable: true,
75
- writable: true
76
- });
77
- } else {
78
- obj[key] = value;
79
- }
80
- return obj;
81
- }
82
- ;// CONCATENATED MODULE: external "vue"
83
- var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
84
- var external_vue_y = x => () => x
85
- 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 });
86
- ;// CONCATENATED MODULE: external "../config-provider"
87
- var external_config_provider_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
88
- var external_config_provider_y = x => () => x
89
- const external_config_provider_namespaceObject = external_config_provider_x({ ["usePrefix"]: () => __WEBPACK_EXTERNAL_MODULE__config_provider_9d0186d9__.usePrefix });
90
- ;// CONCATENATED MODULE: ../../packages/badge/src/badge.tsx
91
-
92
-
93
- /*
94
- * Tencent is pleased to support the open source community by making
95
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
96
- *
97
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
98
- *
99
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
100
- *
101
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
102
- *
103
- * ---------------------------------------------------
104
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
105
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
106
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
107
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
108
- *
109
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
110
- * the Software.
111
- *
112
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
113
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
114
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
115
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
116
- * IN THE SOFTWARE.
117
- */
118
-
119
-
120
-
121
- /* harmony default export */ const badge = ((0,external_vue_namespaceObject.defineComponent)({
122
- name: 'Badge',
123
- props: {
124
- /** badge theme */
125
- theme: external_shared_namespaceObject.PropTypes.string.def('primary'),
126
- /** Number to show in badge */
127
- count: external_shared_namespaceObject.PropTypes.oneOfType([String, Number]).def(1),
128
- position: external_shared_namespaceObject.PropTypes.string.def('top-right'),
129
- radius: external_shared_namespaceObject.PropTypes.string,
130
- valLength: external_shared_namespaceObject.PropTypes.number.def(3),
131
- /** Show capped numeric value */
132
- overflowCount: external_shared_namespaceObject.PropTypes.number.def(99),
133
- /** Whether to show red dots with no content */
134
- dot: external_shared_namespaceObject.PropTypes.bool.def(false),
135
- visible: external_shared_namespaceObject.PropTypes.bool.def(false),
136
- /** 外部设置的 class name */
137
- extCls: external_shared_namespaceObject.PropTypes.string
138
- },
139
- emits: ['hover', 'leave'],
140
- setup: function setup(props, _ref) {
141
- var emit = _ref.emit;
142
- var numberCount = (0,external_vue_namespaceObject.computed)(function () {
143
- if (typeof props.count === 'string') {
144
- var valueText = props.count;
145
- valueText += '';
146
- var output = [];
147
- var count = 0;
148
- valueText.split('').forEach(function (_char) {
149
- if (count < Number(props.valLength)) {
150
- count += /[\u4e00-\u9fa5]/.test(_char) ? 2 : 1;
151
- output.push(_char);
152
- }
153
- });
154
- return output.join('');
155
- }
156
- return props.count > props.overflowCount ? "".concat(props.overflowCount, "+") : props.count;
157
- });
158
- var radiusStyle = (0,external_vue_namespaceObject.computed)(function () {
159
- var isRadius = props.radius !== undefined && /^\d+(%|px|em|rem|vh|vw)?$/.test(props.radius);
160
- var radiusValue = isRadius && /^\d+$/.test(props.radius) && "".concat(props.radius, "px") || props.radius;
161
- return {
162
- borderRadius: radiusValue
163
- };
164
- });
165
- var handleHover = function handleHover() {
166
- /**
167
- * Hover event.
168
- * @event hover
169
- */
170
- emit('hover');
171
- };
172
- var handleLeave = function handleLeave() {
173
- /**
174
- * Leave event.
175
- * @event Leave
176
- */
177
- emit('leave');
178
- };
179
- var _usePrefix = (0,external_config_provider_namespaceObject.usePrefix)(),
180
- resolveClassName = _usePrefix.resolveClassName;
181
- return {
182
- numberCount: numberCount,
183
- handleHover: handleHover,
184
- handleLeave: handleLeave,
185
- radiusStyle: radiusStyle,
186
- resolveClassName: resolveClassName
187
- };
188
- },
189
- render: function render() {
190
- var _classes2;
191
- var _a, _b, _c, _d, _e, _f;
192
- var wrapperClasses = (0,external_shared_namespaceObject.classes)(_defineProperty({}, "".concat(this.resolveClassName('badge-main')), true), this.$props.extCls);
193
- var badgeClass = (0,external_shared_namespaceObject.classes)((_classes2 = {}, _defineProperty(_classes2, "".concat(this.resolveClassName('badge'), " ").concat(this.resolveClassName(this.$props.theme)), !!this.$props.theme), _defineProperty(_classes2, 'pinned ', this.$slots["default"]), _defineProperty(_classes2, 'dot', this.$props.dot), _defineProperty(_classes2, "".concat(this.$props.position), this.$slots["default"]), _defineProperty(_classes2, "".concat(this.resolveClassName('badge-icon'), " is-icon"), this.$slots.icon), _classes2), '');
194
- var number = !this.$props.dot ? (0,external_vue_namespaceObject.createVNode)("span", null, [this.numberCount]) : '';
195
- return (0,external_vue_namespaceObject.createVNode)("div", {
196
- "class": wrapperClasses
197
- }, [(_c = (_b = (_a = this.$slots)["default"]) === null || _b === void 0 ? void 0 : _b.call(_a)) !== null && _c !== void 0 ? _c : '', !this.$props.visible ? (0,external_vue_namespaceObject.createVNode)("span", {
198
- "class": badgeClass,
199
- "style": this.radiusStyle,
200
- "onMouseenter": this.handleHover,
201
- "onMouseleave": this.handleLeave
202
- }, [(_f = (_e = (_d = this.$slots).icon) === null || _e === void 0 ? void 0 : _e.call(_d)) !== null && _f !== void 0 ? _f : number]) : '']);
203
- }
204
- }));
205
- ;// CONCATENATED MODULE: ../../packages/badge/src/index.ts
206
- /*
207
- * Tencent is pleased to support the open source community by making
208
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
209
- *
210
- * Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
211
- *
212
- * 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
213
- *
214
- * License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
215
- *
216
- * ---------------------------------------------------
217
- * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
218
- * documentation files (the "Software"), to deal in the Software without restriction, including without limitation
219
- * the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
220
- * to permit persons to whom the Software is furnished to do so, subject to the following conditions:
221
- *
222
- * The above copyright notice and this permission notice shall be included in all copies or substantial portions of
223
- * the Software.
224
- *
225
- * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
226
- * THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
227
- * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
228
- * CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
229
- * IN THE SOFTWARE.
230
- */
231
-
232
-
233
- var BkBadge = (0,external_shared_namespaceObject.withInstall)(badge);
234
- /* harmony default export */ const src = (BkBadge);
235
- var __webpack_exports__default = __webpack_exports__.Z;
236
- export { __webpack_exports__default as default };
1
+ import*as e from"../shared";import*as t from"vue";import*as o from"../config-provider";var r={d:(e,t)=>{for(var o in t)r.o(t,o)&&!r.o(e,o)&&Object.defineProperty(e,o,{enumerable:!0,get:t[o]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},s={};r.d(s,{Z:()=>f});const n=(i={PropTypes:()=>e.PropTypes,classes:()=>e.classes,withInstall:()=>e.withInstall},a={},r.d(a,i),a);var i,a;function l(e){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},l(e)}function u(e,t,o){return(t=function(e){var t=function(e,t){if("object"!==l(e)||null===e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var r=o.call(e,"string");if("object"!==l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===l(t)?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:o,enumerable:!0,configurable:!0,writable:!0}):e[t]=o,e}const p=(e=>{var t={};return r.d(t,e),t})({computed:()=>t.computed,createVNode:()=>t.createVNode,defineComponent:()=>t.defineComponent}),c=(e=>{var t={};return r.d(t,e),t})({usePrefix:()=>o.usePrefix}),d=(0,p.defineComponent)({name:"Badge",props:{theme:n.PropTypes.string.def("primary"),count:n.PropTypes.oneOfType([String,Number]).def(1),position:n.PropTypes.string.def("top-right"),radius:n.PropTypes.string,valLength:n.PropTypes.number.def(3),overflowCount:n.PropTypes.number.def(99),dot:n.PropTypes.bool.def(!1),visible:n.PropTypes.bool.def(!1),extCls:n.PropTypes.string},emits:["hover","leave"],setup:function(e,t){var o=t.emit;return{numberCount:(0,p.computed)((function(){if("string"==typeof e.count){var t=e.count,o=[],r=0;return(t+="").split("").forEach((function(t){r<Number(e.valLength)&&(r+=/[\u4e00-\u9fa5]/.test(t)?2:1,o.push(t))})),o.join("")}return e.count>e.overflowCount?"".concat(e.overflowCount,"+"):e.count})),handleHover:function(){o("hover")},handleLeave:function(){o("leave")},radiusStyle:(0,p.computed)((function(){return{borderRadius:void 0!==e.radius&&/^\d+(%|px|em|rem|vh|vw)?$/.test(e.radius)&&/^\d+$/.test(e.radius)&&"".concat(e.radius,"px")||e.radius}})),resolveClassName:(0,c.usePrefix)().resolveClassName}},render:function(){var e,t,o,r,s,i,a,l=(0,n.classes)(u({},"".concat(this.resolveClassName("badge-main")),!0),this.$props.extCls),c=(0,n.classes)((u(e={},"".concat(this.resolveClassName("badge")," ").concat(this.resolveClassName(this.$props.theme)),!!this.$props.theme),u(e,"pinned ",this.$slots.default),u(e,"dot",this.$props.dot),u(e,"".concat(this.$props.position),this.$slots.default),u(e,"".concat(this.resolveClassName("badge-icon")," is-icon"),this.$slots.icon),e),""),d=this.$props.dot?"":(0,p.createVNode)("span",null,[this.numberCount]);return(0,p.createVNode)("div",{class:l},[null!==(r=null===(o=(t=this.$slots).default)||void 0===o?void 0:o.call(t))&&void 0!==r?r:"",this.$props.visible?"":(0,p.createVNode)("span",{class:c,style:this.radiusStyle,onMouseenter:this.handleHover,onMouseleave:this.handleLeave},[null!==(a=null===(i=(s=this.$slots).icon)||void 0===i?void 0:i.call(s))&&void 0!==a?a:d])])}}),f=(0,n.withInstall)(d);var v=s.Z;export{v as default};