Methods
install(Vue, options)
- Source:
- Since:
- 2.0.0
又拍云图片处理工具注册函数
处理规则请参考又拍云文档
若想针对某个值使用默认值,则传入null值即可
Parameters:
| Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vue |
Vue | Vue类 |
|||||||||||||||||||||||||||||||||||||||||||||||||||
options |
object |
{}
|
配置选项 Properties
|
image-format(src, sizeOrConfigopt, scaleopt, nullable, formatopt, nullable, qualityopt, nullable, otherRulesopt) → {string}
- Source:
- Since:
- 2.0.0
vue过滤器:image-format
Parameters:
| Name | Type | Attributes | Default | Description |
|---|---|---|---|---|
src |
string | 图片地址,第一个参数vue组件会自动传入,无须管理 |
||
sizeOrConfig |
number | string | object |
<optional> |
裁剪尺寸,取设计稿中的尺寸即可,该值如果是一个字典格式的配置对象,则会其他参数选项的值 |
|
scale |
string |
<optional> <nullable> |
'both'
|
缩放方式 |
format |
string |
<optional> <nullable> |
图片格式化,系统会根据多种情况来最终确定该值的默认值 |
|
quality |
number |
<optional> <nullable> |
90
|
若输出jpg格式图片时的压缩质量 |
otherRules |
string | object |
<optional> |
''
|
又拍云图片处理的的其他规则,注意,如果它是一个字符串格式是,那么它必须是采用 |
Returns:
- Type
- string
(async) checkWebpFeatures(feature) → {Promise}
- Source:
- Since:
- 1.0.0
检测webp特性的支持程度
Parameters:
| Name | Type | Description |
|---|---|---|
feature |
string | 特性值 |
Returns:
- Type
- Promise