fix: version display and comparison issues
- Remove duplicate 'v' prefix in version display - Add version string cleanup (trim spaces, remove v/V prefix) - Use custom download URL when set - Fix has_update logic for same version comparison Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,10 @@ export function getColumns(options: ColumnOptions, t: (key: string) => string):
|
||||
accessorKey: 'version',
|
||||
header: () => t('admin.versions.columns.version'),
|
||||
cell: ({ row }) => {
|
||||
return h('code', { class: 'text-sm bg-muted px-2 py-1 rounded' }, `v${row.original.version}`)
|
||||
const version = row.original.version
|
||||
// 如果版本号本身已经有 v 前缀,则不再添加
|
||||
const displayVersion = version.startsWith('v') || version.startsWith('V') ? version : `v${version}`
|
||||
return h('code', { class: 'text-sm bg-muted px-2 py-1 rounded' }, displayVersion)
|
||||
},
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user