mirror of
https://github.com/the1812/Bilibili-Evolved.git
synced 2025-11-04 21:22:45 +08:00
29 lines
675 B
TypeScript
29 lines
675 B
TypeScript
import {
|
|
defineComponentMetadata,
|
|
defineOptionsMetadata,
|
|
OptionsOfMetadata,
|
|
} from '@/components/define'
|
|
import { startResolution } from './resolution'
|
|
|
|
const options = defineOptionsMetadata({
|
|
scale: {
|
|
displayName: '缩放级别',
|
|
defaultValue: 'auto',
|
|
},
|
|
originalImageInArticles: {
|
|
displayName: '在专栏中请求原图',
|
|
defaultValue: false,
|
|
},
|
|
})
|
|
|
|
export type Options = OptionsOfMetadata<typeof options>
|
|
|
|
export const component = defineComponentMetadata({
|
|
name: 'imageResolution',
|
|
displayName: '高分辨率图片',
|
|
tags: [componentsTags.utils],
|
|
enabledByDefault: window.devicePixelRatio > 1,
|
|
entry: startResolution,
|
|
options,
|
|
})
|