@deot/vc-components 1.0.29 → 1.0.31

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 CHANGED
@@ -15398,10 +15398,10 @@ const HIDDEN_TEXT_STYLE = `
15398
15398
  position: absolute!important;
15399
15399
  word-break: break-all!important;
15400
15400
  overflow: auto!important;
15401
- opacity: 1!important;
15401
+ opacity: 0!important;
15402
15402
  z-index: -1000!important;
15403
15403
  top: 0!important;
15404
- right: 100px!important;
15404
+ right: 0!important;
15405
15405
  `;
15406
15406
  const SIZING_STYLE$1 = [
15407
15407
  "letter-spacing",
@@ -15612,12 +15612,13 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15612
15612
  }
15613
15613
  // 判断是否text-overflow, 如果是就显示tooltip
15614
15614
  const el = e.target.querySelector('.vc-table__text-line');
15615
- if (!el) return;
15615
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
15616
+ if (!el || !line) return;
15616
15617
  const value = `${row[column.prop]}`;
15617
15618
  const endIndex = getFitIndex({
15618
15619
  el,
15619
15620
  value,
15620
- line: column.line,
15621
+ line,
15621
15622
  suffix: '...'
15622
15623
  });
15623
15624
  if (endIndex > 0 && endIndex < value.length - 1) {
@@ -15628,6 +15629,7 @@ const TableBody = /* @__PURE__ */ vue.defineComponent({
15628
15629
  hover: true,
15629
15630
  alone: true,
15630
15631
  autoWidth: true,
15632
+ placement: 'top',
15631
15633
  content: value
15632
15634
  });
15633
15635
  }
