-
Notifications
You must be signed in to change notification settings - Fork 1.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(image): add can-preview & on-load prop and add loading & errorbox slot #1714
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/tusimple/naive-ui/5nuAMd1mJSErsb5waTBBDeiUdEsB |
@@ -20,10 +22,19 @@ group | |||
| img-props | `object` | `undefined` | The props of the img element inside the component. | | |||
| object-fit | `'fill' \| 'contain' \| 'cover' \| 'none' \| 'scale-down'` | `fill` | Object-fit type of the image in the container. | | |||
| preview-src | `string` | `undefined` | Source of preview image. | | |||
| can-preview | `boolean` | `true` | Whether clicking image preview is allowed. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API 措辞不太好, 叫 previewed ? 或者 has-preview ? @07akioni
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
preview-disabled
@@ -0,0 +1,71 @@ | |||
# 加载图片 | |||
|
|||
仅仅只是演示加载效果,在图片加载的时候组件会自动显示加载的效果,`不推荐`直接修改 showLoadIng 属性,除非你很明确知道你在做什么! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
仅仅只是演示加载效果,在图片加载的时候组件会自动显示加载的效果,`不推荐`直接修改 showLoadIng 属性,除非你很明确知道你在做什么! | |
仅仅只是演示加载效果,在图片加载的时候组件会自动显示加载的效果,**不推荐** 直接修改 showLoadIng 属性,除非你很明确知道你在做什么! |
`` 仅在 code 或 API 下使用,英文文档同
Codecov Report
@@ Coverage Diff @@
## main #1714 +/- ##
==========================================
+ Coverage 64.76% 64.79% +0.03%
==========================================
Files 886 886
Lines 17217 17249 +32
Branches 4075 4086 +11
==========================================
+ Hits 11150 11176 +26
- Misses 5300 5302 +2
- Partials 767 771 +4
Continue to review full report at Codecov.
|
|
| activeColor | `string` | `undefined` | Background of checked state. | | ||
| inactiveColor | `string` | `undefined` | Background of unchecked state. | | ||
| activeButtonColor | `string` | `undefined` | Button background of checked state. | | ||
| inactiveButtonColor | `string` | `undefined` | Button background of unchecked state. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
文档里都用 kebab case
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
还有按照字母顺序
close #1647