Security News
ESLint is Now Language-Agnostic: Linting JSON, Markdown, and Beyond
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
nuke-image
Advanced tools
在 native 端对 image 标签封装,在 web 端使用 img 完成适配。
** 注意,在 native 端,图片必须声明宽高才能绘制,否则无法展现。**
属性配置 | 说明 | 类型 | 默认值 |
---|---|---|---|
source | 格式 {uri:"xxx"} | object | |
src | url string | string | |
style | 必须写宽高,否则无法渲染 | object | |
resizeMode | 组件尺寸和图片尺寸不成比例的时候如何调整图片的大小 | 枚举类型,可选 contain cover stretch | stretch |
onLoad | 图片 onLoad 方法,其中 e.size 可返回图片真实宽高 | function(e) | |
quality | 是否无损,凡是 alicdn 的图片地址,默认开启压缩,如果 quality 设置为 original,则不压缩图片 | function(e) |
图片 url
<Image source={{uri:"https://via.placeholder.com/350x150"}} style={{width:350,height:150}} quality="original"/>
resizeMode 释义
例:
<Image source={{uri:"https://gd2.alicdn.com/imgextra/i2/413996455/TB2tNcJbd0opuFjSZFxXXaDNVXa_!!413996455.jpg"}} quality ="original"/>
FAQs
We found that nuke-image demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
ESLint has added JSON and Markdown linting support with new officially-supported plugins, expanding its versatility beyond JavaScript.
Security News
Members Hub is conducting large-scale campaigns to artificially boost Discord server metrics, undermining community trust and platform integrity.
Security News
NIST has failed to meet its self-imposed deadline of clearing the NVD's backlog by the end of the fiscal year. Meanwhile, CVE's awaiting analysis have increased by 33% since June.