mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-06 20:42:57 +08:00
✨ Feature(custom): add longEdgeAsHeight setting for resize
This commit is contained in:
@@ -766,7 +766,45 @@
|
||||
|
||||
<SettingCard
|
||||
v-if="
|
||||
((activeForm.compress.reSizeHeight || 0) > 0 && (activeForm.compress.reSizeWidth || 0) === 0) ||
|
||||
activeForm.compress.isReSize &&
|
||||
(activeForm.compress.reSizeHeight || 0) > 0 &&
|
||||
(activeForm.compress.reSizeWidth || 0) === 0
|
||||
"
|
||||
class="flex flex-col justify-center"
|
||||
>
|
||||
<CustomSwitch
|
||||
v-model="activeForm.compress.longEdgeAsHeight"
|
||||
:title="t('pages.imageProcess.transform.longEdgeAsHeight')"
|
||||
class="custom-switch"
|
||||
no-border
|
||||
small
|
||||
/>
|
||||
|
||||
<PerPicbedSetting
|
||||
v-if="!configId"
|
||||
:map-field="compressForm.longEdgeAsHeightMap"
|
||||
:default-value="defaultCompressSetting.longEdgeAsHeight"
|
||||
field-name="longEdgeAsHeight"
|
||||
:global-value="compressForm.longEdgeAsHeight"
|
||||
input-type="checkbox"
|
||||
@map-change="
|
||||
(picbedType, value) =>
|
||||
safeSetMapValue(
|
||||
compressForm,
|
||||
'longEdgeAsHeight',
|
||||
picbedType,
|
||||
value,
|
||||
defaultCompressSetting.longEdgeAsHeight,
|
||||
)
|
||||
"
|
||||
/>
|
||||
</SettingCard>
|
||||
|
||||
<SettingCard
|
||||
v-if="
|
||||
(activeForm.compress.isReSize &&
|
||||
(activeForm.compress.reSizeHeight || 0) > 0 &&
|
||||
(activeForm.compress.reSizeWidth || 0) === 0) ||
|
||||
((activeForm.compress.reSizeWidth || 0) > 0 && (activeForm.compress.reSizeHeight || 0) === 0)
|
||||
"
|
||||
class="flex flex-col justify-center"
|
||||
@@ -1139,6 +1177,7 @@ const defaultCompressSetting = {
|
||||
skipReSizeOfSmallImg: false,
|
||||
isReSizeByPercent: false,
|
||||
reSizePercent: 50,
|
||||
longEdgeAsHeight: false,
|
||||
isRotate: false,
|
||||
rotateDegree: 0,
|
||||
isRemoveExif: false,
|
||||
@@ -1173,6 +1212,7 @@ const compressForm = ref<IBuildInCompressOptions>({
|
||||
skipReSizeOfSmallImgMap: {},
|
||||
isReSizeByPercentMap: {},
|
||||
reSizePercentMap: {},
|
||||
longEdgeAsHeightMap: {},
|
||||
isRotateMap: {},
|
||||
rotateDegreeMap: {},
|
||||
isRemoveExifMap: {},
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
"isResizeByPercent": "Enable Resize by Percentage",
|
||||
"isResizeByPercentHint": "Higher priority",
|
||||
"isRotate": "Enable Rotation",
|
||||
"longEdgeAsHeight": "Long Edge as Height",
|
||||
"percentageResize": "Resize by Percentage",
|
||||
"resizeDescription": "Set image scaling parameters",
|
||||
"resizeHeight": "Resize Height (0 means scale by width)",
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
"isResizeByPercent": "启用按比例调整",
|
||||
"isResizeByPercentHint": "优先级更高",
|
||||
"isRotate": "启用旋转",
|
||||
"longEdgeAsHeight": "长边作为高度",
|
||||
"percentageResize": "按比例调整尺寸",
|
||||
"resizeDescription": "设置图片缩放参数",
|
||||
"resizeHeight": "调整高度 (0 表示按宽度等比缩放)",
|
||||
|
||||
@@ -180,6 +180,7 @@
|
||||
"isResizeByPercent": "啟用按比例調整",
|
||||
"isResizeByPercentHint": "優先級更高",
|
||||
"isRotate": "啟用旋轉",
|
||||
"longEdgeAsHeight": "長邊作為高度",
|
||||
"percentageResize": "按比例調整尺寸",
|
||||
"resizeDescription": "設置圖片縮放參數",
|
||||
"resizeHeight": "調整高度 (0 表示按寬度等比縮放)",
|
||||
|
||||
Reference in New Issue
Block a user