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.
- package/dist/index.es.js +1173 -1164
- package/dist/index.umd.js +1 -1
- package/dist/rayyy-vue-table-components.css +1 -1
- package/dist/src/components/tables/BaseTable.vue.d.ts +1 -0
- package/dist/src/types/components.d.ts +2 -0
- package/package.json +1 -1
- package/src/assets/styles/element/index.scss +1 -1
- package/src/components/tables/BaseTable.vue +5 -0
- package/src/types/components.d.ts +2 -0
|
@@ -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: {
|
package/package.json
CHANGED
|
@@ -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 }">
|