bkui-vue 0.0.1-beta.12 → 0.0.1-beta.15
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/README.md +25 -17
- package/README_EN.md +89 -0
- package/dist/bkui-vue.cjs.js +1847 -467
- package/dist/bkui-vue.esm.js +1842 -468
- package/dist/bkui-vue.umd.js +1847 -467
- package/dist/style.css +454 -177
- package/lib/alert/index.js +1 -1
- package/lib/animate-number/index.js +1 -1
- package/lib/backtop/index.js +1 -1
- package/lib/badge/index.js +1 -1
- package/lib/breadcrumb/breadcrumb.css +10 -1
- package/lib/breadcrumb/breadcrumb.d.ts +20 -0
- package/lib/breadcrumb/breadcrumb.less +13 -2
- package/lib/breadcrumb/breadcrumb.variable.css +10 -1
- package/lib/breadcrumb/index.d.ts +38 -2
- package/lib/breadcrumb/index.js +1 -1
- package/lib/button/button.d.ts +2 -2
- package/lib/button/index.d.ts +8 -8
- package/lib/button/index.js +1 -1
- package/lib/card/index.js +1 -1
- package/lib/checkbox/index.d.ts +1 -1
- package/lib/checkbox/index.js +1 -1
- package/lib/checkbox/type.d.ts +1 -1
- package/lib/collapse/index.js +1 -1
- package/lib/components.d.ts +3 -1
- package/lib/date-picker/index.js +1 -1
- package/lib/dialog/index.js +1 -1
- package/lib/directives/index.js +1 -1
- package/lib/divider/index.js +1 -1
- package/lib/exception/index.js +1 -1
- package/lib/fixed-navbar/index.js +1 -1
- package/lib/form/index.js +1 -1
- package/lib/icon/angle-down-fill.d.ts +4 -0
- package/lib/icon/angle-up-fill.d.ts +4 -0
- package/lib/icon/arrows-left.d.ts +4 -0
- package/lib/icon/index.d.ts +4 -0
- package/lib/icon/index.js +1 -1
- package/lib/icon/spinner.d.ts +4 -0
- package/lib/index.d.ts +1 -0
- package/lib/input/index.d.ts +19 -11
- package/lib/input/index.js +2 -2
- package/lib/input/input.css +1 -0
- package/lib/input/input.d.ts +5 -3
- package/lib/input/input.less +4 -3
- package/lib/input/input.variable.css +1 -0
- package/lib/link/index.js +1 -1
- package/lib/loading/index.d.ts +21 -4
- package/lib/loading/index.js +1 -1
- package/lib/loading/loading.d.ts +13 -2
- package/lib/menu/index.js +1 -1
- package/lib/message/index.js +1 -1
- package/lib/modal/index.js +1 -1
- package/lib/navigation/index.js +1 -1
- package/lib/notify/index.js +1 -1
- package/lib/notify/notifyConstructor.d.ts +2 -2
- package/lib/popover/index.d.ts +103 -48
- package/lib/popover/index.js +1 -1
- package/lib/popover/popover.css +22 -13
- package/lib/popover/popover.d.ts +30 -23
- package/lib/popover/popover.less +55 -45
- package/lib/popover/popover.variable.css +22 -13
- package/lib/popover/props.d.ts +77 -0
- package/lib/preset.d.ts +2 -3
- package/lib/process/index.d.ts +145 -0
- package/lib/process/index.js +15 -0
- package/lib/process/process.css +139 -0
- package/lib/process/process.d.ts +116 -0
- package/lib/process/process.less +179 -0
- package/lib/process/process.variable.css +225 -0
- package/lib/progress/index.d.ts +23 -1
- package/lib/progress/index.js +1 -1
- package/lib/progress/progress.css +0 -3
- package/lib/progress/progress.d.ts +17 -1
- package/lib/progress/progress.less +0 -4
- package/lib/progress/progress.variable.css +0 -3
- package/lib/radio/index.d.ts +2 -2
- package/lib/radio/index.js +1 -1
- package/lib/rate/index.js +1 -1
- package/lib/select/common.d.ts +10 -1
- package/lib/select/index.d.ts +133 -190
- package/lib/select/index.js +2 -2
- package/lib/select/option.d.ts +1 -7
- package/lib/select/optionGroup.d.ts +22 -15
- package/lib/select/select.css +71 -14
- package/lib/select/select.d.ts +40 -55
- package/lib/select/select.less +73 -14
- package/lib/select/select.variable.css +71 -14
- package/lib/shared/bk-helper-core.d.ts +6 -0
- package/lib/shared/bk-popover.d.ts +45 -4
- package/lib/shared/index.d.ts +10 -0
- package/lib/shared/index.js +1 -1
- package/lib/shared/utils.d.ts +6 -0
- package/lib/sideslider/index.js +1 -1
- package/lib/slider/index.js +2 -2
- package/lib/steps/index.d.ts +8 -8
- package/lib/steps/index.js +2 -2
- package/lib/steps/steps.d.ts +2 -2
- package/lib/styles/index.d.ts +2 -0
- package/lib/styles/index.js +1 -1
- package/lib/switcher/index.js +1 -1
- package/lib/switcher/switcher.css +149 -135
- package/lib/switcher/switcher.less +210 -154
- package/lib/switcher/switcher.variable.css +149 -135
- package/lib/tab/index.js +1 -1
- package/lib/table/index.d.ts +76 -1
- package/lib/table/index.js +1 -1
- package/lib/table/props.d.ts +38 -0
- package/lib/table/render.d.ts +1 -1
- package/lib/table/table.css +6 -4
- package/lib/table/table.d.ts +34 -0
- package/lib/table/table.less +4 -4
- package/lib/table/table.variable.css +6 -4
- package/lib/table/utils.d.ts +7 -0
- package/lib/tag/index.js +1 -1
- package/lib/tree/index.d.ts +22 -8
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +52 -0
- package/lib/tree/tree.css +16 -7
- package/lib/tree/tree.d.ts +13 -7
- package/lib/tree/tree.less +24 -24
- package/lib/tree/tree.variable.css +16 -7
- package/lib/tree/util.d.ts +3 -44
- package/lib/virtual-render/index.d.ts +395 -0
- package/lib/virtual-render/index.js +1 -0
- package/lib/virtual-render/props.d.ts +147 -0
- package/lib/virtual-render/v-virtual-render.d.ts +7 -0
- package/lib/virtual-render/virtual-render.css +40 -0
- package/lib/virtual-render/virtual-render.d.ts +175 -0
- package/lib/virtual-render/virtual-render.less +51 -0
- package/lib/virtual-render/virtual-render.variable.css +40 -0
- package/package.json +10 -6
@@ -108,181 +108,181 @@
|
|
108
108
|
.bk-switcher {
|
109
109
|
position: relative;
|
110
110
|
display: inline-block;
|
111
|
-
/* 默认尺寸 */
|
112
|
-
width: 36px;
|
113
111
|
height: 20px;
|
112
|
+
/* 默认尺寸 */
|
113
|
+
min-width: 36px;
|
114
|
+
padding: 0;
|
115
|
+
margin: 0;
|
116
|
+
font-size: 14px;
|
114
117
|
line-height: 20px;
|
115
118
|
text-align: left;
|
116
119
|
vertical-align: middle;
|
120
|
+
list-style: none;
|
121
|
+
cursor: pointer;
|
117
122
|
background-color: var(--switch-grey-color);
|
123
|
+
border: 1px solid transparent;
|
118
124
|
border-radius: 50px;
|
125
|
+
border-radius: 100px;
|
126
|
+
box-sizing: border-box;
|
119
127
|
transition: all 0.4s ease;
|
128
|
+
transition: all 0.36s;
|
129
|
+
user-select: none;
|
120
130
|
/* 显示文本时固定尺寸 */
|
121
131
|
}
|
122
|
-
.bk-switcher:focus {
|
123
|
-
box-shadow: 0px 0px 6px var(--switch-grey-color);
|
124
|
-
}
|
125
132
|
.bk-switcher:after {
|
126
133
|
position: absolute;
|
127
|
-
top:
|
128
|
-
left:
|
129
|
-
|
130
|
-
|
131
|
-
height: 24px;
|
134
|
+
top: 1px;
|
135
|
+
left: 1px;
|
136
|
+
width: 16px;
|
137
|
+
height: 16px;
|
132
138
|
cursor: pointer;
|
133
139
|
background: var(--switch-default-color);
|
134
|
-
|
135
|
-
|
136
|
-
|
140
|
+
background-color: #fff;
|
141
|
+
border-radius: 18px;
|
142
|
+
content: ' ';
|
137
143
|
transition: all 0.3s ease;
|
138
144
|
}
|
139
|
-
.bk-switcher
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
146
|
-
|
147
|
-
|
145
|
+
.bk-switcher .switcher-text {
|
146
|
+
display: block;
|
147
|
+
margin-right: 6px;
|
148
|
+
margin-left: 28px;
|
149
|
+
font-size: 12px;
|
150
|
+
font-weight: 400;
|
151
|
+
color: #fff;
|
152
|
+
text-align: center;
|
153
|
+
transition: all 0.3s ease;
|
148
154
|
}
|
149
|
-
.bk-switcher.
|
150
|
-
|
155
|
+
.bk-switcher .animating-node {
|
156
|
+
position: absolute;
|
157
|
+
top: 0;
|
158
|
+
right: 0;
|
159
|
+
bottom: 0;
|
160
|
+
left: 0;
|
161
|
+
display: block;
|
162
|
+
pointer-events: none;
|
163
|
+
border-radius: inherit;
|
164
|
+
content: '';
|
165
|
+
opacity: 0.2;
|
166
|
+
box-shadow: 0 0 0 0 #1890ff;
|
167
|
+
animation: fadeEffect 2s cubic-bezier(0.08, 0.82, 0.17, 1), waveEffect 0.4s cubic-bezier(0.08, 0.82, 0.17, 1);
|
168
|
+
animation-fill-mode: forwards;
|
151
169
|
}
|
152
170
|
.bk-switcher .bk-switcher-loading {
|
153
171
|
position: absolute;
|
154
|
-
top:
|
172
|
+
top: 1px;
|
155
173
|
left: 1px;
|
156
|
-
z-index:
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
174
|
+
z-index: 1;
|
175
|
+
width: 16px;
|
176
|
+
height: 16px;
|
177
|
+
font-size: 12px;
|
178
|
+
color: var(--switch-grey-color);
|
179
|
+
cursor: pointer;
|
180
|
+
background: transparent;
|
181
|
+
border-radius: 16px;
|
182
|
+
content: ' ';
|
183
|
+
transition: all 0.36s cubic-bezier(0.78, 0.14, 0.15, 0.86);
|
161
184
|
}
|
162
185
|
.bk-switcher .bk-switcher-loading svg {
|
163
|
-
|
164
|
-
|
165
|
-
|
166
|
-
|
167
|
-
|
168
|
-
|
169
|
-
|
170
|
-
font-size: 12px;
|
171
|
-
font-weight: normal;
|
172
|
-
color: var(--switch-default-color);
|
173
|
-
text-align: center;
|
174
|
-
vertical-align: top;
|
175
|
-
transition: all ease 0.3s;
|
186
|
+
position: absolute;
|
187
|
+
top: 0;
|
188
|
+
right: 0;
|
189
|
+
bottom: 0;
|
190
|
+
left: 0;
|
191
|
+
margin: auto;
|
192
|
+
animation: loading 1s linear infinite;
|
176
193
|
}
|
177
|
-
.bk-switcher
|
178
|
-
|
194
|
+
.bk-switcher.is-loading {
|
195
|
+
cursor: defalt;
|
179
196
|
}
|
180
|
-
.bk-switcher
|
181
|
-
|
197
|
+
.bk-switcher.is-loading input[type=checkbox] {
|
198
|
+
cursor: default;
|
182
199
|
}
|
183
200
|
.bk-switcher.show-label {
|
184
|
-
width: 60px;
|
185
201
|
height: 28px;
|
202
|
+
min-width: 60px;
|
186
203
|
line-height: 28px;
|
187
204
|
}
|
188
|
-
.bk-switcher.show-label
|
189
|
-
|
205
|
+
.bk-switcher.show-label::after {
|
206
|
+
width: 24px;
|
207
|
+
height: 24px;
|
190
208
|
}
|
191
209
|
.bk-switcher.show-label .bk-switcher-loading {
|
192
|
-
width:
|
193
|
-
height:
|
194
|
-
|
195
|
-
justify-content: center;
|
210
|
+
width: 24px;
|
211
|
+
height: 24px;
|
212
|
+
font-size: 20px;
|
196
213
|
}
|
197
|
-
.bk-switcher.show-label .bk-switcher-loading
|
198
|
-
|
214
|
+
.bk-switcher.show-label.is-checked .bk-switcher-loading {
|
215
|
+
left: 100%;
|
216
|
+
margin-left: -25px;
|
199
217
|
}
|
200
218
|
.bk-switcher.is-disabled {
|
201
|
-
cursor:
|
202
|
-
/* background-color: #eee !important; */
|
219
|
+
cursor: not-allowed;
|
203
220
|
opacity: 0.3;
|
204
221
|
}
|
205
|
-
.bk-switcher.is-disabled
|
222
|
+
.bk-switcher.is-disabled .bk-switcher-loading {
|
223
|
+
cursor: not-allowed;
|
224
|
+
}
|
225
|
+
.bk-switcher.is-disabled::after {
|
206
226
|
cursor: not-allowed;
|
207
227
|
}
|
208
228
|
.bk-switcher.is-checked {
|
209
229
|
background: var(--success-color);
|
210
230
|
}
|
211
|
-
.bk-switcher.is-checked
|
212
|
-
|
231
|
+
.bk-switcher.is-checked .bk-switcher-loading svg {
|
232
|
+
color: var(--success-color);
|
213
233
|
}
|
214
|
-
.bk-switcher.is-checked.primary {
|
234
|
+
.bk-switcher.is-checked:not(.bk-switcher-outline).bk-switcher.is-checked.primary {
|
215
235
|
background: var(--primary-color);
|
216
236
|
}
|
217
|
-
.bk-switcher.is-checked.primary
|
218
|
-
|
237
|
+
.bk-switcher.is-checked:not(.bk-switcher-outline).bk-switcher.is-checked.primary .bk-switcher-loading svg {
|
238
|
+
color: var(--primary-color);
|
219
239
|
}
|
220
240
|
.bk-switcher.is-checked:after {
|
221
|
-
top: 2px;
|
222
241
|
left: 100%;
|
223
|
-
margin-left: -
|
224
|
-
|
225
|
-
.bk-switcher.is-checked .switcher-label {
|
226
|
-
margin-left: 4px;
|
242
|
+
margin-left: -1px;
|
243
|
+
transform: translateX(-100%);
|
227
244
|
}
|
228
|
-
.bk-switcher.is-checked .switcher-
|
229
|
-
|
230
|
-
|
231
|
-
.bk-switcher.is-checked .switcher-label .off-text {
|
232
|
-
display: none;
|
245
|
+
.bk-switcher.is-checked .switcher-text {
|
246
|
+
margin-right: 28px;
|
247
|
+
margin-left: 6px;
|
233
248
|
}
|
234
|
-
.bk-switcher.is-checked .bk-switcher-loading {
|
235
|
-
|
236
|
-
left:
|
249
|
+
.bk-switcher:not(.show-label).is-checked .bk-switcher-loading {
|
250
|
+
left: 100%;
|
251
|
+
margin-left: -17px;
|
237
252
|
}
|
238
253
|
.bk-switcher.bk-switcher-outline {
|
239
254
|
background: var(--switch-default-color);
|
240
255
|
border: 1px solid var(--switch-grey-color);
|
241
256
|
}
|
242
257
|
.bk-switcher.bk-switcher-outline:after {
|
243
|
-
width:
|
244
|
-
height:
|
258
|
+
width: 24px;
|
259
|
+
height: 24px;
|
245
260
|
background-color: var(--switch-grey-color);
|
246
261
|
box-shadow: none;
|
247
262
|
}
|
248
|
-
.bk-switcher.bk-switcher-outline .switcher-
|
249
|
-
height: 26px;
|
250
|
-
margin-left: 24px;
|
263
|
+
.bk-switcher.bk-switcher-outline .switcher-text {
|
251
264
|
color: var(--switch-grey-color);
|
252
265
|
}
|
253
|
-
.bk-switcher.bk-switcher-outline .bk-switcher-loading {
|
254
|
-
width: 22px;
|
255
|
-
height: 22px;
|
256
|
-
align-items: center;
|
257
|
-
justify-content: center;
|
258
|
-
}
|
259
266
|
.bk-switcher.bk-switcher-outline.is-checked {
|
260
267
|
border: 1px solid var(--success-color);
|
261
268
|
}
|
262
269
|
.bk-switcher.bk-switcher-outline.is-checked:after {
|
263
|
-
margin-left: -24px;
|
264
270
|
background-color: var(--success-color);
|
265
271
|
}
|
266
|
-
.bk-switcher.bk-switcher-outline.is-checked .switcher-
|
267
|
-
margin-left: 4px;
|
272
|
+
.bk-switcher.bk-switcher-outline.is-checked .switcher-text {
|
268
273
|
color: var(--success-color);
|
269
274
|
}
|
270
|
-
.bk-switcher.bk-switcher-outline.
|
271
|
-
|
272
|
-
border-color: #eee;
|
273
|
-
}
|
274
|
-
.bk-switcher.bk-switcher-outline.is-disabled .switcher-label {
|
275
|
-
color: #eee;
|
275
|
+
.bk-switcher.bk-switcher-outline .bk-switcher-loading svg {
|
276
|
+
color: #fff;
|
276
277
|
}
|
277
|
-
.bk-switcher.bk-switcher-outline.is-
|
278
|
-
|
278
|
+
.bk-switcher.bk-switcher-outline.bk-switcher.primary.is-checked {
|
279
|
+
border: 1px solid var(--primary-color);
|
279
280
|
}
|
280
|
-
.bk-switcher.bk-switcher-outline.bk-switcher-
|
281
|
-
|
282
|
-
height: 18px;
|
281
|
+
.bk-switcher.bk-switcher-outline.bk-switcher.primary.is-checked:after {
|
282
|
+
background: var(--primary-color);
|
283
283
|
}
|
284
|
-
.bk-switcher.bk-switcher-outline.bk-switcher
|
285
|
-
|
284
|
+
.bk-switcher.bk-switcher-outline.bk-switcher.primary.is-checked .switcher-text {
|
285
|
+
color: var(--primary-color);
|
286
286
|
}
|
287
287
|
.bk-switcher.bk-switcher-square {
|
288
288
|
border-radius: 2px;
|
@@ -290,55 +290,69 @@
|
|
290
290
|
.bk-switcher.bk-switcher-square:after {
|
291
291
|
border-radius: 2px;
|
292
292
|
}
|
293
|
-
.bk-switcher.bk-switcher-square .switcher-label {
|
294
|
-
width: 35px;
|
295
|
-
}
|
296
293
|
.bk-switcher.bk-switcher-large {
|
297
|
-
width: 42px;
|
298
294
|
height: 24px;
|
295
|
+
min-width: 42px;
|
299
296
|
line-height: 22px;
|
300
|
-
border-radius: 12px;
|
301
297
|
}
|
302
298
|
.bk-switcher.bk-switcher-large:after {
|
303
299
|
width: 20px;
|
304
300
|
height: 20px;
|
305
301
|
}
|
306
|
-
.bk-switcher.bk-switcher-large.is-checked:after {
|
307
|
-
top: 2px;
|
308
|
-
left: 100%;
|
309
|
-
margin-left: -22px;
|
310
|
-
}
|
311
302
|
.bk-switcher.bk-switcher-large .bk-switcher-loading {
|
312
|
-
width:
|
313
|
-
height:
|
303
|
+
width: 20px;
|
304
|
+
height: 20px;
|
305
|
+
font-size: 16px;
|
306
|
+
}
|
307
|
+
.bk-switcher.bk-switcher-large.is-checked .bk-switcher-loading {
|
308
|
+
margin-left: -21px;
|
314
309
|
}
|
315
310
|
.bk-switcher.bk-switcher-small {
|
316
|
-
width: 26px;
|
317
311
|
height: 16px;
|
312
|
+
min-width: 26px;
|
318
313
|
line-height: 22px;
|
319
314
|
}
|
320
315
|
.bk-switcher.bk-switcher-small:after {
|
321
316
|
width: 12px;
|
322
317
|
height: 12px;
|
323
318
|
}
|
324
|
-
.bk-switcher.bk-switcher-small.is-checked:after {
|
325
|
-
top: 2px;
|
326
|
-
left: 100%;
|
327
|
-
margin-left: -14px;
|
328
|
-
}
|
329
319
|
.bk-switcher.bk-switcher-small .bk-switcher-loading {
|
330
|
-
width:
|
331
|
-
height:
|
320
|
+
width: 12px;
|
321
|
+
height: 12px;
|
322
|
+
font-weight: 700;
|
323
|
+
transform: scale(0.66667);
|
332
324
|
}
|
333
|
-
.bk-switcher
|
334
|
-
|
335
|
-
|
336
|
-
|
337
|
-
|
338
|
-
|
339
|
-
|
340
|
-
|
341
|
-
|
342
|
-
|
343
|
-
|
325
|
+
.bk-switcher.bk-switcher-small.is-checked .bk-switcher-loading {
|
326
|
+
margin-left: -13px;
|
327
|
+
}
|
328
|
+
:not(.show-label).bk-switcher-nomal.bk-switcher-outline::after {
|
329
|
+
width: 16px;
|
330
|
+
height: 16px;
|
331
|
+
}
|
332
|
+
:not(.show-label).bk-switcher-outline.is-checked.bk-switcher-small::after {
|
333
|
+
width: 12px;
|
334
|
+
height: 12px;
|
335
|
+
}
|
336
|
+
:not(.show-label).bk-switcher-outline.is-checked.bk-switcher-large::after {
|
337
|
+
width: 20px;
|
338
|
+
height: 20px;
|
339
|
+
}
|
340
|
+
:not(.show-label).bk-switcher-outline.is-checked::after {
|
341
|
+
width: 16px;
|
342
|
+
height: 16px;
|
343
|
+
}
|
344
|
+
@keyframes fadeEffect {
|
345
|
+
100% {
|
346
|
+
opacity: 0;
|
347
|
+
}
|
348
|
+
}
|
349
|
+
@keyframes waveEffect {
|
350
|
+
100% {
|
351
|
+
box-shadow: 0 0 0 #1890ff;
|
352
|
+
}
|
353
|
+
}
|
354
|
+
@keyframes loading {
|
355
|
+
100% {
|
356
|
+
transform: rotate(1turn);
|
357
|
+
}
|
344
358
|
}
|
package/lib/tab/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon/")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon/"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e._)}(this,(function(e,t,n,a){"use strict";var r=t.defineComponent({name:"
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("@bkui-vue/icon/")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","@bkui-vue/icon/"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e._)}(this,(function(e,t,n,a){"use strict";var r=t.defineComponent({name:"TabNav",props:{active:{type:String||Number},panels:{type:Array,default:function(){return[]}},closable:n.PropTypes.bool.def(!1),addable:n.PropTypes.bool.def(!1),sortable:n.PropTypes.bool.def(!1),sortType:n.PropTypes.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:n.PropTypes.number.def(50),scrollStep:n.PropTypes.number.def(200),validateActive:n.PropTypes.bool.def(!0),changeOnHover:n.PropTypes.bool.def(!1),changeOnHoverDelay:n.PropTypes.number.def(1e3),tabAdd:{type:Function,default:function(){return{}}},tabChange:{type:Function,default:function(){return{}}},tabRemove:{type:Function,default:function(){return{}}},tabSort:{type:Function,default:function(){return{}}},tabDrag:{type:Function,default:function(){return{}}}},methods:{distinctRoots:function(e,t){return e===t},swapArr:function(e,t,n){var a=e[t];e[t]=e[n],e[n]=a},handleTabAdd:function(e){this.tabAdd(e)},dragstart:function(e,t){this.dragStartIndex=e,this.draggingEle=this.guid,t.dataTransfer.effectAllowed="move",this.tabDrag(e,t)},dragenter:function(e){this.distinctRoots(this.draggingEle,this.guid)&&(this.dragenterIndex=e)},dragend:function(){this.dragenterIndex=-1,this.dragStartIndex=-1,this.draggingEle=null},drop:function(e,t){if(!this.distinctRoots(this.draggingEle,this.guid))return!1;if("insert"===t)if(this.dragStartIndex<e)this.panels.splice(e+1,0,this.panels[this.dragStartIndex]),this.panels.splice(this.dragStartIndex,1);else{if(!(this.dragStartIndex>e))return!1;this.panels.splice(e,0,this.panels[this.dragStartIndex]),this.panels.splice(this.dragStartIndex+1,1)}else this.swapArr(this.panels,this.dragStartIndex,e);this.tabSort(this.dragStartIndex,e)},handleTabChange:function(e){this.tabChange(e)},handleTabRemove:function(e,t){this.tabRemove(e,t)}},setup:function(e){return{navs:t.computed((function(){if(!Array.isArray(e.panels)||!e.panels.length)return[];var n=[],a=!1;return e.panels.filter((function(r,o){if(!r.props)return null;var i=r.props,s=i.name,l=i.label,d=i.closable,c=i.visible,p=i.disabled,u=i.sortable;if(!c)return!1;e.active===s&&(a=!0);return n.push({name:s,closable:d,visible:c,disabled:p,sortable:u,tabLabel:function(e){return r.slots.label?t.h(r.slots.label):[void 0,""].includes(e)?"选项卡".concat(o+1):"string"==typeof e?e:"function"==typeof e?t.h(e):e}(l)}),!0})),!a&&e.validateActive&&e.panels[0].props&&e.tabChange(e.panels[0].props.name),n})),dragenterIndex:t.ref(-1),dragStartIndex:t.ref(-1),draggingEle:t.ref(""),guid:Math.random().toString(16).substr(4)+Math.random().toString(16).substr(4)}},render:function(){var e,n,r,o,i,s,l=this,d=this.active,c=this.closable,p=this.addable,u=this.sortable,b=this.sortType,f=this.labelHeight,h=this.dragstart,g=this.dragenter,v=this.dragend,y=this.drop;return t.createVNode("div",{style:{lineHeight:"".concat(f,"px")},class:"bk-tab-header"},[t.createVNode("div",{class:"bk-tab-header-nav"},[l.navs.map((function(e,n){if(!e)return null;var r,o=e.name,i=e.disabled,s=e.tabLabel,p=function(e,t){return"boolean"==typeof e?e:t};return t.createVNode("div",{key:o,onClick:function(){return l.handleTabChange(o)},draggable:p(e.sortable,u),onDragstart:function(e){return h(n,e)},onDragenter:function(e){e.preventDefault(),g(n)},onDragleave:function(e){e.preventDefault()},onDragover:function(e){e.preventDefault()},onDragend:function(e){e.preventDefault(),v()},onDrop:function(e){e.preventDefault(),y(n,b)},class:(r=["bk-tab-header-item"],i&&r.push("bk-tab-header--disabled"),d===o&&r.push("bk-tab-header--active"),r.join(" "))},[t.createVNode("div",null,[s]),p(e.closable,c)&&t.createVNode(a.Close,{class:"bk-tab-header-item-close",onClick:function(){return l.handleTabRemove(n,e)}},null)])}))]),t.createVNode("div",{class:"bk-tab-header-operation"},[(s=[],"function"==typeof l.$slots.add?i=null===(n=(e=l.$slots).add)||void 0===n?void 0:n.call(e,t.h):p&&(i=t.createVNode("div",{onClick:l.handleTabAdd},[t.createVNode(a.Plus,{width:26,height:26},null)])),s.push(i),"function"==typeof l.$slots.setting&&s.push(null===(o=(r=l.$slots).setting)||void 0===o?void 0:o.call(r,t.h)),s.map((function(e,n){return t.createVNode("div",{class:"bk-tab-header-item",key:n},[e])})))])])}}),o=t.defineComponent({name:"Tab",components:{TabNav:r},props:{active:{type:String||Number},type:n.PropTypes.commonType(["card","border-card","unborder-card"],"type").def("border-card"),tabPosition:n.PropTypes.commonType(["left","right","top"],"position").def("top"),closable:n.PropTypes.bool.def(!1),addable:n.PropTypes.bool.def(!1),sortable:n.PropTypes.bool.def(!1),sortType:n.PropTypes.commonType(["replace","insert","top"],"sortType").def("replace"),labelHeight:n.PropTypes.number.def(50),scrollStep:n.PropTypes.number.def(200),extCls:n.PropTypes.string.def(""),validateActive:n.PropTypes.bool.def(!0),showHeader:n.PropTypes.bool.def(!0),changeOnHover:n.PropTypes.bool.def(!1),changeOnHoverDelay:n.PropTypes.number.def(1e3)},emits:["add-panel","tab-change","close-panel","sort-change","on-drag-tab","add","change","remove","update:active","sort","drag"],methods:{tabAdd:function(e){this.$emit("add",{e:e}),this.$emit("add-panel",{e:e})},tabChange:function(e){this.$emit("change",e),this.$emit("tab-change",e),this.$emit("update:active",e)},tabRemove:function(e,t){this.$emit("remove",e,t),this.$emit("close-panel",e,t)},tabSort:function(e,t){this.$emit("sort",e,t),this.$emit("sort-change",e,t)},tabDrag:function(e,t){this.$emit("drag",e,t),this.$emit("on-drag-tab",e,t)}},setup:function(e,n){var a=n.slots,r=t.ref(!1),o=t.ref([]),i=t.getCurrentInstance();"function"==typeof a.panel&&(o.value=a.default()),"function"==typeof a.default&&(o.value=a.default());var s=function e(n){var a=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=n.children;return(r||[]).forEach((function(n){var r=n.type;"TabPanel"===(r=r.name||r)&&n.component?a.push(n.component):r!==t.Fragment&&"template"!==r||e(n,a)})),a},l=function(){if(a.default){var e=i.subTree.children[1].children;if(!e)return;var t=e[0],n=s(t);!(n.length===o.value.length&&n.every((function(e,t){return e.uid===o.value[t].uid})))&&(o.value=n)}};return t.onMounted((function(){l(),r.value=!0})),t.onUpdated((function(){l()})),{isMounted:r,panels:o}},render:function(){var e,n,a,o,i=this;return t.createVNode("div",{class:"top"===i.tabPosition?"bk-tab bk-tab--".concat(i.tabPosition," bk-tab--").concat(i.type," ").concat(i.extCls):"bk-tab bk-tab--".concat(i.tabPosition," ").concat(i.extCls)},[(a=i.panels,o={panels:a,active:i.active,type:i.type,closable:i.closable,addable:i.addable,sortable:i.sortable,sortType:i.sortType,labelHeight:i.labelHeight,scrollStep:i.scrollStep,validateActive:i.validateActive,changeOnHover:i.changeOnHover,changeOnHoverDelay:i.changeOnHoverDelay,tabAdd:i.tabAdd,tabChange:i.tabChange,tabRemove:i.tabRemove,tabSort:i.tabSort,tabDrag:i.tabDrag},a&&Array.isArray(a)?t.createVNode(r,o,i.$slots):null),t.createVNode("div",{class:"bk-tab-content"},[null===(n=(e=this.$slots).default)||void 0===n?void 0:n.call(e)])])}}),i=t.defineComponent({name:"TabPanel",props:{name:{type:String||Number},label:String||Function,closable:Function||Boolean,visible:n.PropTypes.bool.def(!0),disabled:n.PropTypes.bool.def(null)||void 0,sortable:Function||Boolean,renderDirective:n.PropTypes.commonType(["if","show"],"render").def("show"),panel:String||Function},render:function(){var e=this,n=this.name===this.$parent.active;return t.withDirectives(t.createVNode("div",{ref:"content",class:"bk-tab-panel"},[!e.visible||"if"===e.renderDirective&&!n?null:"function"==typeof e.panel?e.panel(t.h):"function"==typeof e.$slots.default?e.$slots.default(null):"function"==typeof e.$slots.panel?e.$slots.panel(null):null]),[[t.vShow,n]])}}),s=n.withInstall(o),l=n.withInstall(i);e.BKTab=s,e.BKTabPanel=l,e.default=s,Object.defineProperty(e,"__esModule",{value:!0})}));
|
package/lib/table/index.d.ts
CHANGED
@@ -4,30 +4,55 @@ declare const BkTable: {
|
|
4
4
|
$data: {};
|
5
5
|
$props: Partial<{
|
6
6
|
data: any[];
|
7
|
+
height: string | number;
|
8
|
+
headHeight: number;
|
7
9
|
columnPick: string;
|
10
|
+
minHeight: string | number;
|
11
|
+
rowHeight: any;
|
12
|
+
virtualEnabled: boolean;
|
8
13
|
}> & Omit<({} & (Readonly<{
|
9
14
|
data?: unknown;
|
10
15
|
columns?: unknown;
|
11
16
|
activeColumn?: unknown;
|
12
17
|
columnPick?: unknown;
|
18
|
+
height?: unknown;
|
19
|
+
minHeight?: unknown;
|
20
|
+
rowHeight?: unknown;
|
21
|
+
headHeight?: unknown;
|
22
|
+
virtualEnabled?: unknown;
|
13
23
|
} & {
|
14
24
|
data: any[];
|
25
|
+
height: string | number;
|
26
|
+
headHeight: number;
|
15
27
|
columnPick: string;
|
28
|
+
minHeight: string | number;
|
29
|
+
virtualEnabled: boolean;
|
16
30
|
} & {
|
17
31
|
columns?: import("./props").Column[];
|
18
32
|
activeColumn?: number | number[];
|
33
|
+
rowHeight?: any;
|
19
34
|
}> & ({} | {}))) & (import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & Readonly<{
|
20
35
|
data?: unknown;
|
21
36
|
columns?: unknown;
|
22
37
|
activeColumn?: unknown;
|
23
38
|
columnPick?: unknown;
|
39
|
+
height?: unknown;
|
40
|
+
minHeight?: unknown;
|
41
|
+
rowHeight?: unknown;
|
42
|
+
headHeight?: unknown;
|
43
|
+
virtualEnabled?: unknown;
|
24
44
|
} & {
|
25
45
|
data: any[];
|
46
|
+
height: string | number;
|
47
|
+
headHeight: number;
|
26
48
|
columnPick: string;
|
49
|
+
minHeight: string | number;
|
50
|
+
virtualEnabled: boolean;
|
27
51
|
} & {
|
28
52
|
columns?: import("./props").Column[];
|
29
53
|
activeColumn?: number | number[];
|
30
|
-
|
54
|
+
rowHeight?: any;
|
55
|
+
}> & ({} | {})), "data" | "height" | "headHeight" | "columnPick" | "minHeight" | "rowHeight" | "virtualEnabled">;
|
31
56
|
$attrs: {
|
32
57
|
[x: string]: unknown;
|
33
58
|
};
|
@@ -46,15 +71,30 @@ declare const BkTable: {
|
|
46
71
|
columns?: unknown;
|
47
72
|
activeColumn?: unknown;
|
48
73
|
columnPick?: unknown;
|
74
|
+
height?: unknown;
|
75
|
+
minHeight?: unknown;
|
76
|
+
rowHeight?: unknown;
|
77
|
+
headHeight?: unknown;
|
78
|
+
virtualEnabled?: unknown;
|
49
79
|
} & {
|
50
80
|
data: any[];
|
81
|
+
height: string | number;
|
82
|
+
headHeight: number;
|
51
83
|
columnPick: string;
|
84
|
+
minHeight: string | number;
|
85
|
+
virtualEnabled: boolean;
|
52
86
|
} & {
|
53
87
|
columns?: import("./props").Column[];
|
54
88
|
activeColumn?: number | number[];
|
89
|
+
rowHeight?: any;
|
55
90
|
}> & ({} | {}), () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {
|
56
91
|
data: any[];
|
92
|
+
height: string | number;
|
93
|
+
headHeight: number;
|
57
94
|
columnPick: string;
|
95
|
+
minHeight: string | number;
|
96
|
+
rowHeight: any;
|
97
|
+
virtualEnabled: boolean;
|
58
98
|
}> & {
|
59
99
|
beforeCreate?: (() => void) | (() => void)[];
|
60
100
|
created?: (() => void) | (() => void)[];
|
@@ -80,23 +120,43 @@ declare const BkTable: {
|
|
80
120
|
columns?: unknown;
|
81
121
|
activeColumn?: unknown;
|
82
122
|
columnPick?: unknown;
|
123
|
+
height?: unknown;
|
124
|
+
minHeight?: unknown;
|
125
|
+
rowHeight?: unknown;
|
126
|
+
headHeight?: unknown;
|
127
|
+
virtualEnabled?: unknown;
|
83
128
|
} & {
|
84
129
|
data: any[];
|
130
|
+
height: string | number;
|
131
|
+
headHeight: number;
|
85
132
|
columnPick: string;
|
133
|
+
minHeight: string | number;
|
134
|
+
virtualEnabled: boolean;
|
86
135
|
} & {
|
87
136
|
columns?: import("./props").Column[];
|
88
137
|
activeColumn?: number | number[];
|
138
|
+
rowHeight?: any;
|
89
139
|
}> & ({} | {})) & import("vue").ShallowUnwrapRef<() => JSX.Element> & {} & {} & import("vue").ComponentCustomProperties & Readonly<{
|
90
140
|
data?: unknown;
|
91
141
|
columns?: unknown;
|
92
142
|
activeColumn?: unknown;
|
93
143
|
columnPick?: unknown;
|
144
|
+
height?: unknown;
|
145
|
+
minHeight?: unknown;
|
146
|
+
rowHeight?: unknown;
|
147
|
+
headHeight?: unknown;
|
148
|
+
virtualEnabled?: unknown;
|
94
149
|
} & {
|
95
150
|
data: any[];
|
151
|
+
height: string | number;
|
152
|
+
headHeight: number;
|
96
153
|
columnPick: string;
|
154
|
+
minHeight: string | number;
|
155
|
+
virtualEnabled: boolean;
|
97
156
|
} & {
|
98
157
|
columns?: import("./props").Column[];
|
99
158
|
activeColumn?: number | number[];
|
159
|
+
rowHeight?: any;
|
100
160
|
}> & ({} | {});
|
101
161
|
__isFragment?: never;
|
102
162
|
__isTeleport?: never;
|
@@ -106,14 +166,29 @@ declare const BkTable: {
|
|
106
166
|
columns?: unknown;
|
107
167
|
activeColumn?: unknown;
|
108
168
|
columnPick?: unknown;
|
169
|
+
height?: unknown;
|
170
|
+
minHeight?: unknown;
|
171
|
+
rowHeight?: unknown;
|
172
|
+
headHeight?: unknown;
|
173
|
+
virtualEnabled?: unknown;
|
109
174
|
} & {
|
110
175
|
data: any[];
|
176
|
+
height: string | number;
|
177
|
+
headHeight: number;
|
111
178
|
columnPick: string;
|
179
|
+
minHeight: string | number;
|
180
|
+
virtualEnabled: boolean;
|
112
181
|
} & {
|
113
182
|
columns?: import("./props").Column[];
|
114
183
|
activeColumn?: number | number[];
|
184
|
+
rowHeight?: any;
|
115
185
|
}> & ({} | {}), () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, {
|
116
186
|
data: any[];
|
187
|
+
height: string | number;
|
188
|
+
headHeight: number;
|
117
189
|
columnPick: string;
|
190
|
+
minHeight: string | number;
|
191
|
+
rowHeight: any;
|
192
|
+
virtualEnabled: boolean;
|
118
193
|
}> & import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps & import("@vue/runtime-core").Plugin;
|
119
194
|
export default BkTable;
|
package/lib/table/index.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared")):"function"==typeof define&&define.amd?define(["exports","vue","../shared"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared)}(this,(function(e,t,r){"use strict";function o(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var
|
1
|
+
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("vue"),require("../shared"),require("../virtual-render")):"function"==typeof define&&define.amd?define(["exports","vue","../shared","../virtual-render"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).bkuiVue={},e.Vue,e.Shared,e["@bkui-vue/virtual-render"])}(this,(function(e,t,r,o){"use strict";function n(e){return e&&"object"==typeof e&&"default"in e?e:{default:e}}var s=n(o);function i(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var a={exports:{}};!function(e){e.exports=function(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e},e.exports.__esModule=!0,e.exports.default=e.exports}(a);var u=i(a.exports),c={data:r.PropTypes.arrayOf(r.PropTypes.any).def([]),columns:r.PropTypes.arrayOf(r.PropTypes.shape({label:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){return""})),r.PropTypes.string.def("")]),field:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){return""})),r.PropTypes.string.def("")]),render:r.PropTypes.oneOfType([r.PropTypes.func.def((function(){return""})),r.PropTypes.string.def("")]),width:r.PropTypes.oneOfType([r.PropTypes.number.def(void 0),r.PropTypes.string.def("auto")])})),activeColumn:r.PropTypes.oneOfType([r.PropTypes.number.def(-1),r.PropTypes.arrayOf(r.PropTypes.number.def(-1))]),columnPick:r.PropTypes.commonType(["multi","single","disabled"],"columnPick").def("disabled"),height:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).def("auto"),minHeight:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.string]).def("auto"),rowHeight:r.PropTypes.oneOfType([r.PropTypes.number,r.PropTypes.func]).def(40),headHeight:r.PropTypes.number.def(40),virtualEnabled:r.PropTypes.bool.def(!1)},p={exports:{}};!function(e){e.exports=function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")},e.exports.__esModule=!0,e.exports.default=e.exports}(p);var l=i(p.exports),d={exports:{}};!function(e){function t(e,t){for(var r=0;r<t.length;r++){var o=t[r];o.enumerable=o.enumerable||!1,o.configurable=!0,"value"in o&&(o.writable=!0),Object.defineProperty(e,o.key,o)}}e.exports=function(e,r,o){return r&&t(e.prototype,r),o&&t(e,o),Object.defineProperty(e,"prototype",{writable:!1}),e},e.exports.__esModule=!0,e.exports.default=e.exports}(d);var f=i(d.exports),y={exports:{}},v={exports:{}},m={exports:{}};!function(e){e.exports=function(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,o=new Array(t);r<t;r++)o[r]=e[r];return o},e.exports.__esModule=!0,e.exports.default=e.exports}(m),function(e){var t=m.exports;e.exports=function(e){if(Array.isArray(e))return t(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(v);var h={exports:{}};!function(e){e.exports=function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)},e.exports.__esModule=!0,e.exports.default=e.exports}(h);var x={exports:{}};!function(e){var t=m.exports;e.exports=function(e,r){if(e){if("string"==typeof e)return t(e,r);var o=Object.prototype.toString.call(e).slice(8,-1);return"Object"===o&&e.constructor&&(o=e.constructor.name),"Map"===o||"Set"===o?Array.from(e):"Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o)?t(e,r):void 0}},e.exports.__esModule=!0,e.exports.default=e.exports}(x);var b={exports:{}};!function(e){e.exports=function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")},e.exports.__esModule=!0,e.exports.default=e.exports}(b),function(e){var t=v.exports,r=h.exports,o=x.exports,n=b.exports;e.exports=function(e){return t(e)||r(e)||o(e)||n()},e.exports.__esModule=!0,e.exports.default=e.exports}(y);var T=i(y.exports),P=void 0,g=function(e,t,r){var o;if(Object.prototype.hasOwnProperty.call(e,t))return"function"==typeof e[t]?(o=e[t]).call.apply(o,[P].concat(T(r))):e[t]},C=function(e){return"disabled"!==e.columnPick?"multi"===e.columnPick?Array.isArray(e.activeColumn)?e.activeColumn:O(e.activeColumn):Array.isArray(e.activeColumn)?O(e.activeColumn[0]):O(e.activeColumn):[]},O=function(e){return/^\d+$/.test("".concat(e))?[parseInt("".concat(e),10)]:[]},k=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"100%";return/^auto|null|undefined$/gi.test("".concat(e))?t:/^\d+\.?\d+$/.test("".concat(e))?"".concat(e,"px"):e},w=function(){function e(t,r,o){l(this,e),this.props=t,this.context=r,this.reactiveProp=o}return f(e,[{key:"propActiveCols",get:function(){return this.reactiveProp.activeColumns}},{key:"renderTableBodySchema",value:function(e){return t.createVNode("table",{cellpadding:0,cellspacing:0},[this.renderColGroup(),this.renderHeader(),this.renderTBody(e)])}},{key:"setColumnActive",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1],r=this.propActiveCols.find((function(t){return t.index===e}));Object.assign(r,{active:!r.active}),t&&this.propActiveCols.filter((function(t){return t.index!==e&&t.active})).forEach((function(e){Object.assign(e,{active:!1})}))}},{key:"handleColumnHeadClick",value:function(e){"disabled"!==this.props.columnPick&&(this.setColumnActive(e,"single"===this.props.columnPick),this.context.emit("column-pick",this.propActiveCols))}},{key:"renderHeader",value:function(){var e=this,o={"--row-height":"".concat(g(this.props,"headHeight",["thead"]),"px"),"--translate-y":"".concat(this.reactiveProp.scrollTranslateY,"px")};return t.createVNode("thead",{style:o},[t.createVNode("tr",null,[this.props.columns.map((function(o,n){return t.createVNode("th",{colspan:1,rowspan:1,class:r.classes({active:e.isColActive(n)}),onClick:function(){return e.handleColumnHeadClick(n)}},[t.createVNode("div",{class:"cell"},[g(o,"label",[o])])])}))])])}},{key:"renderTBody",value:function(e){var r=this;return t.createVNode("tbody",null,[e.map((function(e,o){var n={"--row-height":"".concat(g(r.props,"rowHeight",["tbody",e,o]),"px")};return t.createVNode("tr",{style:n},[r.props.columns.map((function(r){return t.createVNode("td",{colspan:1,rowspan:1},[t.createVNode("div",{class:"cell"},[e[g(r,"field",[r,e])]])])}))])}))])}},{key:"isColActive",value:function(e){return"disabled"!==this.props.columnPick&&this.propActiveCols.some((function(t){return t.index===e&&t.active}))}},{key:"renderColGroup",value:function(){var e=this;return t.createVNode("colgroup",null,[(this.props.columns||[]).map((function(o,n){var s,i=r.classes({active:e.isColActive(n)}),a={width:(s=o.width,k(s,"auto"))};return t.createVNode("col",{class:i,style:a},null)}))])}}]),e}(),_=t.defineComponent({name:"Table",props:c,setup:function(e,o){var n=t.reactive(C(e)),i=function(){return(e.columns||[]).map((function(e,t){return{index:t,active:n.some((function(e){return e===t})),_column:e}}))},a=t.reactive({activeColumns:i(),scrollTranslateY:0}),c=t.computed((function(){return{height:k(e.height),minHeight:k(e.minHeight)}}));t.watch((function(){return[e.activeColumn,e.columns]}),(function(){t.nextTick((function(){a.activeColumns=i();var t=C(e);a.activeColumns.forEach((function(e,r){Object.assign(e,{active:t.some((function(e){return e===r}))})}))}))}),{deep:!0});var p=new w(e,o,a),l=r.classes(u({},r.resolveClassName("table"),!0));return function(){return t.createVNode(s.default,{className:l,style:c.value,lineHeight:e.rowHeight,contentClassName:r.resolveClassName("table-body"),list:e.data,enabled:e.virtualEnabled},{default:function(t){return p.renderTableBodySchema(t.data||e.data)},afterContent:function(){return t.createVNode("div",{class:r.resolveClassName("table-fixed")},null)}})}}}),A=r.withInstall(_);e.default=A,Object.defineProperty(e,"__esModule",{value:!0})}));
|