@deot/vc 1.0.21 → 1.0.23

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.
@@ -26938,9 +26938,9 @@ var Vc = (function (exports, vue) {
26938
26938
  default: true
26939
26939
  },
26940
26940
  autoWidth: {
26941
- // 同宽
26941
+ // 当为false是,使用triggerEl宽度
26942
26942
  type: Boolean,
26943
- default: false
26943
+ default: true
26944
26944
  },
26945
26945
  triggerEl: {
26946
26946
  type: Object,
@@ -28023,7 +28023,7 @@ var Vc = (function (exports, vue) {
28023
28023
  fitPos.value = result;
28024
28024
  wrapperStyle.value = $wrapperStyle;
28025
28025
  arrowStyle.value = $arrowStyle;
28026
- if (!props2.autoWidth) return;
28026
+ if (props2.autoWidth) return;
28027
28027
  wrapperW.value = {
28028
28028
  width: `${triggerEl.getBoundingClientRect().width}px`
28029
28029
  };
@@ -29047,7 +29047,7 @@ var Vc = (function (exports, vue) {
29047
29047
  "trigger": props2.trigger,
29048
29048
  "tag": props2.tag,
29049
29049
  "placement": props2.placement,
29050
- "autoWidth": false,
29050
+ "autoWidth": true,
29051
29051
  "disabled": props2.disabled,
29052
29052
  "portalClass": ["is-padding-none", "vc-date-picker--portal", props2.portalClass],
29053
29053
  "class": [classes.value, its.value.class, "vc-date-picker"],
@@ -34990,7 +34990,7 @@ var Vc = (function (exports, vue) {
34990
34990
  },
34991
34991
  autoWidth: {
34992
34992
  type: Boolean,
34993
- default: true
34993
+ default: false
34994
34994
  },
34995
34995
  max: {
34996
34996
  type: Number,
@@ -35228,32 +35228,35 @@ var Vc = (function (exports, vue) {
35228
35228
  "class": "vc-select__loading"
35229
35229
  }, [vue.createVNode(Spin, {
35230
35230
  "size": 16
35231
- }, null)]), vue.createVNode("div", {
35232
- "class": "vc-select__options"
35233
- }, [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
35234
- let _slot;
35235
- return Array.isArray(item.children) ? vue.createVNode(OptionGroup, {
35236
- "value": item.value,
35237
- "label": item.label,
35238
- "key": item.value
35239
- }, _isSlot$1(_slot = item.children.map(($item) => {
35240
- return vue.createVNode(Option, {
35241
- "key": $item.value,
35242
- "value": $item.value,
35243
- "label": $item.label,
35244
- "disabled": $item.disabled,
35245
- "filterable": $item.filterable
35231
+ }, null)]), vue.createVNode(Scroller, {
35232
+ "class": "vc-select__options",
35233
+ "max-height": "200px"
35234
+ }, {
35235
+ default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
35236
+ let _slot;
35237
+ return Array.isArray(item.children) ? vue.createVNode(OptionGroup, {
35238
+ "value": item.value,
35239
+ "label": item.label,
35240
+ "key": item.value
35241
+ }, _isSlot$1(_slot = item.children.map(($item) => {
35242
+ return vue.createVNode(Option, {
35243
+ "key": $item.value,
35244
+ "value": $item.value,
35245
+ "label": $item.label,
35246
+ "disabled": $item.disabled,
35247
+ "filterable": $item.filterable
35248
+ }, null);
35249
+ })) ? _slot : {
35250
+ default: () => [_slot]
35251
+ }) : vue.createVNode(Option, {
35252
+ "key": item.value,
35253
+ "value": item.value,
35254
+ "label": item.label,
35255
+ "disabled": item.disabled,
35256
+ "filterable": item.filterable
35246
35257
  }, null);
35247
- })) ? _slot : {
35248
- default: () => [_slot]
35249
- }) : vue.createVNode(Option, {
35250
- "key": item.value,
35251
- "value": item.value,
35252
- "label": item.label,
35253
- "disabled": item.disabled,
35254
- "filterable": item.filterable
35255
- }, null);
35256
- })]) : slots.default?.()])]);
35258
+ })]) : slots.default?.()]
35259
+ })]);
35257
35260
  }
35258
35261
  });
35259
35262
  };
