bkui-vue 1.0.3-beta.68.dialog.3 → 1.0.3-beta.69
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 +70 -70
- package/dist/index.esm.js +17014 -17855
- package/dist/index.umd.js +67 -67
- package/dist/style.css +1 -1
- package/dist/style.variable.css +1 -1
- package/lib/components.d.ts +0 -1
- package/lib/components.js +0 -1
- package/lib/dialog/dialog.css +84 -139
- package/lib/dialog/dialog.d.ts +133 -32
- package/lib/dialog/dialog.less +76 -9
- package/lib/dialog/dialog.variable.css +84 -139
- package/lib/dialog/index.d.ts +314 -84
- package/lib/dialog/index.js +221 -197
- package/lib/dialog/props.d.ts +48 -8
- package/lib/info-box/index.d.ts +2 -2
- package/lib/info-box/index.js +173 -328
- package/lib/info-box/info-box.css +7 -63
- package/lib/info-box/info-box.d.ts +16 -18
- package/lib/info-box/info-box.less +14 -76
- package/lib/info-box/info-box.variable.css +7 -63
- package/lib/input/index.js +1 -2
- package/lib/modal/hooks.d.ts +1 -1
- package/lib/modal/index.d.ts +350 -16
- package/lib/modal/index.js +704 -218
- package/lib/modal/modal.css +32 -135
- package/lib/modal/modal.d.ts +134 -6
- package/lib/modal/modal.less +29 -88
- package/lib/modal/modal.variable.css +32 -135
- package/lib/modal/props.mixin.d.ts +53 -2
- package/lib/overflow-title/index.js +52 -46
- package/lib/pop-confirm/index.js +8 -5
- package/lib/radio/index.d.ts +0 -29
- package/lib/radio/index.js +20 -36
- package/lib/radio/radio-button.d.ts +0 -10
- package/lib/radio/radio-group.d.ts +0 -10
- package/lib/radio/radio.d.ts +0 -10
- package/lib/shared/index.d.ts +1 -0
- package/lib/shared/index.js +48 -4
- package/lib/shared/mask.d.ts +11 -0
- package/lib/sideslider/index.d.ts +222 -31
- package/lib/sideslider/index.js +41 -65
- package/lib/sideslider/sideslider.css +86 -17
- package/lib/sideslider/sideslider.d.ts +105 -14
- package/lib/sideslider/sideslider.less +107 -27
- package/lib/sideslider/sideslider.variable.css +86 -17
- package/lib/slider/index.d.ts +0 -19
- package/lib/slider/index.js +5 -45
- package/lib/slider/slider.css +0 -14
- package/lib/slider/slider.d.ts +0 -9
- package/lib/slider/slider.less +0 -15
- package/lib/slider/slider.variable.css +0 -14
- package/lib/table/components/table-cell.d.ts +2 -3
- package/lib/table/components/table-column.d.ts +119 -3
- package/lib/table/const.d.ts +4 -4
- package/lib/table/index.d.ts +107 -26
- package/lib/table/index.js +569 -17784
- package/lib/table/plugins/head-filter.css +4 -8
- package/lib/table/plugins/head-filter.less +3 -6
- package/lib/table/plugins/head-filter.variable.css +4 -8
- package/lib/table/plugins/use-active-columns.d.ts +2 -2
- package/lib/table/plugins/use-fixed-column.d.ts +1 -1
- package/lib/table/plugins/use-pagination.d.ts +1 -3
- package/lib/table/props.d.ts +3 -11
- package/lib/table/table.css +46 -106
- package/lib/table/table.d.ts +0 -11
- package/lib/table/table.less +58 -43
- package/lib/table/table.variable.css +46 -106
- package/lib/table/use-attributes.d.ts +1 -2
- package/lib/table/use-column.d.ts +10 -9
- package/lib/table/use-common.d.ts +1 -1
- package/lib/table/use-render.d.ts +1 -1
- package/lib/table-column/index.d.ts +299 -9
- package/lib/table-column/index.js +282 -24
- package/lib/tree/constant.d.ts +1 -3
- package/lib/tree/index.d.ts +0 -44
- package/lib/tree/index.js +25 -17548
- package/lib/tree/props.d.ts +0 -18
- package/lib/tree/tree.css +2 -76
- package/lib/tree/tree.d.ts +2 -28
- package/lib/tree/tree.variable.css +2 -76
- package/lib/tree/use-node-attribute.d.ts +0 -9
- package/lib/virtual-render/index.d.ts +0 -27
- package/lib/virtual-render/index.js +80 -295
- package/lib/virtual-render/props.d.ts +0 -16
- package/lib/virtual-render/use-fix-top.d.ts +7 -2
- package/lib/virtual-render/v-virtual-render.d.ts +1 -2
- package/lib/virtual-render/virtual-render.css +2 -76
- package/lib/virtual-render/virtual-render.d.ts +0 -13
- package/lib/virtual-render/virtual-render.less +3 -3
- package/lib/virtual-render/virtual-render.variable.css +2 -76
- package/package.json +1 -1
- package/lib/info-box/render-component.d.ts +0 -4
- package/lib/modal/mask.d.ts +0 -6
- package/lib/scrollbar/index.d.ts +0 -15
- package/lib/scrollbar/index.js +0 -18763
- package/lib/scrollbar/scrollbar-core/can-use-dom.d.ts +0 -2
- package/lib/scrollbar/scrollbar-core/helpers.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/index.d.ts +0 -241
- package/lib/scrollbar/scrollbar-core/mouse-wheel.d.ts +0 -5
- package/lib/scrollbar/scrollbar-core/scrollbar-width.d.ts +0 -1
- package/lib/scrollbar/scrollbar.css +0 -75
- package/lib/scrollbar/scrollbar.less +0 -94
- package/lib/scrollbar/scrollbar.variable.css +0 -204
- package/lib/table/plugins/use-column-template.d.ts +0 -7
- package/lib/table/plugins/use-shift-key.d.ts +0 -11
- package/lib/tree/use-intersection-observer.d.ts +0 -27
- package/lib/virtual-render/use-scrollbar.d.ts +0 -24
@@ -127,76 +127,32 @@
|
|
127
127
|
--select-active-color: #e1ecff;
|
128
128
|
--select-hover-color: #f5f7fa;
|
129
129
|
}
|
130
|
-
.bk-
|
131
|
-
|
130
|
+
.bk-info-wrapper .bk-modal-wrapper {
|
131
|
+
width: 440px;
|
132
132
|
}
|
133
|
-
.bk-
|
134
|
-
top: 50%;
|
135
|
-
left: 50%;
|
136
|
-
transform: translate(-50%, -50%);
|
137
|
-
}
|
138
|
-
.bk-infobox-header {
|
139
|
-
padding-top: 24px;
|
140
|
-
}
|
141
|
-
.bk-infobox-type {
|
142
|
-
display: flex;
|
143
|
-
justify-content: center;
|
144
|
-
align-items: center;
|
145
|
-
}
|
146
|
-
.bk-infobox-icon {
|
147
|
-
width: 42px;
|
148
|
-
height: 42px;
|
149
|
-
font-size: 42px;
|
150
|
-
}
|
151
|
-
.bk-infobox-icon.success {
|
152
|
-
color: #2dcb56;
|
153
|
-
}
|
154
|
-
.bk-infobox-icon.warning {
|
155
|
-
color: #ff9c01;
|
156
|
-
}
|
157
|
-
.bk-infobox-icon.danger {
|
158
|
-
color: #ea3636;
|
159
|
-
}
|
160
|
-
.bk-infobox-icon.loading {
|
161
|
-
color: #3a84ff;
|
162
|
-
}
|
163
|
-
.bk-infobox-title {
|
164
|
-
padding-right: 24px;
|
165
|
-
padding-left: 24px;
|
166
|
-
margin-top: 24px;
|
167
|
-
font-size: 20px;
|
168
|
-
line-height: 32px;
|
169
|
-
color: #313238;
|
170
|
-
}
|
171
|
-
.bk-infobox-content {
|
172
|
-
padding-right: 24px;
|
173
|
-
padding-left: 24px;
|
133
|
+
.bk-info-wrapper .bk-modal-wrapper .bk-dialog-header .bk-dialog-title {
|
174
134
|
margin-top: 16px;
|
175
135
|
}
|
176
|
-
.bk-
|
177
|
-
|
178
|
-
padding-right: 24px;
|
179
|
-
padding-bottom: 24px;
|
180
|
-
padding-left: 24px;
|
181
|
-
margin-top: 24px;
|
182
|
-
align-content: center;
|
183
|
-
}
|
184
|
-
.bk-infobox-footer.is-position-right {
|
185
|
-
justify-content: right;
|
186
|
-
}
|
187
|
-
.bk-infobox-footer.is-position-center {
|
188
|
-
justify-content: center;
|
136
|
+
.bk-info-wrapper .bk-dialog-footer button {
|
137
|
+
min-width: 88px;
|
189
138
|
}
|
190
|
-
.bk-
|
191
|
-
|
139
|
+
.bk-info-sub-title {
|
140
|
+
text-align: center;
|
141
|
+
word-break: break-all;
|
192
142
|
}
|
193
|
-
.bk-
|
194
|
-
|
143
|
+
.bk-modal-ctx {
|
144
|
+
position: fixed;
|
145
|
+
top: 0px;
|
146
|
+
left: 0px;
|
147
|
+
display: none;
|
148
|
+
width: 100%;
|
149
|
+
height: 100%;
|
150
|
+
pointer-events: auto;
|
195
151
|
}
|
196
|
-
.bk-
|
197
|
-
|
152
|
+
.bk-modal-ctx.is-show {
|
153
|
+
display: block;
|
198
154
|
}
|
199
|
-
.bk-modal-mask {
|
155
|
+
.bk-modal-ctx-mask {
|
200
156
|
position: fixed;
|
201
157
|
top: 0;
|
202
158
|
left: 0;
|
@@ -205,7 +161,18 @@
|
|
205
161
|
background-color: rgba(0, 0, 0, 0.6);
|
206
162
|
}
|
207
163
|
.bk-modal-wrapper {
|
164
|
+
position: absolute;
|
165
|
+
top: 50%;
|
166
|
+
left: 50%;
|
167
|
+
border-radius: 2px;
|
168
|
+
transform: translate(-50%, -50%);
|
169
|
+
}
|
170
|
+
.bk-modal-outside {
|
208
171
|
position: fixed;
|
172
|
+
top: 0;
|
173
|
+
right: 0;
|
174
|
+
bottom: 0;
|
175
|
+
left: 0;
|
209
176
|
}
|
210
177
|
.bk-modal-body {
|
211
178
|
height: 100%;
|
@@ -215,15 +182,9 @@
|
|
215
182
|
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
216
183
|
}
|
217
184
|
.bk-modal-content {
|
218
|
-
position: relative;
|
219
185
|
max-height: 100vh;
|
220
|
-
|
221
|
-
|
222
|
-
.bk-modal-content div {
|
223
|
-
font-size: 12px;
|
224
|
-
}
|
225
|
-
.bk-modal-footer {
|
226
|
-
position: relative;
|
186
|
+
overflow: auto;
|
187
|
+
scrollbar-gutter: stable;
|
227
188
|
}
|
228
189
|
.bk-modal-close {
|
229
190
|
position: absolute;
|
@@ -243,67 +204,3 @@
|
|
243
204
|
.bk-modal-close:hover {
|
244
205
|
background: #f0f1f5;
|
245
206
|
}
|
246
|
-
.modal-fadein-enter-from {
|
247
|
-
opacity: 0;
|
248
|
-
}
|
249
|
-
.modal-fadein-enter-from .bk-modal-body {
|
250
|
-
transform: translateY(-20px);
|
251
|
-
}
|
252
|
-
.modal-fadein-enter-to {
|
253
|
-
opacity: 1;
|
254
|
-
}
|
255
|
-
.modal-fadein-enter-to .bk-modal-body {
|
256
|
-
transform: translateY(0);
|
257
|
-
}
|
258
|
-
.modal-fadein-leave-from {
|
259
|
-
opacity: 1;
|
260
|
-
}
|
261
|
-
.modal-fadein-leave-from .bk-modal-body {
|
262
|
-
transform: translateY(0);
|
263
|
-
}
|
264
|
-
.modal-fadein-leave-to {
|
265
|
-
opacity: 0;
|
266
|
-
}
|
267
|
-
.modal-fadein-leave-to .bk-modal-body {
|
268
|
-
transform: translateY(-20px);
|
269
|
-
}
|
270
|
-
.modal-fadein-enter-active,
|
271
|
-
.modal-fadein-leave-active {
|
272
|
-
transition: opacity 0.15s linear;
|
273
|
-
}
|
274
|
-
.modal-fadein-enter-active .bk-modal-body,
|
275
|
-
.modal-fadein-leave-active .bk-modal-body {
|
276
|
-
transition: transform 0.08s linear;
|
277
|
-
}
|
278
|
-
.modal-right-enter-from {
|
279
|
-
transform: translateX(100%);
|
280
|
-
}
|
281
|
-
.modal-right-enter-to {
|
282
|
-
transform: translateX(0);
|
283
|
-
}
|
284
|
-
.modal-right-leave-from {
|
285
|
-
transform: translateX(0);
|
286
|
-
}
|
287
|
-
.modal-right-leave-to {
|
288
|
-
transform: translateX(100%);
|
289
|
-
}
|
290
|
-
.modal-right-enter-active,
|
291
|
-
.modal-right-leave-active {
|
292
|
-
transition: transform 0.15s ease;
|
293
|
-
}
|
294
|
-
.modal-left-enter-from {
|
295
|
-
transform: translateX(-100%);
|
296
|
-
}
|
297
|
-
.modal-left-enter-to {
|
298
|
-
transform: translateX(0);
|
299
|
-
}
|
300
|
-
.modal-left-leave-from {
|
301
|
-
transform: translateX(0);
|
302
|
-
}
|
303
|
-
.modal-left-leave-to {
|
304
|
-
transform: translateX(-100%);
|
305
|
-
}
|
306
|
-
.modal-left-enter-active,
|
307
|
-
.modal-left-leave-active {
|
308
|
-
transition: transform 0.15s ease;
|
309
|
-
}
|
@@ -4,8 +4,18 @@ export declare const propsMixin: {
|
|
4
4
|
} & {
|
5
5
|
default: boolean;
|
6
6
|
};
|
7
|
-
width: import("vue-types").VueTypeDef<string | number
|
8
|
-
|
7
|
+
width: import("vue-types").VueTypeDef<string | number> & {
|
8
|
+
default: string | number;
|
9
|
+
};
|
10
|
+
height: import("vue-types").VueTypeDef<string | number> & {
|
11
|
+
default: string | number;
|
12
|
+
};
|
13
|
+
extCls: (import("vue-types").VueTypeValidableDef<string> & {
|
14
|
+
default: string;
|
15
|
+
}) | (import("vue-types").VueTypeValidableDef<unknown[]> & {
|
16
|
+
default: () => unknown[];
|
17
|
+
});
|
18
|
+
scrollable: import("vue-types").VueTypeValidableDef<boolean> & {
|
9
19
|
default: boolean;
|
10
20
|
} & {
|
11
21
|
default: boolean;
|
@@ -25,6 +35,17 @@ export declare const propsMixin: {
|
|
25
35
|
} & {
|
26
36
|
default: boolean;
|
27
37
|
};
|
38
|
+
fullscreen: import("vue-types").VueTypeValidableDef<boolean> & {
|
39
|
+
default: boolean;
|
40
|
+
} & {
|
41
|
+
default: boolean;
|
42
|
+
};
|
43
|
+
size: import("vue-types").VueTypeDef<"small" | "medium" | "large" | "normal">;
|
44
|
+
draggable: import("vue-types").VueTypeValidableDef<boolean> & {
|
45
|
+
default: boolean;
|
46
|
+
} & {
|
47
|
+
default: boolean;
|
48
|
+
};
|
28
49
|
quickClose: import("vue-types").VueTypeValidableDef<boolean> & {
|
29
50
|
default: boolean;
|
30
51
|
} & {
|
@@ -34,6 +55,19 @@ export declare const propsMixin: {
|
|
34
55
|
default: string | boolean | (() => HTMLElement);
|
35
56
|
};
|
36
57
|
zIndex: import("vue-types").VueTypeDef<string | number>;
|
58
|
+
maxHeight: import("vue-types").VueTypeValidableDef<string> & {
|
59
|
+
default: string;
|
60
|
+
};
|
61
|
+
direction: import("vue-types").VueTypeValidableDef<string> & {
|
62
|
+
default: string;
|
63
|
+
} & {
|
64
|
+
default: string;
|
65
|
+
};
|
66
|
+
title: import("vue-types").VueTypeValidableDef<string> & {
|
67
|
+
default: string;
|
68
|
+
} & {
|
69
|
+
default: string;
|
70
|
+
};
|
37
71
|
animateType: import("vue-types").VueTypeValidableDef<string> & {
|
38
72
|
default: string;
|
39
73
|
} & {
|
@@ -43,10 +77,27 @@ export declare const propsMixin: {
|
|
43
77
|
default: "show" | "if";
|
44
78
|
};
|
45
79
|
beforeClose: import("vue-types").VueTypeDef<unknown>;
|
80
|
+
dialogType: import("vue-types").VueTypeDef<"show" | "process" | "operation" | "confirm">;
|
81
|
+
multiInstance: import("vue-types").VueTypeValidableDef<boolean> & {
|
82
|
+
default: boolean;
|
83
|
+
} & {
|
84
|
+
default: boolean;
|
85
|
+
};
|
86
|
+
infoType: import("vue-types").VueTypeDef<"success" | "warning" | "danger" | "primary">;
|
87
|
+
bodyClass: (import("vue-types").VueTypeValidableDef<string> & {
|
88
|
+
default: string;
|
89
|
+
}) | (import("vue-types").VueTypeValidableDef<unknown[]> & {
|
90
|
+
default: () => unknown[];
|
91
|
+
});
|
46
92
|
left: import("vue-types").VueTypeValidableDef<string> & {
|
47
93
|
default: string;
|
48
94
|
};
|
49
95
|
top: import("vue-types").VueTypeValidableDef<string> & {
|
50
96
|
default: string;
|
51
97
|
};
|
98
|
+
hiddenDelay: import("vue-types").VueTypeValidableDef<number> & {
|
99
|
+
default: number;
|
100
|
+
} & {
|
101
|
+
default: number;
|
102
|
+
};
|
52
103
|
};
|
@@ -41,7 +41,7 @@ __webpack_require__.d(__webpack_exports__, {
|
|
41
41
|
;// CONCATENATED MODULE: external "../shared"
|
42
42
|
var x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
43
43
|
var y = x => () => x
|
44
|
-
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["
|
44
|
+
const shared_namespaceObject = x({ ["PropTypes"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.PropTypes, ["debounce"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.debounce, ["withInstall"]: () => __WEBPACK_EXTERNAL_MODULE_bkui_vue_lib_shared_edbdfb03__.withInstall });
|
45
45
|
;// CONCATENATED MODULE: external "vue"
|
46
46
|
var external_vue_x = y => { var x = {}; __webpack_require__.d(x, y); return x; }
|
47
47
|
var external_vue_y = x => () => x
|
@@ -91,6 +91,38 @@ function placementType() {
|
|
91
91
|
resizeable: shared_namespaceObject.PropTypes.bool,
|
92
92
|
popoverOptions: Object // popover属性
|
93
93
|
});
|
94
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByCanvas.ts
|
95
|
+
function getActualWidthByCanvas(text, options) {
|
96
|
+
var _options$fontSize = options.fontSize,
|
97
|
+
fontSize = _options$fontSize === void 0 ? 14 : _options$fontSize,
|
98
|
+
_options$fontFamily = options.fontFamily,
|
99
|
+
fontFamily = _options$fontFamily === void 0 ? 'Microsoft YaHei' : _options$fontFamily;
|
100
|
+
var canvas = document.createElement('canvas');
|
101
|
+
var ctx = canvas.getContext('2d');
|
102
|
+
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
103
|
+
var metrics = ctx.measureText(text);
|
104
|
+
var actual = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight);
|
105
|
+
return Math.max(metrics.width, actual);
|
106
|
+
}
|
107
|
+
/* harmony default export */ const utils_getActualWidthByCanvas = (getActualWidthByCanvas);
|
108
|
+
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByDom.ts
|
109
|
+
function getActualWidthByDom(text, options) {
|
110
|
+
var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.body;
|
111
|
+
if (!dom) {
|
112
|
+
return 0;
|
113
|
+
}
|
114
|
+
var _ref = options || {},
|
115
|
+
fontSize = _ref.fontSize,
|
116
|
+
fontFamily = _ref.fontFamily;
|
117
|
+
var tempDom = document.createElement('div');
|
118
|
+
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 ");
|
119
|
+
tempDom.innerText = text;
|
120
|
+
dom.append(tempDom);
|
121
|
+
var clientWidth = tempDom.clientWidth;
|
122
|
+
dom.removeChild(tempDom);
|
123
|
+
return clientWidth;
|
124
|
+
}
|
125
|
+
/* harmony default export */ const utils_getActualWidthByDom = (getActualWidthByDom);
|
94
126
|
;// CONCATENATED MODULE: ../../packages/overflow-title/src/components/overflow-title.tsx
|
95
127
|
|
96
128
|
|
@@ -98,8 +130,8 @@ function placementType() {
|
|
98
130
|
|
99
131
|
|
100
132
|
|
101
|
-
|
102
|
-
|
133
|
+
|
134
|
+
|
103
135
|
/* harmony default export */ const overflow_title = ((0,external_vue_namespaceObject.defineComponent)({
|
104
136
|
name: 'OverflowTitle',
|
105
137
|
props: props,
|
@@ -117,23 +149,29 @@ function placementType() {
|
|
117
149
|
return slots === null || slots === void 0 || (_slots$default = slots["default"]) === null || _slots$default === void 0 ? void 0 : _slots$default.call(slots);
|
118
150
|
});
|
119
151
|
(0,external_vue_namespaceObject.onMounted)(function () {
|
120
|
-
|
152
|
+
var clientWidth = boxRef.value.clientWidth;
|
121
153
|
var resizeHandler = (0,shared_namespaceObject.debounce)(500, function () {
|
122
154
|
isShowTips.value = false;
|
123
155
|
textProps.value = {};
|
124
|
-
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
|
131
|
-
|
156
|
+
var textWidth = 0;
|
157
|
+
if (props.calType === 'dom') {
|
158
|
+
var _textRef$value;
|
159
|
+
textWidth = utils_getActualWidthByDom((_textRef$value = textRef.value) === null || _textRef$value === void 0 ? void 0 : _textRef$value.textContent, null, boxRef.value);
|
160
|
+
} else {
|
161
|
+
var _getComputedStyle = getComputedStyle(boxRef.value),
|
162
|
+
fontSize = _getComputedStyle.fontSize,
|
163
|
+
fontFamily = _getComputedStyle.fontFamily;
|
164
|
+
textWidth = utils_getActualWidthByCanvas(contentText.value, {
|
165
|
+
fontSize: fontSize,
|
166
|
+
fontFamily: fontFamily
|
167
|
+
});
|
168
|
+
}
|
169
|
+
if (textWidth > clientWidth) {
|
132
170
|
isShowTips.value = true;
|
133
171
|
if (props.type === 'title') {
|
134
|
-
var _textRef$value$innerT, _textRef$
|
172
|
+
var _textRef$value$innerT, _textRef$value2;
|
135
173
|
textProps.value = {
|
136
|
-
title: (_textRef$value$innerT = textRef === null || textRef === void 0 || (_textRef$
|
174
|
+
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
|
137
175
|
};
|
138
176
|
}
|
139
177
|
}
|
@@ -180,38 +218,6 @@ function placementType() {
|
|
180
218
|
})]);
|
181
219
|
}
|
182
220
|
}));
|
183
|
-
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByCanvas.ts
|
184
|
-
function getActualWidthByCanvas(text, options) {
|
185
|
-
var _options$fontSize = options.fontSize,
|
186
|
-
fontSize = _options$fontSize === void 0 ? 14 : _options$fontSize,
|
187
|
-
_options$fontFamily = options.fontFamily,
|
188
|
-
fontFamily = _options$fontFamily === void 0 ? 'Microsoft YaHei' : _options$fontFamily;
|
189
|
-
var canvas = document.createElement('canvas');
|
190
|
-
var ctx = canvas.getContext('2d');
|
191
|
-
ctx.font = "".concat(fontSize, "px ").concat(fontFamily);
|
192
|
-
var metrics = ctx.measureText(text);
|
193
|
-
var actual = Math.abs(metrics.actualBoundingBoxLeft) + Math.abs(metrics.actualBoundingBoxRight);
|
194
|
-
return Math.max(metrics.width, actual);
|
195
|
-
}
|
196
|
-
/* harmony default export */ const utils_getActualWidthByCanvas = (getActualWidthByCanvas);
|
197
|
-
;// CONCATENATED MODULE: ../../packages/overflow-title/src/utils/getActualWidthByDom.ts
|
198
|
-
function getActualWidthByDom(text, options) {
|
199
|
-
var dom = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : document.body;
|
200
|
-
if (!dom) {
|
201
|
-
return 0;
|
202
|
-
}
|
203
|
-
var _ref = options || {},
|
204
|
-
fontSize = _ref.fontSize,
|
205
|
-
fontFamily = _ref.fontFamily;
|
206
|
-
var tempDom = document.createElement('div');
|
207
|
-
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 ");
|
208
|
-
tempDom.innerText = text;
|
209
|
-
dom.append(tempDom);
|
210
|
-
var clientWidth = tempDom.clientWidth;
|
211
|
-
dom.removeChild(tempDom);
|
212
|
-
return clientWidth;
|
213
|
-
}
|
214
|
-
/* harmony default export */ const utils_getActualWidthByDom = (getActualWidthByDom);
|
215
221
|
;// CONCATENATED MODULE: ../../packages/overflow-title/src/directive/overflow-title.ts
|
216
222
|
|
217
223
|
|
package/lib/pop-confirm/index.js
CHANGED
@@ -215,6 +215,13 @@ var PopConfirmProps = {
|
|
215
215
|
},
|
216
216
|
render: function render() {
|
217
217
|
var _this = this;
|
218
|
+
var titleRender = function titleRender() {
|
219
|
+
return _this.title ? (0,external_vue_namespaceObject.createVNode)("div", {
|
220
|
+
"class": "".concat(_this.resolveClassName('pop-confirm-title'))
|
221
|
+
}, [_this.icon ? (0,external_vue_namespaceObject.createVNode)("span", {
|
222
|
+
"class": "".concat(_this.resolveClassName('pop-confirm-icon'))
|
223
|
+
}, [_this.icon]) : '', (0,external_vue_namespaceObject.createVNode)("span", null, [_this.title])]) : '';
|
224
|
+
};
|
218
225
|
return (0,external_vue_namespaceObject.createVNode)(popover_namespaceObject["default"], {
|
219
226
|
"ref": "popoverRef",
|
220
227
|
"isShow": this.visible,
|
@@ -232,11 +239,7 @@ var PopConfirmProps = {
|
|
232
239
|
content: function content() {
|
233
240
|
return (0,external_vue_namespaceObject.createVNode)("div", {
|
234
241
|
"class": "".concat(_this.resolveClassName('pop-confirm'))
|
235
|
-
}, [typeof _this.$slots.content === 'function' ? _this.$slots.content() : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [
|
236
|
-
"class": "".concat(_this.resolveClassName('pop-confirm-title'))
|
237
|
-
}, [_this.icon ? (0,external_vue_namespaceObject.createVNode)("span", {
|
238
|
-
"class": "".concat(_this.resolveClassName('pop-confirm-icon'))
|
239
|
-
}, [_this.icon]) : '', (0,external_vue_namespaceObject.createVNode)("span", null, [_this.title])]) : '', (0,external_vue_namespaceObject.createVNode)("div", {
|
242
|
+
}, [typeof _this.$slots.content === 'function' ? (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [titleRender(), _this.$slots.content()]) : (0,external_vue_namespaceObject.createVNode)(external_vue_namespaceObject.Fragment, null, [titleRender(), (0,external_vue_namespaceObject.createVNode)("div", {
|
240
243
|
"class": "".concat(_this.resolveClassName('pop-confirm-content'))
|
241
244
|
}, [!_this.title ? _this.icon : '', _this.content])]), (0,external_vue_namespaceObject.createVNode)("div", {
|
242
245
|
"class": "".concat(_this.resolveClassName('pop-confirm-footer'))
|
package/lib/radio/index.d.ts
CHANGED
@@ -23,9 +23,6 @@ declare const BkRadio: {
|
|
23
23
|
} & {
|
24
24
|
default: boolean;
|
25
25
|
};
|
26
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
27
|
-
default: (...args: any[]) => any;
|
28
|
-
};
|
29
26
|
}>> & {
|
30
27
|
onChange?: (value: any) => any;
|
31
28
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -64,9 +61,6 @@ declare const BkRadio: {
|
|
64
61
|
} & {
|
65
62
|
default: boolean;
|
66
63
|
};
|
67
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
68
|
-
default: (...args: any[]) => any;
|
69
|
-
};
|
70
64
|
}>> & {
|
71
65
|
onChange?: (value: any) => any;
|
72
66
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -75,7 +69,6 @@ declare const BkRadio: {
|
|
75
69
|
disabled: boolean;
|
76
70
|
modelValue: string | number | boolean;
|
77
71
|
checked: boolean;
|
78
|
-
beforeChange: (...args: any[]) => any;
|
79
72
|
}, true, {}, {}, {
|
80
73
|
P: {};
|
81
74
|
B: {};
|
@@ -105,9 +98,6 @@ declare const BkRadio: {
|
|
105
98
|
} & {
|
106
99
|
default: boolean;
|
107
100
|
};
|
108
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
109
|
-
default: (...args: any[]) => any;
|
110
|
-
};
|
111
101
|
}>> & {
|
112
102
|
onChange?: (value: any) => any;
|
113
103
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -126,7 +116,6 @@ declare const BkRadio: {
|
|
126
116
|
disabled: boolean;
|
127
117
|
modelValue: string | number | boolean;
|
128
118
|
checked: boolean;
|
129
|
-
beforeChange: (...args: any[]) => any;
|
130
119
|
}>;
|
131
120
|
__isFragment?: never;
|
132
121
|
__isTeleport?: never;
|
@@ -153,9 +142,6 @@ declare const BkRadio: {
|
|
153
142
|
} & {
|
154
143
|
default: boolean;
|
155
144
|
};
|
156
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
157
|
-
default: (...args: any[]) => any;
|
158
|
-
};
|
159
145
|
}>> & {
|
160
146
|
onChange?: (value: any) => any;
|
161
147
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -177,7 +163,6 @@ declare const BkRadio: {
|
|
177
163
|
disabled: boolean;
|
178
164
|
modelValue: string | number | boolean;
|
179
165
|
checked: boolean;
|
180
|
-
beforeChange: (...args: any[]) => any;
|
181
166
|
}, {}, string, {}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("vue").Plugin<any[]> & Readonly<{
|
182
167
|
Group: import("vue").DefineComponent<{
|
183
168
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
@@ -198,9 +183,6 @@ declare const BkRadio: {
|
|
198
183
|
default: string;
|
199
184
|
};
|
200
185
|
size: import("vue-types").VueTypeDef<"default" | "small" | "large" | "huge">;
|
201
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
202
|
-
default: (...args: any[]) => any;
|
203
|
-
};
|
204
186
|
}, {
|
205
187
|
resolveClassName: (cls: string) => string;
|
206
188
|
}, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {
|
@@ -225,9 +207,6 @@ declare const BkRadio: {
|
|
225
207
|
default: string;
|
226
208
|
};
|
227
209
|
size: import("vue-types").VueTypeDef<"default" | "small" | "large" | "huge">;
|
228
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
229
|
-
default: (...args: any[]) => any;
|
230
|
-
};
|
231
210
|
}>> & {
|
232
211
|
onChange?: (value: any) => any;
|
233
212
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -236,7 +215,6 @@ declare const BkRadio: {
|
|
236
215
|
type: string;
|
237
216
|
disabled: boolean;
|
238
217
|
withValidate: boolean;
|
239
|
-
beforeChange: (...args: any[]) => any;
|
240
218
|
}, {}>;
|
241
219
|
Button: import("vue").DefineComponent<{
|
242
220
|
name: import("vue-types").VueTypeValidableDef<string> & {
|
@@ -261,9 +239,6 @@ declare const BkRadio: {
|
|
261
239
|
default: boolean;
|
262
240
|
};
|
263
241
|
size: import("vue-types").VueTypeDef<"default" | "small" | "large" | "huge">;
|
264
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
265
|
-
default: (...args: any[]) => any;
|
266
|
-
};
|
267
242
|
}, {
|
268
243
|
isFocused: import("vue").Ref<boolean>;
|
269
244
|
size: import("vue").Ref<string>;
|
@@ -300,9 +275,6 @@ declare const BkRadio: {
|
|
300
275
|
default: boolean;
|
301
276
|
};
|
302
277
|
size: import("vue-types").VueTypeDef<"default" | "small" | "large" | "huge">;
|
303
|
-
beforeChange: import("vue-types").VueTypeValidableDef<(...args: any[]) => any> & {
|
304
|
-
default: (...args: any[]) => any;
|
305
|
-
};
|
306
278
|
}>> & {
|
307
279
|
onChange?: (value: any) => any;
|
308
280
|
"onUpdate:modelValue"?: (value: any) => any;
|
@@ -311,7 +283,6 @@ declare const BkRadio: {
|
|
311
283
|
disabled: boolean;
|
312
284
|
modelValue: string | number | boolean;
|
313
285
|
checked: boolean;
|
314
|
-
beforeChange: (...args: any[]) => any;
|
315
286
|
}, {}>;
|
316
287
|
}>;
|
317
288
|
export default BkRadio;
|
package/lib/radio/index.js
CHANGED
@@ -237,29 +237,22 @@ var useRadio = function useRadio() {
|
|
237
237
|
};
|
238
238
|
// 值更新
|
239
239
|
var handleChange = function handleChange(event) {
|
240
|
-
var _props$beforeChange, _props$beforeChange2;
|
241
240
|
if (isDisabled.value) {
|
242
241
|
return;
|
243
242
|
}
|
244
243
|
var $targetInput = event.target;
|
245
|
-
|
246
|
-
var
|
247
|
-
|
248
|
-
|
249
|
-
|
250
|
-
|
251
|
-
|
252
|
-
|
253
|
-
|
254
|
-
|
255
|
-
|
256
|
-
|
257
|
-
(0,external_vue_namespaceObject.nextTick)(function () {
|
258
|
-
// 选中状态保持同步
|
259
|
-
if ($targetInput.checked !== isChecked.value) {
|
260
|
-
$targetInput.checked = isChecked.value;
|
261
|
-
}
|
262
|
-
});
|
244
|
+
isChecked.value = $targetInput.checked;
|
245
|
+
var nextValue = isChecked.value ? props.label : '';
|
246
|
+
emit('update:modelValue', nextValue);
|
247
|
+
emit('change', nextValue);
|
248
|
+
// 更新 radio-group
|
249
|
+
if (isGroup) {
|
250
|
+
radioGroup.handleChange(currentInstance.proxy);
|
251
|
+
}
|
252
|
+
(0,external_vue_namespaceObject.nextTick)(function () {
|
253
|
+
// 选中状态保持同步
|
254
|
+
if ($targetInput.checked !== isChecked.value) {
|
255
|
+
$targetInput.checked = isChecked.value;
|
263
256
|
}
|
264
257
|
});
|
265
258
|
};
|
@@ -319,8 +312,7 @@ var radioProps = {
|
|
319
312
|
label: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).isRequired,
|
320
313
|
modelValue: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def(''),
|
321
314
|
checked: shared_namespaceObject.PropTypes.bool.def(false),
|
322
|
-
disabled: shared_namespaceObject.PropTypes.bool.def(false)
|
323
|
-
beforeChange: shared_namespaceObject.PropTypes.func
|
315
|
+
disabled: shared_namespaceObject.PropTypes.bool.def(false)
|
324
316
|
};
|
325
317
|
/* harmony default export */ const src_radio = ((0,external_vue_namespaceObject.defineComponent)({
|
326
318
|
name: 'Radio',
|
@@ -426,8 +418,7 @@ var radioButtonProps = {
|
|
426
418
|
modelValue: shared_namespaceObject.PropTypes.oneOfType([shared_namespaceObject.PropTypes.bool, shared_namespaceObject.PropTypes.string, shared_namespaceObject.PropTypes.number]).def(''),
|
427
419
|
checked: shared_namespaceObject.PropTypes.bool.def(false),
|
428
420
|
disabled: shared_namespaceObject.PropTypes.bool.def(false),
|
429
|
-
size: shared_namespaceObject.PropTypes.size()
|
430
|
-
beforeChange: shared_namespaceObject.PropTypes.func
|
421
|
+
size: shared_namespaceObject.PropTypes.size()
|
431
422
|
};
|
432
423
|
/* harmony default export */ const radio_button = ((0,external_vue_namespaceObject.defineComponent)({
|
433
424
|
name: 'RadioButton',
|
@@ -531,8 +522,7 @@ var radioGroupProps = {
|
|
531
522
|
disabled: shared_namespaceObject.PropTypes.bool,
|
532
523
|
withValidate: shared_namespaceObject.PropTypes.bool.def(true),
|
533
524
|
type: shared_namespaceObject.PropTypes.oneOf(['tab', 'capsule', 'card']).def('tab'),
|
534
|
-
size: shared_namespaceObject.PropTypes.size()
|
535
|
-
beforeChange: shared_namespaceObject.PropTypes.func
|
525
|
+
size: shared_namespaceObject.PropTypes.size()
|
536
526
|
};
|
537
527
|
/* harmony default export */ const radio_group = ((0,external_vue_namespaceObject.defineComponent)({
|
538
528
|
name: 'RadioGroup',
|
@@ -558,20 +548,14 @@ var radioGroupProps = {
|
|
558
548
|
}
|
559
549
|
};
|
560
550
|
var handleChange = function handleChange(checkedRadioInstance) {
|
561
|
-
var _props$beforeChange, _props$beforeChange2;
|
562
551
|
var nextValue = checkedRadioInstance.label;
|
563
|
-
|
564
|
-
|
565
|
-
|
566
|
-
radioInstanceList.forEach(function (radioInstance) {
|
567
|
-
if (radioInstance !== checkedRadioInstance) {
|
568
|
-
radioInstance.setChecked(false);
|
569
|
-
}
|
570
|
-
});
|
571
|
-
context.emit('update:modelValue', nextValue);
|
572
|
-
context.emit('change', nextValue);
|
552
|
+
radioInstanceList.forEach(function (radioInstance) {
|
553
|
+
if (radioInstance !== checkedRadioInstance) {
|
554
|
+
radioInstance.setChecked(false);
|
573
555
|
}
|
574
556
|
});
|
557
|
+
context.emit('update:modelValue', nextValue);
|
558
|
+
context.emit('change', nextValue);
|
575
559
|
};
|
576
560
|
(0,external_vue_namespaceObject.provide)(radioGroupKey, {
|
577
561
|
props: props,
|