bkui-vue 0.0.2-beta.82 → 0.0.2-beta.84
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 +135 -161
- package/dist/index.esm.js +16449 -19088
- package/dist/index.umd.js +135 -161
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/affix/index.js +321 -1
- package/lib/alert/index.js +214 -1
- package/lib/animate-number/index.js +155 -1
- package/lib/backtop/index.js +188 -1
- package/lib/badge/index.js +235 -1
- package/lib/breadcrumb/index.js +309 -1
- package/lib/button/index.js +321 -1
- package/lib/card/index.js +285 -1
- package/lib/cascader/index.js +2036 -2
- package/lib/checkbox/index.js +542 -1
- package/lib/code-diff/index.js +5501 -1
- package/lib/collapse/index.js +570 -1
- package/lib/collapse-transition/index.js +177 -1
- package/lib/color-picker/index.js +2665 -1
- package/lib/components.js +530 -1
- package/lib/config-provider/index.js +365 -1
- package/lib/container/index.js +391 -1
- package/lib/date-picker/index.js +5555 -1
- package/lib/dialog/index.js +975 -2
- package/lib/directives/index.js +1375 -2
- package/lib/dist.index.js +87 -1
- package/lib/divider/index.js +169 -1
- package/lib/dropdown/index.js +369 -1
- package/lib/exception/index.js +385 -1
- package/lib/fixed-navbar/index.js +154 -1
- package/lib/form/index.js +952 -1
- package/lib/hooks.js +73 -1
- package/lib/icon/angle-double-down-line.js +191 -1
- package/lib/icon/angle-double-left-line.js +191 -1
- package/lib/icon/angle-double-left.js +191 -1
- package/lib/icon/angle-double-right-line.js +191 -1
- package/lib/icon/angle-double-right.js +191 -1
- package/lib/icon/angle-double-up-line.js +191 -1
- package/lib/icon/angle-down-fill.js +191 -1
- package/lib/icon/angle-down-line.js +191 -1
- package/lib/icon/angle-down.js +191 -1
- package/lib/icon/angle-left.js +191 -1
- package/lib/icon/angle-right.js +191 -1
- package/lib/icon/angle-up-fill.js +191 -1
- package/lib/icon/angle-up.js +191 -1
- package/lib/icon/archive-fill.js +191 -1
- package/lib/icon/arrows-left.js +191 -1
- package/lib/icon/arrows-right.js +191 -1
- package/lib/icon/assistant.js +191 -1
- package/lib/icon/audio-fill.js +191 -1
- package/lib/icon/bk.js +191 -1
- package/lib/icon/circle.js +191 -1
- package/lib/icon/close-line.js +191 -1
- package/lib/icon/close.js +191 -1
- package/lib/icon/code.js +191 -1
- package/lib/icon/cog-shape.js +191 -1
- package/lib/icon/collapse-left.js +191 -1
- package/lib/icon/copy-shape.js +191 -1
- package/lib/icon/copy.js +191 -1
- package/lib/icon/data-shape.js +191 -1
- package/lib/icon/del.js +191 -1
- package/lib/icon/doc-fill.js +191 -1
- package/lib/icon/done.js +191 -1
- package/lib/icon/down-shape.js +191 -1
- package/lib/icon/down-small.js +191 -1
- package/lib/icon/edit-line.js +191 -1
- package/lib/icon/ellipsis.js +191 -1
- package/lib/icon/enlarge-line.js +191 -1
- package/lib/icon/error.js +191 -1
- package/lib/icon/excel-fill.js +191 -1
- package/lib/icon/exclamation-circle-shape.js +191 -1
- package/lib/icon/eye.js +191 -1
- package/lib/icon/filliscreen-line.js +191 -1
- package/lib/icon/fix-line.js +191 -1
- package/lib/icon/fix-shape.js +191 -1
- package/lib/icon/folder-open.js +191 -1
- package/lib/icon/folder-shape-open.js +191 -1
- package/lib/icon/folder-shape.js +191 -1
- package/lib/icon/folder.js +191 -1
- package/lib/icon/funnel.js +191 -1
- package/lib/icon/help-document-fill.js +191 -1
- package/lib/icon/help-fill.js +191 -1
- package/lib/icon/help.js +191 -1
- package/lib/icon/image-fill.js +276 -1
- package/lib/icon/img-error.js +276 -1
- package/lib/icon/img-placehoulder.js +276 -1
- package/lib/icon/index.js +2399 -1
- package/lib/icon/info-line.js +276 -1
- package/lib/icon/info.js +276 -1
- package/lib/icon/left-shape.js +276 -1
- package/lib/icon/left-turn-line.js +276 -1
- package/lib/icon/narrow-line.js +276 -1
- package/lib/icon/original.js +276 -1
- package/lib/icon/pdf-fill.js +276 -1
- package/lib/icon/play-shape.js +276 -1
- package/lib/icon/plus.js +276 -1
- package/lib/icon/ppt-fill.js +276 -1
- package/lib/icon/qq.js +276 -1
- package/lib/icon/right-shape.js +276 -1
- package/lib/icon/right-turn-line.js +276 -1
- package/lib/icon/search.js +276 -1
- package/lib/icon/share.js +276 -1
- package/lib/icon/spinner.js +276 -1
- package/lib/icon/success.js +276 -1
- package/lib/icon/switcher-loading.js +276 -1
- package/lib/icon/text-file.js +276 -1
- package/lib/icon/text-fill.js +276 -1
- package/lib/icon/transfer.js +276 -1
- package/lib/icon/tree-application-shape.js +276 -1
- package/lib/icon/unfull-screen.js +276 -1
- package/lib/icon/unvisible.js +276 -1
- package/lib/icon/up-shape.js +276 -1
- package/lib/icon/upload.js +276 -1
- package/lib/icon/video-fill.js +276 -1
- package/lib/icon/warn.js +276 -1
- package/lib/icon/weixin-pro.js +276 -1
- package/lib/icon/weixin.js +276 -1
- package/lib/image/index.js +641 -1
- package/lib/index.js +97 -1
- package/lib/info-box/index.js +1165 -2
- package/lib/input/index.js +1218 -2
- package/lib/link/index.js +160 -1
- package/lib/loading/index.js +381 -1
- package/lib/locale/index.js +465 -1
- package/lib/menu/index.js +724 -1
- package/lib/message/index.js +1795 -2
- package/lib/modal/index.js +396 -1
- package/lib/navigation/index.js +367 -1
- package/lib/notify/index.js +397 -1
- package/lib/overflow-title/index.js +461 -1
- package/lib/pagination/index.js +880 -1
- package/lib/plugin-popover/index.js +4089 -1
- package/lib/plugins/index.js +63 -1
- package/lib/pop-confirm/index.js +273 -1
- package/lib/popover/index.js +4097 -1
- package/lib/popover2/index.js +107 -1
- package/lib/preset.js +93 -1
- package/lib/process/index.js +759 -2
- package/lib/progress/index.js +431 -1
- package/lib/radio/index.js +627 -1
- package/lib/rate/index.js +338 -1
- package/lib/resize-layout/index.js +429 -1
- package/lib/search-select/index.js +2729 -2
- package/lib/search-select/search-select.css +1 -3
- package/lib/search-select/search-select.less +1 -3
- package/lib/search-select/search-select.variable.css +1 -3
- package/lib/select/index.js +2251 -2
- package/lib/shared/index.js +2873 -1
- package/lib/sideslider/index.js +714 -2
- package/lib/slider/index.js +1291 -2
- package/lib/steps/index.js +825 -2
- package/lib/swiper/index.js +336 -1
- package/lib/switcher/index.js +277 -1
- package/lib/tab/index.js +914 -1
- package/lib/table/index.js +6421 -1
- package/lib/table/plugins/use-column-resize.d.ts +1 -1
- package/lib/table-column/index.js +763 -1
- package/lib/tag/index.js +233 -1
- package/lib/tag-input/index.js +1660 -1
- package/lib/tag-input/tag-input.d.ts +2 -14
- package/lib/time-picker/index.js +71 -1
- package/lib/timeline/index.js +241 -1
- package/lib/transfer/index.js +673 -1
- package/lib/tree/index.js +2686 -1
- package/lib/upload/index.js +2874 -2
- package/lib/virtual-render/index.js +865 -1
- package/package.json +13 -2
- package/lib/cascader/index.js.LICENSE.txt +0 -1
- package/lib/dialog/index.js.LICENSE.txt +0 -1
- package/lib/directives/index.js.LICENSE.txt +0 -14
- package/lib/info-box/index.js.LICENSE.txt +0 -1
- package/lib/input/index.js.LICENSE.txt +0 -1
- package/lib/message/index.js.LICENSE.txt +0 -6
- package/lib/process/index.js.LICENSE.txt +0 -1
- package/lib/search-select/index.js.LICENSE.txt +0 -1
- package/lib/select/index.js.LICENSE.txt +0 -1
- package/lib/sideslider/index.js.LICENSE.txt +0 -1
- package/lib/slider/index.js.LICENSE.txt +0 -1
- package/lib/steps/index.js.LICENSE.txt +0 -1
- package/lib/upload/index.js.LICENSE.txt +0 -1
@@ -1 +1,461 @@
|
|
1
|
-
import*
|
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__popover_cf5f8dce__ from "../popover";
|
4
|
+
import * as __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__ from "vue-types";
|
5
|
+
/******/ var __webpack_modules__ = ({
|
6
|
+
|
7
|
+
/***/ 35:
|
8
|
+
/***/ ((module, __unused_webpack___webpack_exports__, __webpack_require__) => {
|
9
|
+
|
10
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(9601);
|
11
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0__);
|
12
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(2609);
|
13
|
+
/* harmony import */ var _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1__);
|
14
|
+
// Imports
|
15
|
+
|
16
|
+
|
17
|
+
var ___CSS_LOADER_EXPORT___ = _node_modules_css_loader_dist_runtime_api_js__WEBPACK_IMPORTED_MODULE_1___default()((_node_modules_css_loader_dist_runtime_noSourceMaps_js__WEBPACK_IMPORTED_MODULE_0___default()));
|
18
|
+
// Module
|
19
|
+
___CSS_LOADER_EXPORT___.push([module.id, `.text-ov {
|
20
|
+
overflow: hidden;
|
21
|
+
text-overflow: ellipsis;
|
22
|
+
white-space: nowrap;
|
23
|
+
}
|
24
|
+
.position-relative {
|
25
|
+
position: relative;
|
26
|
+
}
|
27
|
+
.position-absolute {
|
28
|
+
position: absolute;
|
29
|
+
}
|
30
|
+
`, ""]);
|
31
|
+
// Exports
|
32
|
+
/* unused harmony default export */ var __WEBPACK_DEFAULT_EXPORT__ = ((/* unused pure expression or super */ null && (___CSS_LOADER_EXPORT___)));
|
33
|
+
|
34
|
+
|
35
|
+
/***/ }),
|
36
|
+
|
37
|
+
/***/ 2609:
|
38
|
+
/***/ ((module) => {
|
39
|
+
|
40
|
+
|
41
|
+
|
42
|
+
/*
|
43
|
+
MIT License http://www.opensource.org/licenses/mit-license.php
|
44
|
+
Author Tobias Koppers @sokra
|
45
|
+
*/
|
46
|
+
module.exports = function (cssWithMappingToString) {
|
47
|
+
var list = [];
|
48
|
+
|
49
|
+
// return the list of modules as css string
|
50
|
+
list.toString = function toString() {
|
51
|
+
return this.map(function (item) {
|
52
|
+
var content = "";
|
53
|
+
var needLayer = typeof item[5] !== "undefined";
|
54
|
+
if (item[4]) {
|
55
|
+
content += "@supports (".concat(item[4], ") {");
|
56
|
+
}
|
57
|
+
if (item[2]) {
|
58
|
+
content += "@media ".concat(item[2], " {");
|
59
|
+
}
|
60
|
+
if (needLayer) {
|
61
|
+
content += "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {");
|
62
|
+
}
|
63
|
+
content += cssWithMappingToString(item);
|
64
|
+
if (needLayer) {
|
65
|
+
content += "}";
|
66
|
+
}
|
67
|
+
if (item[2]) {
|
68
|
+
content += "}";
|
69
|
+
}
|
70
|
+
if (item[4]) {
|
71
|
+
content += "}";
|
72
|
+
}
|
73
|
+
return content;
|
74
|
+
}).join("");
|
75
|
+
};
|
76
|
+
|
77
|
+
// import a list of modules into the list
|
78
|
+
list.i = function i(modules, media, dedupe, supports, layer) {
|
79
|
+
if (typeof modules === "string") {
|
80
|
+
modules = [[null, modules, undefined]];
|
81
|
+
}
|
82
|
+
var alreadyImportedModules = {};
|
83
|
+
if (dedupe) {
|
84
|
+
for (var k = 0; k < this.length; k++) {
|
85
|
+
var id = this[k][0];
|
86
|
+
if (id != null) {
|
87
|
+
alreadyImportedModules[id] = true;
|
88
|
+
}
|
89
|
+
}
|
90
|
+
}
|
91
|
+
for (var _k = 0; _k < modules.length; _k++) {
|
92
|
+
var item = [].concat(modules[_k]);
|
93
|
+
if (dedupe && alreadyImportedModules[item[0]]) {
|
94
|
+
continue;
|
95
|
+
}
|
96
|
+
if (typeof layer !== "undefined") {
|
97
|
+
if (typeof item[5] === "undefined") {
|
98
|
+
item[5] = layer;
|
99
|
+
} else {
|
100
|
+
item[1] = "@layer".concat(item[5].length > 0 ? " ".concat(item[5]) : "", " {").concat(item[1], "}");
|
101
|
+
item[5] = layer;
|
102
|
+
}
|
103
|
+
}
|
104
|
+
if (media) {
|
105
|
+
if (!item[2]) {
|
106
|
+
item[2] = media;
|
107
|
+
} else {
|
108
|
+
item[1] = "@media ".concat(item[2], " {").concat(item[1], "}");
|
109
|
+
item[2] = media;
|
110
|
+
}
|
111
|
+
}
|
112
|
+
if (supports) {
|
113
|
+
if (!item[4]) {
|
114
|
+
item[4] = "".concat(supports);
|
115
|
+
} else {
|
116
|
+
item[1] = "@supports (".concat(item[4], ") {").concat(item[1], "}");
|
117
|
+
item[4] = supports;
|
118
|
+
}
|
119
|
+
}
|
120
|
+
list.push(item);
|
121
|
+
}
|
122
|
+
};
|
123
|
+
return list;
|
124
|
+
};
|
125
|
+
|
126
|
+
/***/ }),
|
127
|
+
|
128
|
+
/***/ 9601:
|
129
|
+
/***/ ((module) => {
|
130
|
+
|
131
|
+
|
132
|
+
|
133
|
+
module.exports = function (i) {
|
134
|
+
return i[1];
|
135
|
+
};
|
136
|
+
|
137
|
+
/***/ })
|
138
|
+
|
139
|
+
/******/ });
|
140
|
+
/************************************************************************/
|
141
|
+
/******/ // The module cache
|
142
|
+
/******/ var __webpack_module_cache__ = {};
|
143
|
+
/******/
|
144
|
+
/******/ // The require function
|
145
|
+
/******/ function __webpack_require__(moduleId) {
|
146
|
+
/******/ // Check if module is in cache
|
147
|
+
/******/ var cachedModule = __webpack_module_cache__[moduleId];
|
148
|
+
/******/ if (cachedModule !== undefined) {
|
149
|
+
/******/ return cachedModule.exports;
|
150
|
+
/******/ }
|
151
|
+
/******/ // Create a new module (and put it into the cache)
|
152
|
+
/******/ var module = __webpack_module_cache__[moduleId] = {
|
153
|
+
/******/ id: moduleId,
|
154
|
+
/******/ // no module.loaded needed
|
155
|
+
/******/ exports: {}
|
156
|
+
/******/ };
|
157
|
+
/******/
|
158
|
+
/******/ // Execute the module function
|
159
|
+
/******/ __webpack_modules__[moduleId](module, module.exports, __webpack_require__);
|
160
|
+
/******/
|
161
|
+
/******/ // Return the exports of the module
|
162
|
+
/******/ return module.exports;
|
163
|
+
/******/ }
|
164
|
+
/******/
|
165
|
+
/************************************************************************/
|
166
|
+
/******/ /* webpack/runtime/compat get default export */
|
167
|
+
/******/ (() => {
|
168
|
+
/******/ // getDefaultExport function for compatibility with non-harmony modules
|
169
|
+
/******/ __webpack_require__.n = (module) => {
|
170
|
+
/******/ var getter = module && module.__esModule ?
|
171
|
+
/******/ () => (module['default']) :
|
172
|
+
/******/ () => (module);
|
173
|
+
/******/ __webpack_require__.d(getter, { a: getter });
|
174
|
+
/******/ return getter;
|
175
|
+
/******/ };
|
176
|
+
/******/ })();
|
177
|
+
/******/
|
178
|
+
/******/ /* webpack/runtime/define property getters */
|
179
|
+
/******/ (() => {
|
180
|
+
/******/ // define getter functions for harmony exports
|
181
|
+
/******/ __webpack_require__.d = (exports, definition) => {
|
182
|
+
/******/ for(var key in definition) {
|
183
|
+
/******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
|
184
|
+
/******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
|
185
|
+
/******/ }
|
186
|
+
/******/ }
|
187
|
+
/******/ };
|
188
|
+
/******/ })();
|
189
|
+
/******/
|
190
|
+
/******/ /* webpack/runtime/hasOwnProperty shorthand */
|
191
|
+
/******/ (() => {
|
192
|
+
/******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
|
193
|
+
/******/ })();
|
194
|
+
/******/
|
195
|
+
/************************************************************************/
|
196
|
+
var __webpack_exports__ = {};
|
197
|
+
// This entry need to be wrapped in an IIFE because it need to be isolated against other modules in the chunk.
|
198
|
+
(() => {
|
199
|
+
|
200
|
+
// EXPORTS
|
201
|
+
__webpack_require__.d(__webpack_exports__, {
|
202
|
+
p1: () => (/* reexport */ overflow_title),
|
203
|
+
ZP: () => (/* binding */ src),
|
204
|
+
si: () => (/* reexport */ utils_getActualWidthByCanvas),
|
205
|
+
ZF: () => (/* reexport */ utils_getActualWidthByDom),
|
206
|
+
$s: () => (/* reexport */ directive_overflow_title)
|
207
|
+
});
|
208
|
+
|
209
|
+
;// CONCATENATED MODULE: external "../shared"
|
210
|
+
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
211
|
+
var y = x => () => x
|
212
|
+
const external_shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.PropTypes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.debounce, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE__shared_65459f0a__.withInstall });
|
213
|
+
;// CONCATENATED MODULE: external "vue"
|
214
|
+
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
215
|
+
var external_vue_y = x => () => x
|
216
|
+
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, ["mergeProps"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.mergeProps, ["onBeforeUnmount"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onBeforeUnmount, ["onMounted"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.onMounted, ["ref"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.ref, ["shallowRef"]: () => __WEBPACK_EXTERNAL_MODULE_vue__.shallowRef });
|
217
|
+
;// CONCATENATED MODULE: external "../popover"
|
218
|
+
var external_popover_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
219
|
+
var external_popover_y = x => () => x
|
220
|
+
const external_popover_namespaceObject = external_popover_x({ ["default"]: () => __WEBPACK_EXTERNAL_MODULE__popover_cf5f8dce__["default"] });
|
221
|
+
;// CONCATENATED MODULE: external "vue-types"
|
222
|
+
var external_vue_types_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
223
|
+
var external_vue_types_y = x => () => x
|
224
|
+
const external_vue_types_namespaceObject = external_vue_types_x({ ["string"]: () => __WEBPACK_EXTERNAL_MODULE_vue_types_22de060a__.string });
|
225
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/props.ts
|
226
|
+
|
227
|
+
|
228
|
+
var PlacementEnum;
|
229
|
+
(function (PlacementEnum) {
|
230
|
+
PlacementEnum["AUTO"] = "auto";
|
231
|
+
PlacementEnum["AUTO_START"] = "auto-start";
|
232
|
+
PlacementEnum["AUTO_END"] = "auto-end";
|
233
|
+
PlacementEnum["TOP"] = "top";
|
234
|
+
PlacementEnum["RIGHT"] = "right";
|
235
|
+
PlacementEnum["BOTTOM"] = "bottom";
|
236
|
+
PlacementEnum["LEFT"] = "left";
|
237
|
+
PlacementEnum["TOP_START"] = "top-start";
|
238
|
+
PlacementEnum["TOP_END"] = "top-end";
|
239
|
+
PlacementEnum["BOTTOM_START"] = "bottom-start";
|
240
|
+
PlacementEnum["BOTTOM_END"] = "bottom-end";
|
241
|
+
PlacementEnum["RIGHT_START"] = "right-start";
|
242
|
+
PlacementEnum["RIGHT_END"] = "right-end";
|
243
|
+
PlacementEnum["LEFT_START"] = "left-start";
|
244
|
+
PlacementEnum["LEFT_END"] = "left-end";
|
245
|
+
})(PlacementEnum || (PlacementEnum = {}));
|
246
|
+
function placementType() {
|
247
|
+
return (0,external_vue_types_namespaceObject.string)().def(PlacementEnum.BOTTOM);
|
248
|
+
}
|
249
|
+
/* harmony default export */ const props = ({
|
250
|
+
content: external_shared_namespaceObject.PropTypes.string,
|
251
|
+
type: external_shared_namespaceObject.PropTypes.oneOf(['tips', 'title']).def('title'),
|
252
|
+
calType: external_shared_namespaceObject.PropTypes.oneOf(['dom', 'canvas']).def('dom'),
|
253
|
+
boundary: external_shared_namespaceObject.PropTypes.oneOfType([external_shared_namespaceObject.PropTypes.string.def('parent'), external_shared_namespaceObject.PropTypes.instanceOf(HTMLElement)]).def(document.body),
|
254
|
+
placement: placementType().def(PlacementEnum.TOP_START),
|
255
|
+
resizeable: external_shared_namespaceObject.PropTypes.bool,
|
256
|
+
popoverOptions: Object // popover属性
|
257
|
+
});
|
258
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByCanvas.ts
|
259
|
+
function getActualWidthByCanvas(text, options) {
|
260
|
+
var _options$fontSize = options.fontSize,
|
261
|
+
fontSize = _options$fontSize === void 0 ? 14 : _options$fontSize,
|
262
|
+
_options$fontFamily = options.fontFamily,
|
263
|
+
fontFamily = _options$fontFamily === void 0 ? 'Microsoft YaHei' : _options$fontFamily;
|
264
|
+
var canvas = document.createElement('canvas');
|
265
|
+
var ctx = canvas.getContext('2d');
|
266
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
267
|
+
var metrics = ctx.measureText(text);
|
268
|
+
var actual = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight);
|
269
|
+
return Math.max(metrics.width, actual);
|
270
|
+
}
|
271
|
+
/* harmony default export */ const utils_getActualWidthByCanvas = (getActualWidthByCanvas);
|
272
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByDom.ts
|
273
|
+
function getActualWidthByDom(text, options) {
|
274
|
+
var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.body;
|
275
|
+
if (!dom) {
|
276
|
+
return 0;
|
277
|
+
}
|
278
|
+
var _ref = options || {},
|
279
|
+
fontSize = _ref.fontSize,
|
280
|
+
fontFamily = _ref.fontFamily;
|
281
|
+
var tempDom = document.createElement('div');
|
282
|
+
tempDom.style.cssText = "position: absolute;left: -999em;top:-999em;z-index: -1;text-overflow: initial;\n ".concat(fontSize ? "font-size:".concat(fontSize, " ;") : '', "\n ").concat(fontFamily ? "font-family:".concat(fontFamily, " ") : '', "\n ");
|
283
|
+
tempDom.innerText = text;
|
284
|
+
dom.append(tempDom);
|
285
|
+
var clientWidth = tempDom.clientWidth;
|
286
|
+
dom.removeChild(tempDom);
|
287
|
+
return clientWidth;
|
288
|
+
}
|
289
|
+
/* harmony default export */ const utils_getActualWidthByDom = (getActualWidthByDom);
|
290
|
+
// EXTERNAL MODULE: ../../packages/overflow-title/src/overflow.less
|
291
|
+
var overflow = __webpack_require__(35);
|
292
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/components/overflow-title.tsx
|
293
|
+
|
294
|
+
|
295
|
+
|
296
|
+
|
297
|
+
|
298
|
+
|
299
|
+
|
300
|
+
|
301
|
+
/* harmony default export */ const overflow_title = ((0,external_vue_namespaceObject.defineComponent)({
|
302
|
+
name: 'OverflowTitle',
|
303
|
+
props: props,
|
304
|
+
setup: function setup(props, _ref) {
|
305
|
+
var slots = _ref.slots;
|
306
|
+
var boxRef = (0,external_vue_namespaceObject.ref)(null);
|
307
|
+
var textRef = (0,external_vue_namespaceObject.ref)(null);
|
308
|
+
var isShowTips = (0,external_vue_namespaceObject.ref)(false);
|
309
|
+
var textProps = (0,external_vue_namespaceObject.shallowRef)();
|
310
|
+
var contentText = (0,external_vue_namespaceObject.computed)(function () {
|
311
|
+
var _slots$default;
|
312
|
+
if (props.content) {
|
313
|
+
return props.content;
|
314
|
+
}
|
315
|
+
return slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
316
|
+
});
|
317
|
+
(0,external_vue_namespaceObject.onMounted)(function () {
|
318
|
+
var clientWidth = boxRef.value.clientWidth;
|
319
|
+
var resizeHandler = (0,external_shared_namespaceObject.debounce)(500, function () {
|
320
|
+
isShowTips.value = false;
|
321
|
+
textProps.value = {};
|
322
|
+
var textWidth = 0;
|
323
|
+
if (props.calType === 'dom') {
|
324
|
+
var _textRef$value;
|
325
|
+
textWidth = utils_getActualWidthByDom((_textRef$value = textRef.value) === null || _textRef$value === void 0 ? void 0 : _textRef$value.textContent, null, boxRef.value);
|
326
|
+
} else {
|
327
|
+
var _getComputedStyle = getComputedStyle(boxRef.value),
|
328
|
+
fontSize = _getComputedStyle.fontSize,
|
329
|
+
fontFamily = _getComputedStyle.fontFamily;
|
330
|
+
textWidth = utils_getActualWidthByCanvas(contentText.value, {
|
331
|
+
fontSize: fontSize,
|
332
|
+
fontFamily: fontFamily
|
333
|
+
});
|
334
|
+
}
|
335
|
+
if (textWidth > clientWidth) {
|
336
|
+
isShowTips.value = true;
|
337
|
+
if (props.type === 'title') {
|
338
|
+
var _textRef$value$innerT, _textRef$value2;
|
339
|
+
textProps.value = {
|
340
|
+
title: (_textRef$value$innerT = textRef === null || textRef === void 0 || (_textRef$value2 = textRef.value) === null || _textRef$value2 === void 0 ? void 0 : _textRef$value2.innerText) !== null && _textRef$value$innerT !== void 0 ? _textRef$value$innerT : props.content
|
341
|
+
};
|
342
|
+
}
|
343
|
+
}
|
344
|
+
});
|
345
|
+
resizeHandler();
|
346
|
+
if (props.resizeable) {
|
347
|
+
var observer = new ResizeObserver(resizeHandler);
|
348
|
+
observer.observe(boxRef.value);
|
349
|
+
(0,external_vue_namespaceObject.onBeforeUnmount)(function () {
|
350
|
+
boxRef.value && (observer === null || observer === void 0 ? void 0 : observer.unobserve(boxRef.value));
|
351
|
+
observer === null || observer === void 0 ? void 0 : observer.disconnect();
|
352
|
+
});
|
353
|
+
}
|
354
|
+
});
|
355
|
+
return {
|
356
|
+
boxRef: boxRef,
|
357
|
+
textRef: textRef,
|
358
|
+
isShowTips: isShowTips,
|
359
|
+
contentText: contentText,
|
360
|
+
textProps: textProps
|
361
|
+
};
|
362
|
+
},
|
363
|
+
render: function render() {
|
364
|
+
var _this = this;
|
365
|
+
return (0,external_vue_namespaceObject.createVNode)("div", {
|
366
|
+
"ref": "boxRef",
|
367
|
+
"class": "position-relative"
|
368
|
+
}, [(0,external_vue_namespaceObject.createVNode)(external_popover_namespaceObject["default"], (0,external_vue_namespaceObject.mergeProps)({
|
369
|
+
"placement": this.placement,
|
370
|
+
"boundary": this.boundary || document.body,
|
371
|
+
"popoverDelay": [200, 0]
|
372
|
+
}, props.popoverOptions, {
|
373
|
+
"disabled": this.type === 'title' || !this.isShowTips
|
374
|
+
}), {
|
375
|
+
"default": function _default() {
|
376
|
+
return (0,external_vue_namespaceObject.createVNode)("div", (0,external_vue_namespaceObject.mergeProps)({
|
377
|
+
"ref": "textRef",
|
378
|
+
"class": "text-ov"
|
379
|
+
}, _this.textProps), [_this.contentText]);
|
380
|
+
},
|
381
|
+
content: function content() {
|
382
|
+
return _this.contentText;
|
383
|
+
}
|
384
|
+
})]);
|
385
|
+
}
|
386
|
+
}));
|
387
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/directive/overflow-title.ts
|
388
|
+
|
389
|
+
|
390
|
+
var overflowTitle = {
|
391
|
+
mounted: function mounted(el, _ref) {
|
392
|
+
var _ref$value = _ref.value,
|
393
|
+
value = _ref$value === void 0 ? {} : _ref$value;
|
394
|
+
var clientWidth = el.parentElement.clientWidth;
|
395
|
+
if (!clientWidth) {
|
396
|
+
return;
|
397
|
+
}
|
398
|
+
var content = value.content,
|
399
|
+
_value$calType = value.calType,
|
400
|
+
calType = _value$calType === void 0 ? 'dom' : _value$calType;
|
401
|
+
var text = content || el.innerText;
|
402
|
+
var textWidth = 0;
|
403
|
+
if (calType === 'dom') {
|
404
|
+
textWidth = utils_getActualWidthByDom(el.textContent, null, el.parentElement);
|
405
|
+
} else {
|
406
|
+
var _getComputedStyle = getComputedStyle(el),
|
407
|
+
fontSize = _getComputedStyle.fontSize,
|
408
|
+
fontFamily = _getComputedStyle.fontFamily;
|
409
|
+
textWidth = utils_getActualWidthByCanvas(text, {
|
410
|
+
fontSize: fontSize,
|
411
|
+
fontFamily: fontFamily
|
412
|
+
});
|
413
|
+
}
|
414
|
+
if (textWidth > clientWidth) {
|
415
|
+
el.setAttribute('title', text);
|
416
|
+
}
|
417
|
+
}
|
418
|
+
};
|
419
|
+
/* harmony default export */ const directive_overflow_title = (overflowTitle);
|
420
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/index.ts
|
421
|
+
/*
|
422
|
+
* Tencent is pleased to support the open source community by making
|
423
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) available.
|
424
|
+
*
|
425
|
+
* Copyright (C) 2021 THL A29 Limited, a Tencent company. All rights reserved.
|
426
|
+
*
|
427
|
+
* 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition) is licensed under the MIT License.
|
428
|
+
*
|
429
|
+
* License for 蓝鲸智云PaaS平台社区版 (BlueKing PaaS Community Edition):
|
430
|
+
*
|
431
|
+
* ---------------------------------------------------
|
432
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
|
433
|
+
* documentation files (the "Software"), to deal in the Software without restriction, including without limitation
|
434
|
+
* the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and
|
435
|
+
* to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
436
|
+
*
|
437
|
+
* The above copyright notice and this permission notice shall be included in all copies or substantial portions of
|
438
|
+
* the Software.
|
439
|
+
*
|
440
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO
|
441
|
+
* THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
442
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF
|
443
|
+
* CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
|
444
|
+
* IN THE SOFTWARE.
|
445
|
+
*/
|
446
|
+
|
447
|
+
|
448
|
+
|
449
|
+
|
450
|
+
|
451
|
+
var BkOverflowTitle = (0,external_shared_namespaceObject.withInstall)(overflow_title);
|
452
|
+
|
453
|
+
/* harmony default export */ const src = (BkOverflowTitle);
|
454
|
+
})();
|
455
|
+
|
456
|
+
var __webpack_exports__OverflowTitle = __webpack_exports__.p1;
|
457
|
+
var __webpack_exports__default = __webpack_exports__.ZP;
|
458
|
+
var __webpack_exports__getActualWidthByCanvas = __webpack_exports__.si;
|
459
|
+
var __webpack_exports__getActualWidthByDom = __webpack_exports__.ZF;
|
460
|
+
var __webpack_exports__overflowTitle = __webpack_exports__.$s;
|
461
|
+
export { __webpack_exports__OverflowTitle as OverflowTitle, __webpack_exports__default as default, __webpack_exports__getActualWidthByCanvas as getActualWidthByCanvas, __webpack_exports__getActualWidthByDom as getActualWidthByDom, __webpack_exports__overflowTitle as overflowTitle };
|