fix: align table defaults and preserve sidebar svg colors

This commit is contained in:
IanShaw027
2026-04-10 18:27:53 +08:00
parent 7dc7ff22d2
commit f480e57344
10 changed files with 40 additions and 17 deletions

View File

@@ -52,7 +52,7 @@ Pagination component with page numbers, navigation, and page size selector.
- `total: number` - Total number of items
- `page: number` - Current page (1-indexed)
- `pageSize: number` - Items per page
- `pageSizeOptions?: number[]` - Available page size options (default: [10, 20, 50])
- `pageSizeOptions?: number[]` - Available page size options (default: [10, 20, 50, 100])
**Events:**

View File

@@ -669,11 +669,14 @@ onMounted(() => {
opacity: 0;
}
/* Custom SVG icon in sidebar: inherit color, constrain size */
/* Custom SVG icon in sidebar: constrain size without overriding uploaded SVG colors */
.sidebar-svg-icon {
color: currentColor;
}
.sidebar-svg-icon :deep(svg) {
display: block;
width: 1.25rem;
height: 1.25rem;
stroke: currentColor;
fill: none;
}
</style>

View File

@@ -0,0 +1,18 @@
import { readFileSync } from 'node:fs'
import { dirname, resolve } from 'node:path'
import { fileURLToPath } from 'node:url'
import { describe, expect, it } from 'vitest'
const componentPath = resolve(dirname(fileURLToPath(import.meta.url)), '../AppSidebar.vue')
const componentSource = readFileSync(componentPath, 'utf8')
describe('AppSidebar custom SVG styles', () => {
it('does not override uploaded SVG fill or stroke colors', () => {
expect(componentSource).toContain('.sidebar-svg-icon {')
expect(componentSource).toContain('color: currentColor;')
expect(componentSource).toContain('display: block;')
expect(componentSource).not.toContain('stroke: currentColor;')
expect(componentSource).not.toContain('fill: none;')
})
})