mirror of
https://gitee.com/vant-contrib/vant.git
synced 2025-04-06 03:57:59 +08:00
fix(Image): ImagePosition type is not exported before (#12549)
This commit is contained in:
parent
7b1a4fc0a7
commit
dbf8027c2d
@ -64,6 +64,7 @@
|
|||||||
"@vitest/coverage-istanbul": "^1.1.3",
|
"@vitest/coverage-istanbul": "^1.1.3",
|
||||||
"@vue/runtime-core": "^3.4.0-rc.1",
|
"@vue/runtime-core": "^3.4.0-rc.1",
|
||||||
"@vue/test-utils": "^2.3.2",
|
"@vue/test-utils": "^2.3.2",
|
||||||
|
"csstype": "^3.1.3",
|
||||||
"diffable-html": "^5.0.0",
|
"diffable-html": "^5.0.0",
|
||||||
"jsdom": "^22.1.0",
|
"jsdom": "^22.1.0",
|
||||||
"typescript": "^5.0.4",
|
"typescript": "^5.0.4",
|
||||||
|
@ -29,15 +29,8 @@ import { Icon } from '../icon';
|
|||||||
|
|
||||||
const [name, bem] = createNamespace('image');
|
const [name, bem] = createNamespace('image');
|
||||||
|
|
||||||
export type ImageFit = 'contain' | 'cover' | 'fill' | 'none' | 'scale-down';
|
// Types
|
||||||
|
import type { ImageFit, ImagePosition } from './types';
|
||||||
export type ImagePosition =
|
|
||||||
| 'center'
|
|
||||||
| 'top'
|
|
||||||
| 'right'
|
|
||||||
| 'bottom'
|
|
||||||
| 'left'
|
|
||||||
| string;
|
|
||||||
|
|
||||||
export const imageProps = {
|
export const imageProps = {
|
||||||
src: String,
|
src: String,
|
||||||
|
@ -4,8 +4,8 @@ import _Image from './Image';
|
|||||||
export const Image = withInstall(_Image);
|
export const Image = withInstall(_Image);
|
||||||
export default Image;
|
export default Image;
|
||||||
export { imageProps } from './Image';
|
export { imageProps } from './Image';
|
||||||
export type { ImageFit, ImageProps } from './Image';
|
export type { ImageProps } from './Image';
|
||||||
export type { ImageThemeVars } from './types';
|
export type { ImageFit, ImagePosition, ImageThemeVars } from './types';
|
||||||
|
|
||||||
declare module 'vue' {
|
declare module 'vue' {
|
||||||
export interface GlobalComponents {
|
export interface GlobalComponents {
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
import type { CSSProperties } from 'vue';
|
||||||
|
|
||||||
|
export type ImageFit = CSSProperties['objectFit'];
|
||||||
|
|
||||||
|
export type ImagePosition = CSSProperties['objectPosition'];
|
||||||
|
|
||||||
export type ImageThemeVars = {
|
export type ImageThemeVars = {
|
||||||
imagePlaceholderTextColor?: string;
|
imagePlaceholderTextColor?: string;
|
||||||
imagePlaceholderFontSize?: string;
|
imagePlaceholderFontSize?: string;
|
||||||
|
@ -3,7 +3,7 @@
|
|||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"allowJs": true,
|
"allowJs": true,
|
||||||
"noImplicitThis": true,
|
"noImplicitThis": true,
|
||||||
"types": ["vitest/globals", "vue/jsx"]
|
"types": ["vitest/globals", "vue/jsx", "csstype"]
|
||||||
},
|
},
|
||||||
"include": ["src/**/*", "docs/**/*", "test/**/*"],
|
"include": ["src/**/*", "docs/**/*", "test/**/*"],
|
||||||
"exclude": ["**/node_modules", "**/.*/"]
|
"exclude": ["**/node_modules", "**/.*/"]
|
||||||
|
3
pnpm-lock.yaml
generated
3
pnpm-lock.yaml
generated
@ -100,6 +100,9 @@ importers:
|
|||||||
'@vue/test-utils':
|
'@vue/test-utils':
|
||||||
specifier: ^2.3.2
|
specifier: ^2.3.2
|
||||||
version: 2.4.1(vue@3.4.0-rc.1)
|
version: 2.4.1(vue@3.4.0-rc.1)
|
||||||
|
csstype:
|
||||||
|
specifier: ^3.1.3
|
||||||
|
version: 3.1.3
|
||||||
diffable-html:
|
diffable-html:
|
||||||
specifier: ^5.0.0
|
specifier: ^5.0.0
|
||||||
version: 5.0.0
|
version: 5.0.0
|
||||||
|
Loading…
x
Reference in New Issue
Block a user