forked from IDuxFE/idux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(comp:image): add image and imageViewer components
fix IDuxFE#698
- Loading branch information
Showing
39 changed files
with
1,230 additions
and
503 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 6 additions & 38 deletions
44
packages/components/image/__tests__/__snapshots__/image.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,11 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Image render alt work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"demo\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render height work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render objectFit work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render preview work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img ix-image-preview-is\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 200px; height: 200px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render src work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render width work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"https://cdn.jsdelivr.net/gh/danranvm/image-hosting/images/idux.jpg\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
</div>" | ||
`; | ||
exports[`Image render work 1`] = ` | ||
"<div class=\\"ix-image\\"><img class=\\"ix-image-img\\" src=\\"\\" style=\\"width: 100px; height: 100px; object-fit: fill;\\" alt=\\"\\"> | ||
<!--v-if--> | ||
"<div class=\\"ix-image ix-image-loading ix-image-preview\\"> | ||
<div class=\\"ix-image-layer\\"> | ||
<!----><i class=\\"ix-icon ix-icon-loading ix-icon-spin ix-image-placeholder\\" role=\\"img\\" aria-label=\\"loading\\"></i> | ||
<!----> | ||
<!----> | ||
</div><img src=\\"/icons/logo.svg\\" class=\\"ix-image-inner ix-image-inner-hidden\\"> | ||
</div>" | ||
`; |
3 changes: 3 additions & 0 deletions
3
packages/components/image/__tests__/__snapshots__/imageViewer.spec.ts.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`ImageViewer render work 1`] = `"<!---->"`; |
Oops, something went wrong.