feat: core facade f-enum add ImageSourceType (#7202)

This commit is contained in:
wpxp123456
2026-07-06 21:21:35 +08:00
committed by GitHub
parent 14bb4b0578
commit 600eaf2b62
2 changed files with 14 additions and 7 deletions
+13 -1
View File
@@ -16,7 +16,7 @@
/* eslint-disable ts/explicit-function-return-type */
import { AbsoluteRefType, AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
import { AbsoluteRefType, AutoFillSeries, BaselineOffset, BooleanNumber, BorderStyleTypes, BorderType, ColorType, CommandType, CommonHideTypes, CopyPasteType, DataValidationErrorStyle, DataValidationOperator, DataValidationRenderMode, DataValidationStatus, DataValidationType, DeleteDirection, DeveloperMetadataVisibility, Dimension, Direction, HorizontalAlign, ImageSourceType, InterpolationPointType, LifecycleStages, LocaleType, MentionType, ProtectionType, RelativeDate, SheetTypes, TextDecoration, TextDirection, ThemeColorType, UniverInstanceType, VerticalAlign, WrapStrategy } from '@univerjs/core';
/**
* @hideconstructor
@@ -458,4 +458,16 @@ export class FEnum {
get ThemeColorType() {
return ThemeColorType;
}
/**
* Image source types
*
* @example
* ```ts
* console.log(univerAPI.Enum.ImageSourceType.URL);
* ```
*/
get ImageSourceType() {
return ImageSourceType;
}
}
+1 -6
View File
@@ -14,7 +14,7 @@
* limitations under the License.
*/
import { DrawingTypeEnum, ImageSourceType } from '@univerjs/core';
import { DrawingTypeEnum } from '@univerjs/core';
import { FEnum } from '@univerjs/core/facade';
import { SheetDrawingAnchorType } from '@univerjs/sheets-drawing';
@@ -25,9 +25,6 @@ export interface IFSheetsDrawingEnumMixin {
/** Please refer to {@link DrawingTypeEnum}. */
DrawingType: typeof DrawingTypeEnum;
/** Please refer to {@link ImageSourceType}. */
ImageSourceType: Omit<typeof ImageSourceType, 'UUID'>;
/** Please refer to {@link SheetDrawingAnchorType}. */
SheetDrawingAnchorType: typeof SheetDrawingAnchorType;
}
@@ -35,8 +32,6 @@ export interface IFSheetsDrawingEnumMixin {
export class FSheetsDrawingEnumMixin extends FEnum implements IFSheetsDrawingEnumMixin {
override get DrawingType(): typeof DrawingTypeEnum { return DrawingTypeEnum; };
override get ImageSourceType(): Omit<typeof ImageSourceType, 'UUID'> { return ImageSourceType; };
override get SheetDrawingAnchorType(): typeof SheetDrawingAnchorType { return SheetDrawingAnchorType; };
}