@deot/vc-components 1.0.20 → 1.0.22
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 +58 -36
- package/dist/index.d.ts +162 -0
- package/dist/index.iife.js +58 -36
- package/dist/index.js +58 -36
- package/dist/index.style.css +1 -1
- package/dist/index.umd.cjs +58 -36
- package/package.json +1 -1
package/dist/index.iife.js
CHANGED
|
@@ -8262,9 +8262,9 @@ var VcComponents = (function (exports, vue) {
|
|
|
8262
8262
|
default: true
|
|
8263
8263
|
},
|
|
8264
8264
|
autoWidth: {
|
|
8265
|
-
//
|
|
8265
|
+
// 当为false是,使用triggerEl宽度
|
|
8266
8266
|
type: Boolean,
|
|
8267
|
-
default:
|
|
8267
|
+
default: true
|
|
8268
8268
|
},
|
|
8269
8269
|
triggerEl: {
|
|
8270
8270
|
type: Object,
|
|
@@ -9434,10 +9434,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
9434
9434
|
wrapperStyle.value = $wrapperStyle;
|
|
9435
9435
|
arrowStyle.value = $arrowStyle;
|
|
9436
9436
|
|
|
9437
|
-
|
|
9438
|
-
|
|
9439
|
-
*/
|
|
9440
|
-
if (!props.autoWidth) return;
|
|
9437
|
+
// 自适应高度
|
|
9438
|
+
if (props.autoWidth) return;
|
|
9441
9439
|
wrapperW.value = {
|
|
9442
9440
|
width: `${triggerEl.getBoundingClientRect().width}px`
|
|
9443
9441
|
};
|
|
@@ -10509,7 +10507,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
10509
10507
|
"trigger": props.trigger,
|
|
10510
10508
|
"tag": props.tag,
|
|
10511
10509
|
"placement": props.placement,
|
|
10512
|
-
"autoWidth":
|
|
10510
|
+
"autoWidth": true,
|
|
10513
10511
|
"disabled": props.disabled,
|
|
10514
10512
|
"portalClass": ['is-padding-none', 'vc-date-picker--portal', props.portalClass],
|
|
10515
10513
|
"class": [classes.value, its.value.class, 'vc-date-picker'],
|
|
@@ -14738,6 +14736,14 @@ var VcComponents = (function (exports, vue) {
|
|
|
14738
14736
|
type: [String, Boolean],
|
|
14739
14737
|
default: "取消"
|
|
14740
14738
|
},
|
|
14739
|
+
okDisabled: {
|
|
14740
|
+
type: Boolean,
|
|
14741
|
+
default: false
|
|
14742
|
+
},
|
|
14743
|
+
cancelDisabled: {
|
|
14744
|
+
type: Boolean,
|
|
14745
|
+
default: false
|
|
14746
|
+
},
|
|
14741
14747
|
footer: {
|
|
14742
14748
|
type: Boolean,
|
|
14743
14749
|
default: true
|
|
@@ -14887,11 +14893,13 @@ var VcComponents = (function (exports, vue) {
|
|
|
14887
14893
|
"class": ['vc-drawer__footer']
|
|
14888
14894
|
}, [slots['footer-extra']?.(), !slots.footer ? vue.createVNode(vue.Fragment, null, [props.cancelText && vue.createVNode(Button, {
|
|
14889
14895
|
"style": "margin-right: 8px;",
|
|
14896
|
+
"disabled": props.cancelDisabled,
|
|
14890
14897
|
"onClick": e => handleBefore(e, handleCancel)
|
|
14891
14898
|
}, {
|
|
14892
14899
|
default: () => [props.cancelText]
|
|
14893
14900
|
}), props.okText && vue.createVNode(Button, {
|
|
14894
14901
|
"type": "primary",
|
|
14902
|
+
"disabled": props.okDisabled,
|
|
14895
14903
|
"onClick": e => handleBefore(e, handleOk)
|
|
14896
14904
|
}, {
|
|
14897
14905
|
default: () => [props.okText]
|
|
@@ -17102,6 +17110,14 @@ var VcComponents = (function (exports, vue) {
|
|
|
17102
17110
|
type: Boolean,
|
|
17103
17111
|
default: false
|
|
17104
17112
|
},
|
|
17113
|
+
okDisabled: {
|
|
17114
|
+
type: Boolean,
|
|
17115
|
+
default: false
|
|
17116
|
+
},
|
|
17117
|
+
cancelDisabled: {
|
|
17118
|
+
type: Boolean,
|
|
17119
|
+
default: false
|
|
17120
|
+
},
|
|
17105
17121
|
/**
|
|
17106
17122
|
* 兼容portal设计, 实现Promise方式
|
|
17107
17123
|
*/
|
|
@@ -17447,11 +17463,13 @@ var VcComponents = (function (exports, vue) {
|
|
|
17447
17463
|
}, 'vc-modal__footer']
|
|
17448
17464
|
}, [slots['footer-extra']?.(), !slots.footer ? vue.createVNode(vue.Fragment, null, [props.cancelText && vue.createVNode(Button, {
|
|
17449
17465
|
"style": "margin-right: 8px;",
|
|
17466
|
+
"disabled": props.cancelDisabled,
|
|
17450
17467
|
"onClick": e => handleBefore(e, handleCancel)
|
|
17451
17468
|
}, {
|
|
17452
17469
|
default: () => [props.cancelText]
|
|
17453
17470
|
}), props.okText && vue.createVNode(Button, {
|
|
17454
17471
|
"type": "primary",
|
|
17472
|
+
"disabled": props.okDisabled,
|
|
17455
17473
|
"onClick": e => handleBefore(e, handleOk)
|
|
17456
17474
|
}, {
|
|
17457
17475
|
default: () => [props.okText]
|
|
@@ -18255,7 +18273,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
18255
18273
|
},
|
|
18256
18274
|
autoWidth: {
|
|
18257
18275
|
type: Boolean,
|
|
18258
|
-
default:
|
|
18276
|
+
default: false
|
|
18259
18277
|
},
|
|
18260
18278
|
max: {
|
|
18261
18279
|
type: Number,
|
|
@@ -18507,32 +18525,34 @@ var VcComponents = (function (exports, vue) {
|
|
|
18507
18525
|
"class": "vc-select__loading"
|
|
18508
18526
|
}, [vue.createVNode(Spin, {
|
|
18509
18527
|
"size": 16
|
|
18510
|
-
}, null)]), vue.createVNode(
|
|
18528
|
+
}, null)]), vue.createVNode(Scroller, {
|
|
18511
18529
|
"class": "vc-select__options"
|
|
18512
|
-
},
|
|
18513
|
-
|
|
18514
|
-
|
|
18515
|
-
|
|
18516
|
-
|
|
18517
|
-
|
|
18518
|
-
|
|
18519
|
-
|
|
18520
|
-
|
|
18521
|
-
|
|
18522
|
-
|
|
18523
|
-
|
|
18524
|
-
|
|
18530
|
+
}, {
|
|
18531
|
+
default: () => [props.data ? vue.createVNode("div", null, [props.data.map(item => {
|
|
18532
|
+
let _slot;
|
|
18533
|
+
return Array.isArray(item.children) ? vue.createVNode(OptionGroup, {
|
|
18534
|
+
"value": item.value,
|
|
18535
|
+
"label": item.label,
|
|
18536
|
+
"key": item.value
|
|
18537
|
+
}, _isSlot$1(_slot = item.children.map($item => {
|
|
18538
|
+
return vue.createVNode(Option, {
|
|
18539
|
+
"key": $item.value,
|
|
18540
|
+
"value": $item.value,
|
|
18541
|
+
"label": $item.label,
|
|
18542
|
+
"disabled": $item.disabled,
|
|
18543
|
+
"filterable": $item.filterable
|
|
18544
|
+
}, null);
|
|
18545
|
+
})) ? _slot : {
|
|
18546
|
+
default: () => [_slot]
|
|
18547
|
+
}) : vue.createVNode(Option, {
|
|
18548
|
+
"key": item.value,
|
|
18549
|
+
"value": item.value,
|
|
18550
|
+
"label": item.label,
|
|
18551
|
+
"disabled": item.disabled,
|
|
18552
|
+
"filterable": item.filterable
|
|
18525
18553
|
}, null);
|
|
18526
|
-
}))
|
|
18527
|
-
|
|
18528
|
-
}) : vue.createVNode(Option, {
|
|
18529
|
-
"key": item.value,
|
|
18530
|
-
"value": item.value,
|
|
18531
|
-
"label": item.label,
|
|
18532
|
-
"disabled": item.disabled,
|
|
18533
|
-
"filterable": item.filterable
|
|
18534
|
-
}, null);
|
|
18535
|
-
})]) : slots.default?.()])]);
|
|
18554
|
+
})]) : slots.default?.()]
|
|
18555
|
+
})]);
|
|
18536
18556
|
}
|
|
18537
18557
|
});
|
|
18538
18558
|
};
|
|
@@ -39959,8 +39979,8 @@ var VcComponents = (function (exports, vue) {
|
|
|
39959
39979
|
scrollPosition.value = 'middle';
|
|
39960
39980
|
}
|
|
39961
39981
|
if (!props.height) {
|
|
39962
|
-
leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
|
|
39963
|
-
rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
|
|
39982
|
+
leftFixedBody.value && (leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
|
|
39983
|
+
rightFixedBody.value && (rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
|
|
39964
39984
|
}
|
|
39965
39985
|
}, 20);
|
|
39966
39986
|
const handleScollY = e => {
|
|
@@ -40440,9 +40460,10 @@ var VcComponents = (function (exports, vue) {
|
|
|
40440
40460
|
emit('clip', endIndex.value);
|
|
40441
40461
|
};
|
|
40442
40462
|
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce$1(calcPosition, props.resize || 0);
|
|
40463
|
+
let poper;
|
|
40443
40464
|
const handleMouseOver = e => {
|
|
40444
40465
|
if (endIndex.value > 0) {
|
|
40445
|
-
Popover.open({
|
|
40466
|
+
poper = Popover.open({
|
|
40446
40467
|
el: document.body,
|
|
40447
40468
|
name: 'vc-text-popover',
|
|
40448
40469
|
// 确保不重复创建
|
|
@@ -40467,6 +40488,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
40467
40488
|
});
|
|
40468
40489
|
vue.onBeforeUnmount(() => {
|
|
40469
40490
|
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
40491
|
+
poper?.destroy?.();
|
|
40470
40492
|
});
|
|
40471
40493
|
const Content = props.tag;
|
|
40472
40494
|
return () => {
|
|
@@ -40618,7 +40640,7 @@ var VcComponents = (function (exports, vue) {
|
|
|
40618
40640
|
return vue.createVNode(Text, {
|
|
40619
40641
|
"style": style,
|
|
40620
40642
|
"line": line,
|
|
40621
|
-
"value": value
|
|
40643
|
+
"value": `${value}`
|
|
40622
40644
|
}, null);
|
|
40623
40645
|
}
|
|
40624
40646
|
return value;
|
package/dist/index.js
CHANGED
|
@@ -2997,9 +2997,9 @@ const props$_ = {
|
|
|
2997
2997
|
default: true
|
|
2998
2998
|
},
|
|
2999
2999
|
autoWidth: {
|
|
3000
|
-
//
|
|
3000
|
+
// 当为false是,使用triggerEl宽度
|
|
3001
3001
|
type: Boolean,
|
|
3002
|
-
default:
|
|
3002
|
+
default: true
|
|
3003
3003
|
},
|
|
3004
3004
|
triggerEl: {
|
|
3005
3005
|
type: Object,
|
|
@@ -4105,10 +4105,8 @@ const PopoverWrapper = /* @__PURE__ */ defineComponent({
|
|
|
4105
4105
|
wrapperStyle.value = $wrapperStyle;
|
|
4106
4106
|
arrowStyle.value = $arrowStyle;
|
|
4107
4107
|
|
|
4108
|
-
|
|
4109
|
-
|
|
4110
|
-
*/
|
|
4111
|
-
if (!props.autoWidth) return;
|
|
4108
|
+
// 自适应高度
|
|
4109
|
+
if (props.autoWidth) return;
|
|
4112
4110
|
wrapperW.value = {
|
|
4113
4111
|
width: `${triggerEl.getBoundingClientRect().width}px`
|
|
4114
4112
|
};
|
|
@@ -5180,7 +5178,7 @@ const createPicker = (name, pickerProps, usePicker) => /* @__PURE__ */ defineCom
|
|
|
5180
5178
|
"trigger": props.trigger,
|
|
5181
5179
|
"tag": props.tag,
|
|
5182
5180
|
"placement": props.placement,
|
|
5183
|
-
"autoWidth":
|
|
5181
|
+
"autoWidth": true,
|
|
5184
5182
|
"disabled": props.disabled,
|
|
5185
5183
|
"portalClass": ['is-padding-none', 'vc-date-picker--portal', props.portalClass],
|
|
5186
5184
|
"class": [classes.value, its.value.class, 'vc-date-picker'],
|
|
@@ -8520,6 +8518,14 @@ const props$P = {
|
|
|
8520
8518
|
type: [String, Boolean],
|
|
8521
8519
|
default: "取消"
|
|
8522
8520
|
},
|
|
8521
|
+
okDisabled: {
|
|
8522
|
+
type: Boolean,
|
|
8523
|
+
default: false
|
|
8524
|
+
},
|
|
8525
|
+
cancelDisabled: {
|
|
8526
|
+
type: Boolean,
|
|
8527
|
+
default: false
|
|
8528
|
+
},
|
|
8523
8529
|
footer: {
|
|
8524
8530
|
type: Boolean,
|
|
8525
8531
|
default: true
|
|
@@ -8669,11 +8675,13 @@ const DrawerView = /* @__PURE__ */ defineComponent({
|
|
|
8669
8675
|
"class": ['vc-drawer__footer']
|
|
8670
8676
|
}, [slots['footer-extra']?.(), !slots.footer ? createVNode(Fragment$1, null, [props.cancelText && createVNode(Button, {
|
|
8671
8677
|
"style": "margin-right: 8px;",
|
|
8678
|
+
"disabled": props.cancelDisabled,
|
|
8672
8679
|
"onClick": e => handleBefore(e, handleCancel)
|
|
8673
8680
|
}, {
|
|
8674
8681
|
default: () => [props.cancelText]
|
|
8675
8682
|
}), props.okText && createVNode(Button, {
|
|
8676
8683
|
"type": "primary",
|
|
8684
|
+
"disabled": props.okDisabled,
|
|
8677
8685
|
"onClick": e => handleBefore(e, handleOk)
|
|
8678
8686
|
}, {
|
|
8679
8687
|
default: () => [props.okText]
|
|
@@ -10331,6 +10339,14 @@ const props$z = {
|
|
|
10331
10339
|
type: Boolean,
|
|
10332
10340
|
default: false
|
|
10333
10341
|
},
|
|
10342
|
+
okDisabled: {
|
|
10343
|
+
type: Boolean,
|
|
10344
|
+
default: false
|
|
10345
|
+
},
|
|
10346
|
+
cancelDisabled: {
|
|
10347
|
+
type: Boolean,
|
|
10348
|
+
default: false
|
|
10349
|
+
},
|
|
10334
10350
|
/**
|
|
10335
10351
|
* 兼容portal设计, 实现Promise方式
|
|
10336
10352
|
*/
|
|
@@ -10676,11 +10692,13 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10676
10692
|
}, 'vc-modal__footer']
|
|
10677
10693
|
}, [slots['footer-extra']?.(), !slots.footer ? createVNode(Fragment$1, null, [props.cancelText && createVNode(Button, {
|
|
10678
10694
|
"style": "margin-right: 8px;",
|
|
10695
|
+
"disabled": props.cancelDisabled,
|
|
10679
10696
|
"onClick": e => handleBefore(e, handleCancel)
|
|
10680
10697
|
}, {
|
|
10681
10698
|
default: () => [props.cancelText]
|
|
10682
10699
|
}), props.okText && createVNode(Button, {
|
|
10683
10700
|
"type": "primary",
|
|
10701
|
+
"disabled": props.okDisabled,
|
|
10684
10702
|
"onClick": e => handleBefore(e, handleOk)
|
|
10685
10703
|
}, {
|
|
10686
10704
|
default: () => [props.okText]
|
|
@@ -11484,7 +11502,7 @@ const props$r = {
|
|
|
11484
11502
|
},
|
|
11485
11503
|
autoWidth: {
|
|
11486
11504
|
type: Boolean,
|
|
11487
|
-
default:
|
|
11505
|
+
default: false
|
|
11488
11506
|
},
|
|
11489
11507
|
max: {
|
|
11490
11508
|
type: Number,
|
|
@@ -11736,32 +11754,34 @@ const Select = /* @__PURE__ */ defineComponent({
|
|
|
11736
11754
|
"class": "vc-select__loading"
|
|
11737
11755
|
}, [createVNode(Spin, {
|
|
11738
11756
|
"size": 16
|
|
11739
|
-
}, null)]), createVNode(
|
|
11757
|
+
}, null)]), createVNode(Scroller, {
|
|
11740
11758
|
"class": "vc-select__options"
|
|
11741
|
-
},
|
|
11742
|
-
|
|
11743
|
-
|
|
11744
|
-
|
|
11745
|
-
|
|
11746
|
-
|
|
11747
|
-
|
|
11748
|
-
|
|
11749
|
-
|
|
11750
|
-
|
|
11751
|
-
|
|
11752
|
-
|
|
11753
|
-
|
|
11759
|
+
}, {
|
|
11760
|
+
default: () => [props.data ? createVNode("div", null, [props.data.map(item => {
|
|
11761
|
+
let _slot;
|
|
11762
|
+
return Array.isArray(item.children) ? createVNode(OptionGroup, {
|
|
11763
|
+
"value": item.value,
|
|
11764
|
+
"label": item.label,
|
|
11765
|
+
"key": item.value
|
|
11766
|
+
}, _isSlot$1(_slot = item.children.map($item => {
|
|
11767
|
+
return createVNode(Option, {
|
|
11768
|
+
"key": $item.value,
|
|
11769
|
+
"value": $item.value,
|
|
11770
|
+
"label": $item.label,
|
|
11771
|
+
"disabled": $item.disabled,
|
|
11772
|
+
"filterable": $item.filterable
|
|
11773
|
+
}, null);
|
|
11774
|
+
})) ? _slot : {
|
|
11775
|
+
default: () => [_slot]
|
|
11776
|
+
}) : createVNode(Option, {
|
|
11777
|
+
"key": item.value,
|
|
11778
|
+
"value": item.value,
|
|
11779
|
+
"label": item.label,
|
|
11780
|
+
"disabled": item.disabled,
|
|
11781
|
+
"filterable": item.filterable
|
|
11754
11782
|
}, null);
|
|
11755
|
-
}))
|
|
11756
|
-
|
|
11757
|
-
}) : createVNode(Option, {
|
|
11758
|
-
"key": item.value,
|
|
11759
|
-
"value": item.value,
|
|
11760
|
-
"label": item.label,
|
|
11761
|
-
"disabled": item.disabled,
|
|
11762
|
-
"filterable": item.filterable
|
|
11763
|
-
}, null);
|
|
11764
|
-
})]) : slots.default?.()])]);
|
|
11783
|
+
})]) : slots.default?.()]
|
|
11784
|
+
})]);
|
|
11765
11785
|
}
|
|
11766
11786
|
});
|
|
11767
11787
|
};
|
|
@@ -15863,8 +15883,8 @@ const Table = /* @__PURE__ */ defineComponent({
|
|
|
15863
15883
|
scrollPosition.value = 'middle';
|
|
15864
15884
|
}
|
|
15865
15885
|
if (!props.height) {
|
|
15866
|
-
leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
|
|
15867
|
-
rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
|
|
15886
|
+
leftFixedBody.value && (leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
|
|
15887
|
+
rightFixedBody.value && (rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
|
|
15868
15888
|
}
|
|
15869
15889
|
}, 20);
|
|
15870
15890
|
const handleScollY = e => {
|
|
@@ -16344,9 +16364,10 @@ const Text = /* @__PURE__ */ defineComponent({
|
|
|
16344
16364
|
emit('clip', endIndex.value);
|
|
16345
16365
|
};
|
|
16346
16366
|
const handleResize = props.resize === true || props.resize === 0 ? calcPosition : debounce(calcPosition, props.resize || 0);
|
|
16367
|
+
let poper;
|
|
16347
16368
|
const handleMouseOver = e => {
|
|
16348
16369
|
if (endIndex.value > 0) {
|
|
16349
|
-
Popover.open({
|
|
16370
|
+
poper = Popover.open({
|
|
16350
16371
|
el: document.body,
|
|
16351
16372
|
name: 'vc-text-popover',
|
|
16352
16373
|
// 确保不重复创建
|
|
@@ -16371,6 +16392,7 @@ const Text = /* @__PURE__ */ defineComponent({
|
|
|
16371
16392
|
});
|
|
16372
16393
|
onBeforeUnmount(() => {
|
|
16373
16394
|
props.resize !== false && Resize.off(instance.vnode.el, handleResize);
|
|
16395
|
+
poper?.destroy?.();
|
|
16374
16396
|
});
|
|
16375
16397
|
const Content = props.tag;
|
|
16376
16398
|
return () => {
|
|
@@ -16522,7 +16544,7 @@ const defaultRenderCell = (rowData = {}) => {
|
|
|
16522
16544
|
return createVNode(Text, {
|
|
16523
16545
|
"style": style,
|
|
16524
16546
|
"line": line,
|
|
16525
|
-
"value": value
|
|
16547
|
+
"value": `${value}`
|
|
16526
16548
|
}, null);
|
|
16527
16549
|
}
|
|
16528
16550
|
return value;
|