mirror of
https://github.com/Kuingsmile/PicList.git
synced 2026-05-25 18:20:24 +08:00
✨ Feature: add new config item to skip resizing small pictures
ISSUES CLOSED: #81
This commit is contained in:
@@ -1376,6 +1376,26 @@
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="compressForm.isReSize && compressForm.reSizeHeight > 0 && compressForm.reSizeWidth === 0"
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_HEIGHT')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="compressForm.skipReSizeOfSmallImg"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="compressForm.isReSize && compressForm.reSizeWidth > 0 && compressForm.reSizeHeight === 0"
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_WIDTH')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="compressForm.skipReSizeOfSmallImg"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_ISRESIZEBYPERCENT')"
|
||||
>
|
||||
@@ -1523,6 +1543,7 @@ async function initForm () {
|
||||
compressForm.reSizeWidth = compress.reSizeWidth ?? 500
|
||||
compressForm.reSizeHeight = compress.reSizeHeight ?? 500
|
||||
compressForm.isReSizeByPercent = compress.isReSizeByPercent ?? false
|
||||
compressForm.skipReSizeOfSmallImg = compress.skipReSizeOfSmallImg ?? false
|
||||
compressForm.reSizePercent = compress.reSizePercent ?? 50
|
||||
compressForm.isRotate = compress.isRotate ?? false
|
||||
compressForm.rotateDegree = compress.rotateDegree ?? 0
|
||||
|
||||
@@ -327,6 +327,26 @@
|
||||
:min="0"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="compressForm.isReSize && compressForm.reSizeHeight > 0 && compressForm.reSizeWidth === 0"
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_HEIGHT')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="compressForm.skipReSizeOfSmallImg"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
v-show="compressForm.isReSize && compressForm.reSizeWidth > 0 && compressForm.reSizeHeight === 0"
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_WIDTH')"
|
||||
>
|
||||
<el-switch
|
||||
v-model="compressForm.skipReSizeOfSmallImg"
|
||||
active-color="#13ce66"
|
||||
inactive-color="#ff4949"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item
|
||||
:label="$T('UPLOAD_PAGE_IMAGE_PROCESS_ISRESIZEBYPERCENT')"
|
||||
>
|
||||
@@ -440,6 +460,7 @@ const compressForm = reactive<any>({
|
||||
isReSize: false,
|
||||
reSizeWidth: 500,
|
||||
reSizeHeight: 500,
|
||||
skipReSizeOfSmallImg: false,
|
||||
isReSizeByPercent: false,
|
||||
reSizePercent: 50,
|
||||
isRotate: false,
|
||||
@@ -467,6 +488,7 @@ async function initData () {
|
||||
compressForm.isReSize = compress.isReSize ?? false
|
||||
compressForm.reSizeWidth = compress.reSizeWidth ?? 500
|
||||
compressForm.reSizeHeight = compress.reSizeHeight ?? 500
|
||||
compressForm.skipReSizeOfSmallImg = compress.skipReSizeOfSmallImg ?? false
|
||||
compressForm.isReSizeByPercent = compress.isReSizeByPercent ?? false
|
||||
compressForm.reSizePercent = compress.reSizePercent ?? 50
|
||||
compressForm.isRotate = compress.isRotate ?? false
|
||||
|
||||
2
src/universal/types/i18n.d.ts
vendored
2
src/universal/types/i18n.d.ts
vendored
@@ -117,6 +117,8 @@ interface ILocales {
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_ISRESIZE: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_RESIZEWIDTH: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_RESIZEHEIGHT: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_HEIGHT: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_SKIPRESIZEOfSMALLIMG_WIDTH: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_ISRESIZEBYPERCENT: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_RESIZEPERCENT: string
|
||||
UPLOAD_PAGE_IMAGE_PROCESS_ISROTATE: string
|
||||
|
||||
Reference in New Issue
Block a user