@@ -38382,6 +38385,7 @@ var Vc = (function (exports, vue) {
38382
38385
  const key = getValueOfRow(row, rowIndex);
38383
38386
  const selected = table.store.isSelected(row);
38384
38387
  const height = rowHeight || rowData.height;
38388
+ const maxColumnIndex = columns.length - 1;
38385
38389
  return vue.createVNode("div", {
38386
38390
  "key": key,
38387
38391
  "class": [getRowClass(row, rowIndex), "vc-table__tr"],
@@ -38417,8 +38421,10 @@ var Vc = (function (exports, vue) {
38417
38421
  column,
38418
38422
  rowIndex,
38419
38423
  columnIndex,
38424
+ selected,
38420
38425
  store: table.store,
38421
- selected
38426
+ isHead: columnIndex === 0,
38427
+ isTail: columnIndex === maxColumnIndex
38422
38428
  })]);
38423
38429
  })]);
38424
38430
  };
@@ -39165,8 +39171,8 @@ var Vc = (function (exports, vue) {
39165
39171
  scrollPosition.value = "middle";
39166
39172
  }
39167
39173
  if (!props2.height) {
39168
- leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
39169
- rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
39174
+ leftFixedBody.value && (leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
39175
+ rightFixedBody.value && (rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
39170
39176
  }
39171
39177
  }, 20);
39172
39178
  const handleScollY = (e) => {
@@ -39804,15 +39810,16 @@ var Vc = (function (exports, vue) {
39804
39810
  }
39805
39811
  const line = column.line || VcInstance.options.TableColumn?.line;
39806
39812
  if (line && value) {
39813
+ const base = rowData.isHead || rowData.isTail ? 30 : 20;
39807
39814
  const style2 = {
39808
39815
  // 目前左右pading为10
39809
39816
  // TODO: 含有border还要-1
39810
- width: (column.realWidth || column.width) - 20 + "px"
39817
+ width: (column.realWidth || column.width) - base + "px"
39811
39818
  };
39812
39819
  return vue.createVNode(Text, {
39813
39820
  "style": style2,
39814
39821
  "line": line,
39815
- "value": value
39822
+ "value": `${value}`
39816
39823
  }, null);
39817
39824
  }
39818
39825
  return value;
@@ -26941,9 +26941,9 @@
26941
26941
  default: true
26942
26942
  },
26943
26943
  autoWidth: {
26944
- // 同宽
26944
+ // 当为false是,使用triggerEl宽度
26945
26945
  type: Boolean,
26946
- default: false
26946
+ default: true
26947
26947
  },
26948
26948
  triggerEl: {
26949
26949
  type: Object,
@@ -28026,7 +28026,7 @@
28026
28026
  fitPos.value = result;
28027
28027
  wrapperStyle.value = $wrapperStyle;
28028
28028
  arrowStyle.value = $arrowStyle;
28029
- if (!props2.autoWidth) return;
28029
+ if (props2.autoWidth) return;
28030
28030
  wrapperW.value = {
28031
28031
  width: `${triggerEl.getBoundingClientRect().width}px`
28032
28032
  };
@@ -29050,7 +29050,7 @@
29050
29050
  "trigger": props2.trigger,
29051
29051
  "tag": props2.tag,
29052
29052
  "placement": props2.placement,
29053
- "autoWidth": false,
29053
+ "autoWidth": true,
29054
29054
  "disabled": props2.disabled,
29055
29055
  "portalClass": ["is-padding-none", "vc-date-picker--portal", props2.portalClass],
29056
29056
  "class": [classes.value, its.value.class, "vc-date-picker"],
@@ -34993,7 +34993,7 @@
34993
34993
  },
34994
34994
  autoWidth: {
34995
34995
  type: Boolean,
34996
- default: true
34996
+ default: false
34997
34997
  },
34998
34998
  max: {
34999
34999
  type: Number,
@@ -35231,32 +35231,35 @@
35231
35231
  "class": "vc-select__loading"
35232
35232
  }, [vue.createVNode(Spin, {
35233
35233
  "size": 16
35234
- }, null)]), vue.createVNode("div", {
35235
- "class": "vc-select__options"
35236
- }, [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
35237
- let _slot;
35238
- return Array.isArray(item.children) ? vue.createVNode(OptionGroup, {
35239
- "value": item.value,
35240
- "label": item.label,
35241
- "key": item.value
35242
- }, _isSlot$1(_slot = item.children.map(($item) => {
35243
- return vue.createVNode(Option, {
35244
- "key": $item.value,
35245
- "value": $item.value,
35246
- "label": $item.label,
35247
- "disabled": $item.disabled,
35248
- "filterable": $item.filterable
35234
+ }, null)]), vue.createVNode(Scroller, {
35235
+ "class": "vc-select__options",
35236
+ "max-height": "200px"
35237
+ }, {
35238
+ default: () => [props2.data ? vue.createVNode("div", null, [props2.data.map((item) => {
35239
+ let _slot;
35240
+ return Array.isArray(item.children) ? vue.createVNode(OptionGroup, {
35241
+ "value": item.value,
35242
+ "label": item.label,
35243
+ "key": item.value
35244
+ }, _isSlot$1(_slot = item.children.map(($item) => {
35245
+ return vue.createVNode(Option, {
35246
+ "key": $item.value,
35247
+ "value": $item.value,
35248
+ "label": $item.label,
35249
+ "disabled": $item.disabled,
35250
+ "filterable": $item.filterable
35251
+ }, null);
35252
+ })) ? _slot : {
35253
+ default: () => [_slot]
35254
+ }) : vue.createVNode(Option, {
35255
+ "key": item.value,
35256
+ "value": item.value,
35257
+ "label": item.label,
35258
+ "disabled": item.disabled,
35259
+ "filterable": item.filterable
35249
35260
  }, null);
35250
- })) ? _slot : {
35251
- default: () => [_slot]
35252
- }) : vue.createVNode(Option, {
35253
- "key": item.value,
35254
- "value": item.value,
35255
- "label": item.label,
35256
- "disabled": item.disabled,
35257
- "filterable": item.filterable
35258
- }, null);
35259
- })]) : slots.default?.()])]);
35261
+ })]) : slots.default?.()]
35262
+ })]);
35260
35263
  }
