@deot/vc-components 1.0.23 → 1.0.24
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 +42 -17
- package/dist/index.d.ts +70 -4
- package/dist/index.iife.js +42 -17
- package/dist/index.js +42 -17
- package/dist/index.style.css +1 -1
- package/dist/index.umd.cjs +42 -17
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -8479,7 +8479,7 @@ const props$P = {
|
|
|
8479
8479
|
},
|
|
8480
8480
|
width: {
|
|
8481
8481
|
type: Number,
|
|
8482
|
-
default:
|
|
8482
|
+
default: 600
|
|
8483
8483
|
},
|
|
8484
8484
|
height: {
|
|
8485
8485
|
type: Number,
|
|
@@ -8505,6 +8505,8 @@ const props$P = {
|
|
|
8505
8505
|
maskStyle: [Object, String],
|
|
8506
8506
|
wrapperClass: [Object, String],
|
|
8507
8507
|
wrapperStyle: [Object, String],
|
|
8508
|
+
contentStyle: [Object, String],
|
|
8509
|
+
contentClass: [Object, String],
|
|
8508
8510
|
closeWithCancel: {
|
|
8509
8511
|
type: Boolean,
|
|
8510
8512
|
default: true
|
|
@@ -8664,7 +8666,8 @@ const DrawerView = /* @__PURE__ */ defineComponent({
|
|
|
8664
8666
|
"class": "vc-drawer__content-container"
|
|
8665
8667
|
}, [createVNode(Scroller, {
|
|
8666
8668
|
"native": false,
|
|
8667
|
-
"contentClass":
|
|
8669
|
+
"contentClass": [props.contentClass, 'vc-drawer__content'],
|
|
8670
|
+
"contentStyle": props.contentStyle
|
|
8668
8671
|
}, {
|
|
8669
8672
|
default: () => [typeof props.content === 'string' ? createVNode("div", {
|
|
8670
8673
|
"innerHTML": props.content
|
|
@@ -8956,7 +8959,10 @@ const props$L = {
|
|
|
8956
8959
|
type: String,
|
|
8957
8960
|
default: "right"
|
|
8958
8961
|
},
|
|
8959
|
-
contentStyle: String
|
|
8962
|
+
contentStyle: [Object, String],
|
|
8963
|
+
contentClass: [Object, String],
|
|
8964
|
+
labelStyle: [Object, String],
|
|
8965
|
+
labelClass: [Object, String]
|
|
8960
8966
|
};
|
|
8961
8967
|
|
|
8962
8968
|
const filterEmpty = (val) => {
|
|
@@ -9031,10 +9037,13 @@ const useFormItem = (expose) => {
|
|
|
9031
9037
|
});
|
|
9032
9038
|
const labelStyle = computed(() => {
|
|
9033
9039
|
const labelWidth = props.labelWidth === 0 || props.labelWidth ? props.labelWidth : isNest.value ? 0 : form.props.labelWidth;
|
|
9034
|
-
return
|
|
9035
|
-
|
|
9036
|
-
|
|
9037
|
-
|
|
9040
|
+
return [
|
|
9041
|
+
{
|
|
9042
|
+
width: labelPosition.value !== "top" && labelWidth && labelWidth > 0 ? `${labelWidth}px` : "auto",
|
|
9043
|
+
textAlign: labelPosition.value === "top" ? "left" : labelPosition.value
|
|
9044
|
+
},
|
|
9045
|
+
props.labelStyle
|
|
9046
|
+
];
|
|
9038
9047
|
});
|
|
9039
9048
|
const contentStyle = computed(() => {
|
|
9040
9049
|
const labelWidth = props.labelWidth === 0 || props.labelWidth ? props.labelWidth : form.props.labelWidth;
|
|
@@ -9246,14 +9255,14 @@ const FormItem = /* @__PURE__ */ defineComponent({
|
|
|
9246
9255
|
})];
|
|
9247
9256
|
return createVNode("div", {
|
|
9248
9257
|
"class": ['vc-form-item', classes.value]
|
|
9249
|
-
}, [createVNode("div", {
|
|
9258
|
+
}, [(label || slots.label) && createVNode("div", {
|
|
9250
9259
|
"style": labelStyle.value,
|
|
9251
|
-
"class":
|
|
9260
|
+
"class": ['vc-form-item__label', props.labelClass],
|
|
9252
9261
|
"for": labelFor
|
|
9253
9262
|
}, [createVNode("label", null, [label || slots.label?.()])]), createVNode("div", {
|
|
9254
9263
|
"class": "vc-form-item__wrapper"
|
|
9255
9264
|
}, [createVNode("div", {
|
|
9256
|
-
"class":
|
|
9265
|
+
"class": ['vc-form-item__content', props.contentClass],
|
|
9257
9266
|
"style": contentStyle.value
|
|
9258
9267
|
}, [slots.default?.(), slots.error ? slots.error({
|
|
9259
9268
|
show: showError.value,
|
|
@@ -10286,10 +10295,14 @@ const props$z = {
|
|
|
10286
10295
|
validator: (v) => /(small|medium|large)/.test(v),
|
|
10287
10296
|
default: "small"
|
|
10288
10297
|
},
|
|
10298
|
+
contentStyle: [Object, String],
|
|
10289
10299
|
contentClass: [Object, String],
|
|
10290
10300
|
width: {
|
|
10291
10301
|
type: Number
|
|
10292
10302
|
},
|
|
10303
|
+
height: {
|
|
10304
|
+
type: Number
|
|
10305
|
+
},
|
|
10293
10306
|
mask: {
|
|
10294
10307
|
type: Boolean,
|
|
10295
10308
|
default: true
|
|
@@ -10381,6 +10394,9 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10381
10394
|
const x = ref(0);
|
|
10382
10395
|
const y = ref(0);
|
|
10383
10396
|
const isActive = ref(false);
|
|
10397
|
+
|
|
10398
|
+
// 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
|
|
10399
|
+
const MAX_HEIGHT = IS_SERVER$1 ? 0 : window.innerHeight - 20;
|
|
10384
10400
|
const defaultSize = computed(() => {
|
|
10385
10401
|
let width = 0;
|
|
10386
10402
|
let height = 0;
|
|
@@ -10400,16 +10416,20 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10400
10416
|
}
|
|
10401
10417
|
return {
|
|
10402
10418
|
width: props.width || width,
|
|
10403
|
-
height
|
|
10419
|
+
height: Math.min(props.height || height, MAX_HEIGHT)
|
|
10404
10420
|
};
|
|
10405
10421
|
});
|
|
10406
10422
|
const basicStyle = computed(() => {
|
|
10407
|
-
|
|
10423
|
+
const result = {
|
|
10408
10424
|
width: `${defaultSize.value.width}px`,
|
|
10409
|
-
|
|
10410
|
-
// 注: 服务端渲染为0, 在客服端激活前,展示端存在问题【高度不定】
|
|
10411
|
-
maxHeight: IS_SERVER$1 ? 0 : `${window.innerHeight - 20}px`
|
|
10425
|
+
maxHeight: `${MAX_HEIGHT}px`
|
|
10412
10426
|
};
|
|
10427
|
+
if (props.height) {
|
|
10428
|
+
result.height = `${defaultSize.value.height}px`;
|
|
10429
|
+
} else {
|
|
10430
|
+
result.minHeight = `${defaultSize.value.height}px`;
|
|
10431
|
+
}
|
|
10432
|
+
return result;
|
|
10413
10433
|
});
|
|
10414
10434
|
const draggableStyle = computed(() => {
|
|
10415
10435
|
if (IS_SERVER$1 || !props.draggable) return {};
|
|
@@ -10532,6 +10552,7 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10532
10552
|
* container在最大值时,需要移除,宽度才会缩回去
|
|
10533
10553
|
*/
|
|
10534
10554
|
const handleContentResize = () => {
|
|
10555
|
+
if (props.height) return;
|
|
10535
10556
|
const needRefreshScroller = !!scroller.value.wrapper.style.getPropertyValue('height');
|
|
10536
10557
|
const needRefreshContainer = !!container.value.style.getPropertyValue('height');
|
|
10537
10558
|
needRefreshContainer && container.value.style.removeProperty('height');
|
|
@@ -10677,7 +10698,8 @@ const ModalView = /* @__PURE__ */ defineComponent({
|
|
|
10677
10698
|
"height": isTransitionEnd.value ? row.height : void 0,
|
|
10678
10699
|
"contentClass": [{
|
|
10679
10700
|
'is-confirm': props.mode
|
|
10680
|
-
}, props.contentClass, 'vc-modal__content']
|
|
10701
|
+
}, props.contentClass, 'vc-modal__content'],
|
|
10702
|
+
"contentStyle": props.contentStyle
|
|
10681
10703
|
}, {
|
|
10682
10704
|
default: () => [typeof props.content === 'string' ? createVNode("div", {
|
|
10683
10705
|
"innerHTML": props.content
|
|
@@ -15616,6 +15638,8 @@ const props$c = {
|
|
|
15616
15638
|
stripe: Boolean,
|
|
15617
15639
|
// 是否带有纵向边框
|
|
15618
15640
|
border: Boolean,
|
|
15641
|
+
// 是否分割线
|
|
15642
|
+
divider: Boolean,
|
|
15619
15643
|
// 非常影响表格虚拟滚动的性能,按容器的高度手动优化该值
|
|
15620
15644
|
// 后续考虑移除,动态计算
|
|
15621
15645
|
rows: {
|
|
@@ -15756,6 +15780,7 @@ const Table = /* @__PURE__ */ defineComponent({
|
|
|
15756
15780
|
'vc-table--fit': props.fit,
|
|
15757
15781
|
'vc-table--striped': props.stripe,
|
|
15758
15782
|
'vc-table--border': props.border || states.isGroup,
|
|
15783
|
+
'vc-table--divider': props.border || props.divider,
|
|
15759
15784
|
'vc-table--group': states.isGroup,
|
|
15760
15785
|
'vc-table--fluid-height': props.maxHeight,
|
|
15761
15786
|
'vc-table--scrollable-x': layout.states.scrollX,
|
|
@@ -16540,7 +16565,7 @@ const defaultRenderCell = (rowData = {}) => {
|
|
|
16540
16565
|
}
|
|
16541
16566
|
const line = column.line || VcInstance.options.TableColumn?.line;
|
|
16542
16567
|
if (line && value) {
|
|
16543
|
-
const base = rowData.isHead || rowData.isTail ?
|
|
16568
|
+
const base = rowData.isHead || rowData.isTail ? 36 : 24; // 目前gap是12
|
|
16544
16569
|
const style = {
|
|
16545
16570
|
// 目前左右pading为10
|
|
16546
16571
|
// TODO: 含有border还要-1
|