Methods
install(Vue, optionsopt)
又拍云图片处理工具注册函数
处理规则请参考又拍云文档
若想针对某个值使用默认值,则传入null值即可
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
Vue |
Vue | Vue类 |
|||||||||||||||||||||||||||||||||||||||||||||||
options |
object |
<optional> |
{}
|
配置选项 Properties
|
image-format(src, sizeOrConfigopt, scaleopt, nullable, formatopt, nullable, qualityopt, nullable, rulesopt)
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格式图片时的压缩质量 |
rules |
string | object |
<optional> |
''
|
又拍云图片处理的的其他规则,注意,如果它是一个字符串格式是,那么它必须是采用 |