mirror of
https://gitee.com/dcloud/opendb.git
synced 2024-12-26 22:41:15 +08:00
fix: uni-media-library schema.ext.js
This commit is contained in:
parent
9f8999547d
commit
933a15f1b3
@ -32,10 +32,11 @@ function getOssProcessUrls (url) {
|
|||||||
if (!url) return urls
|
if (!url) return urls
|
||||||
|
|
||||||
const cropRules = getImageCropRule(url)
|
const cropRules = getImageCropRule(url)
|
||||||
|
const cropMediaAssetsConfig = config.cropMediaAssets || false
|
||||||
|
|
||||||
for (const key in cropRules) {
|
for (const key in cropRules) {
|
||||||
// webp 格式不支持缩略图
|
// webp 格式不支持缩略图
|
||||||
if (/.webp/.test(url) || !config.cropMediaAssets) {
|
if (/.webp/.test(url) || !cropMediaAssetsConfig) {
|
||||||
urls[key] = url
|
urls[key] = url
|
||||||
} else {
|
} else {
|
||||||
urls[key] = url + cropRules[key]
|
urls[key] = url + cropRules[key]
|
||||||
|
Loading…
Reference in New Issue
Block a user