bkui-vue 0.0.1-beta.56 → 0.0.1-beta.59
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 +28 -28
- package/dist/index.esm.js +980 -459
- package/dist/index.umd.js +27 -27
- package/dist/style.css +1 -1
- package/lib/breadcrumb/breadcrumb.css +8 -0
- package/lib/breadcrumb/breadcrumb.variable.css +8 -0
- package/lib/button/button.less +2 -1
- package/lib/card/card.css +16 -8
- package/lib/card/card.less +12 -8
- package/lib/card/card.variable.css +16 -8
- package/lib/components.d.ts +1 -0
- package/lib/components.js +1 -1
- package/lib/container/col.d.ts +51 -0
- package/lib/container/container.css +48 -0
- package/lib/container/container.d.ts +83 -0
- package/lib/container/container.less +20 -0
- package/lib/container/container.variable.css +142 -0
- package/lib/container/index.d.ts +223 -0
- package/lib/container/index.js +1 -0
- package/lib/container/row.d.ts +4 -0
- package/lib/dialog/dialog.css +6 -0
- package/lib/dialog/dialog.d.ts +170 -97
- package/lib/dialog/dialog.less +10 -0
- package/lib/dialog/dialog.variable.css +6 -0
- package/lib/dialog/index.d.ts +373 -206
- package/lib/dialog/index.js +1 -1
- package/lib/icon/close-line.d.ts +4 -0
- package/lib/icon/{funnel.js → close-line.js} +1 -1
- package/lib/icon/help-document-fill.js +1 -0
- package/lib/icon/index.d.ts +1 -0
- package/lib/icon/index.js +1 -1
- package/lib/input/index.js +1 -1
- package/lib/input/input.css +9 -0
- package/lib/input/input.less +2 -0
- package/lib/input/input.variable.css +9 -0
- package/lib/loading/loading.css +8 -0
- package/lib/loading/loading.variable.css +8 -0
- package/lib/menu/menu.css +8 -0
- package/lib/menu/menu.variable.css +8 -0
- package/lib/modal/index.d.ts +177 -165
- package/lib/modal/index.js +1 -1
- package/lib/modal/modal.d.ts +70 -65
- package/lib/modal/props.mixin.d.ts +34 -31
- package/lib/pagination/index.d.ts +7 -7
- package/lib/pagination/pagination.d.ts +2 -2
- package/lib/progress/progress.css +8 -0
- package/lib/progress/progress.variable.css +8 -0
- package/lib/sideslider/index.d.ts +143 -134
- package/lib/sideslider/sideslider.d.ts +70 -65
- package/lib/styles/index.d.ts +1 -0
- package/lib/styles/mixins/clearfix.css +8 -0
- package/lib/styles/mixins/clearfix.less +10 -0
- package/lib/styles/mixins/clearfix.variable.css +8 -0
- package/lib/styles/mixins/mixins.css +8 -0
- package/lib/styles/mixins/mixins.less +1 -0
- package/lib/styles/mixins/mixins.variable.css +8 -0
- package/lib/switcher/switcher.css +8 -0
- package/lib/switcher/switcher.variable.css +8 -0
- package/lib/tab/index.d.ts +1 -1
- package/lib/tab/tab-panel.d.ts +1 -1
- package/lib/table/index.d.ts +16 -1
- package/lib/table/index.js +1 -1
- package/lib/table/plugins/settings.css +110 -0
- package/lib/table/plugins/settings.less +136 -0
- package/lib/table/plugins/settings.variable.css +204 -0
- package/lib/table/props.d.ts +26 -0
- package/lib/table/render.d.ts +12 -2
- package/lib/table/table.css +129 -0
- package/lib/table/table.d.ts +7 -0
- package/lib/table/table.less +28 -0
- package/lib/table/table.variable.css +129 -0
- package/lib/table/use-common.d.ts +4 -1
- package/lib/tree/index.d.ts +31 -52
- package/lib/tree/index.js +1 -1
- package/lib/tree/props.d.ts +10 -0
- package/lib/tree/tree.d.ts +14 -17
- package/lib/tree/use-async.d.ts +5 -0
- package/lib/tree/use-node-action.d.ts +6 -0
- package/lib/tree/use-node-attribute.d.ts +13 -0
- package/lib/virtual-render/index.js +1 -1
- package/package.json +4 -4
package/dist/index.esm.js
CHANGED
@@ -81,6 +81,7 @@ var timeline = "";
|
|
81
81
|
var codeDiff = "";
|
82
82
|
var resizeLayout = "";
|
83
83
|
var tagInput = "";
|
84
|
+
var container = "";
|
84
85
|
const BKLAYERD_INDEX_EFAULT_VALUE = {
|
85
86
|
["bottom"]: 0,
|
86
87
|
["content"]: 1,
|
@@ -2375,141 +2376,160 @@ bkIcon.inheritAttrs = false;
|
|
2375
2376
|
bkIcon.displayName = "bkIcon";
|
2376
2377
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 744.64L789.6 462.72 880 554.56 512 928 144 554.56 234.4 462.72 512 744.64z"}},{"type":"element","name":"path","attributes":{"d":"M144 187.68L234.4 96 512 377.76 789.6 96 880 187.68 512 561.28 144 187.68z"}}]}');
|
2377
2378
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M279.36 512L561.28 789.6 469.44 880 96 512 469.44 144 561.28 234.4 279.36 512z"}},{"type":"element","name":"path","attributes":{"d":"M836.32 144L928 234.4 646.08 512 928 789.6 836.32 880 462.72 512 836.32 144z"}}]}');
|
2378
|
-
const data$
|
2379
|
+
const data$B = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M697.6 281.6l48 48-176 176 176 176-48 48-224-224L697.6 281.6z"}},{"type":"element","name":"path","attributes":{"d":"M505.6 281.6l48 48-176 176 176 176-48 48-224-224L505.6 281.6z"}}]}');
|
2379
2380
|
const angleDoubleLeft = (props, context) => {
|
2380
2381
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2381
2382
|
return createVNode(bkIcon, mergeProps(p2, {
|
2382
|
-
"data": data$
|
2383
|
+
"data": data$B,
|
2383
2384
|
"name": "angleDoubleLeft"
|
2384
2385
|
}), null);
|
2385
2386
|
};
|
2386
2387
|
angleDoubleLeft.displayName = "angleDoubleLeft";
|
2387
2388
|
angleDoubleLeft.inheritAttrs = false;
|
2388
2389
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M744.64 512L462.72 789.6 554.56 880 928 512 554.56 144 462.72 234.4 744.64 512z"}},{"type":"element","name":"path","attributes":{"d":"M187.68 144L96 234.4 377.76 512 96 789.6 187.68 880 561.28 512 187.68 144z"}}]}');
|
2389
|
-
const data$
|
2390
|
+
const data$A = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M358.4 729.6l-48-48 176-176-176-176 48-48 224 224L358.4 729.6z"}},{"type":"element","name":"path","attributes":{"d":"M550.4 729.6l-48-48 176-176-176-176 48-48 224 224L550.4 729.6z"}}]}');
|
2390
2391
|
const angleDoubleRight = (props, context) => {
|
2391
2392
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2392
2393
|
return createVNode(bkIcon, mergeProps(p2, {
|
2393
|
-
"data": data$
|
2394
|
+
"data": data$A,
|
2394
2395
|
"name": "angleDoubleRight"
|
2395
2396
|
}), null);
|
2396
2397
|
};
|
2397
2398
|
angleDoubleRight.displayName = "angleDoubleRight";
|
2398
2399
|
angleDoubleRight.inheritAttrs = false;
|
2399
2400
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 279.36L789.6 561.28 880 469.44 512 96 144 469.44 234.4 561.28 512 279.36z"}},{"type":"element","name":"path","attributes":{"d":"M144 836.32L234.4 928 512 646.08 789.6 928 880 836.32 512 462.72 144 836.32z"}}]}');
|
2400
|
-
const data$
|
2401
|
+
const data$z = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 256L96 704 187.04 704 512 704 836.96 704 928 704 512 256z"}}]}');
|
2401
2402
|
const angleDownFill = (props, context) => {
|
2402
2403
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2403
2404
|
return createVNode(bkIcon, mergeProps(p2, {
|
2404
|
-
"data": data$
|
2405
|
+
"data": data$z,
|
2405
2406
|
"name": "angleDownFill"
|
2406
2407
|
}), null);
|
2407
2408
|
};
|
2408
2409
|
angleDownFill.displayName = "angleDownFill";
|
2409
2410
|
angleDownFill.inheritAttrs = false;
|
2410
|
-
const data$
|
2411
|
+
const data$y = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 762.56L98.72 349.28 189.28 258.72 512 581.44 834.72 258.72 925.28 349.28 512 762.56z"}}]}');
|
2411
2412
|
const angleDownLine = (props, context) => {
|
2412
2413
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2413
2414
|
return createVNode(bkIcon, mergeProps(p2, {
|
2414
|
-
"data": data$
|
2415
|
+
"data": data$y,
|
2415
2416
|
"name": "angleDownLine"
|
2416
2417
|
}), null);
|
2417
2418
|
};
|
2418
2419
|
angleDownLine.displayName = "angleDownLine";
|
2419
2420
|
angleDownLine.inheritAttrs = false;
|
2420
|
-
const data$
|
2421
|
+
const data$x = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M288 448L336 400 512 576 688 400 736 448 512 672z"}}]}');
|
2421
2422
|
const angleDown = (props, context) => {
|
2422
2423
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2423
2424
|
return createVNode(bkIcon, mergeProps(p2, {
|
2424
|
-
"data": data$
|
2425
|
+
"data": data$x,
|
2425
2426
|
"name": "angleDown"
|
2426
2427
|
}), null);
|
2427
2428
|
};
|
2428
2429
|
angleDown.displayName = "angleDown";
|
2429
2430
|
angleDown.inheritAttrs = false;
|
2430
|
-
const data$
|
2431
|
+
const data$w = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M376 504L600 280 648 328 472 504 648 680 600 728 376 504z"}}]}');
|
2431
2432
|
const angleLeft = (props, context) => {
|
2432
2433
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2433
2434
|
return createVNode(bkIcon, mergeProps(p2, {
|
2434
|
-
"data": data$
|
2435
|
+
"data": data$w,
|
2435
2436
|
"name": "angleLeft"
|
2436
2437
|
}), null);
|
2437
2438
|
};
|
2438
2439
|
angleLeft.displayName = "angleLeft";
|
2439
2440
|
angleLeft.inheritAttrs = false;
|
2440
|
-
const data$
|
2441
|
+
const data$v = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M424 728L376 680 552 504 376 328 424 280 648 504 424 728z"}}]}');
|
2441
2442
|
const angleRight = (props, context) => {
|
2442
2443
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2443
2444
|
return createVNode(bkIcon, mergeProps(p2, {
|
2444
|
-
"data": data$
|
2445
|
+
"data": data$v,
|
2445
2446
|
"name": "angleRight"
|
2446
2447
|
}), null);
|
2447
2448
|
};
|
2448
2449
|
angleRight.displayName = "angleRight";
|
2449
2450
|
angleRight.inheritAttrs = false;
|
2450
|
-
const data$
|
2451
|
+
const data$u = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 704L96 256 187.04 256 512 256 836.96 256 928 256 512 704z"}}]}');
|
2451
2452
|
const angleUpFill = (props, context) => {
|
2452
2453
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2453
2454
|
return createVNode(bkIcon, mergeProps(p2, {
|
2454
|
-
"data": data$
|
2455
|
+
"data": data$u,
|
2455
2456
|
"name": "angleUpFill"
|
2456
2457
|
}), null);
|
2457
2458
|
};
|
2458
2459
|
angleUpFill.displayName = "angleUpFill";
|
2459
2460
|
angleUpFill.inheritAttrs = false;
|
2460
|
-
const data$
|
2461
|
+
const data$t = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 368L736 592 688 640 512 464 336 640 288 592 512 368z"}}]}');
|
2461
2462
|
const angleUp = (props, context) => {
|
2462
2463
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2463
2464
|
return createVNode(bkIcon, mergeProps(p2, {
|
2464
|
-
"data": data$
|
2465
|
+
"data": data$t,
|
2465
2466
|
"name": "angleUp"
|
2466
2467
|
}), null);
|
2467
2468
|
};
|
2468
2469
|
angleUp.displayName = "angleUp";
|
2469
2470
|
angleUp.inheritAttrs = false;
|
2470
|
-
const data$
|
2471
|
+
const data$s = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","class":"bk-icon","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M416 480h320v64H416l96 96-48 48L288 512l176-176L512 384 416 480z"}}]}');
|
2471
2472
|
const arrowsLeft = (props, context) => {
|
2472
2473
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2473
2474
|
return createVNode(bkIcon, mergeProps(p2, {
|
2474
|
-
"data": data$
|
2475
|
+
"data": data$s,
|
2475
2476
|
"name": "arrowsLeft"
|
2476
2477
|
}), null);
|
2477
2478
|
};
|
2478
2479
|
arrowsLeft.displayName = "arrowsLeft";
|
2479
2480
|
arrowsLeft.inheritAttrs = false;
|
2480
|
-
const data$
|
2481
|
+
const data$r = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M608 480H288v64H608l-96 96 48 48L736 512l-176-176L512 384Z"}}]}');
|
2481
2482
|
const arrowsRight = (props, context) => {
|
2482
2483
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2483
2484
|
return createVNode(bkIcon, mergeProps(p2, {
|
2484
|
-
"data": data$
|
2485
|
+
"data": data$r,
|
2485
2486
|
"name": "arrowsRight"
|
2486
2487
|
}), null);
|
2487
2488
|
};
|
2488
2489
|
arrowsRight.displayName = "arrowsRight";
|
2489
2490
|
arrowsRight.inheritAttrs = false;
|
2490
2491
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M384 289.28c103.50933333333333 18.986666666666665 183.89333333333332 99.37066666666666 202.62399999999997 201.344l5.3759999999999994 37.376c1.664 83.62666666666667 32.59733333333333 159.7013333333333 82.94399999999999 218.70933333333335 32.72533333333333 37.84533333333333 81.024 62.29333333333333 135.08266666666665 63.53066666666667 2.9013333333333335 0.128 6.0586666666666655 0.21333333333333332 9.216 0.21333333333333332 49.834666666666664 0 95.488-17.962666666666664 130.81599999999997-47.78666666666667 47.40266666666666-42.367999999999995 77.312-104.10666666666665 77.312-172.79999999999998 0-13.952-1.2373333333333334-27.562666666666665-3.584-40.831999999999994-15.786666666666665-115.62666666666667-96.29866666666666-210.43200000000002-203.73333333333335-246.91199999999998-5.8453333333333335-59.98933333333333-33.49333333333333-112.21333333333332-75.47733333333332-148.224-37.33333333333333-34.432-87.03999999999999-55.42399999999999-141.61066666666665-55.42399999999999-15.445333333333332 0-30.506666666666664 1.664-45.01333333333333 4.864-50.986666666666665 13.141333333333332-95.01866666666666 42.83733333333333-126.208 83.072-5.333333333333333 6.143999999999999-8.362666666666666 13.568-8.362666666666666 21.674666666666667 0 9.685333333333332 4.309333333333333 18.389333333333333 11.136 24.27733333333333l3.8826666666666663 0.042666666666666665c-16.21333333333333-4.053333333333333-34.901333333333326-6.613333333333333-54.10133333333333-7.04-6.101333333333333-0.38399999999999995-12.927999999999999-0.6399999999999999-19.797333333333334-0.6399999999999999s-13.696 0.21333333333333332-20.43733333333333 0.6826666666666666l0.9386666666666665-10.922666666666666c2.1333333333333333-25.813333333333333 17.194666666666667-47.70133333333334 38.656-59.30666666666666 9.173333333333332-6.015999999999999 14.933333333333332-15.872 14.933333333333332-27.093333333333334 0-17.749333333333333-14.378666666666668-32.128-32.128-32.128-6.528 0-12.629333333333332 1.9626666666666666-17.706666666666663 5.333333333333333-21.290666666666667 13.653333333333332-38.18666666666667 32.81066666666666-48.81066666666666 55.42399999999999-15.274666666666665-6.442666666666666-32.85333333333333-10.709333333333333-51.413333333333334-10.709333333333333-8.661333333333333 0-17.109333333333332 0.9386666666666665-25.258666666666663 2.6879999999999997-14.037333333333333 3.1999999999999997-24.959999999999997 16.256-24.959999999999997 31.872 0 18.090666666666664 14.677333333333332 32.768 32.768 32.768 2.474666666666667 0 4.906666666666666-0.29866666666666664 7.253333333333334-0.8106666666666666 2.1333333333333333-0.29866666666666664 4.8213333333333335-0.512 7.552-0.512 18.048 0 34.176 8.405333333333333 44.629333333333335 21.546666666666667l0.08533333333333333 0.128c-122.24000000000001 28.16-197.12 139.51999999999998-240 236.79999999999998-33.28 74.88-80.63999999999999 215.67999999999998-24.319999999999997 316.79999999999995 29.610666666666663 61.056 88.96 103.55199999999999 158.72 108.75733333333332l704.64 0.042666666666666665c17.663999999999998 0 32-14.336 32-32s-14.336-32-32-32h-704c-46.848-4.906666666666666-85.80266666666667-34.474666666666664-103.97866666666665-75.34933333333333-44.50133333333333-80.17066666666666 3.498666666666667-208.81066666666666 26.538666666666664-260.65066666666667 65.91999999999999-147.2 156.79999999999998-217.59999999999997 275.84-206.71999999999997zM480 229.12c22.826666666666668-30.976 55.296-53.63199999999999 92.88533333333334-63.744 10.069333333333333-2.1759999999999997 20.266666666666666-3.2426666666666666 30.72-3.2426666666666666 37.888 0 72.448 14.250666666666667 98.60266666666666 37.67466666666667 31.786666666666665 28.8 51.754666666666665 70.39999999999999 51.754666666666665 116.69333333333333 0 1.2373333333333334 0 2.474666666666667-0.042666666666666665 3.7119999999999997l0 32.46933333333333 24.959999999999997 3.84c95.27466666666666 23.296 167.25333333333333 101.50399999999999 180.992 198.4 1.92 10.495999999999999 2.944 21.119999999999997 2.944 32 0 52.522666666666666-23.59466666666667 99.49866666666665-60.75733333333333 130.98666666666665-21.503999999999998 16.554666666666666-48.512 26.368-77.824 26.368-4.224 0-8.448-0.21333333333333332-12.586666666666666-0.5973333333333333 0.512 0.042666666666666665 0.512 0.042666666666666665 0.512 0.042666666666666665-35.583999999999996 0-67.54133333333333-15.530666666666665-89.472-40.19199999999999-39.38133333333333-48.768-63.40266666666666-111.18933333333332-64.08533333333332-179.15733333333333l-5.76-42.410666666666664c-22.954666666666668-111.744-100.30933333333333-201.38666666666666-202.58133333333333-241.152-1.1093333333333333-0.6399999999999999 0.21333333333333332-0.5546666666666666 1.5359999999999998-0.5546666666666666 10.239999999999998 0 19.413333333333334-4.522666666666666 25.599999999999998-11.690666666666667z"}}]}');
|
2491
|
-
const data$
|
2492
|
+
const data$q = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 0c-17.919999999999998 0-32 14.08-32 32s14.08 32 32 32c247.04 0 448 200.95999999999998 448 448 0 17.919999999999998 14.08 32 32 32s32-14.08 32-32c0-282.24-229.76-512-512-512z"}}]}');
|
2492
2493
|
const circle = (props, context) => {
|
2493
2494
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2494
2495
|
return createVNode(bkIcon, mergeProps(p2, {
|
2495
|
-
"data": data$
|
2496
|
+
"data": data$q,
|
2496
2497
|
"name": "circle"
|
2497
2498
|
}), null);
|
2498
2499
|
};
|
2499
2500
|
circle.displayName = "circle";
|
2500
2501
|
circle.inheritAttrs = false;
|
2501
|
-
const data$
|
2502
|
+
const data$p = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M902.56 166.56L857.44 121.44 512 466.72 166.56 121.44 121.44 166.56 466.72 512 121.44 857.44 166.56 902.56 512 557.28 857.44 902.56 902.56 857.44 557.28 512 902.56 166.56z"}}]}');
|
2503
|
+
const closeLine = (props, context) => {
|
2504
|
+
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2505
|
+
return createVNode(bkIcon, mergeProps(p2, {
|
2506
|
+
"data": data$p,
|
2507
|
+
"name": "closeLine"
|
2508
|
+
}), null);
|
2509
|
+
};
|
2510
|
+
closeLine.displayName = "closeLine";
|
2511
|
+
closeLine.inheritAttrs = false;
|
2512
|
+
const data$o = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","class":"bk-icon","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;","overflow":"hidden","viewBox":"0 0 1024 1024"},"elements":[{"type":"element","name":"path","attributes":{"d":"M512 64C264.6 64 64 264.6 64 512s200.6 448 448 448 448-200.6 448-448S759.4 64 512 64zM670.4 625.1l-45.3 45.3L512 557.3 398.9 670.4l-45.3-45.3L466.7 512 353.6 398.9l45.3-45.3L512 466.7l113.1-113.1 45.3 45.3L557.3 512 670.4 625.1z"}}]}');
|
2502
2513
|
const close$1 = (props, context) => {
|
2503
2514
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2504
2515
|
return createVNode(bkIcon, mergeProps(p2, {
|
2505
|
-
"data": data$
|
2516
|
+
"data": data$o,
|
2506
2517
|
"name": "close"
|
2507
2518
|
}), null);
|
2508
2519
|
};
|
2509
2520
|
close$1.displayName = "close";
|
2510
2521
|
close$1.inheritAttrs = false;
|
2511
2522
|
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M1011.1999999999999 489.59999999999997l-224-224c-12.799999999999999-12.799999999999999-32.64-12.799999999999999-45.44 0s-12.799999999999999 32.64 0 45.44l201.59999999999997 200.95999999999998-201.59999999999997 201.59999999999997c-12.799999999999999 12.799999999999999-12.799999999999999 32.64 0 45.44 6.3999999999999995 6.3999999999999995 14.719999999999999 9.6 22.4 9.6s16.64-3.1999999999999997 22.4-9.6l224-224c12.799999999999999-12.799999999999999 12.799999999999999-33.28 0.6399999999999999-45.44z"}},{"type":"element","name":"path","attributes":{"d":"M282.24 265.59999999999997c-12.799999999999999-12.799999999999999-32.64-12.799999999999999-45.44 0l-224 224c-12.799999999999999 12.799999999999999-12.799999999999999 32.64 0 45.44l224 224c6.3999999999999995 5.76 14.719999999999999 8.959999999999999 23.04 8.959999999999999s16.64-3.1999999999999997 22.4-9.6c12.799999999999999-12.799999999999999 12.799999999999999-32.64 0-45.44l-201.59999999999997-200.95999999999998 201.59999999999997-201.59999999999997c12.159999999999998-12.159999999999998 12.159999999999998-32.64 0-44.8z"}},{"type":"element","name":"path","attributes":{"d":"M616.3199999999999 129.27999999999997c-16.64-5.119999999999999-34.56 5.119999999999999-39.04 22.4l-192 704c-4.4799999999999995 17.28 5.119999999999999 34.56 22.4 39.04 2.5599999999999996 0.6399999999999999 5.76 1.2799999999999998 8.32 1.2799999999999998 14.08 0 26.88-9.6 30.72-23.68l192-704c4.4799999999999995-16.64-5.119999999999999-34.56-22.4-39.04z"}}]}');
|
2512
|
-
JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M608 512A96 96 0 0 1 512 608 96 96 0 0 1 416 512 96 96 0 0 1 608 512z"}},{"type":"element","name":"path","attributes":{"d":"M860.8 558.4c4.8-30.4 4.8-62.4 0-92.8l67.2-57.6c9.6-8 14.4-22.4 9.6-35.2-19.2-59.2-51.2-115.2-92.8-161.6-6.4-6.4-14.4-11.2-24-11.2-3.2 0-8 0-11.2 1.6l-83.2 30.4c-24-19.2-52.8-35.2-81.6-46.4l-16-86.4c-1.6-12.8-12.8-22.4-25.6-25.6-60.8-12.8-124.8-12.8-185.6 0-12.8 3.2-22.4 12.8-24 25.6l-16 86.4c-28.8 11.2-56 27.2-81.6 46.4l-83.2-30.4c-3.2-1.6-6.4-1.6-11.2-1.6-9.6 0-17.6 3.2-24 11.2-41.6 46.4-73.6 100.8-92.8 161.6-4.8 12.8 0 27.2 9.6 35.2l67.2 57.6C160 496 160 528 163.2 558.4L96 616c-9.6 8-14.4 22.4-9.6 35.2 19.2 59.2 51.2 115.2 92.8 161.6 6.4 6.4 14.4 11.2 24 11.2 3.2 0 8 0 11.2-1.6l83.2-30.4c24 19.2 52.8 35.2 81.6 46.4l16 86.4c1.6 12.8 12.8 22.4 25.6 25.6 60.8 12.8 124.8 12.8 185.6 0 12.8-3.2 22.4-12.8 25.6-25.6l16-86.4c28.8-11.2 56-27.2 81.6-46.4l83.2 30.4c3.2 1.6 6.4 1.6 11.2 1.6 9.6 0 17.6-3.2 24-11.2 41.6-46.4 73.6-100.8 92.8-161.6 3.2-12.8 0-27.2-11.2-35.2L860.8 558.4zM512 672c-88 0-160-72-160-160s72-160 160-160 160 72 160 160S600 672 512 672z"}}]}');
|
2523
|
+
const data$n = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M608 512A96 96 0 0 1 512 608 96 96 0 0 1 416 512 96 96 0 0 1 608 512z"}},{"type":"element","name":"path","attributes":{"d":"M860.8 558.4c4.8-30.4 4.8-62.4 0-92.8l67.2-57.6c9.6-8 14.4-22.4 9.6-35.2-19.2-59.2-51.2-115.2-92.8-161.6-6.4-6.4-14.4-11.2-24-11.2-3.2 0-8 0-11.2 1.6l-83.2 30.4c-24-19.2-52.8-35.2-81.6-46.4l-16-86.4c-1.6-12.8-12.8-22.4-25.6-25.6-60.8-12.8-124.8-12.8-185.6 0-12.8 3.2-22.4 12.8-24 25.6l-16 86.4c-28.8 11.2-56 27.2-81.6 46.4l-83.2-30.4c-3.2-1.6-6.4-1.6-11.2-1.6-9.6 0-17.6 3.2-24 11.2-41.6 46.4-73.6 100.8-92.8 161.6-4.8 12.8 0 27.2 9.6 35.2l67.2 57.6C160 496 160 528 163.2 558.4L96 616c-9.6 8-14.4 22.4-9.6 35.2 19.2 59.2 51.2 115.2 92.8 161.6 6.4 6.4 14.4 11.2 24 11.2 3.2 0 8 0 11.2-1.6l83.2-30.4c24 19.2 52.8 35.2 81.6 46.4l16 86.4c1.6 12.8 12.8 22.4 25.6 25.6 60.8 12.8 124.8 12.8 185.6 0 12.8-3.2 22.4-12.8 25.6-25.6l16-86.4c28.8-11.2 56-27.2 81.6-46.4l83.2 30.4c3.2 1.6 6.4 1.6 11.2 1.6 9.6 0 17.6-3.2 24-11.2 41.6-46.4 73.6-100.8 92.8-161.6 3.2-12.8 0-27.2-11.2-35.2L860.8 558.4zM512 672c-88 0-160-72-160-160s72-160 160-160 160 72 160 160S600 672 512 672z"}}]}');
|
2524
|
+
const cogShape = (props, context) => {
|
2525
|
+
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
2526
|
+
return createVNode(bkIcon, mergeProps(p2, {
|
2527
|
+
"data": data$n,
|
2528
|
+
"name": "cogShape"
|
2529
|
+
}), null);
|
2530
|
+
};
|
2531
|
+
cogShape.displayName = "cogShape";
|
2532
|
+
cogShape.inheritAttrs = false;
|
2513
2533
|
const data$m = JSON.parse('{"type":"element","name":"svg","attributes":{"xmlns":"http://www.w3.org/2000/svg","viewBox":"0 0 1024 1024","style":"width: 1em; height: 1em; vertical-align: middle;fill: currentColor;overflow: hidden;"},"elements":[{"type":"element","name":"path","attributes":{"d":"M496 216l-76.32 76.32 152.64 152.8H64v101.76H572.16l-152.48 152.8L496 776 775.52 496Zm362.4 0v560H960v-560Z"}}]}');
|
2514
2534
|
const collapseLeft = (props, context) => {
|
2515
2535
|
const p2 = __spreadValues(__spreadValues({}, props), context.attrs);
|
@@ -8283,7 +8303,7 @@ var Component$u = defineComponent({
|
|
8283
8303
|
setup(props, {
|
8284
8304
|
slots
|
8285
8305
|
}) {
|
8286
|
-
const
|
8306
|
+
const container2 = ref(null);
|
8287
8307
|
const el = ref(null);
|
8288
8308
|
const visible = ref(false);
|
8289
8309
|
const zIndex = ref(bkZIndexManager.getModalNextIndex());
|
@@ -8302,19 +8322,19 @@ var Component$u = defineComponent({
|
|
8302
8322
|
zIndex.value = bkZIndexManager.getModalNextIndex();
|
8303
8323
|
});
|
8304
8324
|
onMounted(() => {
|
8305
|
-
|
8325
|
+
container2.value = document;
|
8306
8326
|
el.value = document.documentElement;
|
8307
8327
|
if (props.target) {
|
8308
8328
|
el.value = document.querySelector(props.target);
|
8309
8329
|
if (!el.value) {
|
8310
8330
|
throw new Error("target does not exist");
|
8311
8331
|
}
|
8312
|
-
|
8332
|
+
container2.value = el.value;
|
8313
8333
|
}
|
8314
|
-
|
8334
|
+
container2.value.addEventListener("scroll", scrollHandler);
|
8315
8335
|
});
|
8316
8336
|
onBeforeUnmount(() => {
|
8317
|
-
|
8337
|
+
container2.value.removeEventListener("scroll", scrollHandler);
|
8318
8338
|
});
|
8319
8339
|
return () => createVNode(Transition, {
|
8320
8340
|
"name": "bk-fade"
|
@@ -8737,6 +8757,7 @@ var Component$p = defineComponent({
|
|
8737
8757
|
"class",
|
8738
8758
|
"style"
|
8739
8759
|
]);
|
8760
|
+
const inputRef = ref();
|
8740
8761
|
const inputCls = computed(() => classes({
|
8741
8762
|
[`${inputClsPrefix.value}--${props.size}`]: !!props.size,
|
8742
8763
|
"is-focused": isFocused.value,
|
@@ -8770,6 +8791,12 @@ var Component$p = defineComponent({
|
|
8770
8791
|
const clearCls = computed(() => classes({
|
8771
8792
|
"show-clear-only-hover": props.showClearOnlyHover
|
8772
8793
|
}, suffixCls));
|
8794
|
+
ctx.expose({
|
8795
|
+
focus() {
|
8796
|
+
inputRef.value.focus();
|
8797
|
+
},
|
8798
|
+
clear
|
8799
|
+
});
|
8773
8800
|
function clear() {
|
8774
8801
|
ctx.emit(EventEnum["update:modelValue"], "");
|
8775
8802
|
ctx.emit(EventEnum.change, "");
|
@@ -8785,18 +8812,15 @@ var Component$p = defineComponent({
|
|
8785
8812
|
}
|
8786
8813
|
function eventHandler(eventName) {
|
8787
8814
|
return (e) => {
|
8788
|
-
let originEventName = eventName;
|
8789
8815
|
if (e.code === "Enter" || e.key === "Enter" || e.keyCode === 13) {
|
8790
|
-
|
8791
|
-
if (e.type !== EventEnum.keyup)
|
8792
|
-
return;
|
8816
|
+
ctx.emit(EventEnum.enter, e.target.value, e);
|
8793
8817
|
}
|
8794
8818
|
if (isCNInput.value && [EventEnum.input, EventEnum.change].some((e2) => eventName === e2))
|
8795
8819
|
return;
|
8796
8820
|
if (eventName === EventEnum.input) {
|
8797
8821
|
ctx.emit(EventEnum["update:modelValue"], isNumberInput.value ? +e.target.value : e.target.value);
|
8798
8822
|
}
|
8799
|
-
ctx.emit(
|
8823
|
+
ctx.emit(eventName, e.target.value, e);
|
8800
8824
|
};
|
8801
8825
|
}
|
8802
8826
|
const [handleKeyup, handleKeydown, handleKeyPress, handlePaste, handleChange, handleInput] = [EventEnum.keyup, EventEnum.keydown, EventEnum.keypress, EventEnum.paste, EventEnum.change, EventEnum.input].map(eventHandler);
|
@@ -8861,9 +8885,12 @@ var Component$p = defineComponent({
|
|
8861
8885
|
"class": getCls("prefix-area")
|
8862
8886
|
}, [createVNode("span", {
|
8863
8887
|
"class": getCls("prefix-area--text")
|
8864
|
-
}, [props.prefix])]), isTextArea.value ? createVNode("textarea", mergeProps(
|
8888
|
+
}, [props.prefix])]), isTextArea.value ? createVNode("textarea", mergeProps({
|
8889
|
+
"ref": inputRef
|
8890
|
+
}, inputAttrs, bindProps.value, {
|
8865
8891
|
"rows": props.rows
|
8866
8892
|
}), null) : createVNode("input", mergeProps(inputAttrs, {
|
8893
|
+
"ref": inputRef,
|
8867
8894
|
"class": `${inputClsPrefix.value}--text`,
|
8868
8895
|
"type": pwdVisible.value && props.type === "password" ? "text" : props.type,
|
8869
8896
|
"step": props.step,
|
@@ -9275,69 +9302,19 @@ var Component$m = defineComponent({
|
|
9275
9302
|
});
|
9276
9303
|
const BkCollaspe = withInstall(Component$m);
|
9277
9304
|
const propsMixin$1 = {
|
9278
|
-
isShow:
|
9279
|
-
|
9280
|
-
|
9281
|
-
|
9282
|
-
|
9283
|
-
|
9284
|
-
|
9285
|
-
|
9286
|
-
|
9287
|
-
|
9288
|
-
|
9289
|
-
|
9290
|
-
|
9291
|
-
type: [Array, String],
|
9292
|
-
default: ""
|
9293
|
-
},
|
9294
|
-
scrollable: {
|
9295
|
-
type: Boolean,
|
9296
|
-
default: true
|
9297
|
-
},
|
9298
|
-
showMask: {
|
9299
|
-
type: Boolean,
|
9300
|
-
default: true
|
9301
|
-
},
|
9302
|
-
closeIcon: {
|
9303
|
-
type: Boolean,
|
9304
|
-
default: true
|
9305
|
-
},
|
9306
|
-
escClose: {
|
9307
|
-
type: Boolean,
|
9308
|
-
default: true
|
9309
|
-
},
|
9310
|
-
maskClose: {
|
9311
|
-
type: Boolean,
|
9312
|
-
default: true
|
9313
|
-
},
|
9314
|
-
fullscreen: {
|
9315
|
-
type: Boolean,
|
9316
|
-
default: false
|
9317
|
-
},
|
9318
|
-
size: {
|
9319
|
-
type: String,
|
9320
|
-
default: "normal",
|
9321
|
-
validator: (value) => {
|
9322
|
-
const dialogSize = ["normal", "small", "medium", "large"];
|
9323
|
-
if (dialogSize.indexOf(value) < 0) {
|
9324
|
-
console.error(`dialogSize property is not valid: '${value}',\u3010${dialogSize.join(" | ")}\u3011`);
|
9325
|
-
return false;
|
9326
|
-
}
|
9327
|
-
return true;
|
9328
|
-
}
|
9329
|
-
},
|
9330
|
-
renderDirective: {
|
9331
|
-
type: String,
|
9332
|
-
default: "show",
|
9333
|
-
validator: (value) => {
|
9334
|
-
if (["show", "if"].indexOf(value) < 0) {
|
9335
|
-
console.error(`type render-directive is not valid: '${value}'`);
|
9336
|
-
return false;
|
9337
|
-
}
|
9338
|
-
return true;
|
9339
|
-
}
|
9340
|
-
}
|
9305
|
+
isShow: PropTypes.bool.def(false),
|
9306
|
+
width: PropTypes.oneOfType([String, Number]),
|
9307
|
+
height: PropTypes.oneOfType([String, Number]),
|
9308
|
+
customClass: PropTypes.string || PropTypes.array,
|
9309
|
+
scrollable: PropTypes.bool.def(true),
|
9310
|
+
showMask: PropTypes.bool.def(true),
|
9311
|
+
closeIcon: PropTypes.bool.def(true),
|
9312
|
+
escClose: PropTypes.bool.def(true),
|
9313
|
+
maskClose: PropTypes.bool.def(true),
|
9314
|
+
fullscreen: PropTypes.bool.def(false),
|
9315
|
+
size: PropTypes.commonType(["normal", "small", "medium", "large"], "size").def("normal"),
|
9316
|
+
draggable: PropTypes.bool.def(true),
|
9317
|
+
dialogType: PropTypes.commonType(["show", "operation", "confirm", "process"], "dialogType").def("operation")
|
9341
9318
|
};
|
9342
9319
|
var Component$l = defineComponent({
|
9343
9320
|
name: "Modal",
|
@@ -9387,23 +9364,30 @@ var Component$l = defineComponent({
|
|
9387
9364
|
bkPopIndexManager.hide(this.$el);
|
9388
9365
|
},
|
9389
9366
|
render() {
|
9390
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
9367
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i, _j, _k, _l, _m, _n, _o;
|
9391
9368
|
return createVNode("div", {
|
9392
|
-
"class": ["bk-modal-wrapper", this.
|
9369
|
+
"class": ["bk-modal-wrapper", this.customClass],
|
9393
9370
|
"style": this.compStyle
|
9394
|
-
}, [this.isShow ? createVNode("div", {
|
9371
|
+
}, [this.isShow && this.dialogType === "show" ? createVNode("div", {
|
9395
9372
|
"class": "bk-modal-body"
|
9396
9373
|
}, [createVNode("div", {
|
9397
9374
|
"class": "bk-modal-header"
|
9398
9375
|
}, [(_c = (_b = (_a = this.$slots).header) == null ? void 0 : _b.call(_a)) != null ? _c : ""]), createVNode("div", {
|
9376
|
+
"class": "bk-modal-content",
|
9377
|
+
"style": "height: calc(100% - 74px);margin-bottom: 0px;"
|
9378
|
+
}, [(_f = (_e = (_d = this.$slots).default) == null ? void 0 : _e.call(_d)) != null ? _f : ""])]) : createVNode("div", {
|
9379
|
+
"class": "bk-modal-body"
|
9380
|
+
}, [createVNode("div", {
|
9381
|
+
"class": "bk-modal-header"
|
9382
|
+
}, [(_i = (_h = (_g = this.$slots).header) == null ? void 0 : _h.call(_g)) != null ? _i : ""]), createVNode("div", {
|
9399
9383
|
"class": "bk-modal-content"
|
9400
|
-
}, [(
|
9384
|
+
}, [(_l = (_k = (_j = this.$slots).default) == null ? void 0 : _k.call(_j)) != null ? _l : ""]), createVNode("div", {
|
9401
9385
|
"class": "bk-modal-footer"
|
9402
|
-
}, [(
|
9386
|
+
}, [(_o = (_n = (_m = this.$slots).footer) == null ? void 0 : _n.call(_m)) != null ? _o : ""])])]);
|
9403
9387
|
}
|
9404
9388
|
});
|
9405
9389
|
const BkModal = withInstallProps(Component$l, { propsMixin: propsMixin$1 }, true);
|
9406
|
-
function _isSlot$
|
9390
|
+
function _isSlot$5(s2) {
|
9407
9391
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
9408
9392
|
}
|
9409
9393
|
var Component$k = defineComponent({
|
@@ -9413,96 +9397,131 @@ var Component$k = defineComponent({
|
|
9413
9397
|
BkButton
|
9414
9398
|
},
|
9415
9399
|
props: __spreadProps(__spreadValues({}, propsMixin$1), {
|
9416
|
-
width:
|
9417
|
-
|
9418
|
-
|
9419
|
-
|
9420
|
-
|
9421
|
-
|
9422
|
-
|
9423
|
-
|
9424
|
-
|
9425
|
-
|
9426
|
-
|
9427
|
-
|
9428
|
-
|
9429
|
-
|
9430
|
-
|
9431
|
-
|
9432
|
-
|
9433
|
-
|
9434
|
-
|
9435
|
-
|
9436
|
-
|
9437
|
-
|
9438
|
-
|
9439
|
-
|
9440
|
-
const textAlign = ["left", "center", "right"];
|
9441
|
-
if (textAlign.indexOf(value) < 0) {
|
9442
|
-
console.error(`headerAlign property is not valid: '${value}',\u3010${textAlign.join(" | ")}\u3011`);
|
9443
|
-
return false;
|
9444
|
-
}
|
9445
|
-
return true;
|
9400
|
+
width: PropTypes.oneOfType([String, Number]).def(""),
|
9401
|
+
height: PropTypes.oneOfType([String, Number]).def(""),
|
9402
|
+
confirmText: PropTypes.string.def("\u786E\u5B9A"),
|
9403
|
+
cancelText: PropTypes.string.def("\u53D6\u6D88"),
|
9404
|
+
prevText: PropTypes.string.def("\u4E0A\u4E00\u6B65"),
|
9405
|
+
nextText: PropTypes.string.def("\u4E0B\u4E00\u6B65"),
|
9406
|
+
current: PropTypes.number.def(1),
|
9407
|
+
totalStep: PropTypes.number,
|
9408
|
+
title: PropTypes.string.def("title"),
|
9409
|
+
headerAlign: PropTypes.commonType(["left", "center", "right"], "headerAlign").def("left"),
|
9410
|
+
footerAlign: PropTypes.commonType(["left", "center", "right"], "footerAlign").def("right"),
|
9411
|
+
theme: PropTypes.commonType(["primary", "warning", "success", "danger"], "theme").def("primary"),
|
9412
|
+
isLoading: PropTypes.bool.def(false)
|
9413
|
+
}),
|
9414
|
+
emits: ["closed", "update:isShow", "confirm", "prev", "next"],
|
9415
|
+
setup(props, {
|
9416
|
+
emit
|
9417
|
+
}) {
|
9418
|
+
const data2 = reactive({
|
9419
|
+
positionX: 0,
|
9420
|
+
positionY: 0,
|
9421
|
+
moveStyle: {
|
9422
|
+
top: "",
|
9423
|
+
left: ""
|
9446
9424
|
}
|
9447
|
-
}
|
9448
|
-
|
9449
|
-
|
9450
|
-
|
9451
|
-
validator: (value) => {
|
9452
|
-
const textAlign = ["left", "center", "right"];
|
9453
|
-
if (textAlign.indexOf(value) < 0) {
|
9454
|
-
console.error(`footerAlign property is not valid: '${value}',\u3010${textAlign.join(" | ")}\u3011`);
|
9455
|
-
return false;
|
9456
|
-
}
|
9457
|
-
return true;
|
9425
|
+
});
|
9426
|
+
onMounted(() => {
|
9427
|
+
if (props.escClose) {
|
9428
|
+
addEventListener("keydown", escCloseHandler);
|
9458
9429
|
}
|
9459
|
-
}
|
9460
|
-
|
9461
|
-
|
9462
|
-
|
9463
|
-
validator: (value) => {
|
9464
|
-
if (["primary", "warning", "success", "danger"].indexOf(value) < 0) {
|
9465
|
-
console.error(`theme property is not valid: '${value}'`);
|
9466
|
-
return false;
|
9467
|
-
}
|
9468
|
-
return true;
|
9430
|
+
});
|
9431
|
+
onBeforeUnmount(() => {
|
9432
|
+
if (props.escClose) {
|
9433
|
+
removeEventListener("keydown", escCloseHandler);
|
9469
9434
|
}
|
9470
|
-
}
|
9471
|
-
|
9472
|
-
|
9473
|
-
|
9474
|
-
|
9475
|
-
|
9476
|
-
|
9477
|
-
|
9478
|
-
|
9479
|
-
|
9480
|
-
|
9481
|
-
|
9482
|
-
|
9483
|
-
|
9484
|
-
|
9485
|
-
|
9486
|
-
|
9487
|
-
|
9488
|
-
|
9489
|
-
|
9490
|
-
|
9491
|
-
},
|
9492
|
-
escCloseHandler(e) {
|
9493
|
-
if (this.isShow && this.closeIcon) {
|
9435
|
+
});
|
9436
|
+
watch(() => props.isShow, (val) => {
|
9437
|
+
if (!val) {
|
9438
|
+
data2.moveStyle = {
|
9439
|
+
top: "50%",
|
9440
|
+
left: "50%"
|
9441
|
+
};
|
9442
|
+
data2.positionX = 0;
|
9443
|
+
data2.positionY = 0;
|
9444
|
+
}
|
9445
|
+
});
|
9446
|
+
const handleClose = () => {
|
9447
|
+
emit("update:isShow", false);
|
9448
|
+
emit("closed");
|
9449
|
+
};
|
9450
|
+
const handleConfirm = () => {
|
9451
|
+
emit("update:isShow", false);
|
9452
|
+
emit("confirm");
|
9453
|
+
};
|
9454
|
+
const escCloseHandler = (e) => {
|
9455
|
+
if (props.isShow && props.closeIcon) {
|
9494
9456
|
if (e.keyCode === 27) {
|
9495
|
-
|
9457
|
+
handleClose();
|
9496
9458
|
}
|
9497
9459
|
}
|
9498
|
-
}
|
9460
|
+
};
|
9461
|
+
const handlePrevStep = () => {
|
9462
|
+
emit("prev");
|
9463
|
+
};
|
9464
|
+
const handleNextStep = () => {
|
9465
|
+
emit("next");
|
9466
|
+
};
|
9467
|
+
const moveHandler = (e) => {
|
9468
|
+
if (props.fullscreen) {
|
9469
|
+
return false;
|
9470
|
+
}
|
9471
|
+
const odiv = e.target;
|
9472
|
+
const parentHeight = e.currentTarget.parentNode.parentNode.offsetHeight;
|
9473
|
+
const parentWidth = e.currentTarget.parentNode.parentNode.offsetWidth;
|
9474
|
+
let disX;
|
9475
|
+
let disY;
|
9476
|
+
if (data2.positionX !== 0 && data2.positionY !== 0) {
|
9477
|
+
disX = e.clientX - data2.positionX;
|
9478
|
+
disY = e.clientY - data2.positionY;
|
9479
|
+
} else {
|
9480
|
+
disX = e.clientX - odiv.offsetLeft;
|
9481
|
+
disY = e.clientY - odiv.offsetTop;
|
9482
|
+
}
|
9483
|
+
document.onmousemove = (e2) => {
|
9484
|
+
const boxLeft = window.innerWidth - parentWidth;
|
9485
|
+
const boxTop = window.innerHeight - parentHeight;
|
9486
|
+
let left2 = e2.clientX - disX;
|
9487
|
+
let top2 = e2.clientY - disY;
|
9488
|
+
if (boxLeft / 2 - left2 <= 0) {
|
9489
|
+
left2 = boxLeft / 2;
|
9490
|
+
} else if (boxLeft / 2 + left2 <= 0) {
|
9491
|
+
left2 = -boxLeft / 2;
|
9492
|
+
}
|
9493
|
+
if (boxTop / 2 - top2 <= 0) {
|
9494
|
+
top2 = boxTop / 2;
|
9495
|
+
} else if (boxTop / 2 + top2 <= 0) {
|
9496
|
+
top2 = -boxTop / 2;
|
9497
|
+
}
|
9498
|
+
data2.positionX = left2;
|
9499
|
+
data2.positionY = top2;
|
9500
|
+
data2.moveStyle.left = `calc(50% + ${left2}px)`;
|
9501
|
+
data2.moveStyle.top = `calc(50% + ${top2}px)`;
|
9502
|
+
};
|
9503
|
+
document.onmouseup = () => {
|
9504
|
+
document.onmousemove = null;
|
9505
|
+
document.onmouseup = null;
|
9506
|
+
};
|
9507
|
+
};
|
9508
|
+
return {
|
9509
|
+
data: data2,
|
9510
|
+
handleClose,
|
9511
|
+
handleConfirm,
|
9512
|
+
escCloseHandler,
|
9513
|
+
moveHandler,
|
9514
|
+
handlePrevStep,
|
9515
|
+
handleNextStep
|
9516
|
+
};
|
9499
9517
|
},
|
9500
9518
|
render() {
|
9501
9519
|
const dialogSlot = {
|
9502
9520
|
header: () => {
|
9503
9521
|
var _a, _b, _c;
|
9504
9522
|
return [createVNode("div", {
|
9505
|
-
"class": "bk-dialog-tool"
|
9523
|
+
"class": ["bk-dialog-tool", this.fullscreen || !this.draggable ? "" : "move", this.draggable ? "content-dragging" : ""],
|
9524
|
+
"onMousedown": this.moveHandler
|
9506
9525
|
}, [createVNode("span", {
|
9507
9526
|
"class": ["bk-dialog-close", this.closeIcon ? "" : "close-icon"],
|
9508
9527
|
"onClick": this.handleClose
|
@@ -9518,27 +9537,56 @@ var Component$k = defineComponent({
|
|
9518
9537
|
return (_c = (_b = (_a = this.$slots).default) == null ? void 0 : _b.call(_a)) != null ? _c : "default";
|
9519
9538
|
},
|
9520
9539
|
footer: () => {
|
9521
|
-
var _a, _b, _c;
|
9540
|
+
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
9522
9541
|
return createVNode("div", {
|
9523
9542
|
"class": "bk-dialog-footer",
|
9524
9543
|
"style": `text-align: ${this.footerAlign}`
|
9525
|
-
}, [(_c = (_b = (_a = this.$slots).footer) == null ? void 0 : _b.call(_a)) != null ? _c : createVNode(Fragment, null, [createVNode(BkButton, {
|
9544
|
+
}, [this.dialogType === "process" ? (_c = (_b = (_a = this.$slots).footer) == null ? void 0 : _b.call(_a)) != null ? _c : createVNode(Fragment, null, [this.current === 1 ? "" : createVNode(BkButton, {
|
9545
|
+
"style": "float: left;margin-right: 8px",
|
9546
|
+
"onClick": this.handlePrevStep
|
9547
|
+
}, {
|
9548
|
+
default: () => [this.prevText]
|
9549
|
+
}), this.current === this.totalStep ? "" : createVNode(BkButton, {
|
9550
|
+
"style": "float: left",
|
9551
|
+
"onClick": this.handleNextStep
|
9552
|
+
}, {
|
9553
|
+
default: () => [this.nextText]
|
9554
|
+
}), this.current === this.totalStep ? createVNode(BkButton, {
|
9555
|
+
"onClick": this.handleConfirm,
|
9556
|
+
"theme": this.theme,
|
9557
|
+
"loading": this.isLoading
|
9558
|
+
}, {
|
9559
|
+
default: () => [this.confirmText]
|
9560
|
+
}) : "", createVNode(BkButton, {
|
9561
|
+
"style": "margin-left: 8px",
|
9562
|
+
"onClick": this.handleClose
|
9563
|
+
}, {
|
9564
|
+
default: () => [this.cancelText]
|
9565
|
+
})]) : "", this.dialogType === "operation" ? (_f = (_e = (_d = this.$slots).footer) == null ? void 0 : _e.call(_d)) != null ? _f : createVNode(Fragment, null, [createVNode(BkButton, {
|
9526
9566
|
"onClick": this.handleConfirm,
|
9527
|
-
"theme": this.theme
|
9567
|
+
"theme": this.theme,
|
9568
|
+
"loading": this.isLoading
|
9528
9569
|
}, {
|
9529
9570
|
default: () => [this.confirmText]
|
9530
9571
|
}), createVNode(BkButton, {
|
9531
|
-
"style": "margin-left: 8px
|
9572
|
+
"style": "margin-left: 8px",
|
9532
9573
|
"onClick": this.handleClose
|
9533
9574
|
}, {
|
9534
9575
|
default: () => [this.cancelText]
|
9535
|
-
})])
|
9576
|
+
})]) : "", this.dialogType === "confirm" ? (_i = (_h = (_g = this.$slots).footer) == null ? void 0 : _h.call(_g)) != null ? _i : createVNode(Fragment, null, [createVNode(BkButton, {
|
9577
|
+
"onClick": this.handleConfirm,
|
9578
|
+
"theme": this.theme,
|
9579
|
+
"loading": this.isLoading
|
9580
|
+
}, {
|
9581
|
+
default: () => [this.confirmText]
|
9582
|
+
})]) : ""]);
|
9536
9583
|
}
|
9537
9584
|
};
|
9538
9585
|
const className = `bk-dialog-wrapper ${this.scrollable ? "scroll-able" : ""}`;
|
9539
9586
|
return createVNode(BkModal, mergeProps(this.$props, {
|
9540
|
-
"class": className
|
9541
|
-
|
9587
|
+
"class": [className, this.fullscreen ? "bk-model-fullscreen" : this.size],
|
9588
|
+
"style": this.data.moveStyle
|
9589
|
+
}), _isSlot$5(dialogSlot) ? dialogSlot : {
|
9542
9590
|
default: () => [dialogSlot]
|
9543
9591
|
});
|
9544
9592
|
}
|
@@ -9975,7 +10023,7 @@ const Line = (_2, {
|
|
9975
10023
|
"style": titleStyle
|
9976
10024
|
}, [showDefault()])])]), showDefault(false)]);
|
9977
10025
|
};
|
9978
|
-
function _isSlot$
|
10026
|
+
function _isSlot$4(s2) {
|
9979
10027
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
9980
10028
|
}
|
9981
10029
|
var Component$f = defineComponent({
|
@@ -10040,11 +10088,11 @@ var Component$f = defineComponent({
|
|
10040
10088
|
const $props = __spreadProps(__spreadValues({}, this.$props), {
|
10041
10089
|
percent: this.validPercent(this.percent)
|
10042
10090
|
});
|
10043
|
-
let progress2 = createVNode(Line, $props, _isSlot$
|
10091
|
+
let progress2 = createVNode(Line, $props, _isSlot$4(progressInfo) ? progressInfo : {
|
10044
10092
|
default: () => [progressInfo]
|
10045
10093
|
});
|
10046
10094
|
if (this.type === "circle" || this.type === "dashboard") {
|
10047
|
-
progress2 = createVNode(Circle, $props, _isSlot$
|
10095
|
+
progress2 = createVNode(Circle, $props, _isSlot$4(progressInfo) ? progressInfo : {
|
10048
10096
|
default: () => [progressInfo]
|
10049
10097
|
});
|
10050
10098
|
}
|
@@ -11695,7 +11743,7 @@ var Component$a = defineComponent({
|
|
11695
11743
|
}
|
11696
11744
|
});
|
11697
11745
|
const BkSelect = withInstallProps(Component$a, { Option: BkOption, Group: OptionGroup });
|
11698
|
-
function _isSlot$
|
11746
|
+
function _isSlot$3(s2) {
|
11699
11747
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
11700
11748
|
}
|
11701
11749
|
const {
|
@@ -11756,7 +11804,7 @@ var Component$9 = defineComponent({
|
|
11756
11804
|
return createVNode(BkModal, mergeProps(this.$props, {
|
11757
11805
|
"class": className,
|
11758
11806
|
"style": `${this.direction}: 0`
|
11759
|
-
}), _isSlot$
|
11807
|
+
}), _isSlot$3(dialogSlot) ? dialogSlot : {
|
11760
11808
|
default: () => [dialogSlot]
|
11761
11809
|
});
|
11762
11810
|
}
|
@@ -12037,7 +12085,7 @@ function getMatchedIndex(maxCount, maxHeight, groupItemCount, callback) {
|
|
12037
12085
|
let diffHeight = 0;
|
12038
12086
|
let lastHeight = 0;
|
12039
12087
|
for (; startIndex < maxCount; startIndex++) {
|
12040
|
-
lastHeight = callback(startIndex, [startIndex * groupItemCount, (startIndex + 1) * groupItemCount]);
|
12088
|
+
lastHeight = callback(startIndex, [startIndex * groupItemCount, (startIndex + 1) * groupItemCount, "virtual"]);
|
12041
12089
|
if (height + lastHeight > maxHeight) {
|
12042
12090
|
diffHeight = maxHeight - height;
|
12043
12091
|
break;
|
@@ -12239,6 +12287,13 @@ var Component$6 = defineComponent({
|
|
12239
12287
|
pagination: pagination2,
|
12240
12288
|
throttleDelay: props.throttleDelay
|
12241
12289
|
};
|
12290
|
+
const reset2 = () => {
|
12291
|
+
handleChangeListConfig();
|
12292
|
+
afterListDataReset();
|
12293
|
+
};
|
12294
|
+
ctx.expose({
|
12295
|
+
reset: reset2
|
12296
|
+
});
|
12242
12297
|
return () => {
|
12243
12298
|
var _a, _b, _c, _d, _e, _f, _g, _h, _i;
|
12244
12299
|
return h$1(renderAs || "div", {
|
@@ -12315,24 +12370,26 @@ const resolveColumnWidth = (root, colgroups, autoWidth = 20) => {
|
|
12315
12370
|
}
|
12316
12371
|
};
|
12317
12372
|
colgroups.forEach((col, index) => {
|
12318
|
-
|
12319
|
-
|
12320
|
-
|
12321
|
-
|
12322
|
-
|
12323
|
-
|
12324
|
-
|
12325
|
-
|
12326
|
-
|
12327
|
-
|
12328
|
-
|
12329
|
-
|
12373
|
+
if (!col.isHidden) {
|
12374
|
+
const colWidth = String(col.width);
|
12375
|
+
let isAutoWidthCol = true;
|
12376
|
+
if (/^\d+\.?\d*(px)?$/.test(colWidth)) {
|
12377
|
+
const numWidth = Number(colWidth.replace("px", ""));
|
12378
|
+
resolveColNumberWidth(col, numWidth);
|
12379
|
+
isAutoWidthCol = false;
|
12380
|
+
}
|
12381
|
+
if (/^\d+\.?\d*%$/.test(colWidth)) {
|
12382
|
+
let perWidth = autoWidth;
|
12383
|
+
if (avgWidth > 0) {
|
12384
|
+
const percent = Number(colWidth.replace("%", ""));
|
12385
|
+
perWidth = avgWidth * percent / 100;
|
12386
|
+
}
|
12387
|
+
resolveColNumberWidth(col, perWidth);
|
12388
|
+
isAutoWidthCol = false;
|
12389
|
+
}
|
12390
|
+
if (isAutoWidthCol) {
|
12391
|
+
avgColIndexList.push(index);
|
12330
12392
|
}
|
12331
|
-
resolveColNumberWidth(col, perWidth);
|
12332
|
-
isAutoWidthCol = false;
|
12333
|
-
}
|
12334
|
-
if (isAutoWidthCol) {
|
12335
|
-
avgColIndexList.push(index);
|
12336
12393
|
}
|
12337
12394
|
});
|
12338
12395
|
if (avgColIndexList.length > 0) {
|
@@ -12531,9 +12588,16 @@ const tableProps = {
|
|
12531
12588
|
border: PropTypes.arrayOf(PropTypes.commonType(BORDER_OPRIONS, "border")).def(["row"]),
|
12532
12589
|
pagination: PropTypes.oneOfType([PropTypes.bool.def(false), PropTypes.object.def({})]).def(false),
|
12533
12590
|
remotePagination: PropTypes.bool.def(false),
|
12534
|
-
emptyText: PropTypes.string.def("\u6682\u65E0\u6570\u636E")
|
12591
|
+
emptyText: PropTypes.string.def("\u6682\u65E0\u6570\u636E"),
|
12592
|
+
settings: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
12593
|
+
fields: PropTypes.shape([]).def([]),
|
12594
|
+
checked: PropTypes.shape([]).def([]),
|
12595
|
+
limit: PropTypes.number.def(null),
|
12596
|
+
size: PropTypes.size(["small", "default", "large"]).def("default"),
|
12597
|
+
sizeList: PropTypes.shape([]).def(null)
|
12598
|
+
})]).def(false)
|
12535
12599
|
};
|
12536
|
-
function _isSlot$
|
12600
|
+
function _isSlot$2(s2) {
|
12537
12601
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
12538
12602
|
}
|
12539
12603
|
var useLimit = () => {
|
@@ -12578,7 +12642,7 @@ var useLimit = () => {
|
|
12578
12642
|
"modelValue": localLimit.value,
|
12579
12643
|
"onChange": handleLimitChange,
|
12580
12644
|
"disabled": proxy.disabled
|
12581
|
-
}, _isSlot$
|
12645
|
+
}, _isSlot$2(_slot = proxy.limitList.map((num, index) => createVNode(BkOption, {
|
12582
12646
|
"value": num,
|
12583
12647
|
"label": num,
|
12584
12648
|
"key": `${index}_${num}`
|
@@ -13001,7 +13065,7 @@ var BodyEmpty = defineComponent({
|
|
13001
13065
|
});
|
13002
13066
|
}
|
13003
13067
|
});
|
13004
|
-
function _isSlot(s2) {
|
13068
|
+
function _isSlot$1(s2) {
|
13005
13069
|
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
13006
13070
|
}
|
13007
13071
|
var HeadFilter = defineComponent({
|
@@ -13088,7 +13152,7 @@ var HeadFilter = defineComponent({
|
|
13088
13152
|
"class": "content-list",
|
13089
13153
|
"modelValue": state.checked,
|
13090
13154
|
"onUpdate:modelValue": ($event) => state.checked = $event
|
13091
|
-
}, _isSlot(_slot = localData.value.map((item) => createVNode("div", {
|
13155
|
+
}, _isSlot$1(_slot = localData.value.map((item) => createVNode("div", {
|
13092
13156
|
"class": "list-item"
|
13093
13157
|
}, [createVNode(BkCheckbox, {
|
13094
13158
|
"label": item.value
|
@@ -13165,13 +13229,189 @@ class TablePlugins {
|
|
13165
13229
|
this.ctx = ctx;
|
13166
13230
|
}
|
13167
13231
|
}
|
13232
|
+
function _isSlot(s2) {
|
13233
|
+
return typeof s2 === "function" || Object.prototype.toString.call(s2) === "[object Object]" && !isVNode(s2);
|
13234
|
+
}
|
13235
|
+
var Settings = defineComponent({
|
13236
|
+
name: "Settings",
|
13237
|
+
props: {
|
13238
|
+
settings: PropTypes.oneOfType([PropTypes.bool, PropTypes.shape({
|
13239
|
+
fields: PropTypes.shape([]).def([]),
|
13240
|
+
checked: PropTypes.shape([]).def([]),
|
13241
|
+
limit: PropTypes.number.def(null),
|
13242
|
+
size: PropTypes.string.def(null)
|
13243
|
+
})]).def(false),
|
13244
|
+
columns: PropTypes.array.def([]),
|
13245
|
+
rowHeight: PropTypes.number.def(40)
|
13246
|
+
},
|
13247
|
+
emits: ["change"],
|
13248
|
+
setup(props, {
|
13249
|
+
emit
|
13250
|
+
}) {
|
13251
|
+
var _a, _b, _c;
|
13252
|
+
const defaultSizeList = [{
|
13253
|
+
value: "small",
|
13254
|
+
label: "\u5C0F",
|
13255
|
+
height: 32
|
13256
|
+
}, {
|
13257
|
+
value: "default",
|
13258
|
+
label: "\u4E2D",
|
13259
|
+
height: props.rowHeight
|
13260
|
+
}, {
|
13261
|
+
value: "large",
|
13262
|
+
label: "\u5927",
|
13263
|
+
height: 56
|
13264
|
+
}];
|
13265
|
+
const modifiers = [{
|
13266
|
+
name: "offset",
|
13267
|
+
options: {
|
13268
|
+
offset: [10, 10]
|
13269
|
+
}
|
13270
|
+
}];
|
13271
|
+
const isShow = ref(false);
|
13272
|
+
const settings = props.settings;
|
13273
|
+
const activeSize = ref((_a = settings.size) != null ? _a : "default");
|
13274
|
+
const activeHeight = ref(props.rowHeight);
|
13275
|
+
const checkedFields = ref((_b = settings.checked) != null ? _b : []);
|
13276
|
+
const className = resolveClassName("table-settings");
|
13277
|
+
const theme = `light ${className}`;
|
13278
|
+
const handleSaveClick = () => {
|
13279
|
+
emit("change", {
|
13280
|
+
checked: checkedFields.value,
|
13281
|
+
size: activeSize.value,
|
13282
|
+
height: activeHeight.value
|
13283
|
+
});
|
13284
|
+
isShow.value = false;
|
13285
|
+
};
|
13286
|
+
const handleCancelClick = () => {
|
13287
|
+
var _a2;
|
13288
|
+
activeSize.value = "default";
|
13289
|
+
activeHeight.value = props.rowHeight;
|
13290
|
+
checkedFields.value = (_a2 = settings.checked) != null ? _a2 : [];
|
13291
|
+
isShow.value = false;
|
13292
|
+
};
|
13293
|
+
const handleSettingClick = () => {
|
13294
|
+
isShow.value = true;
|
13295
|
+
};
|
13296
|
+
const handleCheckAllClick = () => {
|
13297
|
+
var _a2, _b2;
|
13298
|
+
checkedFields.value = ((_b2 = (_a2 = settings.fields) != null ? _a2 : props.columns) != null ? _b2 : []).map((item, index) => resolvePropVal(item, "field", [item, index]));
|
13299
|
+
};
|
13300
|
+
const isLimit = computed(() => {
|
13301
|
+
var _a2;
|
13302
|
+
return ((_a2 = settings.limit) != null ? _a2 : 0) > 0;
|
13303
|
+
});
|
13304
|
+
const sizeList = (_c = settings.sizeList) != null ? _c : defaultSizeList;
|
13305
|
+
const isFiledDisabled = computed(() => {
|
13306
|
+
var _a2;
|
13307
|
+
return isLimit.value && ((_a2 = settings.limit) != null ? _a2 : 0) <= checkedFields.value.length;
|
13308
|
+
});
|
13309
|
+
const isItemReadonly = (item, index) => isFiledDisabled.value && !checkedFields.value.includes(resolvePropVal(item, "field", [item, index]));
|
13310
|
+
const handleSizeItemClick = (item) => {
|
13311
|
+
activeSize.value = item.value;
|
13312
|
+
activeHeight.value = item.height;
|
13313
|
+
};
|
13314
|
+
const getItemClass = (item) => ({
|
13315
|
+
"line-size": true,
|
13316
|
+
"is-default": activeSize.value === "default",
|
13317
|
+
active: item.value === activeSize.value
|
13318
|
+
});
|
13319
|
+
const buttonStyle = {
|
13320
|
+
width: "85px",
|
13321
|
+
marginRight: "5px"
|
13322
|
+
};
|
13323
|
+
const renderSize = () => sizeList.map((item) => createVNode("span", {
|
13324
|
+
"class": getItemClass(item),
|
13325
|
+
"onClick": () => handleSizeItemClick(item)
|
13326
|
+
}, [item.label]));
|
13327
|
+
return () => createVNode(BkPopover, mergeProps({
|
13328
|
+
"trigger": "manual",
|
13329
|
+
"isShow": isShow.value,
|
13330
|
+
"placement": "bottom-end",
|
13331
|
+
"arrow": false
|
13332
|
+
}, {
|
13333
|
+
modifiers,
|
13334
|
+
theme
|
13335
|
+
}, {
|
13336
|
+
"boundary": document.body
|
13337
|
+
}), {
|
13338
|
+
default: () => createVNode(cogShape, {
|
13339
|
+
"style": "color: rgba(99,101,110, 0.6);",
|
13340
|
+
"onClick": handleSettingClick
|
13341
|
+
}, null),
|
13342
|
+
content: () => {
|
13343
|
+
var _a2, _b2;
|
13344
|
+
let _slot2;
|
13345
|
+
return createVNode("div", {
|
13346
|
+
"class": "setting-content"
|
13347
|
+
}, [createVNode("div", {
|
13348
|
+
"class": "setting-head"
|
13349
|
+
}, [createVNode("h2", null, [createTextVNode("\u8868\u683C\u8BBE\u7F6E")]), createVNode(closeLine, {
|
13350
|
+
"class": "icon-close-action",
|
13351
|
+
"onClick": handleCancelClick
|
13352
|
+
}, null)]), createVNode("div", {
|
13353
|
+
"class": "setting-body"
|
13354
|
+
}, [createVNode("div", {
|
13355
|
+
"class": "setting-body-title"
|
13356
|
+
}, [createVNode("div", null, [createVNode("span", null, [createTextVNode("\u5B57\u6BB5\u663E\u793A\u8BBE\u7F6E")]), isLimit.value ? createVNode("span", {
|
13357
|
+
"class": "limit"
|
13358
|
+
}, [createTextVNode("\uFF08\u6700\u591A"), settings.limit, createTextVNode("\u9879\uFF09")]) : ""]), isLimit.value ? "" : createVNode("span", {
|
13359
|
+
"class": "check-all",
|
13360
|
+
"onClick": handleCheckAllClick
|
13361
|
+
}, [createTextVNode("\u5168\u9009")])]), createVNode(BkCheckboxGroup, {
|
13362
|
+
"class": "setting-body-fields",
|
13363
|
+
"modelValue": checkedFields.value,
|
13364
|
+
"onUpdate:modelValue": ($event) => checkedFields.value = $event
|
13365
|
+
}, _isSlot(_slot2 = ((_b2 = (_a2 = settings.fields) != null ? _a2 : props.columns) != null ? _b2 : []).map((item, index) => {
|
13366
|
+
let _slot;
|
13367
|
+
return createVNode("div", {
|
13368
|
+
"class": "field-item"
|
13369
|
+
}, [createVNode(BkCheckbox, {
|
13370
|
+
"label": resolvePropVal(item, "field", [item, index]),
|
13371
|
+
"disabled": isItemReadonly(item, index)
|
13372
|
+
}, _isSlot(_slot = resolvePropVal(item, "label", [item, index])) ? _slot : {
|
13373
|
+
default: () => [_slot]
|
13374
|
+
})]);
|
13375
|
+
})) ? _slot2 : {
|
13376
|
+
default: () => [_slot2]
|
13377
|
+
}), createVNode("div", {
|
13378
|
+
"class": "setting-body-line-height"
|
13379
|
+
}, [createTextVNode("\u8868\u683C\u884C\u9AD8\uFF1A"), renderSize()])]), createVNode("div", {
|
13380
|
+
"class": "setting-footer"
|
13381
|
+
}, [createVNode(BkButton, {
|
13382
|
+
"theme": "primary",
|
13383
|
+
"style": buttonStyle,
|
13384
|
+
"onClick": handleSaveClick
|
13385
|
+
}, {
|
13386
|
+
default: () => [createTextVNode("\u786E\u5B9A")]
|
13387
|
+
}), createVNode(BkButton, {
|
13388
|
+
"style": buttonStyle,
|
13389
|
+
"onClick": handleCancelClick
|
13390
|
+
}, {
|
13391
|
+
default: () => [createTextVNode("\u53D6\u6D88")]
|
13392
|
+
})])]);
|
13393
|
+
}
|
13394
|
+
});
|
13395
|
+
}
|
13396
|
+
});
|
13168
13397
|
let EVENTS;
|
13169
13398
|
(function(EVENTS2) {
|
13170
13399
|
EVENTS2["ON_SORT_BY_CLICK"] = "onSortByClick";
|
13171
13400
|
EVENTS2["ON_FILTER_CLICK"] = "onFilterClick";
|
13401
|
+
EVENTS2["ON_SETTING_CHANGE"] = "onSettingChange";
|
13172
13402
|
})(EVENTS || (EVENTS = {}));
|
13173
13403
|
class TableRender {
|
13174
13404
|
constructor(props, ctx, reactiveProp, colgroups) {
|
13405
|
+
__publicField(this, "getRowHeight", (row, rowIndex) => {
|
13406
|
+
const {
|
13407
|
+
size,
|
13408
|
+
height
|
13409
|
+
} = this.setting;
|
13410
|
+
if (height !== null && height !== void 0) {
|
13411
|
+
return resolvePropVal(this.setting, "height", ["tbody", row, rowIndex, size]);
|
13412
|
+
}
|
13413
|
+
return resolvePropVal(this.props, "rowHeight", ["tbody", row, rowIndex]);
|
13414
|
+
});
|
13175
13415
|
__publicField(this, "getColumnClass", (colIndex) => `${this.uuid}-column-${colIndex}`);
|
13176
13416
|
this.props = props;
|
13177
13417
|
this.context = ctx;
|
@@ -13191,10 +13431,31 @@ class TableRender {
|
|
13191
13431
|
if (!isShow) {
|
13192
13432
|
return null;
|
13193
13433
|
}
|
13194
|
-
|
13434
|
+
const handleSettingsChanged = (arg) => {
|
13435
|
+
const {
|
13436
|
+
checked = [],
|
13437
|
+
size,
|
13438
|
+
height
|
13439
|
+
} = arg;
|
13440
|
+
this.reactiveProp.setting.size = size;
|
13441
|
+
this.reactiveProp.setting.height = height;
|
13442
|
+
if (checked.length) {
|
13443
|
+
this.colgroups.forEach((col) => {
|
13444
|
+
col.isHidden = !(checked != null ? checked : []).includes(resolvePropVal(col, "field", [col]));
|
13445
|
+
});
|
13446
|
+
}
|
13447
|
+
this.emitEvent(EVENTS.ON_SETTING_CHANGE, [arg]);
|
13448
|
+
};
|
13449
|
+
return [this.props.settings ? createVNode(Settings, {
|
13450
|
+
"class": "table-head-settings",
|
13451
|
+
"settings": this.props.settings,
|
13452
|
+
"columns": this.props.columns,
|
13453
|
+
"rowHeight": this.props.rowHeight,
|
13454
|
+
"onChange": handleSettingsChanged
|
13455
|
+
}, null) : "", createVNode("table", {
|
13195
13456
|
"cellpadding": 0,
|
13196
13457
|
"cellspacing": 0
|
13197
|
-
}, [this.renderColGroup(), this.renderHeader()]);
|
13458
|
+
}, [this.renderColGroup(), this.renderHeader()])];
|
13198
13459
|
}
|
13199
13460
|
renderTableBodySchema(rows) {
|
13200
13461
|
return createVNode("table", {
|
@@ -13316,7 +13577,7 @@ class TableRender {
|
|
13316
13577
|
};
|
13317
13578
|
return createVNode("thead", {
|
13318
13579
|
"style": rowStyle
|
13319
|
-
}, [createVNode("tr", null, [this.
|
13580
|
+
}, [createVNode("tr", null, [this.filterColgroups.map((column, index) => createVNode("th", {
|
13320
13581
|
"colspan": 1,
|
13321
13582
|
"rowspan": 1,
|
13322
13583
|
"class": classes({
|
@@ -13331,13 +13592,13 @@ class TableRender {
|
|
13331
13592
|
var _a, _b, _c;
|
13332
13593
|
return createVNode("tbody", null, [rows.length ? rows.map((row, rowIndex) => {
|
13333
13594
|
const rowStyle = {
|
13334
|
-
"--row-height": `${
|
13595
|
+
"--row-height": `${this.getRowHeight(row, rowIndex)}px`
|
13335
13596
|
};
|
13336
13597
|
return createVNode("tr", {
|
13337
13598
|
"style": rowStyle,
|
13338
13599
|
"onClick": (e) => this.handleRowClick(e, row, rowIndex, rows),
|
13339
13600
|
"onDblclick": (e) => this.handleRowDblClick(e, row, rowIndex, rows)
|
13340
|
-
}, [this.
|
13601
|
+
}, [this.filterColgroups.map((column, index) => createVNode("td", {
|
13341
13602
|
"class": this.getColumnClass(index),
|
13342
13603
|
"colspan": 1,
|
13343
13604
|
"rowspan": 1
|
@@ -13370,7 +13631,7 @@ class TableRender {
|
|
13370
13631
|
return this.props.columnPick !== "disabled" && this.propActiveCols.some((col) => col.index === colIndex && col.active);
|
13371
13632
|
}
|
13372
13633
|
renderColGroup() {
|
13373
|
-
return createVNode("colgroup", null, [(this.
|
13634
|
+
return createVNode("colgroup", null, [(this.filterColgroups || []).map((column, index) => {
|
13374
13635
|
const colCls = classes({
|
13375
13636
|
active: this.isColActive(index)
|
13376
13637
|
});
|
@@ -13381,6 +13642,12 @@ class TableRender {
|
|
13381
13642
|
}, null);
|
13382
13643
|
})]);
|
13383
13644
|
}
|
13645
|
+
get filterColgroups() {
|
13646
|
+
return this.colgroups.filter((col) => !col.isHidden);
|
13647
|
+
}
|
13648
|
+
get setting() {
|
13649
|
+
return this.reactiveProp.setting;
|
13650
|
+
}
|
13384
13651
|
}
|
13385
13652
|
const useClass = (props, root) => {
|
13386
13653
|
const autoHeight = ref(200);
|
@@ -13390,13 +13657,17 @@ const useClass = (props, root) => {
|
|
13390
13657
|
const headClass = classes({
|
13391
13658
|
[resolveClassName("table-head")]: true
|
13392
13659
|
});
|
13660
|
+
const config = resolveHeadConfig(props);
|
13661
|
+
const headStyle = {
|
13662
|
+
"--row-height": `${resolvePropVal(config, "height", ["thead"])}px`
|
13663
|
+
};
|
13393
13664
|
const contentClass = classes({
|
13394
13665
|
[resolveClassName("table-body")]: true
|
13395
13666
|
});
|
13396
|
-
const footerClass = classes({
|
13667
|
+
const footerClass = computed(() => classes({
|
13397
13668
|
[resolveClassName("table-footer")]: true,
|
13398
13669
|
["is-hidden"]: !props.pagination || !props.data.length
|
13399
|
-
});
|
13670
|
+
}));
|
13400
13671
|
const wrapperStyle = computed(() => ({
|
13401
13672
|
minHeight: resolveNumberOrStringToPix(props.minHeight, "auto")
|
13402
13673
|
}));
|
@@ -13440,7 +13711,7 @@ const useClass = (props, root) => {
|
|
13440
13711
|
autoHeight.value = height;
|
13441
13712
|
}
|
13442
13713
|
};
|
13443
|
-
return { tableClass, headClass, contentClass, footerClass, wrapperStyle, contentStyle, resetTableHeight };
|
13714
|
+
return { tableClass, headClass, contentClass, footerClass, wrapperStyle, contentStyle, headStyle, resetTableHeight };
|
13444
13715
|
};
|
13445
13716
|
var Component$4 = defineComponent({
|
13446
13717
|
name: "Table",
|
@@ -13454,6 +13725,7 @@ var Component$4 = defineComponent({
|
|
13454
13725
|
let columnFilterFn = null;
|
13455
13726
|
let observerIns = null;
|
13456
13727
|
const root = ref();
|
13728
|
+
const refVirtualRender = ref();
|
13457
13729
|
const {
|
13458
13730
|
activeColumns
|
13459
13731
|
} = useActiveColumns(props);
|
@@ -13470,11 +13742,16 @@ var Component$4 = defineComponent({
|
|
13470
13742
|
footerClass,
|
13471
13743
|
wrapperStyle,
|
13472
13744
|
contentStyle,
|
13745
|
+
headStyle,
|
13473
13746
|
resetTableHeight
|
13474
13747
|
} = useClass(props);
|
13475
13748
|
const reactiveProp = reactive({
|
13476
13749
|
scrollTranslateY: 0,
|
13477
|
-
activeColumns
|
13750
|
+
activeColumns,
|
13751
|
+
setting: {
|
13752
|
+
size: null,
|
13753
|
+
height: null
|
13754
|
+
}
|
13478
13755
|
});
|
13479
13756
|
const tableRender = new TableRender(props, ctx, reactiveProp, colgroups);
|
13480
13757
|
watchEffect(() => {
|
@@ -13492,6 +13769,13 @@ var Component$4 = defineComponent({
|
|
13492
13769
|
} = args;
|
13493
13770
|
columnFilterFn = filterFn;
|
13494
13771
|
resolvePageData(columnFilterFn, columnSortFn);
|
13772
|
+
}).on(EVENTS.ON_SETTING_CHANGE, (args) => {
|
13773
|
+
var _a, _b;
|
13774
|
+
const {
|
13775
|
+
checked = []
|
13776
|
+
} = args;
|
13777
|
+
checked.length && resolveColumnWidth(root.value, colgroups, 20);
|
13778
|
+
(_b = (_a = refVirtualRender.value) == null ? void 0 : _a.reset) == null ? void 0 : _b.call(_a);
|
13495
13779
|
});
|
13496
13780
|
const handleScrollChanged = (args) => {
|
13497
13781
|
const pagination2 = args[1];
|
@@ -13516,24 +13800,30 @@ var Component$4 = defineComponent({
|
|
13516
13800
|
"class": tableClass.value,
|
13517
13801
|
"style": wrapperStyle.value,
|
13518
13802
|
"ref": root
|
13519
|
-
}, [
|
13520
|
-
"
|
13521
|
-
|
13522
|
-
|
13523
|
-
|
13524
|
-
|
13525
|
-
|
13526
|
-
|
13527
|
-
|
13528
|
-
|
13529
|
-
|
13530
|
-
|
13531
|
-
|
13532
|
-
"
|
13533
|
-
},
|
13534
|
-
|
13535
|
-
|
13536
|
-
|
13803
|
+
}, [
|
13804
|
+
createVNode("div", {
|
13805
|
+
"class": headClass,
|
13806
|
+
"style": headStyle
|
13807
|
+
}, [tableRender.renderTableHeadSchema()]),
|
13808
|
+
createVNode(BkVirtualRender, {
|
13809
|
+
"ref": refVirtualRender,
|
13810
|
+
"lineHeight": tableRender.getRowHeight,
|
13811
|
+
"class": contentClass,
|
13812
|
+
"style": contentStyle.value,
|
13813
|
+
"list": pageData,
|
13814
|
+
"onContentScroll": handleScrollChanged,
|
13815
|
+
"throttleDelay": 0,
|
13816
|
+
"enabled": props.virtualEnabled
|
13817
|
+
}, {
|
13818
|
+
default: (scope) => tableRender.renderTableBodySchema(scope.data || props.data),
|
13819
|
+
afterContent: () => createVNode("div", {
|
13820
|
+
"class": resolveClassName("table-fixed")
|
13821
|
+
}, null)
|
13822
|
+
}),
|
13823
|
+
createVNode("div", {
|
13824
|
+
"class": footerClass.value
|
13825
|
+
}, [props.pagination && props.data.length && tableRender.renderTableFooter(localPagination.value)])
|
13826
|
+
]);
|
13537
13827
|
}
|
13538
13828
|
});
|
13539
13829
|
const BkTable = withInstall(Component$4);
|
@@ -15003,15 +15293,15 @@ const Message$1 = (constructor, options) => {
|
|
15003
15293
|
offsetY: verticalOffset,
|
15004
15294
|
id
|
15005
15295
|
});
|
15006
|
-
const
|
15296
|
+
const container2 = document.createElement("div");
|
15007
15297
|
const vm = createVNode(constructor, opts);
|
15008
15298
|
vm.props.onDestory = (id2) => {
|
15009
15299
|
close(id2, position, spacing, userOnClose);
|
15010
|
-
render(null,
|
15300
|
+
render(null, container2);
|
15011
15301
|
};
|
15012
|
-
render(vm,
|
15302
|
+
render(vm, container2);
|
15013
15303
|
instances[position].push(vm);
|
15014
|
-
document.body.appendChild(
|
15304
|
+
document.body.appendChild(container2.firstElementChild);
|
15015
15305
|
};
|
15016
15306
|
function close(id, position, spacing, userOnClose) {
|
15017
15307
|
userOnClose == null ? void 0 : userOnClose();
|
@@ -19949,6 +20239,7 @@ const Transfer = withInstall(Component$1);
|
|
19949
20239
|
const treeProps = {
|
19950
20240
|
data: PropTypes.arrayOf(PropTypes.any).def([]),
|
19951
20241
|
label: PropTypes.oneOfType([PropTypes.func.def(void 0), PropTypes.string.def("label")]),
|
20242
|
+
nodeKey: PropTypes.string.def(null),
|
19952
20243
|
children: PropTypes.string.def("children"),
|
19953
20244
|
indent: PropTypes.number.def(18),
|
19954
20245
|
lineHeight: PropTypes.number.def(32),
|
@@ -19965,10 +20256,49 @@ const treeProps = {
|
|
19965
20256
|
]).def(true),
|
19966
20257
|
async: PropTypes.shape({
|
19967
20258
|
callback: PropTypes.func.def(null),
|
19968
|
-
cache: PropTypes.bool.def(true)
|
20259
|
+
cache: PropTypes.bool.def(true),
|
20260
|
+
deepAutoOpen: PropTypes.commonType(["once", "every"], "columnType").def("once")
|
19969
20261
|
}),
|
19970
20262
|
offsetLeft: PropTypes.number.def(5)
|
19971
20263
|
};
|
20264
|
+
var useNodeAttribute = (flatData) => {
|
20265
|
+
const schemaValues = computed(() => Array.from(flatData.schema.values()));
|
20266
|
+
const getSchemaVal2 = (key) => flatData.schema.get(key);
|
20267
|
+
const getNodeAttr2 = (node, attr) => {
|
20268
|
+
var _a;
|
20269
|
+
return (_a = getSchemaVal2(node.__uuid)) == null ? void 0 : _a[attr];
|
20270
|
+
};
|
20271
|
+
const setNodeAttr = (node, attr, val) => flatData.schema.set(node.__uuid, __spreadProps(__spreadValues({}, getSchemaVal2(node.__uuid)), {
|
20272
|
+
[attr]: val
|
20273
|
+
}));
|
20274
|
+
const getNodePath = (node) => getNodeAttr2(node, "__path");
|
20275
|
+
const isRootNode = (node) => getNodeAttr2(node, "__isRoot");
|
20276
|
+
const isNodeOpened = (node) => getNodeAttr2(node, "__isOpen");
|
20277
|
+
const hasChildNode = (node) => getNodeAttr2(node, "__hasChild");
|
20278
|
+
const isItemOpen = (item) => {
|
20279
|
+
var _a;
|
20280
|
+
if (typeof item === "object") {
|
20281
|
+
return isNodeOpened(item);
|
20282
|
+
}
|
20283
|
+
if (typeof item === "string") {
|
20284
|
+
return (_a = getSchemaVal2(item)) == null ? void 0 : _a.__isOpen;
|
20285
|
+
}
|
20286
|
+
return false;
|
20287
|
+
};
|
20288
|
+
const checkNodeIsOpen = (node) => isRootNode(node) || isItemOpen(node) || isItemOpen(getNodeAttr2(node, "__parentId"));
|
20289
|
+
return {
|
20290
|
+
schemaValues,
|
20291
|
+
getSchemaVal: getSchemaVal2,
|
20292
|
+
getNodeAttr: getNodeAttr2,
|
20293
|
+
setNodeAttr,
|
20294
|
+
getNodePath,
|
20295
|
+
isRootNode,
|
20296
|
+
isNodeOpened,
|
20297
|
+
hasChildNode,
|
20298
|
+
isItemOpen,
|
20299
|
+
checkNodeIsOpen
|
20300
|
+
};
|
20301
|
+
};
|
19972
20302
|
var rngBrowser = { exports: {} };
|
19973
20303
|
var getRandomValues = typeof crypto != "undefined" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto) || typeof msCrypto != "undefined" && typeof window.msCrypto.getRandomValues == "function" && msCrypto.getRandomValues.bind(msCrypto);
|
19974
20304
|
if (getRandomValues) {
|
@@ -20113,6 +20443,13 @@ const getFlatdata = (props, treeData = void 0, cachedSchema = []) => {
|
|
20113
20443
|
const outputData = [];
|
20114
20444
|
let order2 = 0;
|
20115
20445
|
const schema = /* @__PURE__ */ new Map();
|
20446
|
+
function getUid(item) {
|
20447
|
+
let uid = null;
|
20448
|
+
if (typeof props.nodeKey === "string") {
|
20449
|
+
uid = item[props.nodeKey];
|
20450
|
+
}
|
20451
|
+
return uid || item.__uuid || uuid_1.v4();
|
20452
|
+
}
|
20116
20453
|
function getCachedTreeNodeAttr(uuid2, node, attr, cachedAttr) {
|
20117
20454
|
const cached = (cachedSchema || []).find((item) => item.__uuid === uuid2);
|
20118
20455
|
if (cached) {
|
@@ -20134,7 +20471,7 @@ const getFlatdata = (props, treeData = void 0, cachedSchema = []) => {
|
|
20134
20471
|
flatten(item, depth, parent, path);
|
20135
20472
|
} else {
|
20136
20473
|
if (typeof item === "object" && item !== null) {
|
20137
|
-
const uuid2 = item
|
20474
|
+
const uuid2 = getUid(item);
|
20138
20475
|
const currentPath = path !== null ? `${path}-${i}` : `${i}`;
|
20139
20476
|
const hasChildren = !!(item[children] || []).length;
|
20140
20477
|
const attrs = {
|
@@ -20146,7 +20483,7 @@ const getFlatdata = (props, treeData = void 0, cachedSchema = []) => {
|
|
20146
20483
|
__path: currentPath,
|
20147
20484
|
__isRoot: parent === null,
|
20148
20485
|
__order: order2,
|
20149
|
-
__isOpen: isCachedTreeNodeOpened(uuid2, item)
|
20486
|
+
__isOpen: isCachedTreeNodeOpened(uuid2, item),
|
20150
20487
|
__checked: isCachedTreeNodeChecked(uuid2, item),
|
20151
20488
|
[children]: null
|
20152
20489
|
};
|
@@ -20248,203 +20585,291 @@ const assignTreeNode = (path, treeData, childKey, assignVal) => {
|
|
20248
20585
|
}, treeData);
|
20249
20586
|
Object.assign(targetNode, assignVal || {});
|
20250
20587
|
};
|
20588
|
+
var useAsync = (props, flatData) => {
|
20589
|
+
const {
|
20590
|
+
setNodeAttr,
|
20591
|
+
getNodePath,
|
20592
|
+
getNodeAttr: getNodeAttr2
|
20593
|
+
} = useNodeAttribute(flatData);
|
20594
|
+
const setNodeRemoteLoad = (resp, item) => {
|
20595
|
+
if (typeof resp === "object" && resp !== null) {
|
20596
|
+
setNodeAttr(item, "__isOpen", true);
|
20597
|
+
const nodeValue = Array.isArray(resp) ? resp : [resp];
|
20598
|
+
updateTreeNode(getNodePath(item), props.data, props.children, props.children, nodeValue);
|
20599
|
+
}
|
20600
|
+
};
|
20601
|
+
const asyncNodeClick = (item) => {
|
20602
|
+
if (item.async) {
|
20603
|
+
const {
|
20604
|
+
callback = null,
|
20605
|
+
cache = true
|
20606
|
+
} = props.async || {};
|
20607
|
+
setNodeAttr(item, "__isAsyncInit", true);
|
20608
|
+
if (typeof callback === "function") {
|
20609
|
+
if (!item.cached) {
|
20610
|
+
Object.assign(item, {
|
20611
|
+
loading: true
|
20612
|
+
});
|
20613
|
+
return Promise.resolve(callback(item, (resp) => setNodeRemoteLoad(resp, item)).then((resp) => setNodeRemoteLoad(resp, item)).catch((err) => console.error("load remote data error:", err)).finally(() => {
|
20614
|
+
assignTreeNode(getNodePath(item), props.data, props.children, __spreadValues({
|
20615
|
+
loading: false
|
20616
|
+
}, cache ? {
|
20617
|
+
cached: true
|
20618
|
+
} : {}));
|
20619
|
+
}));
|
20620
|
+
}
|
20621
|
+
return Promise.resolve(true);
|
20622
|
+
}
|
20623
|
+
return Promise.reject("async need to set prop: asyncLoad with function wich will return promise object");
|
20624
|
+
}
|
20625
|
+
};
|
20626
|
+
const deepAutoOpen = () => {
|
20627
|
+
const autoOpenNodes = flatData.data.filter((item) => item.async && item.isOpen && !getNodeAttr2(item, "__isAsyncInit"));
|
20628
|
+
if (autoOpenNodes.length) {
|
20629
|
+
Promise.all(autoOpenNodes.map((item) => asyncNodeClick(item))).then(() => {
|
20630
|
+
deepAutoOpen();
|
20631
|
+
}).catch((err) => {
|
20632
|
+
console.warn(err);
|
20633
|
+
});
|
20634
|
+
}
|
20635
|
+
};
|
20636
|
+
return {
|
20637
|
+
asyncNodeClick,
|
20638
|
+
deepAutoOpen
|
20639
|
+
};
|
20640
|
+
};
|
20641
|
+
var useNodeAction = (props, ctx, flatData, renderData) => {
|
20642
|
+
const checkedNodes = [];
|
20643
|
+
const {
|
20644
|
+
setNodeAttr,
|
20645
|
+
getNodePath,
|
20646
|
+
getSchemaVal: getSchemaVal2,
|
20647
|
+
getNodeAttr: getNodeAttr2,
|
20648
|
+
isRootNode,
|
20649
|
+
hasChildNode,
|
20650
|
+
isItemOpen,
|
20651
|
+
isNodeOpened,
|
20652
|
+
schemaValues
|
20653
|
+
} = useNodeAttribute(flatData);
|
20654
|
+
const {
|
20655
|
+
asyncNodeClick,
|
20656
|
+
deepAutoOpen
|
20657
|
+
} = useAsync(props, flatData);
|
20658
|
+
const getRootIcon = (item) => isItemOpen(item) ? createVNode(folderShapeOpen, {
|
20659
|
+
"class": resolveClassName("tree-icon")
|
20660
|
+
}, null) : createVNode(folder, {
|
20661
|
+
"class": resolveClassName("tree-icon")
|
20662
|
+
}, null);
|
20663
|
+
const renderPrefixVal = (val) => {
|
20664
|
+
if (typeof val === "string") {
|
20665
|
+
return val;
|
20666
|
+
}
|
20667
|
+
if (typeof val === "object" && val !== null) {
|
20668
|
+
if (val.__v_isVNode) {
|
20669
|
+
return val;
|
20670
|
+
}
|
20671
|
+
const {
|
20672
|
+
node,
|
20673
|
+
className,
|
20674
|
+
text,
|
20675
|
+
style
|
20676
|
+
} = val;
|
20677
|
+
return h$1(node, {
|
20678
|
+
class: className,
|
20679
|
+
style
|
20680
|
+
}, text);
|
20681
|
+
}
|
20682
|
+
return null;
|
20683
|
+
};
|
20684
|
+
const getActionIcon = (item) => {
|
20685
|
+
let prefixFnVal = null;
|
20686
|
+
if (typeof props.prefixIcon === "function") {
|
20687
|
+
prefixFnVal = props.prefixIcon(isRootNode(item), hasChildNode(item) || item.async, isItemOpen(item), "action", item);
|
20688
|
+
if (prefixFnVal !== "default") {
|
20689
|
+
return renderPrefixVal(prefixFnVal);
|
20690
|
+
}
|
20691
|
+
}
|
20692
|
+
if (prefixFnVal === "default" || typeof props.prefixIcon === "boolean" && props.prefixIcon) {
|
20693
|
+
if (hasChildNode(item) || item.async) {
|
20694
|
+
return isItemOpen(item) ? createVNode(downShape, null, null) : createVNode(rightShape, null, null);
|
20695
|
+
}
|
20696
|
+
}
|
20697
|
+
return null;
|
20698
|
+
};
|
20699
|
+
const getNodePrefixIcon = (item) => {
|
20700
|
+
let prefixFnVal = null;
|
20701
|
+
if (typeof props.prefixIcon === "function") {
|
20702
|
+
prefixFnVal = props.prefixIcon(isRootNode(item), hasChildNode(item) || item.async, isItemOpen(item), "node_type", item);
|
20703
|
+
if (prefixFnVal !== "default") {
|
20704
|
+
return renderPrefixVal(prefixFnVal);
|
20705
|
+
}
|
20706
|
+
}
|
20707
|
+
if (prefixFnVal === "default" || typeof props.prefixIcon === "boolean" && props.prefixIcon) {
|
20708
|
+
return isRootNode(item) || hasChildNode(item) ? getRootIcon(item) : createVNode(textFile, {
|
20709
|
+
"class": resolveClassName("tree-icon")
|
20710
|
+
}, null);
|
20711
|
+
}
|
20712
|
+
return null;
|
20713
|
+
};
|
20714
|
+
const getLoadingIcon = (item) => item.loading ? createVNode(spinner, null, null) : "";
|
20715
|
+
const setNodeOpened = (item) => {
|
20716
|
+
const newVal = !isItemOpen(item);
|
20717
|
+
setNodeAttr(item, "__isOpen", newVal);
|
20718
|
+
if (newVal) {
|
20719
|
+
return;
|
20720
|
+
}
|
20721
|
+
renderData.value.filter((node) => String.prototype.startsWith.call(getNodePath(node), getNodePath(item))).forEach((filterNode) => setNodeAttr(filterNode, "__isOpen", newVal));
|
20722
|
+
};
|
20723
|
+
const hanldeTreeNodeClick = (item) => {
|
20724
|
+
asyncNodeClick(item);
|
20725
|
+
if (hasChildNode(item)) {
|
20726
|
+
setNodeOpened(item);
|
20727
|
+
}
|
20728
|
+
};
|
20729
|
+
const handleNodeActionClick = (e, node) => {
|
20730
|
+
e.stopImmediatePropagation();
|
20731
|
+
e.stopPropagation();
|
20732
|
+
e.preventDefault();
|
20733
|
+
hanldeTreeNodeClick(node);
|
20734
|
+
};
|
20735
|
+
const handleNodeContentClick = (item) => {
|
20736
|
+
if (!checkedNodes.includes(item.__uuid)) {
|
20737
|
+
checkedNodes.forEach((__uuid) => setNodeAttr({
|
20738
|
+
__uuid
|
20739
|
+
}, "__checked", false));
|
20740
|
+
checkedNodes.length = 0;
|
20741
|
+
setNodeAttr(item, "__checked", true);
|
20742
|
+
checkedNodes.push(item.__uuid);
|
20743
|
+
if (!isNodeOpened(item)) {
|
20744
|
+
hanldeTreeNodeClick(item);
|
20745
|
+
}
|
20746
|
+
ctx.emit("check", item, getSchemaVal2(item.__uuid));
|
20747
|
+
}
|
20748
|
+
};
|
20749
|
+
const filterNextNode = (depth, node) => {
|
20750
|
+
if (isRootNode(node)) {
|
20751
|
+
return false;
|
20752
|
+
}
|
20753
|
+
const nodepath = getNodePath(node);
|
20754
|
+
const paths = `${nodepath}`.split("-").slice(0, depth + 1);
|
20755
|
+
const currentPath = paths.join("-");
|
20756
|
+
if (currentPath === nodepath) {
|
20757
|
+
return true;
|
20758
|
+
}
|
20759
|
+
const lastLevel = paths.pop();
|
20760
|
+
const nextLevel = parseInt(lastLevel, 10);
|
20761
|
+
paths.push(`${nextLevel + 1}`);
|
20762
|
+
const nextNodePath = paths.join("-");
|
20763
|
+
return schemaValues.value.some((val) => val.__path === nextNodePath);
|
20764
|
+
};
|
20765
|
+
const getVirtualLines = (node) => {
|
20766
|
+
if (!props.levelLine) {
|
20767
|
+
return null;
|
20768
|
+
}
|
20769
|
+
const getNodeLineStyle = (dpth) => ({
|
20770
|
+
"--depth": dpth
|
20771
|
+
});
|
20772
|
+
const maxDeep = getNodeAttr2(node, "__depth") + 1;
|
20773
|
+
return new Array(maxDeep).fill("").map((_2, index) => index).filter((depth) => filterNextNode(depth, node)).filter((depth) => depth > 0).map((index) => createVNode("span", {
|
20774
|
+
"class": "node-virtual-line",
|
20775
|
+
"style": getNodeLineStyle(maxDeep - index)
|
20776
|
+
}, null));
|
20777
|
+
};
|
20778
|
+
const renderTreeNode = (item) => {
|
20779
|
+
var _a, _b, _c, _d, _e;
|
20780
|
+
return createVNode("div", {
|
20781
|
+
"class": getNodeRowClass(item, flatData.schema)
|
20782
|
+
}, [createVNode("div", {
|
20783
|
+
"class": getNodeItemClass(item, flatData.schema, props),
|
20784
|
+
"style": getNodeItemStyle(item, props, flatData),
|
20785
|
+
"onClick": () => handleNodeContentClick(item)
|
20786
|
+
}, [createVNode("span", {
|
20787
|
+
"class": resolveClassName("node-action"),
|
20788
|
+
"onClick": (e) => handleNodeActionClick(e, item)
|
20789
|
+
}, [getActionIcon(item)]), createVNode("span", {
|
20790
|
+
"class": resolveClassName("node-content")
|
20791
|
+
}, [[getNodePrefixIcon(item), getLoadingIcon(item)], createVNode("span", {
|
20792
|
+
"class": resolveClassName("node-text")
|
20793
|
+
}, [(_e = (_b = (_a = ctx.slots).node) == null ? void 0 : _b.call(_a, item)) != null ? _e : [getLabel(item, props), (_d = (_c = ctx.slots).nodeAppend) == null ? void 0 : _d.call(_c, item)]])]), getVirtualLines(item)])]);
|
20794
|
+
};
|
20795
|
+
return {
|
20796
|
+
renderTreeNode,
|
20797
|
+
hanldeTreeNodeClick,
|
20798
|
+
deepAutoOpen
|
20799
|
+
};
|
20800
|
+
};
|
20251
20801
|
var Component = defineComponent({
|
20252
20802
|
name: "Tree",
|
20253
20803
|
props: treeProps,
|
20254
20804
|
emits: ["check"],
|
20255
20805
|
setup(props, ctx) {
|
20806
|
+
var _a;
|
20256
20807
|
const formatData = getFlatdata(props);
|
20257
|
-
const checkedNodes = [];
|
20258
20808
|
const flatData = reactive({
|
20259
20809
|
data: formatData[0],
|
20260
20810
|
schema: formatData[1],
|
20261
20811
|
levelLineSchema: {}
|
20262
20812
|
});
|
20813
|
+
const {
|
20814
|
+
schemaValues,
|
20815
|
+
setNodeAttr,
|
20816
|
+
checkNodeIsOpen
|
20817
|
+
} = useNodeAttribute(flatData);
|
20818
|
+
const renderData = computed(() => flatData.data.filter((item) => checkNodeIsOpen(item)));
|
20819
|
+
const {
|
20820
|
+
renderTreeNode,
|
20821
|
+
hanldeTreeNodeClick,
|
20822
|
+
deepAutoOpen
|
20823
|
+
} = useNodeAction(props, ctx, flatData, renderData);
|
20824
|
+
if ((_a = props.async) == null ? void 0 : _a.callback) {
|
20825
|
+
deepAutoOpen();
|
20826
|
+
}
|
20263
20827
|
watch(() => [props.data], (newData) => {
|
20828
|
+
var _a2, _b;
|
20264
20829
|
const formatData2 = getFlatdata(props, newData, schemaValues.value);
|
20265
20830
|
flatData.data = formatData2[0];
|
20266
20831
|
flatData.schema = formatData2[1];
|
20832
|
+
if (((_a2 = props.async) == null ? void 0 : _a2.callback) && ((_b = props.async) == null ? void 0 : _b.deepAutoOpen) === "every") {
|
20833
|
+
deepAutoOpen();
|
20834
|
+
}
|
20267
20835
|
}, {
|
20268
20836
|
deep: true
|
20269
20837
|
});
|
20270
|
-
const
|
20271
|
-
|
20272
|
-
|
20273
|
-
|
20274
|
-
|
20275
|
-
|
20276
|
-
const setNodeAttr = (node, attr, val) => flatData.schema.set(node.__uuid, __spreadProps(__spreadValues({}, getSchemaVal2(node.__uuid)), {
|
20277
|
-
[attr]: val
|
20278
|
-
}));
|
20279
|
-
const getNodePath = (node) => getNodeAttr2(node, "__path");
|
20280
|
-
const isRootNode = (node) => getNodeAttr2(node, "__isRoot");
|
20281
|
-
const isNodeOpened = (node) => getNodeAttr2(node, "__isOpen");
|
20282
|
-
const hasChildNode = (node) => getNodeAttr2(node, "__hasChild");
|
20283
|
-
const renderData = computed(() => flatData.data.filter((item) => checkNodeIsOpen(item)));
|
20284
|
-
const isItemOpen = (item) => {
|
20285
|
-
var _a;
|
20286
|
-
if (typeof item === "object") {
|
20287
|
-
return isNodeOpened(item);
|
20288
|
-
}
|
20289
|
-
if (typeof item === "string") {
|
20290
|
-
return (_a = getSchemaVal2(item)) == null ? void 0 : _a.__isOpen;
|
20291
|
-
}
|
20292
|
-
return false;
|
20293
|
-
};
|
20294
|
-
const getRootIcon = (item) => isItemOpen(item) ? createVNode(folderShapeOpen, {
|
20295
|
-
"class": resolveClassName("tree-icon")
|
20296
|
-
}, null) : createVNode(folder, {
|
20297
|
-
"class": resolveClassName("tree-icon")
|
20298
|
-
}, null);
|
20299
|
-
const renderPrefixVal = (val) => {
|
20300
|
-
if (typeof val === "string") {
|
20301
|
-
return val;
|
20302
|
-
}
|
20303
|
-
if (typeof val === "object" && val !== null) {
|
20304
|
-
if (val.__v_isVNode) {
|
20305
|
-
return val;
|
20306
|
-
}
|
20307
|
-
const {
|
20308
|
-
node,
|
20309
|
-
className,
|
20310
|
-
text,
|
20311
|
-
style
|
20312
|
-
} = val;
|
20313
|
-
return h$1(node, {
|
20314
|
-
class: className,
|
20315
|
-
style
|
20316
|
-
}, text);
|
20317
|
-
}
|
20318
|
-
return null;
|
20319
|
-
};
|
20320
|
-
const getActionIcon = (item) => {
|
20321
|
-
let prefixFnVal = null;
|
20322
|
-
if (typeof props.prefixIcon === "function") {
|
20323
|
-
prefixFnVal = props.prefixIcon(isRootNode(item), hasChildNode(item) || item.async, isItemOpen(item), "action", item);
|
20324
|
-
if (prefixFnVal !== "default") {
|
20325
|
-
return renderPrefixVal(prefixFnVal);
|
20326
|
-
}
|
20327
|
-
}
|
20328
|
-
if (prefixFnVal === "default" || typeof props.prefixIcon === "boolean" && props.prefixIcon) {
|
20329
|
-
if (hasChildNode(item) || item.async) {
|
20330
|
-
return isItemOpen(item) ? createVNode(downShape, null, null) : createVNode(rightShape, null, null);
|
20838
|
+
const setNodeAction = (args, action, value) => {
|
20839
|
+
const resolveNodeItem = (node) => {
|
20840
|
+
if (typeof node === "string") {
|
20841
|
+
return {
|
20842
|
+
__uuid: node
|
20843
|
+
};
|
20331
20844
|
}
|
20332
|
-
|
20333
|
-
|
20334
|
-
};
|
20335
|
-
const getNodePrefixIcon = (item) => {
|
20336
|
-
let prefixFnVal = null;
|
20337
|
-
if (typeof props.prefixIcon === "function") {
|
20338
|
-
prefixFnVal = props.prefixIcon(isRootNode(item), hasChildNode(item) || item.async, isItemOpen(item), "node_type", item);
|
20339
|
-
if (prefixFnVal !== "default") {
|
20340
|
-
return renderPrefixVal(prefixFnVal);
|
20845
|
+
if (Object.prototype.hasOwnProperty.call(node, "__uuid")) {
|
20846
|
+
return node;
|
20341
20847
|
}
|
20342
|
-
|
20343
|
-
|
20344
|
-
|
20345
|
-
|
20346
|
-
|
20347
|
-
}
|
20348
|
-
return null;
|
20349
|
-
};
|
20350
|
-
const getLoadingIcon = (item) => item.loading ? createVNode(spinner, null, null) : "";
|
20351
|
-
const setNodeOpened = (item) => {
|
20352
|
-
const newVal = !isItemOpen(item);
|
20353
|
-
setNodeAttr(item, "__isOpen", newVal);
|
20354
|
-
if (newVal) {
|
20848
|
+
console.error("setNodeAction Error: cannot find uid for the ndoe item");
|
20849
|
+
return node;
|
20850
|
+
};
|
20851
|
+
if (Array.isArray(args)) {
|
20852
|
+
args.forEach((node) => setNodeAttr(resolveNodeItem(node), action, value));
|
20355
20853
|
return;
|
20356
20854
|
}
|
20357
|
-
|
20855
|
+
setNodeAttr(resolveNodeItem(args), action, value);
|
20358
20856
|
};
|
20359
|
-
const
|
20360
|
-
|
20361
|
-
setNodeAttr(item, "__isOpen", true);
|
20362
|
-
const nodeValue = Array.isArray(resp) ? resp : [resp];
|
20363
|
-
updateTreeNode(getNodePath(item), props.data, props.children, props.children, nodeValue);
|
20364
|
-
}
|
20857
|
+
const setOpen = (item, isOpen = true) => {
|
20858
|
+
setNodeAction(item, "__isOpen", isOpen);
|
20365
20859
|
};
|
20366
|
-
const
|
20367
|
-
|
20368
|
-
const {
|
20369
|
-
callback = null,
|
20370
|
-
cache = true
|
20371
|
-
} = props.async || {};
|
20372
|
-
if (typeof callback === "function") {
|
20373
|
-
if (item.cached) {
|
20374
|
-
return;
|
20375
|
-
}
|
20376
|
-
Object.assign(item, {
|
20377
|
-
loading: true
|
20378
|
-
});
|
20379
|
-
callback(item, (resp) => setNodeRemoteLoad(resp, item)).then((resp) => setNodeRemoteLoad(resp, item)).catch((err) => console.error("load remote data error:", err)).finally(() => {
|
20380
|
-
assignTreeNode(getNodePath(item), props.data, props.children, __spreadValues({
|
20381
|
-
loading: false
|
20382
|
-
}, cache ? {
|
20383
|
-
cached: true
|
20384
|
-
} : {}));
|
20385
|
-
});
|
20386
|
-
} else {
|
20387
|
-
console.error("async need to set prop: asyncLoad with function wich will return promise object");
|
20388
|
-
}
|
20389
|
-
}
|
20390
|
-
if (hasChildNode(item)) {
|
20391
|
-
setNodeOpened(item);
|
20392
|
-
}
|
20393
|
-
};
|
20394
|
-
const handleNodeActionClick = (e, node) => {
|
20395
|
-
e.stopImmediatePropagation();
|
20396
|
-
e.stopPropagation();
|
20397
|
-
e.preventDefault();
|
20398
|
-
hanldeTreeNodeClick(node);
|
20399
|
-
};
|
20400
|
-
const handleNodeContentClick = (item) => {
|
20401
|
-
if (!checkedNodes.includes(item.__uuid)) {
|
20402
|
-
checkedNodes.forEach((__uuid) => setNodeAttr({
|
20403
|
-
__uuid
|
20404
|
-
}, "__checked", false));
|
20405
|
-
checkedNodes.length = 0;
|
20406
|
-
setNodeAttr(item, "__checked", true);
|
20407
|
-
checkedNodes.push(item.__uuid);
|
20408
|
-
if (!isNodeOpened(item)) {
|
20409
|
-
hanldeTreeNodeClick(item);
|
20410
|
-
}
|
20411
|
-
ctx.emit("check", item, getSchemaVal2(item.__uuid));
|
20412
|
-
}
|
20413
|
-
};
|
20414
|
-
const checkNodeIsOpen = (node) => isRootNode(node) || isItemOpen(node) || isItemOpen(getNodeAttr2(node, "__parentId"));
|
20415
|
-
const filterNextNode = (depth, node) => {
|
20416
|
-
if (isRootNode(node)) {
|
20417
|
-
return false;
|
20418
|
-
}
|
20419
|
-
const nodepath = getNodePath(node);
|
20420
|
-
const paths = `${nodepath}`.split("-").slice(0, depth + 1);
|
20421
|
-
const currentPath = paths.join("-");
|
20422
|
-
if (currentPath === nodepath) {
|
20423
|
-
return true;
|
20424
|
-
}
|
20425
|
-
const lastLevel = paths.pop();
|
20426
|
-
const nextLevel = parseInt(lastLevel, 10);
|
20427
|
-
paths.push(`${nextLevel + 1}`);
|
20428
|
-
const nextNodePath = paths.join("-");
|
20429
|
-
return schemaValues.value.some((val) => val.__path === nextNodePath);
|
20430
|
-
};
|
20431
|
-
const getVirtualLines = (node) => {
|
20432
|
-
if (!props.levelLine) {
|
20433
|
-
return null;
|
20434
|
-
}
|
20435
|
-
const getNodeLineStyle = (dpth) => ({
|
20436
|
-
"--depth": dpth
|
20437
|
-
});
|
20438
|
-
const maxDeep = getNodeAttr2(node, "__depth") + 1;
|
20439
|
-
return new Array(maxDeep).fill("").map((_2, index) => index).filter((depth) => filterNextNode(depth, node)).filter((depth) => depth > 0).map((index) => createVNode("span", {
|
20440
|
-
"class": "node-virtual-line",
|
20441
|
-
"style": getNodeLineStyle(maxDeep - index)
|
20442
|
-
}, null));
|
20860
|
+
const setChecked = (item, checked = true) => {
|
20861
|
+
setNodeAction(item, "__checked", checked);
|
20443
20862
|
};
|
20863
|
+
ctx.expose({
|
20864
|
+
hanldeTreeNodeClick,
|
20865
|
+
setOpen,
|
20866
|
+
setChecked,
|
20867
|
+
setNodeAction
|
20868
|
+
});
|
20444
20869
|
const root = ref();
|
20445
20870
|
const setNodeTextStyle = () => {
|
20446
|
-
var
|
20447
|
-
if ((
|
20871
|
+
var _a2;
|
20872
|
+
if ((_a2 = root.value) == null ? void 0 : _a2.$el) {
|
20448
20873
|
const selector = `.${resolveClassName("tree-node")}`;
|
20449
20874
|
const ctxSelector = `.${resolveClassName("node-content")}`;
|
20450
20875
|
Array.prototype.forEach.call(root.value.$el.querySelectorAll(selector), (nodeEl) => {
|
@@ -20463,45 +20888,15 @@ var Component = defineComponent({
|
|
20463
20888
|
onUpdated(() => {
|
20464
20889
|
setNodeTextStyle();
|
20465
20890
|
});
|
20466
|
-
return {
|
20467
|
-
renderData,
|
20468
|
-
flatData,
|
20469
|
-
root,
|
20470
|
-
hanldeTreeNodeClick,
|
20471
|
-
handleNodeContentClick,
|
20472
|
-
handleNodeActionClick,
|
20473
|
-
getActionIcon,
|
20474
|
-
getRootIcon,
|
20475
|
-
getVirtualLines,
|
20476
|
-
getNodePrefixIcon,
|
20477
|
-
getLoadingIcon
|
20478
|
-
};
|
20479
|
-
},
|
20480
|
-
render() {
|
20481
|
-
const props = this.$props;
|
20482
|
-
const renderTreeNode = (item) => createVNode("div", {
|
20483
|
-
"class": getNodeRowClass(item, this.flatData.schema)
|
20484
|
-
}, [createVNode("div", {
|
20485
|
-
"class": getNodeItemClass(item, this.flatData.schema, props),
|
20486
|
-
"style": getNodeItemStyle(item, props, this.flatData),
|
20487
|
-
"onClick": () => this.handleNodeContentClick(item)
|
20488
|
-
}, [createVNode("span", {
|
20489
|
-
"class": resolveClassName("node-action"),
|
20490
|
-
"onClick": (e) => this.handleNodeActionClick(e, item)
|
20491
|
-
}, [this.getActionIcon(item)]), createVNode("span", {
|
20492
|
-
"class": resolveClassName("node-content")
|
20493
|
-
}, [[this.getNodePrefixIcon(item), this.getLoadingIcon(item)], createVNode("span", {
|
20494
|
-
"class": resolveClassName("node-text")
|
20495
|
-
}, [getLabel(item, props)])]), this.getVirtualLines(item)])]);
|
20496
|
-
return createVNode(BkVirtualRender, {
|
20891
|
+
return () => createVNode(BkVirtualRender, {
|
20497
20892
|
"class": resolveClassName("tree"),
|
20498
20893
|
"style": getTreeStyle(null, props),
|
20499
|
-
"list":
|
20894
|
+
"list": renderData.value,
|
20500
20895
|
"lineHeight": props.lineHeight,
|
20501
20896
|
"enabled": props.virtualRender,
|
20502
20897
|
"contentClassName": resolveClassName("container"),
|
20503
20898
|
"throttleDelay": 0,
|
20504
|
-
"ref":
|
20899
|
+
"ref": root
|
20505
20900
|
}, {
|
20506
20901
|
default: (scoped) => (scoped.data || []).map(renderTreeNode)
|
20507
20902
|
});
|
@@ -20873,6 +21268,129 @@ var FormItem = defineComponent({
|
|
20873
21268
|
}
|
20874
21269
|
});
|
20875
21270
|
const BkForm = withInstallProps(Form, { FormItem, ComposeFormItem });
|
21271
|
+
const colProps = {
|
21272
|
+
span: PropTypes.number.def(1),
|
21273
|
+
offset: PropTypes.number.def(0),
|
21274
|
+
pull: PropTypes.number.def(0),
|
21275
|
+
push: PropTypes.number.def(0)
|
21276
|
+
};
|
21277
|
+
var Col = defineComponent({
|
21278
|
+
name: "Row",
|
21279
|
+
props: colProps,
|
21280
|
+
emits: [],
|
21281
|
+
setup(props, ctx) {
|
21282
|
+
const {
|
21283
|
+
col,
|
21284
|
+
gutter,
|
21285
|
+
flex
|
21286
|
+
} = inject("containerProps");
|
21287
|
+
const {
|
21288
|
+
span,
|
21289
|
+
offset: offset2,
|
21290
|
+
pull,
|
21291
|
+
push
|
21292
|
+
} = props;
|
21293
|
+
const realSpan = computed(() => span || col);
|
21294
|
+
provide("containerProps", {
|
21295
|
+
col: realSpan.value,
|
21296
|
+
gutter,
|
21297
|
+
flex
|
21298
|
+
});
|
21299
|
+
const formatPercentage = function(val) {
|
21300
|
+
return `${Number((val * 100).toFixed(3))}%`;
|
21301
|
+
};
|
21302
|
+
const style = computed(() => ({
|
21303
|
+
width: formatPercentage(realSpan.value / col),
|
21304
|
+
"padding-right": `${gutter / 2}px`,
|
21305
|
+
"padding-left": `${gutter / 2}px`,
|
21306
|
+
"margin-left": offset2 ? formatPercentage(offset2 / col) : null,
|
21307
|
+
right: pull ? formatPercentage(pull / col) : null,
|
21308
|
+
left: push ? formatPercentage(push / col) : null
|
21309
|
+
}));
|
21310
|
+
return () => {
|
21311
|
+
var _a, _b;
|
21312
|
+
return createVNode("div", {
|
21313
|
+
"class": "bk-grid-col",
|
21314
|
+
"style": style.value
|
21315
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
21316
|
+
};
|
21317
|
+
}
|
21318
|
+
});
|
21319
|
+
const containerProps = {
|
21320
|
+
col: PropTypes.number.def(24),
|
21321
|
+
gutter: PropTypes.number.def(20),
|
21322
|
+
margin: PropTypes.number.def(20),
|
21323
|
+
flex: PropTypes.bool.def(false),
|
21324
|
+
extCls: PropTypes.string
|
21325
|
+
};
|
21326
|
+
var Container = defineComponent({
|
21327
|
+
name: "Container",
|
21328
|
+
props: containerProps,
|
21329
|
+
emits: [],
|
21330
|
+
setup(props, ctx) {
|
21331
|
+
const {
|
21332
|
+
col,
|
21333
|
+
gutter,
|
21334
|
+
flex,
|
21335
|
+
extCls
|
21336
|
+
} = props;
|
21337
|
+
provide("containerProps", {
|
21338
|
+
col,
|
21339
|
+
gutter,
|
21340
|
+
flex
|
21341
|
+
});
|
21342
|
+
const classes2 = computed(() => extCls ? `bk-grid-container ${extCls}` : "bk-grid-container");
|
21343
|
+
const style = computed(() => {
|
21344
|
+
const {
|
21345
|
+
margin
|
21346
|
+
} = props;
|
21347
|
+
return {
|
21348
|
+
"padding-right": `${margin}px`,
|
21349
|
+
"padding-left": `${margin}px`
|
21350
|
+
};
|
21351
|
+
});
|
21352
|
+
return () => {
|
21353
|
+
var _a, _b;
|
21354
|
+
return createVNode("div", {
|
21355
|
+
"class": classes2.value,
|
21356
|
+
"style": style.value
|
21357
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
21358
|
+
};
|
21359
|
+
}
|
21360
|
+
});
|
21361
|
+
var Row = defineComponent({
|
21362
|
+
name: "Row",
|
21363
|
+
emits: [],
|
21364
|
+
setup(_props, ctx) {
|
21365
|
+
const {
|
21366
|
+
col,
|
21367
|
+
gutter,
|
21368
|
+
flex
|
21369
|
+
} = inject("containerProps");
|
21370
|
+
provide("containerProps", {
|
21371
|
+
col,
|
21372
|
+
gutter,
|
21373
|
+
flex
|
21374
|
+
});
|
21375
|
+
const style = computed(() => {
|
21376
|
+
const o2 = flex ? {
|
21377
|
+
display: ["-webkit-box", "-ms-flexbox", "flex"]
|
21378
|
+
} : {};
|
21379
|
+
return __spreadProps(__spreadValues({}, o2), {
|
21380
|
+
"margin-right": `-${gutter / 2}px`,
|
21381
|
+
"margin-left": `-${gutter / 2}px`
|
21382
|
+
});
|
21383
|
+
});
|
21384
|
+
return () => {
|
21385
|
+
var _a, _b;
|
21386
|
+
return createVNode("div", {
|
21387
|
+
"class": "bk-grid-row",
|
21388
|
+
"style": style.value
|
21389
|
+
}, [(_b = (_a = ctx.slots).default) == null ? void 0 : _b.call(_a)]);
|
21390
|
+
};
|
21391
|
+
}
|
21392
|
+
});
|
21393
|
+
const BkContainer = withInstallProps(Container, { Row, Col });
|
20876
21394
|
var Dropdown = defineComponent({
|
20877
21395
|
name: "BkDropdown",
|
20878
21396
|
props: {
|
@@ -21051,6 +21569,9 @@ var components = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProp
|
|
21051
21569
|
Form: BkForm,
|
21052
21570
|
FormItem,
|
21053
21571
|
Pagination: BkPagination,
|
21572
|
+
Container: BkContainer,
|
21573
|
+
Row,
|
21574
|
+
Col,
|
21054
21575
|
Dropdown: BkDropdown,
|
21055
21576
|
DropdownMenu,
|
21056
21577
|
DropdownItem
|
@@ -21071,4 +21592,4 @@ var preset = {
|
|
21071
21592
|
install: createInstall(),
|
21072
21593
|
version: "0.0.1"
|
21073
21594
|
};
|
21074
|
-
export { BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkOption, OptionGroup as BkOptionGroup, BkBreadcrumb as Breadcrumb, BreadcrumbItem, BkButton as Button, ButtonGroup, BkCard as Card, BkCheckbox as Checkbox, BkCheckboxGroup as CheckboxGroup, BkCollaspe as Collapse, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkDropdown as Dropdown, DropdownItem, DropdownMenu, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, FormItem, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkPagination as Pagination, BkPopover as Popover, BkProgress as Progress, BkRadio as Radio, RadioButton, RadioGroup, BkRate as Rate, BkSelect as Select, BkSideslider as Sideslider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher, BkTab as Tab, TabPanel, BkTable as Table, BkTag as Tag, TagInput, Transfer, BkTree as Tree, BkVirtualRender as VirtualRender, tooltips as bkTooltips, ClickOutside as clickoutside, preset as default, mousewheel };
|
21595
|
+
export { BkAlert as Alert, BkAnimateNumber as AnimateNumber, BkBacktop as Backtop, BkBadge as Badge, BkOption, OptionGroup as BkOptionGroup, BkBreadcrumb as Breadcrumb, BreadcrumbItem, BkButton as Button, ButtonGroup, BkCard as Card, BkCheckbox as Checkbox, BkCheckboxGroup as CheckboxGroup, Col, BkCollaspe as Collapse, BkContainer as Container, BkDatePicker as DatePicker, BkDialog as Dialog, BkDivider as Divider, BkDropdown as Dropdown, DropdownItem, DropdownMenu, BkException as Exception, BkFixedNavbar as FixedNavbar, BkForm as Form, FormItem, BkInput as Input, BkLink as Link, BkLoading as Loading, BkMenu as Menu, Message, BkModal as Modal, Navigation, Notify, BkPagination as Pagination, BkPopover as Popover, BkProgress as Progress, BkRadio as Radio, RadioButton, RadioGroup, BkRate as Rate, Row, BkSelect as Select, BkSideslider as Sideslider, BkSteps as Steps, BkSwiper as Swiper, BkSwitcher as Switcher, BkTab as Tab, TabPanel, BkTable as Table, BkTag as Tag, TagInput, Transfer, BkTree as Tree, BkVirtualRender as VirtualRender, tooltips as bkTooltips, ClickOutside as clickoutside, preset as default, mousewheel };
|