@@ -16957,7 +16959,7 @@ const defaultRenderCell = (rowData = {}) => {
16957
16959
  if (formatter) {
16958
16960
  return column.formatter(rowData);
16959
16961
  }
16960
- const line = column.line || VcInstance.options.TableColumn?.line;
16962
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
16961
16963
  if (line && value) {
16962
16964
  const style = {
16963
16965
  '-webkit-line-clamp': line
@@ -17019,11 +17021,7 @@ const TableColumn = /* @__PURE__ */ vue.defineComponent({
17019
17021
  type: String,
17020
17022
  default: 'default'
17021
17023
  },
17022
- // 默认只展示一行
17023
- line: {
17024
- type: Number,
17025
- default: 0
17026
- },
17024
+ line: Number,
17027
17025
  label: String,
17028
17026
  labelClass: String,
17029
17027
  prop: String,
package/dist/index.d.ts CHANGED
@@ -7644,10 +7644,7 @@ type: {
7644
7644
  type: StringConstructor;
7645
7645
  default: string;
7646
7646
  };
7647
- line: {
7648
- type: NumberConstructor;
7649
- default: number;
7650
- };
7647
+ line: NumberConstructor;
7651
7648
  label: StringConstructor;
7652
7649
  labelClass: StringConstructor;
7653
7650
  prop: StringConstructor;
@@ -7684,10 +7681,7 @@ type: {
7684
7681
  type: StringConstructor;
7685
7682
  default: string;
7686
7683
  };
7687
- line: {
7688
- type: NumberConstructor;
7689
- default: number;
7690
- };
7684
+ line: NumberConstructor;
7691
7685
  label: StringConstructor;
7692
7686
  labelClass: StringConstructor;
7693
7687
  prop: StringConstructor;
@@ -7718,7 +7712,6 @@ filterPopupClass: StringConstructor;
7718
7712
  filter: FunctionConstructor;
7719
7713
  tooltip: (StringConstructor | FunctionConstructor)[];
7720
7714
  }>> & Readonly<{}>, {
7721
- line: number;
7722
7715
  type: string;
7723
7716
  reserveSelection: boolean;
7724
7717
  sortable: boolean;
@@ -11670,10 +11663,7 @@ type: {
11670
11663
  type: StringConstructor;
11671
11664
  default: string;
11672
11665
  };
11673
- line: {
11674
- type: NumberConstructor;
11675
- default: number;
11676
- };
11666
+ line: NumberConstructor;
11677
11667
  label: StringConstructor;
11678
11668
  labelClass: StringConstructor;
11679
11669
  prop: StringConstructor;
@@ -11710,10 +11700,7 @@ type: {
11710
11700
  type: StringConstructor;
11711
11701
  default: string;
11712
11702
  };
11713
- line: {
11714
- type: NumberConstructor;
11715
- default: number;
11716
- };
11703
+ line: NumberConstructor;
11717
11704
  label: StringConstructor;
11718
11705
  labelClass: StringConstructor;
11719
11706
  prop: StringConstructor;
@@ -11744,7 +11731,6 @@ filterPopupClass: StringConstructor;
11744
11731
  filter: FunctionConstructor;
11745
11732
  tooltip: (StringConstructor | FunctionConstructor)[];
11746
11733
  }>> & Readonly<{}>, {
11747
- line: number;
11748
11734
  type: string;
11749
11735
  reserveSelection: boolean;
11750
11736
  sortable: boolean;
@@ -41429,10 +41429,10 @@ var VcComponents = (function (exports, vue) {
41429
41429
  position: absolute!important;
41430
41430
  word-break: break-all!important;
41431
41431
  overflow: auto!important;
41432
- opacity: 1!important;
41432
+ opacity: 0!important;
41433
41433
  z-index: -1000!important;
41434
41434
  top: 0!important;
41435
- right: 100px!important;
41435
+ right: 0!important;
41436
41436
  `;
41437
41437
  const SIZING_STYLE$1 = [
41438
41438
  "letter-spacing",
@@ -41643,12 +41643,13 @@ var VcComponents = (function (exports, vue) {
41643
41643
  }
41644
41644
  // 判断是否text-overflow, 如果是就显示tooltip
41645
41645
  const el = e.target.querySelector('.vc-table__text-line');
41646
- if (!el) return;
41646
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
41647
+ if (!el || !line) return;
41647
41648
  const value = `${row[column.prop]}`;
41648
41649
  const endIndex = getFitIndex({
41649
41650
  el,
41650
41651
  value,
41651
- line: column.line,
41652
+ line,
41652
41653
  suffix: '...'
41653
41654
  });
41654
41655
  if (endIndex > 0 && endIndex < value.length - 1) {
@@ -41659,6 +41660,7 @@ var VcComponents = (function (exports, vue) {
41659
41660
  hover: true,
41660
41661
  alone: true,
41661
41662
  autoWidth: true,
41663
+ placement: 'top',
41662
41664
  content: value
41663
41665
  });
41664
41666
  }
@@ -42988,7 +42990,7 @@ var VcComponents = (function (exports, vue) {
42988
42990
  if (formatter) {
42989
42991
  return column.formatter(rowData);
42990
42992
  }
42991
- const line = column.line || VcInstance.options.TableColumn?.line;
42993
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
42992
42994
  if (line && value) {
42993
42995
  const style = {
42994
42996
  '-webkit-line-clamp': line
@@ -43050,11 +43052,7 @@ var VcComponents = (function (exports, vue) {
43050
43052
  type: String,
43051
43053
  default: 'default'
43052
43054
  },
43053
- // 默认只展示一行
43054
- line: {
43055
- type: Number,
43056
- default: 0
43057
- },
43055
+ line: Number,
43058
43056
  label: String,
43059
43057
  labelClass: String,
43060
43058
  prop: String,
package/dist/index.js CHANGED
@@ -15376,10 +15376,10 @@ const HIDDEN_TEXT_STYLE = `
15376
15376
  position: absolute!important;
15377
15377
  word-break: break-all!important;
15378
15378
  overflow: auto!important;
15379
- opacity: 1!important;
15379
+ opacity: 0!important;
15380
15380
  z-index: -1000!important;
15381
15381
  top: 0!important;
15382
- right: 100px!important;
15382
+ right: 0!important;
15383
15383
  `;
15384
15384
  const SIZING_STYLE$1 = [
15385
15385
  "letter-spacing",
@@ -15590,12 +15590,13 @@ const TableBody = /* @__PURE__ */ defineComponent({
15590
15590
  }
15591
15591
  // 判断是否text-overflow, 如果是就显示tooltip
15592
15592
  const el = e.target.querySelector('.vc-table__text-line');
15593
- if (!el) return;
15593
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
15594
+ if (!el || !line) return;
15594
15595
  const value = `${row[column.prop]}`;
15595
15596
  const endIndex = getFitIndex({
15596
15597
  el,
15597
15598
  value,
15598
- line: column.line,
15599
+ line,
15599
15600
  suffix: '...'
15600
15601
  });
15601
15602
  if (endIndex > 0 && endIndex < value.length - 1) {
@@ -15606,6 +15607,7 @@ const TableBody = /* @__PURE__ */ defineComponent({
15606
15607
  hover: true,
15607
15608
  alone: true,
15608
15609
  autoWidth: true,
15610
+ placement: 'top',
15609
15611
  content: value
15610
15612
  });
15611
15613
  }
@@ -16935,7 +16937,7 @@ const defaultRenderCell = (rowData = {}) => {
16935
16937
  if (formatter) {
16936
16938
  return column.formatter(rowData);
16937
16939
  }
16938
- const line = column.line || VcInstance.options.TableColumn?.line;
16940
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
16939
16941
  if (line && value) {
16940
16942
  const style = {
16941
16943
  '-webkit-line-clamp': line
@@ -16997,11 +16999,7 @@ const TableColumn = /* @__PURE__ */ defineComponent({
16997
16999
  type: String,
16998
17000
  default: 'default'
16999
17001
  },
17000
- // 默认只展示一行
17001
- line: {
17002
- type: Number,
17003
- default: 0
17004
- },
17002
+ line: Number,
17005
17003
  label: String,
17006
17004
  labelClass: String,
17007
17005
  prop: String,
@@ -41432,10 +41432,10 @@
41432
41432
  position: absolute!important;
41433
41433
  word-break: break-all!important;
41434
41434
  overflow: auto!important;
41435
- opacity: 1!important;
41435
+ opacity: 0!important;
41436
41436
  z-index: -1000!important;
41437
41437
  top: 0!important;
41438
- right: 100px!important;
41438
+ right: 0!important;
41439
41439
  `;
41440
41440
  const SIZING_STYLE$1 = [
41441
41441
  "letter-spacing",
@@ -41646,12 +41646,13 @@
41646
41646
  }
41647
41647
  // 判断是否text-overflow, 如果是就显示tooltip
41648
41648
  const el = e.target.querySelector('.vc-table__text-line');
41649
- if (!el) return;
41649
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
41650
+ if (!el || !line) return;
41650
41651
  const value = `${row[column.prop]}`;
41651
41652
  const endIndex = getFitIndex({
41652
41653
  el,
41653
41654
  value,
41654
- line: column.line,
41655
+ line,
41655
41656
  suffix: '...'
41656
41657
  });
41657
41658
  if (endIndex > 0 && endIndex < value.length - 1) {
@@ -41662,6 +41663,7 @@
41662
41663
  hover: true,
41663
41664
  alone: true,
41664
41665
  autoWidth: true,
41666
+ placement: 'top',
41665
41667
  content: value
41666
41668
  });
41667
41669
  }
@@ -42991,7 +42993,7 @@
42991
42993
  if (formatter) {
42992
42994
  return column.formatter(rowData);
42993
42995
  }
42994
- const line = column.line || VcInstance.options.TableColumn?.line;
42996
+ const line = typeof column.line !== 'undefined' ? column.line : VcInstance.options.TableColumn?.line;
42995
42997
  if (line && value) {
42996
42998
  const style = {
42997
42999
  '-webkit-line-clamp': line
@@ -43053,11 +43055,7 @@
43053
43055
  type: String,
43054
43056
  default: 'default'
43055
43057
  },
43056
- // 默认只展示一行
43057
- line: {
43058
- type: Number,
43059
- default: 0
43060
- },
43058
+ line: Number,
43061
43059
  label: String,
43062
43060
  labelClass: String,
43063
43061
  prop: String,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@deot/vc-components",
3
- "version": "1.0.29",
3
+ "version": "1.0.31",
4
4
  "type": "module",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",