rayyy-vue-table-components 2.0.45 → 2.0.46

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.
@@ -15,6 +15,7 @@ declare const _default: <T extends Record<string, unknown> = Record<string, unkn
15
15
  data: T[];
16
16
  columns: TableColumn<T>[];
17
17
  showSelection?: boolean;
18
+ showIndex?: boolean;
18
19
  showSummary?: boolean;
19
20
  showOverFlowTooltip?: boolean;
20
21
  summaryMethod?: ((param: {
@@ -15,6 +15,8 @@ export interface BaseTableProps<T extends Record<string, unknown> = Record<strin
15
15
  columns: TableColumn<T>[]
16
16
  /** 是否顯示選擇列 */
17
17
  showSelection?: boolean
18
+ /** 是否顯示索引列 */
19
+ showIndex?: boolean
18
20
  /** 是否顯示匯總行 */
19
21
  showSummary?: boolean
20
22
  /** 是否顯示溢出提示 */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rayyy-vue-table-components",
3
- "version": "2.0.45",
3
+ "version": "2.0.46",
4
4
  "description": "Vue 3 + Element Plus 表格組件庫",
5
5
  "type": "module",
6
6
  "main": "./dist/index.umd.js",
@@ -33,7 +33,7 @@ $colors: (
33
33
  --main-color-light-8: #b3def0;
34
34
  --main-color-light-9: #ccedf7;
35
35
  --main-color-dark-2: #005b96;
36
- --main-color-border: #606266;
36
+ --main-color-border: #c5c8cc;
37
37
 
38
38
  // 成功色系
39
39
  --el-color-success: #67c23a;
@@ -13,6 +13,7 @@ type Props<T extends Record<string, unknown> = Record<string, unknown>> = {
13
13
  data: T[]
14
14
  columns: TableColumn<T>[]
15
15
  showSelection?: boolean
16
+ showIndex?: boolean
16
17
  showSummary?: boolean
17
18
  showOverFlowTooltip?: boolean
18
19
  summaryMethod?: (param: {
@@ -30,6 +31,7 @@ const props = withDefaults(defineProps<Props<T>>(), {
30
31
  loading: false,
31
32
  data: () => [],
32
33
  showSelection: false,
34
+ showIndex: false,
33
35
  showSummary: false,
34
36
  showOverFlowTooltip: false,
35
37
  showCheckBtn: false,
@@ -101,6 +103,9 @@ const operatorWidth = computed(() => {
101
103
  <!-- 選擇列 -->
102
104
  <el-table-column v-if="showSelection" type="selection" width="60" fixed="left" align="center" />
103
105
 
106
+ <!-- 索引列 -->
107
+ <el-table-column v-if="showIndex" type="index" width="60" fixed="left" align="center" label="No" />
108
+
104
109
  <!-- 數據列 -->
105
110
  <el-table-column v-for="(column, index) in columns" :key="index" v-bind="column">
106
111
  <template #default="{ row }">
@@ -16,6 +16,8 @@ export interface BaseTableProps<T extends Record<string, unknown> = Record<strin
16
16
  columns: TableColumn<T>[]
17
17
  /** 是否顯示選擇列 */
18
18
  showSelection?: boolean
19
+ /** 是否顯示索引列 */
20
+ showIndex?: boolean
19
21
  /** 是否顯示匯總行 */
20
22
  showSummary?: boolean
21
23
  /** 是否顯示溢出提示 */