35261
35264
  });
35262
35265
  };
@@ -38385,6 +38388,7 @@
38385
38388
  const key = getValueOfRow(row, rowIndex);
38386
38389
  const selected = table.store.isSelected(row);
38387
38390
  const height = rowHeight || rowData.height;
38391
+ const maxColumnIndex = columns.length - 1;
38388
38392
  return vue.createVNode("div", {
38389
38393
  "key": key,
38390
38394
  "class": [getRowClass(row, rowIndex), "vc-table__tr"],
@@ -38420,8 +38424,10 @@
38420
38424
  column,
38421
38425
  rowIndex,
38422
38426
  columnIndex,
38427
+ selected,
38423
38428
  store: table.store,
38424
- selected
38429
+ isHead: columnIndex === 0,
38430
+ isTail: columnIndex === maxColumnIndex
38425
38431
  })]);
38426
38432
  })]);
38427
38433
  };
@@ -39168,8 +39174,8 @@
39168
39174
  scrollPosition.value = "middle";
39169
39175
  }
39170
39176
  if (!props2.height) {
39171
- leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
39172
- rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop;
39177
+ leftFixedBody.value && (leftFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
39178
+ rightFixedBody.value && (rightFixedBody.value.getRootElement().scrollTop = bodyXWrapper.value.scrollTop);
39173
39179
  }
39174
39180
  }, 20);
39175
39181
  const handleScollY = (e) => {
@@ -39807,15 +39813,16 @@
39807
39813
  }
39808
39814
  const line = column.line || VcInstance.options.TableColumn?.line;
39809
39815
  if (line && value) {
39816
+ const base = rowData.isHead || rowData.isTail ? 30 : 20;
39810
39817
  const style2 = {
39811
39818
  // 目前左右pading为10
39812
39819
  // TODO: 含有border还要-1
39813
- width: (column.realWidth || column.width) - 20 + "px"
39820
+ width: (column.realWidth || column.width) - base + "px"
39814
39821
  };
39815
39822
  return vue.createVNode(Text, {
39816
39823
  "style": style2,
39817
39824
  "line": line,
39818
- "value": value
39825
+ "value": `${value}`
39819
39826
  }, null);
39820
39827
  }
39821
39828
  return value;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc",
3
- "version": "1.0.21",
3
+ "version": "1.0.23",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",
@@ -19,9 +19,9 @@
19
19
  "access": "public"
20
20
  },
21
21
  "dependencies": {
22
- "@deot/vc-components": "^1.0.21",
23
- "@deot/vc-hooks": "^1.0.21",
24
- "@deot/vc-shared": "^1.0.21"
22
+ "@deot/vc-components": "^1.0.23",
23
+ "@deot/vc-hooks": "^1.0.23",
24
+ "@deot/vc-shared": "^1.0.23"
25
25
  },
26
26
  "peerDependencies": {
27
27
  "vue": "*"