@stonecrop/atable 0.3.7 → 0.3.8
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/atable.d.ts +213 -213
- package/dist/atable.js +434 -430
- package/dist/atable.js.map +1 -1
- package/dist/atable.umd.cjs +1 -1
- package/dist/atable.umd.cjs.map +1 -1
- package/dist/src/stores/table.d.ts +213 -213
- package/dist/src/stores/table.d.ts.map +1 -1
- package/dist/stores/table.js +3 -3
- package/package.json +3 -3
- package/src/components/ACell.vue +7 -7
- package/src/components/ARow.vue +4 -3
- package/src/stores/table.ts +5 -3
package/src/stores/table.ts
CHANGED
|
@@ -56,7 +56,7 @@ export const createTableStore = (initData: {
|
|
|
56
56
|
defaultDisplay[rowIndex] = {
|
|
57
57
|
childrenOpen: false,
|
|
58
58
|
expanded: false,
|
|
59
|
-
indent: row.indent ||
|
|
59
|
+
indent: row.indent || 0,
|
|
60
60
|
isParent: parents.has(rowIndex),
|
|
61
61
|
isRoot: row.parent === null || row.parent === undefined,
|
|
62
62
|
rowModified: false,
|
|
@@ -85,7 +85,9 @@ export const createTableStore = (initData: {
|
|
|
85
85
|
return `${indent}ch`
|
|
86
86
|
})
|
|
87
87
|
|
|
88
|
-
const zeroColumn = computed(() =>
|
|
88
|
+
const zeroColumn = computed(() =>
|
|
89
|
+
config.value.view ? ['list', 'tree', 'list-expansion'].includes(config.value.view) : false
|
|
90
|
+
)
|
|
89
91
|
|
|
90
92
|
// actions
|
|
91
93
|
const getCellData = <T = any>(colIndex: number, rowIndex: number): T => table.value[`${colIndex}:${rowIndex}`]
|
|
@@ -113,7 +115,7 @@ export const createTableStore = (initData: {
|
|
|
113
115
|
const getHeaderCellStyle = (column: TableColumn): CSSProperties => ({
|
|
114
116
|
minWidth: column.width || '40ch',
|
|
115
117
|
textAlign: column.align || 'center',
|
|
116
|
-
width: config.value.fullWidth ? 'auto' :
|
|
118
|
+
width: config.value.fullWidth ? 'auto' : undefined,
|
|
117
119
|
})
|
|
118
120
|
|
|
119
121
|
const isRowVisible = (rowIndex: number) => {
|